Failed to open /dev/mem from Anroid opencore framework

by Ling Wan » Fri, 07 Aug 2009 02:36:50 GMT


Sponsored Links
 Hi,

We try to open "/dev/mem" from user space, within the opencore multimedia 
framework. The purpose is to allow access to hardware register of a 
peripheral, as well as map chunks of DMA safe memory between kernel and user 
space.

 int fd = open("/dev/mem", O_RDONLY);

 While we can open and use "/dev/mem" under busybox (2.6.27 kernel and we have 
root permission), we got file descriptor -1 , when it's done from the opencore 
framework, where device driver is supposed to be added. We tried changing 777 
on "/dev/mem", no improvement.

What is the likely reason for that ? Is this due to Android's security
 restriction or some other reason? (We didn't enable SELinux option)

 And how do we solve it, or any alternative on sharing buffer between user / 
kernel space ? Some pointers / links would be great.

Thanks!




      
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Other Threads

1. my question...

Hi,
I'm looking for a code that can replace the following code since its no more 
existing:

 /** This function actually handles the KeyStroke-Injection. */ 
 private void doInjectKeyEvent(KeyEvent kEvent) { 
 try { 
 /* Inject the KeyEvent to the Window-Manager. */ 
 windowManager.injectKeyEvent(kEvent.isDown(), 
kEvent.getKeyCode(), 
 kEvent.getRepeatCount(), kEvent.getDownTime(), kEvent 
 .getEventTime(), true); 
 } catch (DeadObjectException e) { 
 e.printStackTrace(); 
 } 
 } 

if u have a pieces of code that doing so I'll be glad to get it....
10x
Yorgen



      
--~--~---------~--~----~------------~-------~--~----~

2. Any shared memory and named semaphores in Android

Is there any shared memory and named semaphores supported in Android?
Because that I try to use shmget API in android but I get the
following error message

shmget of 0 failed: Function not implemented

system calls in the android kernel, but not in the bionic (the bionic
has a syscall stub that point to sys_ni_syscall which always return
ENOSYS which is the "Not implemented" error).


--~--~---------~--~----~------------~-------~--~----~

3. GoogleMaps-Logo on MapView hidden - Maps ToS - Advocate Question

4. J2ME apps for Android --J2ME MIDP RUNNER

5. Jythonroid: Jython runs successfully on Android Emulator

6. The difference between "Runtime.getRuntime().freeMemory();" and "ActivityManager.MemoryInf.availMem"

7. File permission about MediaPlayer