Without the init.d support in the ROM, its almost impossible to run your own boot scripts during system startup. I found a way using an app called Automate. It does automation of pretty much everything in Android that can be automated. Its really a 5-star app. Note that there is nothing to flash and nothing else funky app to run.
How to run script(s) at startup: Create a flow with the shell command block following by Delay block, which sleeps for 9h59m59s and then goes back to sleep again. Now, run this flow. When Automate starts up at boot time, it starts all the flows which were running when the system rebooted. Since your flow was running (after finishing the script it was sleeping but running) at shutdown time, it will run again. And it will run your scripts and go to sleep.
PS: if you are not familiar with Automate or what flows are, and failed to comprehend all of the above, my apologies!
How to run script(s) at startup: Create a flow with the shell command block following by Delay block, which sleeps for 9h59m59s and then goes back to sleep again. Now, run this flow. When Automate starts up at boot time, it starts all the flows which were running when the system rebooted. Since your flow was running (after finishing the script it was sleeping but running) at shutdown time, it will run again. And it will run your scripts and go to sleep.
PS: if you are not familiar with Automate or what flows are, and failed to comprehend all of the above, my apologies!
Aucun commentaire:
Enregistrer un commentaire