Reputation: 11
I am trying to write to a sysfs entry through an android application using the following lines of code:
String command[]={"/system/bin/sh",
"-c",
"echo 0 > /sys/module/lge_handle_panic/parameters/gen_modem_panic",
};
Process p = Runtime.getRuntime().exec(command);
On installing the app in /system/priv-app, it works fine and creates a modem panic in android L. But, nothing executes in Android M.
I am not sure if Android M requires certain SELinux policy permission.
Upvotes: 0
Views: 1281
Reputation: 11
We need to set the SeLinux policy to permissive manually for echo to work in android M. Command used: adb shell su root setenforce 0
Upvotes: 1