Is there any adb command to enable/disable a system app?
Thanks
Answer
Yes. The command is pm disable
. You must be root in order to do this:
Open shell and get root:
PC> adb shell
shell@hammerhead:/ $ su
List all enabled apps, filter by "calculator":
root@hammerhead:/ # pm list packages -e | grep 'calculator'
package:com.android.calculator2
Disable app:
root@hammerhead:/ # pm disable com.android.calculator2
Package com.android.calculator2 new state: disabled
List all disabled apps:
root@hammerhead:/ # pm list packages -d
package:com.android.calculator2
package:com.google.android.apps.inputmethod.hindi
package:jp.co.omronsoft.iwnnime.ml
package:com.google.android.inputmethod.pinyin
package:com.google.android.inputmethod.korean
package:com.google.earth
root@hammerhead:/ #
Some other things worth noting:
- In my testing, apps disabled in this manner disappear completely from the Settings > Apps list. They do not even seem to be displayed in the "Disabled" tab
- You can re-enable apps with
pm enable
. In fact, this seems to be the only way to re-enable them, in my experience.
No comments:
Post a Comment