Chris, Have you tried to access sysfs directly frdom Java? I have not been able to get this to work.
Could you provide a code fragment? TIA On Nov 23, 10:12 am, Chris Stratton <cs07...@gmail.com> wrote: > On Nov 23, 5:33 am, Mikkel Christensen <mikkel.christen...@ixonos.com> > wrote: > > > If the LED is already exposed in sysfs you are lucky and it should be > > quite easy. Otherwise create a Kernel device driver that does the > > exposure of the LED to sysfs. > > If it's already exposed in sysfs, you don't need to use native code. > You should be able to access the special file directly from java if > you have the permissions set right. If they are wrong, you can't > access it from the ndk either. > > > Then in the /jni/native.cpp function do the proper write to the sysfs > > entry like this (note: this depends on how the led is exposed trough > > sysfs): > > > ret = system("echo 1 > /sys/class/leds/red/brightness"); > > Chaining the echo command seems wasteful. Why not just write to the > special file yourself? -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting