4

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.

  • 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 Mar 6 '14 at 10:18
1

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

1

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

1

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

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.