yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] el.quechon:
go to system/etc then find install-recovery.sh open it and delete everything in there paste this then:

#!/system/bin/sh

# If you're implementing this in a custom kernel/firmware,

# I suggest you use a different script name, and add a service

# to launch it from init.rc

# Launches SuperSU in daemon mode only on Android 4.3+.

# Nothing will happen on 4.2.x or older, unless SELinux+Enforcing.

# If you want to force loading the daemon, use "--daemon" instead

/system/xbin/daemonsu --auto-daemon &

# Some apps like to run stuff from this script as well, that will

# obviously break root - in your code, just search this file

# for "install-recovery-2.sh", and if present, write there instead.

/system/etc/install-recovery-2.sh

After that safe and reboot and look for the test.log file in /data

Make sure to give proper permission before rebooting you can find that in op first post
[Android Software/Hacking General [Developers Only]] bombadier:
scripts in my init.d folder are not starting, those in su.d work fine, I have installed uni-init to test and everything looks good,anyone any ideas ?

Example

The script 00test which will create a log in /data, put the script in init.d it does not work, move it to su.d and rename it 00test.sh and it runs and generates a log in /data

I am on slimsaber which has init.d support and the app reports that everything is working, scripts in init.d do not work but manually running them does

Correct permissions etc

latest busybox 1.23.2

Also going to /system/etc/init.d and running the script manually works,just not at startup like it meant to.
[Android Software/Hacking General [Developers Only]] Perseus:
Can you please use System Manager to see if Scripts do get executed at Boot ? Alternatively Script Manager is also a good test.

If one or both fail then there's a chance your kernel does not look in init.d and you'd need to look into some sort of insmod option or continue Script manager.
[Android Software/Hacking General [Developers Only]] bombadier:
Thanks for the pointers,sorry dont understand how to check with system manager? is that an app ? Am using slimsaber and ak's kernel which is meant to have support, it seems like the init.d folder is definitely not being allowed to run at boot, odd that su.d is working, as I said I can run the script and it works, just not at startup
[Android Software/Hacking General [Developers Only]] Perseus:
Can you Try SManager AKA Script Manager ?

Meant to say [APP 2.1+] System Tuner not Manager. :p
[Android Software/Hacking General [Developers Only]] bombadier:
Now I found the app but still not sure how to use it to show what got ran on boot,although I suspect that it will show the scripts not being ran,will ask in ak's thread to see if its something with the kernel,

The same script with a .sh added execute on startup from the su.d folder,hope that makes sense?

Ok asked in ak's thread and he says known limitation with lollipop,that will be that then

tapatyping fae the bacon
[Android Software/Hacking General [Developers Only]] alanthehat:
su
mkdir /data/logs
chmod 0777 /data/logs
touch /data/logs/startup.log

Then, in every startup script:

echo $(date) $0 >> /data/logs/startup.log

will tell you what has run & when (you can substitute the name of the script for '$0')

cat /data/logs/startup.log
[Android Software/Hacking General [Developers Only]] viaimpedita:
Some one can help me?

I don't nave log in data after reboot.

I try run script install-recovery.sh an install-recovery-2.sh with script manager bit i have this error :

Only position indipendent executables (PIE) are supported

I have fonetab 8 with lollipop

EDIT : i solved get runparts file from my samsung s4 mini

:crying::crying::crying::crying::crying:

EDIT 2 : Also for me the script do't run at boot, why??

If i run script with script manager i have testlog i data

Thanks all
[Android Software/Hacking General [Developers Only]] Ulf3000:
working on z3c kitkat stock ! thanx so much ^^
[Android Software/Hacking General [Developers Only]] kiaheyrati038:
tnx man.it worked great on Xperia V lt25i 4.3 rooted stock ROM.:good:
[Android Software/Hacking General [Developers Only]] famewolf:
Is there a way to apply init.d to a flashable zip of the stock rom?
[Android Software/Hacking General [Developers Only]] kos25k:
hello guys!can anyone please tell me how to make this https://github.com/poliva/random-scripts/blob/master/wifi/hotspot-bypass-android.sh an executable script?
[Android Software/Hacking General [Developers Only]] dogmatism:
Working well, thanks. 5.1.1. stock
[Android Software/Hacking General [Developers Only]] mark.dx:
thanks OP this mod worked like a charm !

previously I had a problem the init.d won't work somehow, I already done searching for the work-around and tried many method and it fails. I read that the init.d won't work caused by SELinux or something but I don't want to temper my stock kernel. But after do more searching I find your thread then I give it a go. Tried the zip-init method but it failed there is no Test.log in data folder. Then I used the term-init.sh method and it successfully enable init.d on my phone, but I need to remove sysinit and install-recovery first before run the term-init script and rebooting twice. the test.log is present after reboot. thanks for this awesome mod :)

Device : Xiaomi Redmi 1S

ROM : Mokee Stable Release 20151115 Lollipop 5.1.1 based CM12.1
[Android Software/Hacking General [Developers Only]] JazzMartian:
Thanks for the app. I have built in init.d support, but I run it anyways, cause, well...I'm Homer J. Oddysey ;) It's seriously though the best app of its kind, imo.

Oh, and I dig your avatar!
[Android Software/Hacking General [Developers Only]] databits:
Tried term-init on my 5.1 stock rom, executed successfully but I can't see the test.log in /data after twice reboots.

All troubleshooting from 1 to 5 checks out but still no test.log.:(
[Android Software/Hacking General [Developers Only]] xonich:
Hello,

With Galaxy S5 Neo:

In my init.rc, I have these lines :

******

service flash_recovery /system/bin/install-recovery.sh

class main

seclabel u:r:install_recovery:s0

oneshot

******

If install-recovery.sh is in /system/bin , can I change term-init.sh to use /system/bin/install-recovery.sh instead of /system/etc/install-recovery.sh
[Android Software/Hacking General [Developers Only]] matrixex:
Bro please tell me what should. I add to ini.d script folder so that on every booy my /data partition. Will wipe automatically. Please i need it

---------- Post added at 07:30 AM ---------- Previous post was at 07:30 AM ----------

Bro please tell me what should. I add to ini.d script folder so that on every booy my /data partition. Will wipe automatically on everyboot Please i need it
[Android Software/Hacking General [Developers Only]] Dmav:
(removed)
[Android Software/Hacking General [Developers Only]] amiro13:
;) Yeah! It works! Thx!

Huawei Y560-U02 sc7731g android 4.4.2 stock
[Android Software/Hacking General [Developers Only]] mrchrister:
hey there,

just tried the uni-init app on firetv and unfortunately there is no /data/Test.log after reboot. I can chmod 777 /system/etc/init.d/00Test and execute the file but after reboot, the permissions are reset
[Android Software/Hacking General [Developers Only]] amiro13:
Look the post http://xdaforums.com/showpost.php?p=32734144&postcount=4
[Android Software/Hacking General [Developers Only]] Flopik2:
Is anyone try this on the nexus 6p? Im searching a way to enable init.d on stock rom with root
[Android Software/Hacking General [Developers Only]] 4ld0u5:
i tried all but it seems my system cannot initiate init.d files, I cant even find test.log

i am running 5.1.1
[Android Software/Hacking General [Developers Only]] veez21:
Try kernel auditor, it emulates init.d by running at boot.., has the same effect...

Download on play store
[Android Software/Hacking General [Developers Only]] evildog1:
i can't downlopad. it says

404 not found

Can't find it!
[Android Software/Hacking General [Developers Only]] LuanTeles:
after enabling can i desinstall the app?
[Android Software/Hacking General [Developers Only]] Emre67511:
It didn't worked for me :( I checked all points of troubleshooting but it still didn't work. The line of my install-recovery.sh are only

# Init.d support

# Ryuinferno @ XDA 2012

run-parts /system/etc/init.d/

I have no install-recovery 2 file

I deleted the last line and copied your line into it and also left an empty line at the end but it still don't works. After I reboot the install-recovery file is deleted

Is there a solution ?
[Android Software/Hacking General [Developers Only]] Gourangaputhal:
After enable in universal int.d enabler apk.... Is there any effect by uninstalling the apk.....
[Android Software/Hacking General [Developers Only]] LegendaryMagbabalut:
Tried Term init.. . Im on android marshmallos 6.0 but no test.log in /data.. . what can in do??
[Android Software/Hacking General [Developers Only]] ranchu-panchu:
Hi,

I wander what the concept of it ?

Isn't /etc part of ramdisk ?

If yes - how is it that the script manage to change ramdisk ?

Thanks,

Ranchu
[Android Software/Hacking General [Developers Only]] bpushpak:
Simplest way is to add the following lines at the end of init.qcom.postboot.sh file and you will have full init.d support

### Init.d support ###

/system/etc/init.d/*
[Android Software/Hacking General [Developers Only]] rony raj:
thumbs up man i need this
[Android Software/Hacking General [Developers Only]] ranchu-panchu:
Hi,

The init.d is working (it creates file with date every boot).

Yet, on adding echo command, I can't find where the "echo" output goes ?

It is not in logcat or dmesg ?

So where did it goes ?

Thank you,

Ranchu
[Android Software/Hacking General [Developers Only]] bpushpak:
This depends on ROM and activities you are trying to do. For example in my mobile the init.d script that touches the system folder does not work,but the fstrim command works perfectly.

My guess this is due to permission issues in later versions of Android or how the ROM has been built.
[Android Software/Hacking General [Developers Only]] ranchu-panchu:
Thanks for the hints, yet I wander what's the real reason, surely someone has investigated this, no ?
[Android Software/Hacking General [Developers Only]] momotizzati:
Hi, I tried the app and seams to work fine so I got init.d support. My problem is that link2sd still not recognizing my ext2 partition on the sd card. I'm on Android marshmallow with huawei honor 4c. Could any one help me?

Thanks

Inviato dal mio CHM-U01 utilizzando Tapatalk
[Android Software/Hacking General [Developers Only]] bpushpak:
I am not sure why the issues happen like this. The fstrim script I mentioned works perfectly in this phone, but does not work in MIUI 8 even though both ROM are lollipop based and are having identical hardware

Something in ROM build or kernel (MIUI is having custom kernel)

---------- Post added at 09:21 PM ---------- Previous post was at 09:18 PM ----------

Could this be that init.d scripts are not getting executed? Have you tried to see if other init.d scripts other than the test script works? Try with something like the SQL lite optimisation script and see if the log is getting generated
[Android Software/Hacking General [Developers Only]] virus_boy_18:
what app should i use to change permission of the folder and files ??? and i am using ES file plorer i cant see group :shell--------- instead it has group :root
[Android Software/Hacking General [Developers Only]] mrrocketdog:
ES file explorer can change perms. :)

"err on the side of kindness"
[Android Software/Hacking General [Developers Only]] rony raj:
Try mixplorer
[Android Software/Hacking General [Developers Only]] virus_boy_18:
btw i have EVo-Grace Ui for j7 prime ...android 6.0.1(marshmallow)

nothing happen i did everything ... cant find test.log in /data
[Android Software/Hacking General [Developers Only]] virus_boy_18:
the problem is busybox cant be found even when verify with apk init.d help ... i did everything i still cant find the line "install_recovery" in /init.rc

help plzzz ... i want to mount ext2 sd card

i have android 6.0.1 Evo Grace Ui for samsung j7 prime .. https://xdaforums.com/galaxy-j7/development/rom-evo-grace-v1-0-t3520809

Flash with TWRP https://xdaforums.com/galaxy-j7/how-to/guide-root-galaxy-j7-prime-twrp-t3503926
[Android Software/Hacking General [Developers Only]] mdmaher:
Please help

I tried your method 1 ( apk method ) on my galaxy grand PRIME stock 5.0.2 (SM-G530FZ).

BUT NO luck
[Android Software/Hacking General [Developers Only]] Vagelis1608:
Why don't you try the other 2 methods?
[Android Software/Hacking General [Developers Only]] mdmaher:
Your apps say it's working, but after reboot can't find test.log

Manager method also tried, but test.log is not executed.

I can't try recovery type as I don't have custom recovery.

Please do something
[Android Software/Hacking General [Developers Only]] Vagelis1608:
For android 4.3+, only method #2 works.

Also, this is not my work.
[Android Software/Hacking General [Developers Only]] mdmaher:
I'm using 5.0.2 (lollipop)

In your original post, you said you will try your best to help, thats why I was asking :(

Edited : Forgot to mention that my device is Qualcomm
[Android Software/Hacking General [Developers Only]] Vagelis1608:
SELinux is probably set to enforcing.

I can't help you much. The developer might be able to help you.
[Android Software/Hacking General [Developers Only]] mdmaher:
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://xdaforums.com/showthread.php?t=2698813&page=1
[Android Software/Hacking General [Developers Only]] 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
[Android Software/Hacking General [Developers Only]] roninq6:
1-5 steps - done.

6: I tried 'Uni-init' and 'Term-init' method and still don't have Test.log in /data.. :/ Help?
[Android Software/Hacking General [Developers Only]] kaizokan:
Did you manage to get it working? and how?

EDIT: never mind. I now used the terminal method. no test.log yet.
[Android Software/Hacking General [Developers Only]] 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

通过我的 MHA-AL00 上的 Tapatalk发言
[Android Software/Hacking General [Developers Only]] 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.
[Android Software/Hacking General [Developers Only]] landcruser:
the question is the init.d seems not work .scripts not execut at boot
[Android Software/Hacking General [Developers Only]] Medeon:
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.
[Android Software/Hacking General [Developers Only]] Medeon:
Actually I overlooked the install-recovery.sh file (I was looking for it in the init.d folder:o). 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?
[Android Software/Hacking General [Developers Only]] Saswata Chakraborty:
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.
[Android Software/Hacking General [Developers Only]] jagster936:
Does this work on android 5.0.1? Verizon s4 PL1 firmware. I’m looking to disable ipv6 permanently by running startup script.
[Android Software/Hacking General [Developers Only]] alecxs:
does not work on Lollipop. because install-recovery.sh is executed with very restrictive selinux context.

– Source: Chainfire Google+

Try to set selinux permissive with SELinuxModeChanger first. Then try to install init.d

edit: app is no longer available on google play, is this project discontinued? May I suggest flashable Kernel init.d Support Injector - the author [MENTION=4544860]osm0sis[/MENTION] claims this zip is also signed, so could potentially be used with stock recovery on a locked bootloader.
[Android Software/Hacking General [Developers Only]] osm0sis:
You're better off using su.d (SuperSU) or post-fs-data.d (Magisk) than trying to get init.d to work.
[Android Software/Hacking General [Developers Only]] xXCoolGuYXx:
Will this work on a LG V20 H91810q T-Mobile on magisk 16.0v root ?
[Android Software/Hacking General [Developers Only]] kblade29m:
Getting error "Read-only file system" when the script try to copy the sysinit and install-recovery.sh. For some unknown reason, the script failed to mount /system as rewritable due to "Device is busy".

Manually run -- "mount -o rw,remount /system" in adb shell.

Re-run the script "sh term-init.sh"

All executed properly.

The script seem to work fine.

Thanks.
[Android Software/Hacking General [Developers Only]] ranchu-panchu:
Hello,

Is there a way to start the init script a bit earlier ? I see that UI starts before my scripts, but I need the script to start before UI.

Is there a way I can make it earlier ? Or do I need to find other method ?

Thank you very much for the init.d tool, it's very good.

ranran
[Android Software/Hacking General [Developers Only]] HemanthJabalpuri:
hi..

My device successfully supports init.d...

Android v4.4.2 Device SamsungGalaxy S4 Mini GT-I9192(serranodsdd) ..ROM stock touchwiz...

I have a doubt..

When i enabled init.d through app the sysinit script is

#!/system/bin/sh
# Init.d support
# Ryuinferno @ XDA 2012

export PATH=/sbin:/system/sbin:/system/bin:/system/xbin
/system/bin/logwrapper run-parts /system/etc/init.d

and when I use term init script then the sysinit script is

#!/system/bin/sh
# init.d support

export PATH=/sbin:/system/sbin:/system/bin:/system/xbin
run-parts /system/etc/init.d

Which is better?

What is the additional use of that /system/bin/logwrapper ?
[Android Software/Hacking General [Developers Only]] 站住那逗比:
Hello. :)

My Android TV box(GF-WM28H, Android 4.4.2) successfully supports init.d through your script file, thanks!

(This box is a deep customization Android, can just use system app, but leave a usb cable can use adb directly connect. Use this script to auto open network adb connection port ((which dropped default

That's all, thanks again!
[Android Software/Hacking General [Developers Only]] Henry Markle:
The download page is somewhat broken.

Could you uodate the download site?
[Android Software/Hacking General [Developers Only]] clickmeplz:
It works with script manager app or if i run sh /etc/install-recovery.sh at emulator.

But i have to run the command in each reboot or keep script manager app and i can not uninstall it.

Is there a better solution?

Device: Mi 4

Rom: Xiaomi eu

Kernel: ZeurionX
[Android Software/Hacking General [Developers Only]] edzamber:
Hi

Yes

You need to add init.d support in your Kernel directly.

Ask to your Kernel dev to do it or edit your Kernel ramdisk.

https://mega.nz/#!7lFkjCoL!qliHaAMzFWv2ZT-PNwF9PgyU0U5OG-0NjXpcd-T9sAM
[Android Software/Hacking General [Developers Only]] alecxs:
for systemless root solution /su/su.d or /data/adb/post-fs-data.d and /data/adb/service.d
[Android Software/Hacking General [Developers Only]] :
For me Universal Init.d Support doesn't work on Android emulator named MEmu App Player: The message Success.!You have init.d support! simply is a fake.

It's not wondering me because neither init.rc and/or init.<machine_name>.rc - the files that are processed by Android's init at boot - nor any other hereby imported .rc file triggers sysinit.sh and/or install-recovery.sh script.
[Android Software/Hacking General [Developers Only]] jamestts:
hi,maybe can add my way to your troubleshooting guide. i found that odexed stock rom will not work with the script. but you can install script manager and set install-recovery.sh as boot,root and fav. this is how i make it work with odexed galaxy mini,mini 2,w,nexus,pocket.
[Android Software/Hacking General [Developers Only]] Ryuinferno:
I don't think so...there is something else causing it...tested using an odexed ROM...:)
[Android Software/Hacking General [Developers Only]] jamestts:
thx for the info. i installed busybox 1.9.3,run your script,reboot 3 times and check in data folder. but i didnt see the log file. so at first i click install-recovery.sh and select run in root explorer,then the log file appear in data folder. thats why i so sure with using the script manager to run that script on boot. after that i flashed geeky engine and comfirmed it does running. i think i still need to find out where is the problem caused. but thanks for the script.

Sent from my GT-I8150
[Android Software/Hacking General [Developers Only]] Ryuinferno:
Added Zip-init...now users can choose to use terminal emulator or flash it through recovery...:D
[Android Software/Hacking General [Developers Only]] Ryuinferno:
My script is now being used in Droid Manager! Check it out! :D

http://xdaforums.com/showthread.php?t=1772338

But if you just want a simple script, just use Term-init or Zip-init...:)
[Android Software/Hacking General [Developers Only]] GregórioAxiaMagno:
Perfect!

Works with LG P698 stock!
[Android Software/Hacking General [Developers Only]] allenpot:
now i'm really starting to chase all threads how to create custom roms on android phone... thanks
[Android Software/Hacking General [Developers Only]] ald01:
Amazing work with LG Optimus 2x

thx very much:good::good::good::good::good:
[Android Software/Hacking General [Developers Only]] Ryuinferno:
My work is featured in the XDA News Portal: Init.d Support for Any Rooted Phone (Thanks to the_scotsman! Thanks for the support! :D
[Android Software/Hacking General [Developers Only]] subnoize soulja:
This is probably a dumb question but here it is anyways??? Does this mod give performance tweaks and such or is it just to give our devices init.d support?? Sorry I'm just confused about what this really does for our devices??
[Android Software/Hacking General [Developers Only]] Ryuinferno:
It is just to enable init.d support...then you will have to apply scripts such as Thunderbolt, V6 supercharger, Supremancy script, Smurfed out script or maybe even Pimp my ROM (it contains init.d scripts)...after applying my script to enable init.d and the others, then only your phone's performance will be improved...:)