Android - Removing pre-installed applications with adb
Android phones and tablets come with pre-installed applications that can sometimes be uninstalled or at least disabled. However, disabling is not a proposed option for certain apps. But you can still uninstall them without rooting by using the command line tool Android Debug Bridge (adb).
Note that uninstalling via adb
does not prevent the device from receiving and installing official updates.
Also, keep in mind that with adb
, applications are not completely removed. They are only uninstalled
for the default user.
Installing adb on Ubuntu
We begin by installing ADB (Android Debug Bridge) with:
sudo apt-get install adb
adb
is installed, you can check its version with the following command:adb version
Android Debug Bridge version 1.0.41 Version 29.0.6-debian Installed as /usr/lib/android-sdk/platform-tools/adb
Of course, you can install adb
on Windows or Mac.
The following explanations remain valid for these environments.
Activating the developer mode and enabling USB debugging
Before using the command adb
the developer mode must be enabled on your device.
The procedure for activating Developer Mode can change depending on brands and models, see this page
Android Studio User Guide - Enable options for developers.
For Samsung tablets and smartphones go to Settings → About phone → Software information
and tap 7 times on the "Build number" field.
Then, enable USB Debugging. The activation process depends on the Android version of your device.
See this page Android Studio User Guide - Enable USB debugging on your device
(in our case, it's Settings → Developer options → USB Debugging
).
Using adb
After connecting your smartphone or tablet to the computer via USB, a message will appear
asking for permission to access the device data by the computer. Once you have granted this permission,
you can verify on your PC that the device is detected by adb
using the following command:
adb devices
* daemon not running; starting now at tcp:5037 * daemon started successfully List of devices attached RF6M430T52E deviceA message will appear on the device asking for permission to enable USB debugging. Choose "Authorize."
Now we can list all the packages present on the device using this command:
adb shell pm list packages
adb shell pm list packages | sort
package:android package:android.auto_generated_rro_vendor__ package:android.autoinstalls.config.samsung package:com.android.apps.tag package:com.android.backupconfirm package:com.android.bips package:com.android.bluetooth package:com.android.bluetoothmidiservice package:com.android.bookmarkprovider package:com.android.calllogbackup package:com.android.cameraextensions ... ...(to get the number of listed packages, execute the following command:
adb shell pm list packages | wc -l
)Now we will try to find all the pre-installed (or intentionally installed) Facebook packages.
To do that, filter the command adb shell pm list packages
with a grep
.
adb shell pm list packages | grep facebook
package:com.facebook.services package:com.facebook.katana package:com.facebook.system package:com.facebook.appmanagerThe uninstallation of a package is performed by the command:
adb shell pm uninstall -k --user 0 <nom_du_package>The four Facebook packages can be uninstalled using the following commands:
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
A useful list of adb
(Android Debug Bridge) commands is maintained in
this file on GitHub.
Removing of Bixby
Bixby is Samsung's intelligent personal assistant found on smartphones and tablets similar to
Siri from Apple.
On certain models, there's a dedicated Bixby button located on the left side below the volume keys.
On other models, it uses the power button for launching Bixby, which can lead to unintended launches.
However, you can disable or even uninstall Bixby via adb
. Here is how:
The command :
adb shell pm list packages | grep bixby
package:com.samsung.android.app.settings.bixby package:com.samsung.systemui.bixby2 package:com.samsung.android.bixby.service package:com.samsung.android.bixby.agent package:com.samsung.android.bixby.wakeupYou can then proceed to uninstall the packages one by one using the following commands:
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.wakeupAfter executing the above commands, pressing the Bixby button no longer has any effect on my phone which continues to work fine as before (which was also our goal!).
However, there remain two applications Bixby Routine and Bixby Vision with package names
that do not contain the word bixby
: "com.samsung.android.app.routines" and "com.samsung.android.visionintelligence".
You can uninstall them using these commands:
adb shell pm uninstall -k --user 0 com.samsung.android.app.routines adb shell pm uninstall -k --user 0 com.samsung.android.visionintelligence
Re-installing pre-installed apps that were removed
As stated above, only the user by default has their apps removed, but the packages are not deleted. Re-installing an app can be done with the command:
adb shell pm install-existing <nom_du_package>For example to reinstall Gmail app:
adb shell pm install-existing com.google.android.gm