On Sun, Aug 15, 2010 at 11:43 PM, Mitar <mmi...@gmail.com> wrote: > So what I am asking is that in theory it should be enough just to add > this new permission file and reboot and all applications with this > permission would be assigned "wifi" group? I was reading the Java code > handling all this and it seems quite complicated. Maybe there is a > cache which is not cleared even after the reboot. For example, > updatePermissionsLP has some "replace" flags which are not called in > all cases: >
An application won't get a new permission assigned to it until it is installed again, since at the time of install you are approving the set of permissions it is allowed. If one of the permissions it requests at that point doesn't exist, then you will need to re-install it later when it does exist to have the permission assigned. (An except is signature permissions, which are not shown to the user so can be granted when the permission becomes known due to installing the .apk that declares it.) There are a number of permissions associated with a gid. Just follow the same example, boot the system, and "adb install" the app you want to have the permission. If that doesn't work, then you are missing something or have something wrong in how you are declaring the permission/gid. Oh and for .apks on the system image, those have their permissions assigned at each boot. Also be sure to look at the log output; the system is generally fairly verbose about things not being right. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting