How to get rid of the file manager preinstalled app

Rooting the phone is not necessary to use ADB and to uninstall preinstalled Apps via ADB :wink: .

3 Likes

When I open a WA chat and want to attach something, then select document a list with docs I recently used will open. When I then click on browse other files it looks that way for me, i.e. I can choose which application I want use and can select always or just once.


When I want to attach a document to an email (I use K9 Mail), a window opens (I think its the pre-installed file viewer/manager) and when I then open the menu on the left (3 lines) and scroll down I can select the other file manager I have installed.

Of this all does not work, you can always select the document in the file manager and select share and then select application to be used to share, like mail or WA.
all just Workarounds, however you should be able to select what application to use to browse for the file to be attached. Also with Lineage on the FP2 its not possible to deactivate the pre-installed file manager app, so looks as if there would be reason for this. Also reading through the post linked above I understand that running that script would not remove the file manager.

Look who appeared: The author of the debloat script.
You can remove the file manager by executing:

adb shell pm uninstall -k --user 0 com.google.android.documentsui

If that doesnt work try:

adb shell pm uninstall -k --user 0 com.android.documentsui
1 Like

Thanks ADS (Author of the Debloat Script)!

By the way… I had already read your post about that script. I guess I could just copy and paste your lines and solve the problem but I’m interested in better understanding the possibility of “making maintenance” to my phone through adb. Can you point me to a good source of information?

I’ve used once adb (logcat) from my Linux box while trying to understand why my phone kept rebooting and I had the feeling there are a lot of interesting things that could be done through adb. I know there is a lot of good documentation about it I could start from, the problem isv in the “a lot” part :slight_smile:

Ciao,
Max

Hello there,
to be honest, I don’t really use adb except for the basic stuff like rebooting my phone, sideloading stuff and removing/installing apps. I would suggest you rading the official Android Developers page, although it might be a bit hard to understand:

Best regards,
Jan

1 Like

I’ll have a look.

Thanks.

One more question, how do you know the name of the package to be removed?

com.google.android.documentsui doesn’t look like “file manager”.

Just in case I want to remove something else.

Ciao,
Max

In my opinion, the Total Commander file manager is the first choice for file managers on Android. Stable, two file windows side by side and so much more. Once you know it, you don’t want any other.

https://www.ghisler.com/index.htm

1 Like

I think you have the correct package, juts ensure you can re-install it in case it does more that be available for other apps to access files.

https://gossipfunda.com/com-android-documentsui/

Try Package Names Viewer 2.0:
From the Spy Store:

Or if you goin’ degoogled:

1 Like

I don’t use Fairphone OS currently, so I can’t check, but there’s a chance you can see the package name of an App in Settings - Apps & notifications - (select your App) - (scroll to the bottom of the page, or tap “Advanced” and scroll to the bottom of the page).

Else … here’s a post from a while back including a list of some preinstalled packages and what they are … Google Apps keep reinstalling/ reactivating - #34 by AnotherElk

No, you can’t see the package name in Settings but “Package Names Viewer” works perfectly.

Thanks again.

Ciao,
Max

1 Like

Its a LineageOS feature sadly

1 Like

@JBNCK I’m doing some tests to better understand the way “adb shell pm” works.

Before trying to uninstall the system preinstalled file system explorer I’d try to disable it and so I started making test with “adb pm enable” and “adb pm disable”.

I tried to enable the Faircom app that I had previously disabled using the system “setting” app.

pm enable com.fairphone.myfairphone

It worked as expected, the app reappeared in my list of available apps.

Then I tried to disable it again by running

pm disable com.fairphone.myfairphone

This time I had a Java runtime error:

Security exception: Shell cannot change component state for com.fairphone.myfairphone/null to 2

However, I can still disable it using the shortcut “app info” that appears when I tap on it.

I tried to restart the server through

adb kill-server
adb shell

but it didn’t solved the problem.

Apparently I can enable an app through “adb pm” but not disabling it.

Can you understand what happened?

Thanks.

Ciao,
Max

Try pm disable-user --user 0 com.fairphone.myfairphone

1 Like

It worked, now it reads:

Package com.fairphone.myfairphone new state: disabled-user

and the app is no longer visible in the app panel.

According to “pm list users” there is only one user, user 0, and it’s me. So what’s the difference between “pm disable” and “pm disable-user --user 0”?

The former disables the App, and it seems the user is not allowed to do this by default. The internet tells me the ADB shell needs root for this (perhaps a case for Android OSes which let you root the ADB shell via Rooted debugging without rooting the whole system).

The latter reads like it would instead disable the user for the App, which in practice disables the App for the user, and apparently the user is allowed to do this.

2 Likes

Thanks guys, I solved the problem using

pm disable-user --user 0  com.google.android.documentsui

And I also succeeded in have it reappearing through

pm enable com.google.android.documentsui

Ciao,
Max

2 Likes

So I got rid of the preinstalled file manager app but I can’t get the SimpleTools one the default.

When I’m in WhatsApp and I try to attached a file the file explorer that opens is the internal one, WhatsApp’s one (which could be OK, the app chose to open its own) but if I click on the top WhatsApp line saying “Browse other docs” I get the error message “you may not have a proper app for viewing this content”. If I do the same thing when the preinstalled file browser is enabled I have WhatsApp starting the preinstalled file browser without complaining.

What I guess is that somewhere in the system it’s written which is the default app to be used for file browsing. I succeded in disabling the preinstalled app but I can’t tell the phone to use the other one.

Any help?

1 Like

Sorry that I didn’t reply that fast because school. It looks like the problem is solved though. Also, if you ever wanted to uninstall a system app (not only disable) you could do:

adb shell pm uninstall --user 0 packagename

And to reinstall:

adb shell pm install-existing packagename

If you are rooted, you could delete the application file via root explorer. It should be somewhere in one of these directories:

  • /system/app/
  • /system/priv-app/
  • /product/app/
  • /product/priv-app/
  • /vendor/app/

Uninstalling does a bit more than disabling and it can be handy sometimes.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.