How to re-enable apps using ADB? 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.
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 &amp;&amp; pm disable-user PACKAGE &amp;&amp; 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.