FORUMS
Remove All Ads from XDA

[FIX] Run init.d scripts at startup (corrected sysinit along with run-parts)

13,194 posts
Thanks Meter: 39,783
 
Post Reply Email Thread
[ info ]

the reason i created this thread is that many custom kernels for our X10 are having the feature of running init.d scripts at startup, BUT the problem is that some ROMS dont have the necessary/correct files in place for executing those scripts...

so i am attaching a easy to flash update.zip which contains these missing files required for full functionality of executing startup scripts...

use the following files only if u are not able to execute init.d startup scripts on ur current ROM


[ requirements ]
  1. rooted device with recovery installed
  2. kernel/other modifications which support init.d script execution (via sysinit) [exec /system/bin/sysinit]


[ download link ]

update.zip flashable via xRecovery-0.3-GBready (amend syntax)
init.d-autorunner-v01.zip


[ additional info ]
  • i have added the following things in the update.zip:
    1. corrected /system/bin/sysint file
    2. run-parts binary in /system/xbin/run-parts (which is basically busybox 1.16.2 binary)
    3. test/example script /system/etc/init.d/99test
  • CM7-FreeXperia ROM already supports this execution so no need to flash it on that ROM
  • if ur startup script is not correctly working then u need to make sure that u have the correct permissions on the script (just tick all 9 boxes using RootExplorer permissions pop-up)


let me know how it goes!




ENJOY!
Attached Files
File Type: zip init.d-autorunner-v01.zip - [Click for QR Code] (283.5 KB, 14623 views)
The Following 24 Users Say Thank You to DooMLoRD For This Useful Post: [ View ] Gift DooMLoRD Ad-Free
26th August 2011, 10:50 PM |#2  
DooMLoRD's Avatar
OP Inactive Recognized Developer
Flag Pune
Thanks Meter: 39,783
 
Donate to Me
More
reserved reserved
The Following 2 Users Say Thank You to DooMLoRD For This Useful Post: [ View ] Gift DooMLoRD Ad-Free
29th August 2011, 05:22 PM |#3  
Aphex33's Avatar
Senior Member
Flag Winnipeg
Thanks Meter: 91
 
More
Hey Doom, Is this already implemented in Z's CM7 2.3.5 rom?
29th August 2011, 05:40 PM |#4  
DooMLoRD's Avatar
OP Inactive Recognized Developer
Flag Pune
Thanks Meter: 39,783
 
Donate to Me
More
Quote:
Originally Posted by Aphex33

Hey Doom, Is this already implemented in Z's CM7 2.3.5 rom?

i dont remember...

test it out...

if init.d scripts are getting executed w/o using this FIX then its already implemented
The Following User Says Thank You to DooMLoRD For This Useful Post: [ View ] Gift DooMLoRD Ad-Free
29th August 2011, 05:49 PM |#5  
sahibunlimited's Avatar
Senior Member
Flag Nagpur
Thanks Meter: 2,452
 
More
This solves the issues with wolf v4.0.4 with Doomkernel??
So i will retain back my init.d files...
29th August 2011, 05:53 PM |#6  
aZuZu's Avatar
Recognized Developer
Flag Zagreb
Thanks Meter: 934
 
More
Hey doom and other devs
How many copies of busybox we will have in roms

I mean why not just add special folder rtm ( run-time module ) and place our busybox there...
That would ensure that it is not overwritten and replaced by market or some external thing...

If you take look now we have devs placing busybox in /recovery/sh /xbin/sh /bin/busybox etc, etc ...
Let's not forget busybox has size 700 kB that is like almost 1 MB of wasted space per copy...

And all sh scripts can run using #!/path_to/busybox sh and let's not forget that run-parts are created by update-script in xbin or bin folder so making new copy of busybox as run-parts not needed

And sysinit can be as service in init file

service sysinit /path_to/busybox run-parts /system/etc/init.d
The Following User Says Thank You to aZuZu For This Useful Post: [ View ]
29th August 2011, 06:35 PM |#7  
yunuss.10's Avatar
Member
Flag İstanbul / Turkey
Thanks Meter: 29
 
Donate to Me
More
Hi Doom,

Thank you
29th August 2011, 06:40 PM |#8  
DooMLoRD's Avatar
OP Inactive Recognized Developer
Flag Pune
Thanks Meter: 39,783
 
Donate to Me
More
Quote:
Originally Posted by aZuZu

Hey doom and other devs
How many copies of busybox we will have in roms

I mean why not just add special folder rtm ( run-time module ) and place our busybox there...
That would ensure that it is not overwritten and replaced by market or some external thing...

If you take look now we have devs placing busybox in /recovery/sh /xbin/sh /bin/busybox etc, etc ...
Let's not forget busybox has size 700 kB that is like almost 1 MB of wasted space per copy...

And all sh scripts can run using #!/path_to/busybox sh and let's not forget that run-parts are created by update-script in xbin or bin folder so making new copy of busybox as run-parts not needed

And sysinit can be as service in init file

service sysinit /path_to/busybox run-parts /system/etc/init.d

aZuZu u will have to check all busybox binaries... wht i found was NOT ALL busybox binaries support run-parts (u can check it ur self)...
there are symlinks created using update-script which are wrong... u should be using busybox --s -install command always...

anyways the problem is that some devs use busybox in /system/bin /system/xbin
some include busybox in ramdisk (/sbin)...

so simplest solution for run-parts is to use a small "<400kb" binary which handles this well...


BTW i already use the sysinit service for my other kernels (Arc/Play/etc...) [which is much more advanced]

the solution posted here is a generic one which should work for MOST kernels...

P.S.: having a small 400Kb file is not going to waste 350MB+ space of ur /system partition
The Following User Says Thank You to DooMLoRD For This Useful Post: [ View ] Gift DooMLoRD Ad-Free
30th August 2011, 02:33 AM |#9  
tkymgr's Avatar
Member
Flag Narashino
Thanks Meter: 417
 
Donate to Me
More
Quote:
Originally Posted by DooMLoRD

aZuZu u will have to check all busybox binaries... wht i found was NOT ALL busybox binaries support run-parts (u can check it ur self)...
there are symlinks created using update-script which are wrong... u should be using busybox --s -install command always...

anyways the problem is that some devs use busybox in /system/bin /system/xbin
some include busybox in ramdisk (/sbin)...

so simplest solution for run-parts is to use a small "<400kb" binary which handles this well...


BTW i already use the sysinit service for my other kernels (Arc/Play/etc...) [which is much more advanced]

the solution posted here is a generic one which should work for MOST kernels...

P.S.: having a small 400Kb file is not going to waste 350MB+ space of ur /system partition

Hi my friend,

I think your idea is also based

so I want to try this script

Cheers,
tkymgr
Attached Files
File Type: zip run-parts.zip - [Click for QR Code] (689 Bytes, 516 views)
The Following User Says Thank You to tkymgr For This Useful Post: [ View ] Gift tkymgr Ad-Free
18th February 2012, 10:27 AM |#10  
Junior Member
Thanks Meter: 0
 
More
thanks for your such nice information sharing with us in this forum so keep it up
18th April 2012, 12:01 PM |#11  
shardul_seth's Avatar
Senior Member
Thanks Meter: 1,724
 
More
@DooMLoRD: This does not seem to work on ICS.. any suggestions?
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes