The "appops" shell command is now just a wrapper around doing
"cmd appops", no more need to launch a Java VM!
Change-Id: I06fc68762d0ab95a016fb24db0affb0d91197588
The AppOpsService handles the 'root' pseudo-package as any other; it
gets no automatic allowances. This is reasonable, but it blocked me from
accessing the mms-sms provider through the 'content' command, even in a
root shell.
So I tried to change the rules:
$ adb root
$ adb shell appops set root WRITE_SMS allow
Error: No UID for root in user 0
This error occurs in the appops command because there isn't really a
package called root, so the UID lookup via PackageManager fails.
But we know that root is UID 0, so we can just skip the lookup.
(Also, AppOpsService handles the other way around in getOpsLocked method.)
Change-Id: Ie0cad67efa438a74a4d9921d29933610cfb13974
...uninstalling updates to a system app
Things seem to be working fine, however we were not as aggressive at
writing out the current state in this case as we probably should be.
Also introduce more features to the appops command, which are useful
for testing this.
Change-Id: I177a9cc0e16e98b76fee0d052d742e06842bb3f9