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

Search This thread

iridaki

Retired Forum Moderator
Feb 21, 2007
4,532
5,190
37
Edinburgh, Scotland
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 :D) 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! :)


attachment.php
attachment.php
attachment.php
 

sgj1

Senior Member
May 10, 2010
100
16
spain
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
 

aimcr7

Senior Member
Jun 14, 2010
2,001
889
Yogyakarta
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
 

onlavu

Senior Member
Jan 21, 2011
100
16
Opava
www.facebook.com
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:
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 :D) 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! :)


attachment.php
attachment.php
attachment.php

this is working for neo v?
 

Tenacious

Senior Member
Oct 2, 2011
957
541
With rootxplorer go to system mount read/write (see screenshot)
59ac7e51-70b8-a63e.jpg
long press build.prop open in text editor find vm heapsize change it to 48 save the change and reboot. Make buckup of build.prop just in case.

Taptalked
 

Top Liked Posts

  • There are no posts matching your filters.
  • 75
    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 :D) 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! :)


    attachment.php
    attachment.php
    attachment.php
    1
    i cant edit it when i open as text:S

    Not open as text, scroll down and open in text editor.

    Taptalked
    1
    and what are your permissions ?
    What permissions? Of the build.prop file? Just long press on build.prop and select permissions. Or you also don't have that option? :)
    Anw, mine are RW-R-R.
    1
    I use rootxplorer 2.19. Ok copy your build.prop to SD card transfer it to PC use text editor of your choice to edit build.prop after you finish putt it back to SD card now use rootexplorer and copy it to system set permission to rw-r-r and reboot. That is it.

    Taptalked
    1
    For what reason? This phone has rather limited RAM to start with and anything over 32 or 36M heap is probably overkill. With a larger heap size, there is more v.memory for programs and the garbage collector "may" run more efficiently. Therefore, it is possible to get better performance by setting a larger VM heap size.

    However, if you set it too high you could run out of free memory which can trigger swapping which will seriously degrade performance. Take care... and remember that if the manufacturer could gain "free" performance simply by changing this, then they would have done.