I use an old Samsumg J120W running Android 6.0.1 that seems not to come with init.d. I have installed init.d using Ruyinferno's Universal Init.d Support. This claims init.d is working as intended:

enter image description here

Nonetheless, init.d scripts are not getting executed. For instance, Universal Init.d Support has a very simple init.d test script:

root@j1xltecan:/ # cat /system/etc/init.d/00test                               
# Init.d test

if [ -e /data/Test.log ]; then
rm /data/Test.log

echo  Ryuinferno @ XDA 2012 > /data/Test.log
echo  Init.d is working !!! >> /data/Test.log
echo "excecuted on $(date +"%d-%m-%Y %r" )" >> /data/Test.log

root@j1xltecan:/ # ls -l /system/etc/init.d/00test                             
-rwxrwxrwx root     root          239 2020-10-01 22:09 00test

This is clearly not getting run since the log file does not exist at all after rebooting:

root@j1xltecan:/ # cat /data/Test.log 
/system/bin/sh: cat: /data/Test.log: No such file or directory

Does anyone know how to get init.d scripts actually to run on startup?

If this is relevant, I am using Magisk on top of an Android OS that was not modified in any other way.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.