Run Script through Android app and prevent killing process
I have a script that is run from an android application via:
Process su = Runtime.getRuntime().exec("su");
DataOutputStream outputStream = new DataOutputStream(su.getOutputStream());
outputStream.writeBytes("sh /system/bin/androidtolinux.sh"+ "\n");
outputStream.flush();
outputStream.writeBytes ("\n\nexit\n");
outputStream.flush();
su.waitFor();
This works great, however part of the script stops zygote with:
setprop ctl.stop media & setprop ctl.stop zygote
After that, the application will be destroyed along with all the processes that it starts, including the process running the script.
SO my question is, how can I run my script through the application, but so that the scripting process is not killed as soon as it is executed setprop ctl.stop media & setprop ctl.stop zygote
.
+3
source to share
No one has answered this question yet
Check out similar questions: