Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
DooMLoRD
Old
(Last edited by DooMLoRD; 15th March 2012 at 06:56 AM.)
#1  
DooMLoRD's Avatar
Recognized Developer - OP
Thanks Meter 20900
Posts: 10,144
Join Date: Jul 2010
Location: Indian Institute of Management, Ahmedabad (IIMA)
Default [ADDON][Xperia S] Generic startup/init.d scripts support for Stock ROM/Kernel

[ info ]

i am attaching a easy to run package which contains the files required for full functionality of executing startup scripts (init.d scripts)...

basically this will allow the user to execute custom shell scripts, placed in /system/etc/init.d/ folder and they will be executed on each boot!

i dont have this device yet!!

thanks to Jozinek for testing this on his phone!


[ requirements ]
  1. stock rooted ROM
  2. windows PC with adb drivers installed


[ how to install ]
  1. download the provided zip package
  2. save it on c:\
  3. extract the contents of the package
  4. connect phone with usb debugging active to PC via ADB
  5. execute "runme.bat"
  6. follow onscreen instructions & enjoy!

incase some issue is there post the output/log of script


[ additional info ]

i have added the following things in the package:
  1. corrected /system/bin/sysint file
  2. run-parts binary in /system/xbin/run-parts (which is basically busybox 1.19.3 binary)
  3. correct /system/etc/install-recovery.sh file (this file gets executed by default on stock kernel too!)
  4. test/example script /system/etc/init.d/99test

to check if this is working the test script (99test) will create a temporary file /data/local/tmp/init.d_log_test.txt on each boot


[ donations/device fund ]

i dont yet have this device but i plan to buy it.... if u guys want to donate to me to get this device OR if u feel that this work has helped u OR u think that the work i put into making this is worthy of donations, then click on the following link for buying me some coffee/beer/etc

i am currently channeling all my donations to get this phone asap and to avoid selling my ARC!!!


PAYPAL DONATION LINK


[ download link ]

generic-init.d-support-v01.zip
MD5HASH: 2eda273af4b91c34f868807820cceaee

let me know how it goes!




ENJOY!
Like my work? Please consider donating via PayPal

Lead Developer of Team UtterChaos & Member of Team ICX

Creator of DooMKernel making those Snapdragons fly higher and faster

Android Devices I use : Sony Xperia Z, T, S, ARC, PLAY

Contributions : Generic Android / Xperia X10 / Xperia 2011 devices / Samsung Galaxy S2 / Huawei Ideos X6 / Samsung Galaxy SCL (i9003) / HTC Flyer / Kindle Fire / HTC JetStream / Xperia P, Sola, U / HTC One X / Xperia S / Xperia T, V, TX / Xperia Z, ZL, Tablet Z





** NEW *** Xperia SDCARD Mounter App! (supports Xperia Z, ZL, Tablet Z, T/TL, TX, V, S/SL/NX, Ion, Acro S/HD, P, U, Go, Sola, J, Miro, Tipo, Tipo Dual, E, E Dual!)
The Following 29 Users Say Thank You to DooMLoRD For This Useful Post: [ Click to Expand ]
 
somemadcaaant
Old
(Last edited by somemadcaaant; 15th March 2012 at 01:10 PM.)
#2  
somemadcaaant's Avatar
Senior Member
Thanks Meter 232
Posts: 682
Join Date: Apr 2010
Nice work, this will enable the Speedy v7 int.d hacks, can you incorporate this in the above? As an addon perhaps.

Done, $50 "AU" dollars coming your way mate.

-smc
The Following 3 Users Say Thank You to somemadcaaant For This Useful Post: [ Click to Expand ]
 
DooMLoRD
Old
#3  
DooMLoRD's Avatar
Recognized Developer - OP
Thanks Meter 20900
Posts: 10,144
Join Date: Jul 2010
Location: Indian Institute of Management, Ahmedabad (IIMA)
Quote:
Originally Posted by somemadcaaant View Post
Nice work, this will enable the Speedy v7 int.d hacks, can you incorporate this in the above? As an addon perhaps.

Done, $50 "AU" dollars coming your way mate.

-smc
this init.d support can be used to execute ANY shell script/program at startup... u are free to choose the ones u want...

if anyone needs help on how to push the scripts onto device let me know... but script specific info i dont have, u will need to ask the developer of those scripts..
Like my work? Please consider donating via PayPal

Lead Developer of Team UtterChaos & Member of Team ICX

Creator of DooMKernel making those Snapdragons fly higher and faster

Android Devices I use : Sony Xperia Z, T, S, ARC, PLAY

Contributions : Generic Android / Xperia X10 / Xperia 2011 devices / Samsung Galaxy S2 / Huawei Ideos X6 / Samsung Galaxy SCL (i9003) / HTC Flyer / Kindle Fire / HTC JetStream / Xperia P, Sola, U / HTC One X / Xperia S / Xperia T, V, TX / Xperia Z, ZL, Tablet Z





** NEW *** Xperia SDCARD Mounter App! (supports Xperia Z, ZL, Tablet Z, T/TL, TX, V, S/SL/NX, Ion, Acro S/HD, P, U, Go, Sola, J, Miro, Tipo, Tipo Dual, E, E Dual!)
The Following User Says Thank You to DooMLoRD For This Useful Post: [ Click to Expand ]
 
keunhuvac
Old
#4  
keunhuvac's Avatar
Senior Member
Thanks Meter 143
Posts: 606
Join Date: Nov 2010

 
DONATE TO ME
I used this script to move dalvik cache to /cache folder:
Code:
#!/system/bin/sh
# 
# relocate dalvik-cache to /cache/dalvik-cache

if [ ! -d /cache/dalvik-cache ]
then
    busybox rm -rf /cache/dalvik-cache /data/dalvik-cache
    mkdir /cache/dalvik-cache /data/dalvik-cache
fi

busybox chown 1000:1000 /cache/dalvik-cache
busybox chmod 0771 /cache/dalvik-cache

# create symlink
busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
busybox chown 1000:1000 /data/dalvik-cache
busybox chmod 0771 /data/dalvik-cache
After reboot i saw folder /cache-dalvid in both folders /data and /cache, is it normal?
Thank!
Unavailable!
 
imTigger
Old
#5  
Member
Thanks Meter 38
Posts: 70
Join Date: Jul 2008
Location: Hong Kong
I found that for devices rooted with locked bootloader

Line 21 of runme.bat need to change from

HTML Code:
@files\adb shell "su -c 'busybox mount -t ext4 -o rw,remount /system /system'"
to

HTML Code:
@files\adb shell "su -c 'busybox mount -o remount,rw /system'"
The Following User Says Thank You to imTigger For This Useful Post: [ Click to Expand ]
 
Miche1asso
Old
(Last edited by Miche1asso; 26th August 2012 at 05:32 PM.)
#6  
Miche1asso's Avatar
Senior Member
Thanks Meter 33
Posts: 177
Join Date: Apr 2012
Location: Treviso
This is all great, exactly what I was looking for! But what about if the ROM already has a custom kernel that makes use of /etc/init.d? Do the /etc/init.d scripts get executed twice?

EDIT: in my phone this solution can't work. In the init.rc file the following lines are commented out


Code:
#service flash_recovery /system/etc/install-recovery.sh
#    oneshot
 
charlymaster
Old
#7  
charlymaster's Avatar
Member
Thanks Meter 9
Posts: 30
Join Date: Jun 2012
Thanks, it's working but I have a question, how we can include this in a rom?

Please respond, I would appreciate that
 
Daniel D.
Old
#8  
Daniel D.'s Avatar
Senior Member
Thanks Meter 152
Posts: 618
Join Date: Apr 2012

 
DONATE TO ME
Quote:
Originally Posted by DooMLoRD View Post
  1. run-parts binary in /system/xbin/run-parts (which is basically busybox 1.19.3 binary)
That means I don't need run-parts if I've busybox installed?
Sony Xperia Arc S (BL unlocked) - My Custom ROM - Stock Kernel / LuPuS
 
emmanueldmc
Old
#9  
emmanueldmc's Avatar
Senior Member
Thanks Meter 36
Posts: 669
Join Date: Jul 2011
Location: Distrito Federal
1-Tell me please if I understand: I've done everything the post says Doomlord ([ADDON] [Xperia S] Generic startup /init.d scripts support for Stock ROM / Kernel) my question is this, after this I can already install scripts from cwm?

2-I try installing ''NullVoid'' tweaK by cmw and apparently well was installed. (I say apparently because i do not know if it is working)

3-Another thing about Tweaks: These have to be installed every time the phone restarts? This tweaks are compatible with the stock ics rom? (With the Doomloard Method ?

xX::THE BEST::Xx
 
PIRATA!
Old
#10  
PIRATA!'s Avatar
Senior Member
Thanks Meter 64
Posts: 1,342
Join Date: Dec 2010
Location: Pisa, Italy

 
DONATE TO ME
Quote:
Originally Posted by DooMLoRD View Post
........

[ additional info ]

i have added the following things in the package:
  1. corrected /system/bin/sysint file
  2. run-parts binary in /system/xbin/run-parts (which is basically busybox 1.19.3 binary)
  3. correct /system/etc/install-recovery.sh file (this file gets executed by default on stock kernel too!)
  4. test/example script /system/etc/init.d/99test

to check if this is working the test script (99test) will create a temporary file /data/local/tmp/init.d_log_test.txt on each boot

..........
So the "install-recovery.sh" file is executed by system by default and does not need to be executed manually from terminal or what else?
And about the file...that is not a one-run file...right? It is executed at every phone boot...right??

Thank you.


Sent from my GT-I9000 using xda app-developers app
Samsung GalaxyS3 GT-i9300XXELLA / DarkyROM III v8.4 / Siyah Kernel S3 v1.8.6+ / Pimp My Rom Hacks!
-----------------------------------------------------------
My NEW XDA contribution:
> Stock / Custom Bootanimations on Galaxy S3 <

You can donate to me.

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...