The OnePlus 6 is officially on sale! Buy now →
FORUMS
Remove All Ads from XDA
OnePlus 6 On Sale

[MOD][APK+SCRIPT+ZIP] Enable Init.d for Any Phones w/o Need of Custom Kernels!!!

3,548 posts
Thanks Meter: 7,219
 
Post Reply Email Thread
16th February 2017, 12:31 PM |#551  
Senior Member
Flag Currently in Kuwait
Thanks Meter: 48
 
More
Quote:
Originally Posted by Vagelis1608

SELinux is probably set to enforcing.
I can't help you much. The developer might be able to help you.

Thanks for all your replies. However my device SM-G530FZ (5.0.2) [QUALCOMM] supported the init.d.
Now im using it.
I got the solution from here.:- https://forum.xda-developers.com/sho...2698813&page=1
 
 
17th February 2017, 10:12 PM |#552  
Member
Thanks Meter: 3
 
More
Yo, I installed Uni-unit but when I click on activate/verify It wants open store to install Superuser but i'm already rooted ( I got SuperSU2.79, busybox etc....)
I got a Honor 8 with stock rom Nougat
31st May 2017, 09:11 AM |#553  
Junior Member
Thanks Meter: 0
 
More
1-5 steps - done.
6: I tried 'Uni-init' and 'Term-init' method and still don't have Test.log in /data.. :/ Help?
27th July 2017, 07:52 PM |#554  
Senior Member
Thanks Meter: 159
 
More
Quote:
Originally Posted by remi13014

Yo, I installed Uni-unit but when I click on activate/verify It wants open store to install Superuser but i'm already rooted ( I got SuperSU2.79, busybox etc....)
I got a Honor 8 with stock rom Nougat

Did you manage to get it working? and how?
EDIT: never mind. I now used the terminal method. no test.log yet.
24th October 2017, 04:48 PM |#555  
Junior Member
Thanks Meter: 0
 
More
i have huawei mate9 with Android version 7.0,try every method and not working also follow the advices so i have to post the screenshot..
and the contents of /etc/install-recovery.sh as follow
#!/system/bin/sh
# init.d support

/system/bin/sysinit


any ideas?thanks



通过我的 MHA-AL00 上的 Tapatalk发言
24th October 2017, 06:21 PM |#556  
Senior Member
Thanks Meter: 637
 
More
Quote:
Originally Posted by landcruser

i have huawei mate9 with Android version 7.0,try every method and not working also follow the advices so i have to post the screenshot..
and the contents of /etc/install-recovery.sh as follow
#!/system/bin/sh
# init.d support

/system/bin/sysinit

any ideas?thanks

If you're running Android 7.0, you don't need this. As the first 2 lines of the output in your screenshot show, you should already have native init.d support.
24th October 2017, 11:27 PM |#557  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by post-mortem

If you're running Android 7.0, you don't need this. As the first 2 lines of the output in your screenshot show, you should already have native init.d support.

the question is the init.d seems not work .scripts not execut at boot
5th February 2018, 03:25 PM |#558  
Junior Member
Flag Dordrecht
Thanks Meter: 4
 
More
Quote:
Originally Posted by Ryuinferno;

- /system/etc/install-recovery.sh (rwxr-xr-x) [owner: root (0), group: root (0)]

Initially my Sony Xperia m5 smartphone running android 6.0 didn't suport init.d so I had to manually add the folder in the /etc folder. Followed all the nessecery steps including chance file permissions. I have got a recent version of busybox by Osm0sis installed which includes the run-parts applet (for a full overview of applets see screenshot I added). Finally got init.d support by installing the app and when I verified wheter it was installed correctly it confirmed me Init.d now was supported on my device. However when checking the test.log file I didn't find it in the /data folder (nor anywhere). So I decided to check the troubleshooting guide and finally found out that al the files are there with the right permissions, except from the install-recovery.sh Where did it go wrong? Could you help me out? I'd really appreciate that.
Attached Thumbnails
Click image for larger version

Name:	BB1.png
Views:	306
Size:	236.8 KB
ID:	4410425   Click image for larger version

Name:	BB2.png
Views:	308
Size:	250.0 KB
ID:	4410426  
5th February 2018, 09:58 PM |#559  
Junior Member
Flag Dordrecht
Thanks Meter: 4
 
More
Actually I overlooked the install-recovery.sh file (I was looking for it in the init.d folder). I added 'busybox' to the lines since it was the only missing word in the program file. Still no test.log file in the /data folder. However something strange occured to me when I second checked all the files. The sysint file in the system/bin folder would temporarily be present whenever I (re)activate init.d support trough the app. Then after rebooting the device it completely dissapeared as if it never existed inside the system/bin folder (this time I double checked). Do you have idea how this could be?
19th March 2018, 12:26 PM |#560  
Rowdyy Ronnie's Avatar
Senior Member
Flag City Of Joy
Thanks Meter: 157
 
More
Quote:
Originally Posted by Ryuinferno

**UPDATE: v3 is out now! Android 4.3 compatible!

**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


Do I have init.d support?:
Well, here is a way to test:
1. Download the file from here: Attachment 1612958
2. Extract the file, you will get a file named 00test. DO NOT flash!
3. Paste it into /etc/init.d. If there is no init.d folder, most probably you DO NOT have init.d support. However, if you still wanna try, just create the folder named "init.d"
4. Change the permissions of the init.d folder and 00test into rwxrwxrwx.
5. Reboot.
6. If you see a file named Test.log in /data, you have init.d support. If not, you will have to run Uni-init, Term-init or Zip-init.



Features:
- Auto checks for required files [v2]
- 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 move install-recovery.sh to install-recovery-2.sh if it already exists and call it from the main install-recovery.sh (will not replace install-recovery.sh because certain apps such as Link2SD requires that to work), creates it if it doesn't [v3]
- If Superuser is using install-recovery.sh, will use install-recovery-2.sh instead [v3]
- Creates the init.d folder with correct permissions
- Adds 2 init.d scripts: one for testing (shows time of execution [v2]), another to ensure that the scripts in init.d folder always have the correct permissions
- Adds sysinit in /system/bin, will add the required lines if it already exists. This is for utilising a similar method to enabling init.d in AOSP ROMs



Requirements:
- a rooted phone of course...

- busybox with required applets (especially run-parts), if not sure what is this, just install this by Stericson: Link and please reboot after installing before running this script......use "normal install" method, don't use "smart install"...

- terminal emulator such as this: Link



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...

**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...


Please don't mirror / modify my work, ask for permissions first...

Source code & changelog: https://github.com/Ryuinferno/Term-init

So, after placing the file in the root of sdcard directory, I typed sh /sdcard/term-init.sh and guess what, it said no file or directory found. Then i used my brain and typed sh /root/term-init.sh and it worked. But when I rebooted my device twice and checked /data, no Test.log found. Does it mean my device doesn't support init.d? And if not, will there be any problem since ran the term-init.sh file through terminal emulator? By the way I am using Xiaomi Mi A1 (Nougat 7.1.2) with Magisk root.
7th April 2018, 04:07 PM |#561  
Junior Member
Thanks Meter: 1
 
More
Does this work on android 5.0.1? Verizon s4 PL1 firmware. I’m looking to disable ipv6 permanently by running startup script.
Post Reply Subscribe to Thread

Tags
app, init.d, stock kernel, terminal emulator

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes