How to get rid of the file manager preinstalled app

I assume you defined the stock file manager as default app. In the settings under Apps you should find a lisiting with default applications. When you click in the file manager App in this list, you should then see a small list with all file manager installed and change the default one.

I did look at the list and have no such app set as default, so I didn’t mention it. It will be good to find out if that has been set on @mpolito1969 phone.

I tried with the “Default apps” settings also but I can’t find any application having a name that makes me think it’s a file manager.

Currently I only have 6 categories of actions I can link default apps to and they are:

Assist app (now set to Google)
Browser app (now set to Adblock Browser)
Caller ID & spam app (Phone)
Home app (Quickstep)
Phone app (Phone)
SMS app (Messages)

As you can see nothing related to what app to use for file system browsing.

Ciao,
Max

1 Like

Exactly the same as I have ?? (Except :- Firefox as browser)

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