6 Commits

Author SHA1 Message Date
Dianne Hackborn
268e4e3d00 Move appops command to the service.
The "appops" shell command is now just a wrapper around doing
"cmd appops", no more need to launch a Java VM!

Change-Id: I06fc68762d0ab95a016fb24db0affb0d91197588
2015-11-18 16:29:56 -08:00
Adam Lesinski
45f704a4d0 am 89eaa06a: am 6382a950: am 2327239d: Merge "Handle \'root\' pseudo-package in the appops command"
* commit '89eaa06a10ed399ae9919de2795f76c2af932adc':
  Handle 'root' pseudo-package in the appops command
2015-10-13 01:24:29 +00:00
Snild Dolkow
3875bf6c04 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
2015-10-07 19:58:17 +02:00
Xiaohui Chen
b52c7330d9 Clean up USER_OWNER reference in cmds.
Again, the easy ones.

Bug: 19913735
Change-Id: Ib9519cb8309b332258b20dee54a38007eaba3b1d
2015-08-06 14:05:35 -07:00
Dianne Hackborn
7b7c58b384 Work on issue #18572506: AppOps in-memory state is invalid after...
...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
2014-12-03 10:01:14 -08:00
Adam Lesinski
b5cf61be7c Add Shell command to set AppOps permissions
Change-Id: I6446543b27f0d2d2e69590a2807e713c6d5ccbbc
2014-08-19 11:27:19 -07:00