4

Recently I used ADB to hide a bunch of packages on an old phone (Verizon 2013 Moto X) I intend to use for development. I hid most of the phone-related packages, including the SIM Toolkit and the telephony service, but now a dialog saying that "Phone has stopped" shows up continuously whenever I try to use the phone. I've tried to unhide most of the ones I hid, but hidden packages don't appear in the output of pm list packages. Is there any way to see all of these packages and/or unhide them? I'd rather not have to factory reset it.

5
  • Additionally, I've tried to unhide com.android.services.telephony but pm unhide's output seems to suggest that the package doesn't exist. Jul 29, 2017 at 5:07
  • Turns out the name of the package causing the issue was com.android.providers.telephony, so this is no longer an issue. Jul 29, 2017 at 5:08
  • How did you "hide" the package? By pm hide?
    – iBug
    Jul 29, 2017 at 5:28
  • @AlexDueppen What was the output?
    – Grimoire
    Jul 29, 2017 at 16:27

1 Answer 1

5

If you run adb shell pm you would find many options and parameters for pm. One of the parameter is -u to show uninstalled packages. (Hidden packages are treated as uninstalled packages.)

On an unrooted device, make a list of all the packages and then all the packages plus the hidden ones. Compare them and the uncommon entries in the second list would be the packages you are looking for.

adb shell pm list packages
adb shell pm list packages -u

As for rooted devices, search the string hidden="true" in the file at /data/system/users/0/packages-restrictions.xml. You would see the corresponding package name.

Tested with Stock Android 6.0.1.

2
  • Does not work properly for N. You may want to switch to cmd packages instead of pm list packages.
    – iBug
    Jul 29, 2017 at 11:20
  • I don't have to since it works well until Android 6.0.1
    – Firelord
    Jul 29, 2017 at 12:19

You must log in to answer this question.

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