The correct way to do this is with filesystem permissions and Android permissions, like other drivers and kernel facilities are controlled. Basically:
- Define a new user/group ID for your module, which it publishes itself under in the fs.
- In frameworks/base/data/etc/permissions/ add a .xml file that associates a permission name with the new uid, like other permissions that are declared in permissions.xml.
- In frameworks/base/core/res/AndroidManifest.xml declare your permission as done with other permissions. Here you can set the protectionLevel to what you'd like: signature so only .apks signed with the platform cert can get it, signatureOrSystem to also allow an app installed in /system to get it, etc.
--
Dianne Hackborn
Android framework engineer
hac...@android.comNote: 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.