Wednesday, October 25, 2017

boot - How to create start up scripts using the init.d folder?


In this answer to a question I asked a while ago, he said it's possible to have a script executed every boot.


I created a file (without extension) that contains the following:


#!/system/bin/sh


busybox mount -o bind /emmc/Android/data/com.google.android.music/ /sdcard/Android/data/com.google.android.music/

I made sure the target folder exists and saved the file to /system/etc/init.d, but in fact it looks like the script isn't executed.


P.S. the script file's properties are: -rwxr-xr-x.



Answer



In my version of Android (cm11 / LolliKat) there is a 90userinit script in init.d that tries to run a script named /data/local/userinit.sh if it finds it.


I've not tried this, but naming your script /data/local/userinit.sh might do the trick.


[I know it's an old question, but for posterity...]


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...