Search Results

Search found 1 results on 1 pages for 'ee3509'.

Page 1/1 | 1 

  • android : how to run a shell command from within code

    - by ee3509
    I am trying to execute a command from within my code, the command is "echo 125 /sys/devices/platform/flashlight.0/leds/flashlight/brightness" and I can run it without problems from adb shell I am using Runtime class to execute it : Runtime.getRuntime().exec("echo 125 > /sys/devices/platform/flashlight.0/leds/flashlight/brightness"); However I get a permissions error since I am not supposed to access the sys directory. I have also tried to place the command in a String[] just in case spaces caused a problem but it didn't make much differense. Does anyone know any workaround for this ?

    Read the article

1