Why do some androids show permission denied while some dont (both are not rooted)?

2.5k Views Asked by At

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 ?

1

There are 1 best solutions below

1
Anirudhdhsinh Jadeja On

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.gamecenter which 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..

adb shell pm uninstall --user 0 com.instagram.android
adb shell pm disable-user --user 0 com.instagram.android