Skip to content

Instantly share code, notes, and snippets.

Last active May 20, 2024 04:10
Show Gist options
  • Save teocci/8af2667b8457f31dd245c45cdda29808 to your computer and use it in GitHub Desktop.
Save teocci/8af2667b8457f31dd245c45cdda29808 to your computer and use it in GitHub Desktop.

Freezing and uninstalling non-removable Android apps in Developer mode

  1. Download and install Android SDK Platform-Tools on your computer. Of the tools inside, you’ll only need the Android Debug Bridge USB driver and the ADB command line.
  2. Enable Developer mode on your phone. The details vary slightly from vendor to vendor, but the general recipe is roughly the same: repeatedly tap the Build Number option in the About Phone.
  3. Enable USB Debugging under Developer Settings on your smartphone. There are multiple options there — but don’t touch any apart from these two!
  4. Connect your smartphone to your computer through USB.
  5. Allow Debug mode on your phone screen.
  6. Test Debug mode by getting a list of all packages (what developers call apps) installed on your phone. To do so, type the following in the ADB command line
adb shell pm list packages 
  1. The response will be a long list of packages installed on the phone, in which you need to find the name of the unwanted app. This might look something like facebook.katana or You can often (but not always) tell which app is which by their names.
  2. Freeze (disable) the unwanted app using the ADB command line. To do so, enter the command
adb shell pm disable-user --user 0 PACKAGENAME

where PACKAGENAME is the name of the unwanted app package. Different vendors may have different usernames (0 in our example), so check the correct PM command for your smartphone. As before, an online search helps out: “phone model + Debloat” or “phone model + ADB PM”.

  1. You can use developer commands to not only disable an app but also completely uninstall it. To do so, replace the previous command with:
adb shell pm uninstall --user 0 PACKAGENAME
  1. Restart your phone.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment