This is the command I am running via usb
adb -s pm disable-user com.instagram.android
Error: java.lang.SecurityException: Permission Denial: attempt to change component state from pid=21028, uid=2000, package uid=10134
I also tried --user 2000 or --user 0 or --user 13 without any luck
adb shell pm list users
Users: UserInfo{0:Owner:13} running
adb -s pm disable-user --user 13 com.instagram.android
The above is on android 5.1 on a Xiaomi Redmi 2 Prime.
While the same code when run on android 7.0 on a Motorola Moto C works perfectly fine. Both are brand new non-rooted phones. What is the difference ? Is there any permission settings that I am missing ?
It's All about manufacturer. Some times some companies make their apps uninstallable or prevent users to disable it. I have a realme 3 Pro and It has
com.nearme.gamecenterwhich can't be uninstalled or disabled. My brother has Realme narzo 20 pro. In which the same package is uninstallable. Why companies do this is still a mystry.though I will suggest trying these commands..