echo 0 > /sys/class/leds/button-backlight/brightness
The above command is working perfectly through adb shell.But when I try to run through my code there is no effect.Here is my code.
Process mSuProcess;
mSuProcess = Runtime.getRuntime().exec("su");
DataOutputStream mSuDataOutputStream = new DataOutputStream(mSuProcess.getOutputStream());
mSuDataOutputStream.writeBytes("echo 0 > /sys/class/leds/button-backlight/brightness \n");
mSuDataOutputStream.flush();
mSuDataOutputStream.close();
Please help me out on this.