Ermir
Ermir

Reputation: 247

How to change application user group

I've an application that needs to be part of a group i.e audio group. As default the application gets the owner group when it is installed.

Say my application owner is app_46 and group app_46. How can I change my application's group to audio or something else runtime?

Is there any permission or something in AndroidManifest.xml?

Upvotes: 6

Views: 5360

Answers (1)

Ermir
Ermir

Reputation: 247

Found the solution. Maybe someone is interested in it. To add a custom permission you need to add it to frameworks/base/core/res/AndroidManifest.xml . Then to use that permission with an userId you need to link the permission to a group in: frameworks/dase/data/etc/platform.xml. In your application, use the permission you defined above to make use of that group:

< uses-permission android:name="android.permission.your_new_permission>" />

Upvotes: 5

Related Questions