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:


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.

  • 3
    I think the answer is mistaken: “the kernel” never calls anything from any init.d directory. There needs to be explicit support from the startup scripts for that. I’d need to look at an actual Android device boot process to say how/where, though, can’t do that right now.
    – mirabilos
    Commented Mar 6, 2014 at 10:18

3 Answers 3


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...]


If you have stock ROM you probably don't have init.d support. Permissions of file located in init.d folder should be 755 or 777. If you don't have init.d support you can use kernel adiutor which have init.d emulator


On my CM13 I moved script in /etc/init.d with extension .sh with chmod 755 and turned on the support init.d with the help of the application Universal init.d

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .