Managing apps with ADB (and without root)

Often new phones, especially Samsung ones, come with a whole lot of bloatware, which usually cannot be uninstalled from within the phone. This could be circumvated by rooting your phone, essentially gaining full administrative control over the device, however this process can be somewhat involved and could cause issues.

A better solution is using the Android Debug Bridge (ADB), a developer tool with which you can more fluently control your device. Of course, you still won't get full control, but it is as close as it gets, without requiring any permanent and involved configurations.

If you're having trouble, XDA's article, as well as these maketecheasier articles go into more detail and show pictures.

Installing

Windows:

  1. Download the official platform tools from here
  2. Extract the files in a folder and navigate to it

Linux (or MacOS):

Opening a shell and connecting to your device

ADB is very powerfull, so by default phones don't allow you to connect to the device with it. First, we'll allow such a connection:

  1. Go to Settings/About phone (depending on your Android skin, this might be located in a slightly different place)
  2. Tap "Build number" 7 times, until a message says you're done
  3. Navigate to the Developer options, which is often in Settings/Developer options, but could also be inside the Settings/System menu
  4. Enable the "USB debugging option" (if a popup appears, click OK)

ADB is a command-line only tool, so first open a terminal inside the platform-tools directory:

Connect your phone to the computer with a USB cable, change the transfer mode to "File transfer" and in the terminal enter:

adb devices

On your phone you should get a poppup asking "Allow USB debugging?", press OK. You should get a "List of devices attached", and it should have one entry (a line below it, with some number and letters and then the word "device").

Now, we'll open a shell[1], a program with which to directly enter commands that the device understands:

adb shell

Managing applications

There are 3 general commands that you would want to use:

pm list packages

Which prints the internal names of all applications that are installed on the device. All of the other commands use those names (without the leading "package:", if it exists) for referring to applications.

pm uninstall -k --user 0 PACKAGE

Where PACKAGE is an aforementioned application name. This command just uninstalls the app for the normal user, meaning it will be brought back on factory reset.

pm disable --user 0 PACKAGE

Disabled PACKAGE, so it wouldn't work but you wouldn't need to reinstall it (just enable it). Beware that, if it shows some sort of error (anything that isn't "Success"), you'll probably need to use disable-user, rather than just disable.

After you're done, you can pretty much just unplug your device, but remember to turn back off the "USB debugging" option!

What to remove

This is a lost of commands, which remove a whole lot of arguably unnecessary apps. Use AT YOUR OWN RISK! Although they shouldn't, they might cause problems FOR WHICH I'M NOT RESPONSIBLE!


More information on available package commands can be shown with pm help. You can learn more about the adb tool from developer.android.com.


[1]You could just run every command like adb shell COMMAND, which wouldn't give you an interactive shell, so it is less convinient ^