Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 556
Ermir Avatar asked Mar 28 '11 19:03

Ermir


1 Answers

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>" />
like image 130
Ermir Avatar answered Oct 13 '22 06:10

Ermir