top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Android: open /dev/graphics/fb0 failed, despite app signature

+1 vote
1,023 views

In my system application for the latest jeally bean ( 4.3 ), signed with the fitting platform certificate running as android.uid.system. In my manifest, I added the permissions READ_FRAME_BUFFER, ACCESS_SURFACE_FLINGER.

In my app, I'm able to access the SurfaceFlinger service via the ScreenShotClient ( c++ ). Accessing the /dev/graphics/fb0 device directly ( also using native code, c++ ) via open always failed with a permission error.

I wrote an little command line tool, which is able to open the /dev/graphics/fb0. For sure my command line tool is running as root user, and my app is running as system user.

ls -l -a /dev/graphics/fb0 crw-rw---- root graphics 29, 0 2013-09-30 07:31 fb0

For my understanding only the root user, or a member of the graphics group can access the fb0. For my understanding the READ_FRAME_BUFFER permission, is exactly for accessing /dev/graphics/fb? Can someone please give me a hint?

posted Sep 30, 2013 by Bob Wise

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
  1. In /frameworks/base/core/res/AndroidManifest.xml, You can see what access rights apply to each of the system-defined permissions. ->In this case, you'll see that READ_FRAME_BUFFER is marked as android:protectionLevel="signature | system", and ACCESS_SURFACE_FLINGER is marked as android:protectionLevel="signature".
  2. So logically in any system app, having these both permission you should not face any issue in accessing framebuffer and surface flinger. (Its also written in /frameworks/base/core/res/AndroidManifest.xml in comment where READ_FRAME_BUFFER permission is defined, that It is to get access to the frame buffer data)

So there might be something else creating the problem, You may want to post some error log messages etc.

answer Sep 30, 2013 by Mandeep Sehgal
Similar Questions
+3 votes

Hi, I want to open another applications like Facebook, google play etc., while user clicks links in the webview of my application. I have given facebook.com link to the buttons. However app doesn't load by clicking that. Please help.

0 votes

I have some query regarding criteria of stable binary of android source code project. Please provide me information about release criteria of android open source project on based success rate of performed testing.

+5 votes

Are there any open sourced live tracking (AR) libraries for Android?

The task I wish to accomplish is to find the floor area of the room in the image captured thru camera. I have tried to use OpenCV and I could not accomplish this without using Markers. Please suggest some other libraries or a working solution with OpenCV.

Thanks in Advance.

...