2

I cannot get apps enabled or disabled using ADB.

  • Android: 8.0.0
  • Device: Samsung Galaxy A520 (SM-A520F)

I don't have root access to my device.

To get the list of the disabled packages I use:

$ adb shell pm list packages -d
package:com.samsung.android.game.gamehome
package:com.microsoft.skydrive
package:com.google.android.webview
package:com.google.android.videos
package:flipboard.boxer.app
package:com.samsung.android.ststub
package:com.sec.android.emergencylauncher
package:com.samsung.android.dlp.service
package:com.samsung.upsmtheme

Q1: Oddly, this list doesn't seem to include the apps I really disabled in the Apps section:

  • Briefing
  • Google Play Movies & TV

Why is that?

Then I run through the list and enable every package, e.g.:

$ adb shell pm enable com.google.android.webview
Package com.google.android.webview new state: enabled

Q2: Despite some packages are reported as "enabled" they are still in the disabled list:

$ adb shell pm list packages -d | grep com.google.android.webview
package:com.google.android.webview

Why is that?

Q3: How can I get the list of packages that I myself disabled in the Apps section and how can I manage this list using ADB?

1
  • Welcome to Android Enthusiasts! Our site has a nice search field. I've put the corresponding terms in, so you might wish to check these posts. About the reported failure: could it have to do with permissions? Some disable commands, in my experience, require root power.
    – Izzy
    Nov 20, 2018 at 13:25

1 Answer 1

2

Q1: Oddly, this list doesn't seem to include the apps I really disabled in the Apps section:

  • Briefing

  • Google Play Movies & TV

Why is that?

Your output already listed the two apps. com.google.android.videos for Google Play Movies and flipboard.boxer.app for Briefing app.

Optional: see my answer to know how to find an app's package name easily.

For your other issue:

This seems to be a problem in your ROM per se. My experiences with stock Android ROMs on Nexus 6 device and a near stock Android ROM on OnePlus 6 (Android 8.1.0) tell me this shouldn't happen.

Normally, the apps disabled using shell user are not listed in Settings app, but any app disabled by any means are listed in pm list packages -d or cmd package list packages -d.

Disabling and enabling an app without root access is simple. Run:

adb shell pm disable-user PACKAGE_NAME  # disables the app for the current user
adb shell pm enable PACKAGE_NAME        # enables the app for the user, regardless of how the app was disabled. 
1
  • 1
    Thank you very much. Yes, you were right about the identity of those 2 packages. (I personally find it confusing that on the one hand you cannot see a package's class in the UI and from another - there is no shell command to establish package title by its class.) As for the command pm disable-user <package_name> - it perfectly did its job, yeah. Now I can enable/disable packages from command line!
    – Onkeltem
    Nov 21, 2018 at 11:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .