Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[MOD] Enable init.d scripts support on stock kernel

OP iridaki

1st January 2012, 04:12 PM   |  #1  
iridaki's Avatar
OP Retired Forum Moderator / Recognized Themer
Flag Edinburgh, Scotland
Thanks Meter: 4,817
 
3,892 posts
Join Date:Joined: Feb 2007
Donate to Me
More
Hello!

This is a small mod, inspired by non other than our great DoomLord (so if it helped you, thank him/donate to him/worship him ) and his thread in the X10 section.

I am trying a lot of things on my phone, so I often switch back and forth from stock kernel to DoomKernel.
However, I use lots of init.d scripts (my favorite one being SuperCharger)
and I just don't want to lose this feature when I'm on stock.

So, without further ado, here are the steps that are needed to make init.d scripts run automatically at boot on stock kernel.

Requirements:

1. Stock Kernel
2. Root
3. Busybox
4. CMW Recovery for Stock Kernel by nAa.
5. Root Explorer or any other similar app.

Instructions:

1. Download the zip and place it in a folder in your SD card.

2. With Root Explorer, go to /system/etc. Press the Mount RW button on top right corner.
a. If the file install-recovery.sh is not there, then press Menu and create a New File.
Name it install-recovery.sh and then long-press on it and select Open in Text Editor.
Paste this text in it:
Code:
#!/system/bin/sh
# init.d support
busybox run-parts /system/etc/init.d/
Save it and delete any .bak file that Root Explorer might have created. Set the permissions as in the attached screenshot.
OR
b. If the file install-recovery.sh is already there, long-press on it and select Open in Text Editor. Paste this text in the end:

Code:
# init.d support
busybox run-parts /system/etc/init.d/
In both scenarios, don't forget to leave one empty line at the end of install-recovery.sh file. ***

3. Reboot into Recovery and flash the init.d-autorunner-stock.zip.

4. Reboot your phone and with Root Explorer go to /data/local/tmp.
There should be a txt file there named "init.d_log_test.txt" and once you open it, you should see the word "done".

5. Now you can use your favorite init.d scripts on stock kernel!

If you want to check if the scripts you want to use actually work, please refer to one of my older threads about how to test them.


*** I am not including an install-recovery.sh because this is the file that Link2SD depends on, so it's better if you modify it yourself, rather than use mine.


Let me know if it worked for you!


The Following 66 Users Say Thank You to iridaki For This Useful Post: [ View ]
2nd January 2012, 02:02 AM   |  #2  
aimcr7's Avatar
Senior Member
Flag Yogyakarta
Thanks Meter: 780
 
1,828 posts
Join Date:Joined: Jun 2010
More
Good, nice to see this posted here too.

Sent from my MT15i using XDA App
2nd January 2012, 03:54 AM   |  #3  
YongJeah's Avatar
Senior Member
Flag Canton
Thanks Meter: 82
 
162 posts
Join Date:Joined: Nov 2011
More
great work!
2nd January 2012, 12:02 PM   |  #4  
Member
Thanks Meter: 4
 
64 posts
Join Date:Joined: Oct 2011
Could this be used in other android devices?
2nd January 2012, 12:56 PM   |  #5  
aimcr7's Avatar
Senior Member
Flag Yogyakarta
Thanks Meter: 780
 
1,828 posts
Join Date:Joined: Jun 2010
More
Quote:
Originally Posted by kcthomlau

Could this be used in other android devices?

Yes, it should be works well on other devices, just try it and let us know.

Sent from my MT15i using XDA App
2nd January 2012, 04:18 PM   |  #6  
sgj1's Avatar
Member
Flag spain
Thanks Meter: 7
 
79 posts
Join Date:Joined: May 2010
More
itīs necessary to have unlocked bootloader?
I have followed this tutorial and have not created the file "init.d_log_test.txt"
when i go to /data/local/tmp i only have init.rc file
2nd January 2012, 04:24 PM   |  #7  
pawo99's Avatar
Senior Member
Thanks Meter: 189
 
547 posts
Join Date:Joined: Dec 2007
More
Quote:
Originally Posted by sgj1

itīs necessary to have unlocked bootloader?
I have followed this tutorial and have not created the file "init.d_log_test.txt"
when i go to /data/local/tmp i only have init.rc file

no. I have now locked bootloader and it is working
2nd January 2012, 07:25 PM   |  #8  
aimcr7's Avatar
Senior Member
Flag Yogyakarta
Thanks Meter: 780
 
1,828 posts
Join Date:Joined: Jun 2010
More
Quote:
Originally Posted by sgj1

itīs necessary to have unlocked bootloader?
I have followed this tutorial and have not created the file "init.d_log_test.txt"
when i go to /data/local/tmp i only have init.rc file

This is working great on mine mate, just try it again maybe you left something, i tested it with init.d scripts from SE Tweaked and it works.

Sent from my MT15i using XDA App
14th January 2012, 11:34 AM   |  #9  
Senior Member
Flag Győr
Thanks Meter: 7
 
119 posts
Join Date:Joined: Mar 2009
More
hello guys!

what kind of script is the neo?
15th January 2012, 09:08 AM   |  #10  
Member
Flag Opava
Thanks Meter: 14
 
96 posts
Join Date:Joined: Jan 2011
More
Thumbs up Confirmed, working:)
I tried this mod and it seems to be working. Before its application, Supercharger tells me that he cannot reach init.d or something like that. But with this mod it can use init.d without any problems, no more warning. So it is working. Thank you
Last edited by onlavu; 15th January 2012 at 09:10 AM.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes