I'm having a problem keeping scripts running (in background) through ADB on my non-rooted Mate 10 after the phone has been unplugged.
I've tried to use the nohup command which has always worked for me with other Android devices, to no avail. I know that nohup only protects from SIGHUP and SIGQUIT signals and so the device might be sending a different signal to kill the process.
I have also tried spawning a child task which runs the script to try to 'hide' the spawned process and tried calling /system/bin/sh to spawn a shell within a shell which have both also failed.
Does anyone have some ideas on alternatives to nohup for non-rooted Android OS or any other ideas on how to solve this issue?
Edit: disown and screen are not present in the Mate 10's shell so they cannot be used.