property_set() can't get property value when I call it in an native thread

131 views
Skip to first unread message

Yang Liu

unread,
Apr 11, 2014, 4:13:16 AM4/11/14
to android-...@googlegroups.com
Hello~
Recently, I'm in a project. I need to start a native thread from audioflinger and this thread will call property_get() to monitor some my own property (I create my property in init.my_device.rc at beginning time). But in runtime, I find that in my thread, property_get() can't return actual value.
I checked my property permission, it's AID_MEDIA. my thread's uid is "AID_MEDIA" also. When I looked the kernel log via adb dmesg, it shows "permission denied uid: 1013". Is there any thing that I missed or do I have wrong steps?

Thanks,

shridutt kothari

unread,
Apr 11, 2014, 11:41:29 AM4/11/14
to android-...@googlegroups.com
HI Yang Liu,

Please see following link: 

you can see AID_MEDIA is defined as 1013 uid, but AID_AUDIO has uid value 1005. so in your case you are being assigned  AID_MEDIA instead of AID_AUDIO.

also see the following link: 

for the linking of Linux UID to android permission for further mapping.

So i think you need to modify your init.yourdevice.rc file for getting AID_AUDIO so that you can call property_get() to get 1005. 

I hope you have enough pointers.

Thanks,
Shridutt Kothari
Impetus Infotech India Ltd.



--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-platfo...@googlegroups.com.
To post to this group, send email to android-...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Shridutt Kothari.
Reply all
Reply to author
Forward
0 new messages