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.

Shimmy Weitzhandler
  • 1,196
  • 6
  • 17
  • 36

3 Answers3

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

xavier_fakerat
  • 10,325
  • 6
  • 43
  • 103
Jon Coombs
  • 146
  • 1
  • 6
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

xavier_fakerat
  • 10,325
  • 6
  • 43
  • 103
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

xavier_fakerat
  • 10,325
  • 6
  • 43
  • 103