0

I got a samsung galaxy folder 2: https://www.samsung.com/hk_en/smartphones/galaxy-folder2-g165/

It runs Android 6.0.1

Anyways I am not new to ABD and have used it to uninstall system apps on my other phone (Samsung S10) with no problems. So when I got the folder 2 and started removing system apps using pm unistall -k --user 0 as I did with my other phone. Then I decided to remove the contacts app (com.android.contacts) because I installed google contacts.

Well apparently, in doing so that contacts app actually housed the phone app as well. So now I have no phone app on my phone. That's kind of a big deal.

How do I re enable the contacts app using ADB?

My device is not rooted and I don't want to root it. Also I know factory resetting should fix this, but I'd prefer not to do that either. Thanks.

10
  • How did you uninstall a system app without root? Aug 7 '20 at 3:50
  • ADB: Adb shell pm unistall -k --user 0 (app package name) easy. It's all over the internet.
    – icymoo15
    Aug 7 '20 at 3:58
  • system partition is mounted read-only and nothing can be added/removed without rooting phone. Aug 7 '20 at 4:10
  • you probably meant pm disable (not uninstall) so you can just pm enable back
    – alecxs
    Aug 7 '20 at 4:24
  • 2
    @alecxs it does make them completely unavailable for the "main user" as if they were completely removed, but the .apk file remains on the device (and the app available to other users, if there are any established). You can check that with dumpsys package. Hence the install-existing, basically telling the system to look for the /path/to/apk in packages.xml.
    – Izzy
    Aug 7 '20 at 6:24
1

Unfortunately there is no way on Android 6 (and even 7) to reinstall a system app uninstalled with adb shell pm uninstall PACKAGE.

The command adb shell cmd package install-existing PACKAGE can restore the uninstalled package but it has only been introduced with Android 8.0.

On these older android versions, it is safer to use :

adb shell am force-stop PACKAGE && pm disable-user PACKAGE && pm clear PACKAGE

so you can revert it if necessary :

adb shell pm enable PACKAGE

Note: PACKAGE everywhere above means package name of the app.

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.