Handle 'root' pseudo-package in the appops command
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
Loading
Please register or sign in to comment