**Term-init is also used in Droid Manager!!!**
**Featured in the XDA News Portal: Init.d Support for Any Rooted Phone (Thanks to the_scotsman!)
Hi guys...as stated in the title above, I have created a script to be ran in terminal emulator so that it will enable the support of init.d scripts!!!
**Note...this is only for those who do not have init.d support...if you are using custom kernels (cyanogen mod original kernel etc.) that already supports init.d, you shouldn't run this......but if you accidentally ran this, it is ok...won't mess up anything...
init.d support through terminal emulator!!!
What is init.d:
But how?
Concept:
I have recently learnt some linux scripting and was searching for a method to enable init.d scripts support for my phone which has a stock kernel. Inspired by this thread by iridaki, I finally managed to get init.d working in my phone!!! However, I thought of the other users who still do not have a proper custom recovery...how are they gonna flash zip packages? And if it has to be done manually, it requires a lot of typing, changing file permissions etc....a very tedious process...
Therefore, I've decided to come up with a script to automate this process!!! *Drum rolls*...lol
Features:
- Utilises install-recovery.sh (if your kernel supports that, but of course, but most do...) to enable init.d scripts (busybox run-parts required)
- Will add lines in install-recovery.sh if it already exists (will not replace install-recovery.sh because certain apps such as Link2SD requires that to work), creates it if it doesn't
- Creates the init.d folder with correct permissions
- Adds 2 init.d scripts: one for testing, another to ensure that the scripts in init.d folder always have the correct permissions
- Adds sysint in /system/bin, will add the required lines if it already exists
- Deletes duplicate files and lines to ensure the least of errors
Requirements:
- a rooted phone of course...
- busybox with required applets (especially run-parts), if not sure what is this, just install this by Stericson: BusyBox and please reboot after installing before running this script......use "normal install" method, don't use "smart install"...
- terminal emulator such as this
Instructions:
1. Download the file.
2. Place it in the root of your sdcard directory.
3. Launch terminal emulator.
4. Type: su
5. Grant SuperUser access if prompted
6. Type: sh /sdcard/term-init.sh
7. The script will run and follow the instructions! As simple as that...
Example:
**To check whether init.d is working or not, reboot your phone and navigate to /data...you should find a Test.log in there...If it is present, congrats, you have init.d support!
Download:
If you have already read all the instructions and understand them, then click here to download:
Feel free to posts questions below...I will try my best to help......By the way, those who used my script and found that it works, please leave a post here, stating you phone model, android version and ROM...thanks! but don't just leave comnents saying 'it doesn't work' etc...give more details and screenshots if possible...
Hit the thanks button if you like my work...it gives me a boost!
Please don't mirror / modify my work, ask for permissions first...
Worked a treat on stock 587 Xperia Kernel, and I just used Script Manager to run it.
Hi, excuse me. I have Note 2 international with custom ROM. My qustion is how can i check whether i currently(already) have init.d support or not in case i don't know/are not sure. Thank you very much, appreciate. :victory:
Hi.
You can try see if you have init.d folder under ./system/etc/init.d (you need a root browser).
If you have init.d folder then i'm sure you have init.d support. Some custom Rom's add init.d support if not i'm sure Term-init & Zip-init would do the tricks
Where do I get BusyBox and Run-Parts??
Play store or where???
In the troubleshooting I read that if I download the Stericson installer, must I select Normal Installation Method...right??
..but in what? Running Term-init.d.sh or installing his BusyBox??
Thank you
Sent from my ☠-GT-i9000 using XDA app
Hi
I have a galaxy ace 5830i
with stock ROM
Here are the parameters of the ROM:
version of droid: 2.3.6 (it is a normal stock)
Baseband version S5830iXXLA2
Kernel: stock
Build number: GINGERBREAD.XXLA4
A few weeks ago i used your first method succesfully, but that time my kernel was flashed with a custom kernel (Rafael Baugis kernel).
All other parameters was the same.
Now (with stock kernel) does not works any of the methods, neither, with terminal, nor with zip).
Test.log doesn't appears in \data
I does not got any error status... With both of the methods it seems that everything is ok, but it doesn't work.
Can you help me?
Hi.
You can try see if you have init.d folder under ./system/etc/init.d (you need a root browser).
If you have init.d folder then i'm sure you have init.d support. Some custom Rom's add init.d support if not i'm sure Term-init & Zip-init would do the tricks
Where do I get BusyBox and Run-Parts??
Play store or where???
In the troubleshooting I read that if I download the Stericson installer, must I select Normal Installation Method...right??
..but in what? Running Term-init.d.sh or installing his BusyBox??
Thank you
Sent from my ☠-GT-i9000 using XDA app
Ok...here's a quick fix...get script manager from play store, then navigate to /etc/install-recovery.sh...select it and run as root and at boot (select the skull icon and the gear icon)...then reboot your phone...should do you fine...
Thanks for your answer. I made all you wrote, but i still can not find the file: test.log. Should i type once more the command in terminal?
By the way, i have init.d folder, just the log file is missing. Originally there wasn't this folder.
Sent from my GT-S5830i using xda premium
Hi.
Make sure that you have root access (install Superuser or SuperSU) and then installed BusyBox from the Play Store, and then start BusyBox and run "Normal Install" and after that run the term-init.d.sh file again... Then restart your phone.. and see if you have the Test.log inside ./data/
the_scotsman (Moderator Liaison Admin / Moderator Committee / XDA News Writer) said:Init.d plays an important role in the world of Android development and customization It allows users to install scripts and mods to be run at boot—everything from battery tweaks to performance tweaks. It essentially opens the door to a world of mods only possible through the Init.d process, which in turn is usually only available on custom kernels.
the_scotsman (Moderator Liaison Admin / Moderator Committee / XDA News Writer) said:Init.d plays an important role in the world of Android development and customization It allows users to install scripts and mods to be run at boot—everything from battery tweaks to performance tweaks. It essentially opens the door to a world of mods only possible through the Init.d process, which in turn is usually only available on custom kernels.
the_scotsman (Moderator Liaison Admin / Moderator Committee / XDA News Writer) said:Init.d plays an important role in the world of Android development and customization It allows users to install scripts and mods to be run at boot—everything from battery tweaks to performance tweaks. It essentially opens the door to a world of mods only possible through the Init.d process, which in turn is usually only available on custom kernels.
# init.d support
busybox run-parts /system/etc/init.d/