Simple android application running scripts in /data/local/init.d as super-user.
Build and install the application
./gradlew installDebug
Then, start Init.d from launcher, grant root permission.
Add shell scripts to /data/local/init.d
and reboot.
Init.d works on Android M (6.1) and above with compatibility to new background execution model introduced by Android Oreo (8.0).
Init.d requires su
command with find
/xargs
under root shell.
To ensure the scripts running, you can either look into adb logcat
or add following script to /data/local/init.d
:
setprop banana.initd.active 1
Then check if the flag is set after reboot:
adb shell "su -c 'getprop banana.initd.active'"
(The MIT License)