Remove unwanted apps from older Android OS

Some time ago, after an (un ?) fortunate chain of events, I got my hands on an Alcatel Pixi 8079 – which has really-really low performance. This is why some of the preinstalled apps need to go.

The problem is that some applications simply cannot simply be uninstalled. ADB provides a method to uninstall apps. One such application is Facebook.

Prerequisites

  • Install ADB on your computer
    To install ADB on your computer, follow the steps in the tutorial here.
  • Identify versions
    Use App Inspector to identify which programs you want uninstalled.

Uninstall an app

  1. Enable USB debugging and allow the debugging connection;
  2. Open a terminal;
  3. adb devices to see the available devices;
  4. Use App inspector to find the version of the app you want to uninstall – in our case it’s the Facebook app;
  5. adb shell pm list users
    View the list of users – this is not a mandatory step, but everything is ok if you see the user 0 (zero)
  6. adb shell pm uninstall -k --user 0 com.facebook.katana
    This is the uninstall command for the Facebook app identified on the Pixi tablet

Various commands

These are random commands ran in the terminal of a MacOS operating system. If ran on other operating system, some tweaks might be needed:

  • adb shell pm list packages | grep alcatel | sed -n 's/^package:*//p'
    List all packages with alcatel in their name and without the package: prefix.
  • adb shell pm list packages | grep alcatel | sed -n 's/^package:*//p' | xargs -n1 echo hey: $1
    This does the same as the above, but for each line it runs the echo command.

Sources