All posts for the month October, 2013

Last Updated on Dec 26, 2022

Disclaimer: I am not responsible for you doing things wrong and breaking your phone or losing your data.

I recently found out that my debuggerd hack to enable init.d support on my stock SGS4 wasn’t working. So, I did this and now it works.

Make a file named “” and drop it into /system/etc. Whatever script you put in here will execute at boot up so long as the user/permissions are correct.

chown shell:shell "/system/etc/"
chmod 755 "/system/etc/"
chmod u=rwx,a=rx "/system/etc/" # busybox must support symbolic modes

My “/system/etc/” script:


echo "Executing" > $LOG;
echo "" >> $LOG;

echo "$(date) install-recovery hack..." > $LOG
echo "" >> $LOG
echo "init.d" >> $LOG

# I can't get run-parts to work for some reason, but this will run every *.sh script in /system/etc/init.d as root.
for N in /system/etc/init.d/*.sh; do
	su -c "$N" 1>>$LOG 2>>$LOG


  • Mount binding (in JB 4.2.2+) seems to work. E.g. mount -o bind /folder1 /folder2
  • $(date) does not provide the correct date (mine said: “Wed Apr 15 13:24:13 MST 1970”).
  • The Package Manager is not available. (There may be other unavailabilities, but I don’t intend to test it thoroughly.)