yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] papaschtroumpf:
as written the script leaves /system mounted as read only after reboot. This is good, you don;t want /system to get trashed, but you may want to add instructions on how to modify the contents of the init.d directory, to either remove scripts or add your own scripts/tweaks. I would not be surprised if it stumps so users.

This is especially true since some custom ROM implementations have an init.d script that then calls a script in /data/local (called userinit.sh I think) which is mounted as writable, so instructions for other ROMS will not mention remounting as read/write first as they tell you to modify this userinit.sh instead.
[Android Software/Hacking General [Developers Only]] sniperkill:
Okay, now for everyone that is having problems getting this to work. When you get the busybox app from the market and run it, it will ask you what version of busybox you want to install, make sure you use version busybox 1.17.2 and install it to system/xbin. Busybox 1.17.2 is the only version that would work for me after a number of failed attempts to get init.d support. But now it works flawlessly.
[Android Software/Hacking General [Developers Only]] RAD7:
Noted but my extremely important highlight to all non aware members is that once BusyBox has been installed, do not uninstall it ever. It is better to start afresh after flashing your firmware fxz file.

---------- Post added at 12:00 PM ---------- Previous post was at 11:22 AM ----------

Ryu - Whilst I noted all you mentioned just to reiterate I do have init.d support which is confirmed when I click verify tab in your app even today. I posted my query because I do not see /data/test.log still. Also the code that needs to be there as per your code in /system/etc/install-recovery.sh is different but there is no busybox mentioned before run-parts.) but the runparts do exist as checked as part of your troubleshooting post.

Now how do I verify if my Busybox is functional? The install-recovery.sh is modified isn't it? (as a matter of fact it shows your name as well which is not part of your "add these lines" code. What is the exact impact in specifics if I delete orcmove this file? Wont it cause other issues then? I highlighted this issue as I have init.d support using your app but at the same time the test.log file does not exist. Please help.
[Android Software/Hacking General [Developers Only]] Ryuinferno:
You still don't get it, don't you? The app checks for the necessary files, if they are all present then it will report as positive...my script adds lines to install-recovery.sh...But if it is too complex like the one you gave me, errors will occur...so that's why I asked you to delete the one you attached and run the app again to create a new install-recovery.sh...if install-recovery is called by init.rc of your current ROM, then only it will work...if not, try the script manager trick...install-recovery.sh is not very important as it flashes back stock recovery, which it's not desirable when you are rooted and running a stock recovery...if you still can't get it to work or get what I mean, just flash a custom kernel...run-parts is just a busybox component to excecute a bunch of scripts in a directory...it can also exist as a separate binary...
[Android Software/Hacking General [Developers Only]] RAD7:
As it was not mentioned in trouble shooting points separate post, that if the install-recovery.sh is too complex (as in my phone) errors may occur by the script,unaware of this I posted my query. What I now u/s & I may be wrong, is though the app verify tab shows I have init.d support, but since I do not see test.log file I actually do not have init.d support. Could you advise how can I verify if my current stock ROM init.rc calls the install-recovery.sh, if I know this I can then decide whether if I need to try the script manager based install. Ideally I'd appreciate steps that doesn't involve me changing my stock ROM and kernel. For my phone the only way we can boot in to CWMR is through an GUI app called "Atrix 2 Bootstrapper" else stock recovery is the only option on this phone (just informing if by knowing this you'd recommend me not to delete or move my current install-recovery.sh). Request your patience with additional questions as do not want to hastily act and cause any issues for myself. Also I have read your entire thread with all posts and have gone through troubleshooting thread and only then asking questions.
[Android Software/Hacking General [Developers Only]] Ryuinferno:
This is because your case is rare and actually there's this one guy who attached a similar install-recovery.sh as yours...and after deleting it and a re-run of the app, init.d works for him as his init.rc has install-recovery.sh called...to check, just browse through your /init.rc file and search for "install-recovery"...if it's there, then it will work theoretically (which should be there, I'm 90% sure)...just make sure that your install-recovery.sh looks something like this without extra lines:

#!/system/bin/sh
# Ryuinferno @ XDA 2012
# Init.d support
run-parts /system/etc/init.d/

Remember to leave a space below the last line...

*Note: I have not used your device before, so I'm not sure whether will anything happen if you use this hack for init.d...but maybe, just maybe your CWM might be permanent as install-recovery.sh was meant to restore stock recovery after every reboot...
[Android Software/Hacking General [Developers Only]] RAD7:
Attachments for PM sent

Attachments for PM sent to keep thread clean. Please help.
[Android Software/Hacking General [Developers Only]] derride8:
Does this work for tablets?
[Android Software/Hacking General [Developers Only]] Ryuinferno:
Yes...as long as it is android...
[Android Software/Hacking General [Developers Only]] killed:
The phone name LG Prada 3.0 P940 with stock ROM is working with .apk (not test within flash via recovery CWM)
[Android Software/Hacking General [Developers Only]] muko_pilat:
Thanks it work

Your patcher is work in my smarfren andromax i :good::good::good::good:
[Android Software/Hacking General [Developers Only]] wyndcryst25:
Works on Note II with stock recovery and kernel! :good: :good: :good:

Thank you very much Bro! :highfive:
[Android Software/Hacking General [Developers Only]] cegrade:
I really don';t know why I coudln't get it work :'(

I installed busybox and have all applets(they showed green and should be installed)

I didn't choose Smart install

Stock rooted 2.3.6, didn't add script in build.prop, but have deleted some stock apps

I am thinking that have I really get busybox installed because when I choose normal install, after a while, it reboot, but after reboot and it says it is installed.

I havce tried busybox installer app but it is failed to install
[Android Software/Hacking General [Developers Only]] Lownita:
Permissions are set to 777 for init.d folder, 755 would also be ok, right?
[Android Software/Hacking General [Developers Only]] Ryuinferno:
Yup...;)

Please check your /init.rc file and see whether there a "install-recovery" phrase...if yes, it should work if you have busybox; if not, just use the script manager trick...
[Android Software/Hacking General [Developers Only]] RAD7:
Specific to Atrix 2

Specific to Atrix 2 (if you read my few posts below) I deleted my installrecovery.sh & ran Ryu's apk again as per his advice and I now have init.d.
[Android Software/Hacking General [Developers Only]] k3v0:
Works well on my stock Galaxy Note 2. I am able to utilize init.d support, required to stop leaks in AFWall+, and maintain "normal" status, required to use my samsung allshare cast hub. A stock kernel with init.d support added caused the status to change to modified and allshare to fail to connect, so this is a great workaround.
[Android Software/Hacking General [Developers Only]] NAZUnlimited:
Uni-init v1.0.apk works on Huawei U8666E-1 (Huawei Ascend Y201 Pro) with full stock ( recovery, kernel and rom )

Tx
[Android Software/Hacking General [Developers Only]] encik_racun:
Works on galaxy wonder i8150
[Android Software/Hacking General [Developers Only]] cegrade:
Thanks a lot!!!

I used the script manager trick and try the init apk again and it works!:):):)
[Android Software/Hacking General [Developers Only]] Guitwo2:
I had a rough time making init.d work.

I tried many things before I realized that the only thing that was missing in my install-recovery.sh was this first line :eek: :

#!/system/bin/sh
[Android Software/Hacking General [Developers Only]] bigknowz:
Check init.d settings

I wrote a script that allows you to check what settings (using echo command) are in your init.d vs. the actual settings on the phone. A file showsettings.txt is created in /sdcard with all the values. Link to the file is in my signature, just change the extension from .txt before you run it in smanager or terminal.
[Android Software/Hacking General [Developers Only]] Ryuinferno:
It is kinda rude to pop in someone else's thread and advertise...:rolleyes:

EDIT: Your link isn't working btw...
[Android Software/Hacking General [Developers Only]] bigknowz:
Me?

Was that comment directed to me?
[Android Software/Hacking General [Developers Only]] bubu2001:
Where from can I download latest version of this init.d intializer?
[Android Software/Hacking General [Developers Only]] denzel09:
R: [MOD][APK+SCRIPT+ZIP] Enable Init.d for Any Phones w/o Need of Custom Kernels!!!

Thanks
[Android Software/Hacking General [Developers Only]] mixednuts:
Have you checked the first couple of posts by the OP?
[Android Software/Hacking General [Developers Only]] Perseus:
Custom Rom inclusion

First off, I wish to thank for such an outstanding mod. This is awesome.

The APK does the job very well. The test does establish that init.d is working successfully after the APK enables it.

I have a slightly different problem. I am trying to enable init.d support in a custom ROM I am building. Here's the steps I followed so far without success.

1. Add lines at the bottom of existing install-recovery script to execute init.d.

run-parts /system/etc/init.d

2. I added the init.d folder with the sample test script from this thread.

3. Set the permissions to 644 on the init.d as well as the test scripts inside. Also set 755 on the install-recovery.

4. Since those permissions did not work, I tried 755 on the init.d folder and scripts inside.

5. I did copy the run-parts binary to /system/xbin folder and made sure it had executable permissions. All objects have root as owner (0).

Yet I don't see the test log in /data folder.

Note I do see a successful test log upon using the Universal init.d app.

Can someone help me pin point the issue ?
[Android Software/Hacking General [Developers Only]] Ryuinferno:
The permissions of the init.d folder and the scripts in it should be 755, not 644...
[Android Software/Hacking General [Developers Only]] Perseus:
Thanks Ryuinferno. Appreciate the advice. I will test and post back the result.
[Android Software/Hacking General [Developers Only]] Kanzhelier:
can i get the best script for my SXU ???
[Android Software/Hacking General [Developers Only]] ayazm.140895:
I have done everything according to your guide but I can't get in init.d support! I can't see testlog in /data, I have installed the mod using terminal emulator and even tried through app!

Sent from my LG P500 eating tastiest gingerbread ever! :D
[Android Software/Hacking General [Developers Only]] ken_alpha24:
i dont get it... what are you suppose to do in the update-binary? where do i get it? and how do i get it?
[Android Software/Hacking General [Developers Only]] mintume:
not working for me.

here are the details:

i have Galaxy S3 International I9300 version on stock 4.1.2 firmware. it's rooted.

i installed busybox first. when i run it, it asked for superuser permissions which i granted. it automatically started smart install after i run it. then i waited this smart install to finish. then i clicked install and it asked for smart or normal install. i selected normal install. i install in xbin this time.

then i installed your v1 apk file and clicked activate. after it's success message i clicked verify. this time also got the message done.

then i rebooted 3 times but couldn't find test.log in /data.

then i moved to your troubleshoot steps:

1. Check whether have you installed busybox properly, especially run-parts. REBOOT after installing, then only apply this script.

done

2. If you are using the busybox installer by Stericson, please use "normal installation method", NOT "smart installation method".

done

3. Check whether are these files present with the correct permissions (please change if the permissions are wrong):

- /system/bin/sysint (rwxr-xr-x) [owner: root (0), group: shell (2000)]

- /system/etc/init.d (rwxrwxrwx) [owner: root (0), group: root (0)]

- /system/etc/init.d/00test (rwxrwxrwx) [owner: root (0), group: root (0)]

-/system/etc/init.d/08setperm (rwxrwxrwx) [owner: root (0), group: root (0)]

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

done - corrected the permissions of init.d folder and files inside it

4. Check whether you have run-parts installed. Go to /system/xbin, you should be able to find a fine named "run-parts"

i couldn't find run-parts in this folder so i downloaded and copied as per your instructions.

5. Check whether you have these lines in /system/etc/install-recovery.sh (if not, please add them in manually, remember to leave an EMPTY line at the end of the file)

Code:

# init.d support

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

corrected as per your instructions

6. If all the above are still not helping, please download this: run-parts.zip and extract it (DO NOT flash it). Place the file named "run-parts" in /system/xbin. Change permissions to rwxrwxrwx, owner to root (o) and group to shell (2000). Reboot and check /data again.

done. permissions are set

Now i repeated the process again with apk file after all these checks. but again couldn't find test.log

then i did step 7 also:

7. Use this as a last resort: Download Script Manager from Play Store: Link. Then navigate to /etc/install-recovery.sh, select it and run as root and at boot (select the skull and gear icon).

did it but no luck

then i tried term-init and zip-init methods also but no lock again.

term-init method: all the message were shown OK and done.

i can't understand what am i doing wrong.
[Android Software/Hacking General [Developers Only]] Ryuinferno:
Your busybox must be corrupted...I said, use normal installation right from the beginning...type this in terminal emulator and post the output:

which run-parts

Also look for any lines that contain "install-recovery" in /init.rc...if you can't find one, means this hack will not work for you...

No details, no support...
[Android Software/Hacking General [Developers Only]] mintume:
I checked init.rc, there is line which contains install-recovery.

