Permission to access /dev/graphics/fb0

1,734 views
Skip to first unread message

Tao

unread,
Aug 11, 2009, 1:04:12 AM8/11/09
to android-ndk
Hi All,

I am wondering if there is a way to gain the permission of reading/
writing device files such as /dev/graphics/fb0?
I am trying to build a native library based on SDL . Though it passes
the building process, it fails at run time while trying to init the
video device. I find the reason is the lack of permission while
calling open("/dev/graphics/fb0", O_RDWR, 0) inside the SDL library.

I found a similar post here without answer:
http://groups.google.com/group/android-framework/browse_thread/thread/cb479e73702b99a

Just wondering if this is doable or there is no such thing?

Jack Palevich

unread,
Aug 11, 2009, 12:32:36 PM8/11/09
to andro...@googlegroups.com
No, that is not supported by the NDK.

We plan on providing OpenGL ES support in a future version of the NDK.
Once that is available you could perhaps base your SDL port on top of
OpenGL ES. Of course, once OpenGL ES is available applications might
as well use it directly instead of using SDL.

David Turner

unread,
Aug 11, 2009, 1:02:56 PM8/11/09
to andro...@googlegroups.com
Accessing /dev/graphics/fb0 requires priviledges that are not available to applications
for several reasons.

One of them is that we are slowly changing the platform to use OpenGL much
more aggressively. This means that /dev/graphics/fb0 is likely to become obsolete
on some upcoming devices.

On Mon, Aug 10, 2009 at 10:04 PM, Tao <gre...@gmail.com> wrote:

Tao

unread,
Aug 12, 2009, 6:08:33 PM8/12/09
to android-ndk
Thanks for clearing things up. Jack and David.

From somewhere else I found that NDK may move to ALSA for audio
drivers in the future.
Will this be true in the future version of NDK? ( or OSS support )

On Aug 11, 1:02 pm, David Turner <di...@android.com> wrote:
> Accessing /dev/graphics/fb0 requires priviledges that are not available to
> applications
> for several reasons.
>
> One of them is that we are slowly changing the platform to use OpenGL much
> more aggressively. This means that /dev/graphics/fb0 is likely to become
> obsolete
> on some upcoming devices.
>
> On Mon, Aug 10, 2009 at 10:04 PM, Tao <grea...@gmail.com> wrote:
>
> > Hi All,
>
> > I am wondering if there is a way to gain the permission of reading/
> > writing device files such as /dev/graphics/fb0?
> > I am trying to build a native library based on SDL . Though it passes
> > the building process, it fails at run time while trying to init the
> > video device. I find the reason is the lack of permission while
> > calling open("/dev/graphics/fb0", O_RDWR, 0) inside the SDL library.
>
> > I found a similar post here without answer:
>
> >http://groups.google.com/group/android-framework/browse_thread/thread...

David Turner

unread,
Aug 12, 2009, 9:44:21 PM8/12/09
to andro...@googlegroups.com
On Wed, Aug 12, 2009 at 3:08 PM, Tao <gre...@gmail.com> wrote:

Thanks for clearing things up. Jack and David.

From somewhere else I found that NDK may move to ALSA for audio
drivers in the future.

What I know is that we would like to use the Alsa kernel facilities for audio for the Android platform in the future; on the other hand, I'm pretty sure we don't intend to use the Alsa user-level libraries at all.
 

Will this be true in the future version of NDK? ( or OSS support )

I'm really not sure. I also doubt we're going to expose something as low-level (and horrible) as the ALSA API.
 
Reply all
Reply to author
Forward
0 new messages