Impossible to get the init.d support in ramdisk

Search This thread

kalo86

Senior Member
Jan 17, 2011
1,052
1,740
Turin
Hello guys!

I am not new in the Android and Nexus world but at this time I need some help.
I am used to root any Nexus phone in this way:

1. Put su, daemonsu, busybox on /system/xbin/ path;
2. Create the init.d folder in /system/etc/ path;
3. Add a script file to start the superuser daemon at the boot;
4. Edit the kernel ramdisk adding the sysinit script to add the init.d support at the boot;
5. Edit the updated-script for the right permissions to the new init.d folder (and its content) and to the su binary file.

I never had problems with Galaxy Nexus and LG Nexus 4 but today I am having troubles with the Nexus 5.
Is this a common issue?

I hope to get answers,
regards,

kalo86
 

Elluel

Senior Member
Jan 14, 2014
5,168
3,057
26
えうれる
Hello guys!

I am not new in the Android and Nexus world but at this time I need some help.
I am used to root any Nexus phone in this way:

1. Put su, daemonsu, busybox on /system/xbin/ path;
2. Create the init.d folder in /system/etc/ path;
3. Add a script file to start the superuser daemon at the boot;
4. Edit the kernel ramdisk adding the sysinit script to add the init.d support at the boot;
5. Edit the updated-script for the right permissions to the new init.d folder (and its content) and to the su binary file.

I never had problems with Galaxy Nexus and LG Nexus 4 but today I am having troubles with the Nexus 5.
Is this a common issue?

I hope to get answers,
regards,

kalo86

fastboot oem unlock

flash custom recovery

flash SuperSU in recovery
 

kalo86

Senior Member
Jan 17, 2011
1,052
1,740
Turin
Of course I have unlocked the bootloder but the init.d script does not work.
Neither a test script works...

This is the test script that I am using to verify if the init.d support is working. The file 00test is placed in /system/etc/init.d/.

Code:
#!/system/bin/sh
#Init.d Test

busybox mount -o remount,rw -t auto /system

if [ -e /system/Test.log ]; then
rm /system/Test.log
fi

echo "kalo86 @ XDA 2014" > /system/Test.log
echo "Init.d is working !!!" >> /system/Test.log
 

jd1639

Inactive Recognized Contributor
Sep 21, 2012
16,833
5,404
Minnesota
Of course I have unlocked the bootloder but the init.d script does not work.
Neither a test script works...

This is the test script that I am using to verify if the init.d support is working. The file 00test is placed in /system/etc/init.d/.

Code:
#!/system/bin/sh
#Init.d Test

busybox mount -o remount,rw -t auto /system

if [ -e /system/Test.log ]; then
rm /system/Test.log
fi

echo "kalo86 @ XDA 2014" > /system/Test.log
echo "Init.d is working !!!" >> /system/Test.log

You're making it way too difficult. Just flash supersu in a custom recovery

Sent from my Nexus 5 using XDA Free mobile app
 

3DSammy

Senior Member
May 5, 2011
1,252
617
Toronto
You could install an application such as Universal init.d from the playstore. It works for me on both my Nexus 5 and 10. Initially works without issue.

Sent from my Nexus 10 using XDA Premium HD app
 

kalo86

Senior Member
Jan 17, 2011
1,052
1,740
Turin
You're making it way too difficult. Just flash supersu in a custom recovery

Sent from my Nexus 5 using XDA Free mobile app

Why difficult? This is the same identical mechanism that Chainfire uses to root your phone but I like to share a rooted-ROM ready to use.
The init.d folder is not supported at the moment. This is the truth.
And I don't want a workaround since the init.d support is very useful also for other stuff which is not only root access.