Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of pm hide and pm block on Android KitKat and Lollipop #63

Closed
sbechet opened this issue Nov 7, 2021 · 2 comments
Closed

Usage of pm hide and pm block on Android KitKat and Lollipop #63

sbechet opened this issue Nov 7, 2021 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@sbechet
Copy link

sbechet commented Nov 7, 2021

If you've Android KitKat or above and do not have root access, use adb in PC to execute this command:

adb shell pm block PACKAGE         # for Android KitKat
adb shell pm hide  PACKAGE         # for Android Lollipop only
adb shell pm disable-user PACKAGE  # alternative to `pm hide`; for Android Lollipop and above; this works just like disabling an app through Settings app

To reinstate the app:

adb shell pm unblock PACKAGE   # for Android KitKat
adb shell pm unhide PACKAGE    # for Android Lollipop and only if you used `pm hide` earlier
adb shell pm enable PACKAGE    # for Android Lollipop and above

source

@0x192 0x192 added enhancement New feature or request type::enhancement and removed enhancement New feature or request labels Nov 12, 2021
@0x192
Copy link
Owner

0x192 commented Nov 12, 2021

Thanks for the heads-up !

So, from the android Stackexchange discussion it seems that:

  • pm disable-user doesn't exist on Android KitKat and below (which is weird because I recall using it on a very old phone)
  • pm block/pm unblock can be used for Android KitKat (4.4)
  • pm hide only exists for Lollipop

I also wonder about the usefulness of pm hide is when you can usepm-disable-user instead (for Android 5+)

I'll go through the AOSP source code to verify all of this.

@0x192 0x192 added bug Something isn't working and removed type::enhancement labels Nov 12, 2021
@0x192 0x192 added this to the 0.4 milestone Nov 12, 2021
@0x192
Copy link
Owner

0x192 commented Nov 13, 2021

Diving into the source code was interesting.

For easier reference: https://github.com/0x192/universal-android-debloater/wiki/ADB-reference

@0x192 0x192 added enhancement New feature or request and removed bug Something isn't working labels Nov 13, 2021
@0x192 0x192 changed the title kitkat and lollipop Usage of pm hide and pm block on Android KitKat and Lollipop Nov 13, 2021
@0x192 0x192 closed this as completed Jan 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants