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

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.

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.

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?

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

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

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.

XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality.Are you a developer? | Terms of Service