2

So I was playing with adb pm uninstall and now my phone doesn't boot. So I'm actually curious, how really pm uninstall works, where does it store the list of uninstalled packages (if it does) and if there is a way to revert the changes I made via adb shell with root.

3
  • The is a file named /data/system/packages.xml which contains a lot info on each installed app. I never checked it but this would be a good place to start searching.
    – Robert
    Jul 31 at 16:30
  • 1
    Disabled package states are stored in /data/system/users/<UserId>/package-restrictions.xml. Uninstalled packages are, well, uninstalled. They aren't disabled. Jul 31 at 17:16
  • please mark the answer as accepted (check mark)
    – alecxs
    Aug 1 at 7:05
1

To answer your question. No there's no way to get back an uninstalled app on Android like in Windows where you can restore back to a point in time - that feature unfortunately isn't that well developed in Linux ( Android is a far off modification of Linux ). if you had uninstalled using this ( below ) command instead of pm uninstall ( which just hides the app as against throw it out )

adb shell pm uninstall -k --user 0 <package>

you could re-install using

adb shell cmd package install-existing <package>

sounds like you don't quite fit in the above. In that case your other options are

-hunt around the internet for the same package name and see if you can re-install it ( chances are fat to find the same exact version and esp if its system app it may not install correctly or if it used crypto keys )
-Backup existing data. If you have an older /system backup then restore that after a full wipe.
-Resintall new ROMfrom scratch and restore data from backup

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.