Android: removing and managing built-in/bloatware applications with ADB

descriptionStandard

This article introduces the reader to how to uninstall packages from Android devices that cannot normally be uninstalled or disabled. I have provided some additional examples on how to utilise the ADB command line tool to perform other related package manager operations.

In the past I used to root my phone without hesitation, as one of the significant benefits to a rooted device is the ability to manage and interact with areas you wouldn’t normally be allowed to change. Take, for example, the built-in applications that manufacturers force upon their users. For many users these bundled application are not just undesired – they are never used. These bundled application not only take up space but can waste battery; for myself the latter point is my focus and the area that concerns me the most.

Previously I would have suggested rooting the device to gain the ability to truly control what is running or installed on the device. However I appreciate that not everyone wants a rooted device. I too no longer root my own Android device because I have methods to achieve the same or similar results.

Why would you want to remove an Application instead of just disabling it?

There can be several situations where uninstalling an package/application using ADB can be advantageous:

  • The ability to disable or remove installed applications is unavailable.
  • The application can only be disabled but not removed.
  • Disabling an application does not prevent it from starting up*.

This last point is alarming and to help clarify, read on. In most cases, disabling an application should prevent it from running, but this is not the case with the Facebook application on Android. The problem here is, despite disabling the application, once you restart your device 2 out of the 3 packages will report as running.

To track and record detailed battery statistics and consumption broken down by packages I used an application from NextApp, Inc. called SystemPanel 2. By using the statistics gathered by SystemPanel 2 I could see that Facebook’s application and its associated packages would continue to consume battery when disabled. The only way to prevent this would be to manually “force stop” them after every device restart.

Long story short, and I don’t know exactly how, but some applications abuse their “system app” state (looking at you Facebook). With this abuse they can somehow circumvent expected package behaviour such as the disabled state. I have attempted previously to raise this with Samsung who did nothing but make a note.

At the bottom I’ve provided a list of all the packages I don’t use on my device that I have uninstalled. By uninstalling these, you are removing the application from the user space on the device.

How does a non-rooted Android user disable built-in applications?

Firstly, I’ll introduce those unfamiliar with the Android Debug Bridge (ADB for short) to several commands we will be using to perform various operations on the devices.

You will need to have the Android SDK Platform tools installed to be able to use these commands. Windows, Linux and Mac variants are available.

In the table below you will find several commands with examples for scenarios such as: listing installed packages, how to uninstall or disable packages and finally how to reinstall built-in applications.

DescriptionCommand
List all packagesadb shell pm list packages
List disabled packagesThis command lists all disabled packages.
adb shell pm list packages -d
List enabled packagesadb shell pm list packages -e
Disable packagesadb shell pm disable-user --user 0 <package_to_disable>
Enable packagesFind the package name that corresponds to the app you want to enable. 
adb shell pm enable <package_to_enable>
Uninstall packagesNote that this on uninstall applications from user_mode:
adb shell pm uninstall -k --user 0 <package_to_disable>
Reinstall built-packages to userspaceadb shell cmd package install-existing <name of package>
ADB Shell example demonstrating how to interact with the package manager on the device.

Example packages removed from my own Samsung device

# Bixby
adb shell pm uninstall -k --user 0 com.samsung.android.bixby.es.globalaction
adb shell pm uninstall -k --user 0 com.samsung.android.bixby.plmsync
adb shell pm uninstall -k --user 0 com.samsung.android.app.settings.bixby
adb shell pm uninstall -k --user 0 com.samsung.systemui.bixby2
adb shell pm uninstall -k --user 0 com.samsung.android.bixby.service
adb shell pm uninstall -k --user 0 com.samsung.android.bixby.agent
adb shell pm uninstall -k --user 0 com.samsung.android.bixby.wakeup
adb shell pm uninstall -k --user 0 com.samsung.android.bixby.voiceinput
adb shell pm uninstall -k --user 0 com.samsung.android.bixby.agent.dummy
# Facebook
adb shell pm uninstall -k --user 0 com.facebook.services
adb shell pm uninstall -k --user 0 com.facebook.katana
adb shell pm uninstall -k --user 0 com.facebook.system
adb shell pm uninstall -k --user 0 com.facebook.appmanager
# Microsoft Office
adb shell pm uninstall -k --user 0 com.microsoft.office.powerpoint
adb shell pm uninstall -k --user 0 com.microsoft.office.excel
adb shell pm uninstall -k --user 0 com.microsoft.skydrive
adb shell pm uninstall -k --user 0 com.microsoft.rdc.android
adb shell pm uninstall -k --user 0 com.microsoft.office.word
adb shell pm uninstall -k --user 0 com.microsoft.office.powerpoint
# Other misc never used stuff...
adb shell pm uninstall -k --user 0 com.samsung.android.samsungpass
adb shell pm uninstall -k --user 0 com.samsung.android.samsungpassautofill
adb shell pm uninstall -k --user 0 com.samsung.android.widgetapp.yahooedge.finance
adb shell pm uninstall -k --user 0 com.samsung.android.widgetapp.yahooedge.sport
adb shell pm uninstall -k --user 0 com.linkedin.android
adb shell pm uninstall -k --user 0 com.samsung.android.app.spage
adb shell pm uninstall -k --user 0 com.samsung.android.visionintelligence
adb shell pm uninstall -k --user 0 com.sec.android.emergencylauncher
adb shell pm uninstall -k --user 0 com.sec.spp.push
adb shell pm uninstall -k --user 0 de.axelspringer.yana.zeropage
adb shell pm uninstall -k --user 0 com.sec.android.app.billing

Restoring removed packages

There are two methods to restore the applications:

  1. You can trigger re-installation of uninstalled packages through a simple ADB command.
  2. Or alternatively you can perform a factory reset which will restore the device to a out the box state; this measure is the more drastic.