android.permission.ACCESS_SURFACE_FLINGER error

2,327 views
Skip to first unread message

bor...@gmail.com

unread,
Dec 3, 2011, 10:36:35 PM12/3/11
to android-porting, android-d...@googlegroups.com
Hi all,
  I am using <uses-permission
                android:name="android.permission.ACCESS_SURFACE_FLINGER" />
to access the ISurface, But I am getting the error: 

E/SecHardwareRenderer(  424): iSurface is get
E/SecHardwareRenderer(  424): mframesize set  ok
W/ServiceManager(   90): Permission failure: android.permission.ACCESS_SURFACE_FLINGER from uid=10036 pid=424
E/SurfaceFlinger(   90): Permission Denial: can't access SurfaceFlinger pid=424, uid=10036
E/SecHardwareRenderer(  424): i surface register Buffer is ok

How to Rectify the above error?

Thanks
--
Jiang Bian
http://www.wifihack.net/
http://golang-china.org/

Liu Xin

unread,
Dec 6, 2011, 9:39:51 PM12/6/11
to bor...@gmail.com, android-porting, android-d...@googlegroups.com
you might miss to set the device graphics group.
for example, /dev/graphics/* is belong to graphics group. as a result, SF will have permission to access it. 

refer to ueventd.rc
/dev/graphics/*           0660   root       graphics

thanks,
--lx

bor...@gmail.com

unread,
Dec 7, 2011, 12:38:17 AM12/7/11
to Liu Xin, android-porting, android-d...@googlegroups.com
Thanks for your reply. Default my /dev/graphics/* is belong to graphics group. 

I change the android.permission.ACCESS_SURFACE_FLINGER permission protectionLevel from signature to normal in frameworks/base/core/res/AndroidManifest.xml file, it fixed the permission problem, although it's a bad idea.

Finally We add same interface in MediaPlay, solve our problems.

# cd /dev/graphics
# ls -l
crw-rw---- root     graphics  29,   4 2010-01-01 12:00 fb4
crw-rw---- root     graphics  29,   3 2010-01-01 12:00 fb3
crw-rw---- root     graphics  29,   2 2010-01-01 12:00 fb2
crw-rw---- root     graphics  29,   1 2010-01-01 12:00 fb1
crw-rw---- root     graphics  29,   0 2010-01-01 12:00 fb0
Reply all
Reply to author
Forward
0 new messages