I am in the group graphics

shell@lt03wifi:/ $ id
uid=2000(shell) gid=2000(shell) groups=1003(graphics),1004(input),1007(log),1009(mount),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats) context=u:r:shell:s0

The char device /dev/graphics/fb0 is marked as accessible (rw) to my group:

shell@lt03wifi:/ $ ls -l /dev/graphics/fb0                         
crw-rw---- root     graphics  29,   0 2013-12-24 23:30 fb0*
shell@lt03wifi:/ $ mount | grep "/dev "
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=1421696k,nr_inodes=114626,mode=755 0 0

But I am denied access (why ?):

shell@lt03wifi:/ $ cd data/data/com.spartacusrex.spartacuside/files/system/bin
shell@lt03wifi:/data/data/com.spartacusrex.spartacuside/files/system/bin $ ./grep -l . /dev/graphics/fb0
grep: /dev/graphics/fb0: Permission denied

The test executable grep works, see:

shell@lt03wifi:/data/data/com.spartacusrex.spartacuside/files/system/bin $ ./grep -l . grep

Why am I denied access to this char device ?

  • What do you intend to accomplish with grepping from your frame buffer? Also, what are the permissions on /, /dev and /dev/graphics? – twalberg Dec 24 '13 at 18:47
  • Have you tried the newgrp graphics command to change your default group? – jim mcnamara Dec 25 '13 at 2:53
  • @twalberg: grep is just a process opening the device for reading. I could have used wc or cat, but grep -l is the fastest in case of success and has small outputs, so it would not last long on computers of others trying to answer my question. – user2987828 Dec 25 '13 at 16:57
  • @twalberg: I tried to root a tablet with the open-source rooting method explained at forum.xda-developers.com/showthread.php?p=48818188 – user2987828 Dec 25 '13 at 18:01
  • I noticed that your filesystem is mounted with seclabel, do you have SELinux enabled? (you may need to add a policy to allow your user context to access the context of the device) You can use getenforce to check. – ArchLayperson Jul 28 '14 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.