Solve permission denied error when using SystemProperties.set()

549 views
Skip to first unread message

B Sampath Kumar

unread,
Aug 19, 2013, 5:50:57 AM8/19/13
to android-...@googlegroups.com

Hi,

I’ve a problem of not having enough permissions for setting a “persist.xxxxx” property from one of the applications. This application shares the UserId of the phone so I tried to hack in property_service.c and add an entry:

 

{“persist.”, AID_RADIO, 0}

 

in property_perms structure.

 

After this I was able to set the property but without this I get a “permission denied” error.
Does anyone know how to solve permission denied error ?

B Sampath Kumar

unread,
Aug 19, 2013, 5:55:17 AM8/19/13
to android-...@googlegroups.com
Btw, I get this error: "> init: sys_prop: permission denied uid:1001  name:persist.xxxxx"

Baodong Chen

unread,
Sep 8, 2013, 8:14:39 AM9/8/13
to android-...@googlegroups.com
as you have already hacked property_service.c, uid 1001 is AID_RADIO, so why not change the key of your porperty_set call, eg:from persist.xxxxx to persist.radio.xxxxx?

在 2013年8月19日星期一UTC+8下午5时55分17秒,B Sampath Kumar写道:
Reply all
Reply to author
Forward
0 new messages