Here is output of 'which run-parts' on terminal: system/xbin/run-parts
[Android Software/Hacking General [Developers Only]] Ryuinferno:
No idea then...things should work...delete install-recovery.sh and start over...or just use a custom kernel...there are many for the s3 anyway...to me, it seems that your busybox is acting weirdly...cause the script manager trick always works...
[Android Software/Hacking General [Developers Only]] akuila:
every step i followed and its say done without any error message (i believe my eyes still good) using term-ini.sh

i've rebooted twice but, there is no test.log in my /data folder

i'm using samsung galaxy mini, gingerbread XWKT9
[Android Software/Hacking General [Developers Only]] Ryuinferno:
Post your /etc/install-recovery.sh here...and check whether /init.rc has the line "install-recovery" in it or not...my guess is that you are using Link2sd or something similar...So install-recovery.sh might be modified...
[Android Software/Hacking General [Developers Only]] Androguide.fr:
[MENTION=4576707]Ryuinferno[/MENTION] Hey bro!

While working on Pimp my Rom's bew beta, I came up with a way to grant init.d support to any device, which happens all on the app side, no need for install-recovery.sh (or any other file) modifications.

The concept is very simple but it's what makes it powerful and truly universal :

Using Android's BroadcastReceivers mechanism, the app detects whenever the device is rebooted, and when it does, after the boot is completed, it will execute all the scripts inside /system/etc/init.d automatically.

I also refined the kernel init.d support testing, it now requires a reboot but will really detect if the user's kernel has init.d support by creating a simple init.d script that creates a file on the sdcard, and after the reboot, the app will check if the file has indeed been generated, if it does, the kernel has init.d support so the app is useless, otherwise, it doesn't.

Finally, I added options to manage the init.d scripts (edit/delete/run), and will probably soon add an option to select your "init.d" folder (i.e make it so that /sdcard/newinitd is considered as /system/etc/init.d and the app will execute all the scripts in it instead of in the real init.d folder).

The standalone app is fully open-source, so if you want to fork it/add it here/modify it to your needs, go ahead, it's yours : http://github.com/Androguide/Universal-init.d

I attached a signed apk to this post.

Here are a few screenshots :

Also, I wanted to ask you some help ;

I could definitely use your bash knowledge for a new project I started, which allows to flash zips without using a recovery, if you got time, please go take a look and tell me if you see any mistake or better bash translations of updater-script commands. (thread here)

-
[Android Software/Hacking General [Developers Only]] detdett:
"Your device doesn't have init.d support . " I'm running 4.2.2 on Samsung galaxy exhibit
[Android Software/Hacking General [Developers Only]] ArtfulDodger:
Very nice work, Andro! App working good so far. Scripts will execute within the app, only thing I am trying to determine is if scripts are actually running at boot. It will be difficult as the scripts I have do not generate logs at the moment (NOS). NOS entropy is not running at boot it appears.

At any rate I know it's a WIP and it's very handy for many of us. I like that you can remove scripts you don't want easily as well. This will cure a lot of hassle for many users.
[Android Software/Hacking General [Developers Only]] Androguide.fr:
Thanks for the nice words. To see if the scripts run, simply create an empty script in /system/etc/init.d called test.sh for example, and paste this code in it :

#!/system/bin/sh

echo "initd is working!" >> /sdcard/TEST_INITD.txt

Make sure to set the right permissions to this script (i.e in terminal chmod 0755 /sdcard/TEST_INITD.txt), then reboot.

Give it at least 15 seconds after your device is rebooted, then go to /sdcard, if the file named TEST_INITD.txt has been created, it works.

(also, you should see the "superuser granted to Universal init.d" toast a few seconds after the boot is completed)

Make sure to do the test (using the test button) before, it basically does what I described above, but without the app activated, in order to determine if your current kernel already has init.d
[Android Software/Hacking General [Developers Only]] ArtfulDodger:
OK sadly no, the scripts are not executing at boot. Manually ran the test script within the app and it created the file, on boot it does not execute. Good news is that scripts can be activated manually within the app which doesn't take very long.
[Android Software/Hacking General [Developers Only]] Androguide.fr:
Are you sure the toggle at the top (under the title) is on ?
[Android Software/Hacking General [Developers Only]] ArtfulDodger:
Yes. Tried twice.
[Android Software/Hacking General [Developers Only]] Androguide.fr:
That's weird, it's just a regular service, it's a basic android apps feature.

If possible, can you please give me a logcat of your device booting (leave it running like 20seconds after boot is completed, because it can take a while for the device to mount the sdcard, as well as for the app to execute all the scripts).
[Android Software/Hacking General [Developers Only]] ArtfulDodger:
Can't seem to create one. Sorry there are no logs in the dev/log folder. Anywhere else I should look?

Meantime I am uninstalling and reinstalling the app to start over. See what happens.

Edit: No dice.
[Android Software/Hacking General [Developers Only]] ArtfulDodger:
OK downloaded Catlog app and made one. I only pasted info pertaining to your app:

04-27 18:18:42.636 I/dalvikvm(1039): threadid=3: reacting to signal 3

04-27 18:18:42.666 D/Strategy(2158): [ADVANCED] load strategy from file

04-27 18:18:42.836 I/Process (402): Sending signal. PID: 1926 SIG: 3

04-27 18:18:42.846 I/dalvikvm(1926): threadid=3: reacting to signal 3

04-27 18:18:43.016 I/dalvikvm(1039): Wrote stack traces to '/data/anr/traces.txt'

04-27 18:18:43.067 E/ActivityManager(402): ANR in com.androguide.universal.init.d

04-27 18:18:43.067 E/ActivityManager(402): Reason: Broadcast of Intent { act=android.intent.action.BOOT_COMPLETED flg=0x10 cmp=com.androguide.universal.init.d/.BootReceiver (has extras) }

04-27 18:18:43.077 W/ActivityManager(402): Killing ProcessRecord{422df9c8 2236:com.androguide.universal.init.d/u0a10136}: background ANR

04-27 18:18:43.197 D/dalvikvm(402): GC_FOR_ALLOC freed 792K, 22% free 10823K/13836K, paused 107ms, total 107ms

04-27 18:18:43.197 I/dalvikvm-heap(402): Grow heap (frag case) to 10.993MB for 262190-byte allocation

04-27 18:18:43.297 D/dalvikvm(402): GC_FOR_ALLOC freed 393K, 25% free 10685K/14096K, paused 101ms, total 101ms

04-27 18:18:43.307 I/ActivityManager(402): Process com.androguide.universal.init.d (pid 2236) has died.

04-27 18:18:43.347 I/dalvikvm(1926): Wrote stack traces to '/data/anr/traces.txt'

04-27 18:18:43.367 D/dalvikvm(2158): GC_EXPLICIT freed 355K, 21% free 2527K/3160K, paused 13ms+2ms, total 605ms

Looks like app not responding errors?
[Android Software/Hacking General [Developers Only]] akuila:
this is sir :

View attachment 1917737
[Android Software/Hacking General [Developers Only]] Androguide.fr:
Yeah, it's good, it means the app is useful for you, if you had the other message ("your kernel already has init.d") it would mean that this app is useless for you.

I'll swap the colors though, would make more sense you're right.

---------- Post added at 03:48 AM ---------- Previous post was at 03:42 AM ----------

Yeah, for some reason it gives an ANR on your device, I'll need to investigate this. The broadcast intent gets received properly though.

Thanks a lot for the logcat, very useful :good:
[Android Software/Hacking General [Developers Only]] Ryuinferno:
Hey there! Will definately take a look at it soon...:)...but just one quick comment...creating a file in /sdcard is not really reliable as sometimes /sdcard gets mounted after boot...generating it in /data would be better...

Yea, it's confirmed that my method won't work for you... Cause the "install-recovery" lines are commented out...
[Android Software/Hacking General [Developers Only]] akuila:
yeah, i've tried to uncomment those lines but it revert to commented when reboot, idk why.

but now i can use init.d in gingerbread, thanks to Androguide.fr and you also.
[Android Software/Hacking General [Developers Only]] Ryuinferno:
You can't lol...you must extract your initramfs, edit it and repack it into your kernel...
[Android Software/Hacking General [Developers Only]] akuila:
i can, using apk file from Androguide.fr, posted on previous post. now i can see Test.log in /data generated by your script 00test
[Android Software/Hacking General [Developers Only]] Ryuinferno:
What I meant was you can't uncomment the lines by editing /init.rc just like that... Lol