Related
DROID X2 init.d hack
This is an alternative to a certain 2nd init functionality, because with 2nd init you could do this just as easily if you know how. This is not an init. This is for the folks running stock 2.3.3 for the Droid X2, who want to "performance tune" their phone while working with what they have. This will allow you to use any init.d performance scripts on your phone. If you don't know, an "init.d" script is special in the sense that they are run when the phone is booting up. This way, when you are using your phone, you can enjoy performance benefits.
The "hack" runs the BusyBox "run-parts" binary and searches the /system/etc/init.d directory for scripts. Additionally, if for whatever reason you don't have BusyBox, it will fall back to a for loop and run that instead! This functionality is added through "install-recovery.sh" script in /system/etc which is run every time the phone boots by default. Normally this script tries to install the default recovery every time you boot your phone, so that you can't install any other recovery. I've hijacked that script for the init.d task instead. As is common practice, any script actions can be viewed in your logcat upon boot if you have USB debugging enabled.
This hack includes default enhancement scripts (outlined below). You can choose to use these scripts, or delete them and replace them with whatever you want. I would advise against running the default scripts with other tweak scripts!
Requirements:
Root - follow the guides
Bootstrap Recovery - follow the guides
Knowledge of CWMR/Bootstrap Recovery use, and how to install a zip with it
Default Enhancements:
sysctl tweaks - try to speed up OS/virtual machine/kernel
lowmem tweaks - try to limit low memory so as to keep more memory available
sd read ahead - increase KB read ahead on SD reads
cpu/governor tweaks - set scaling_min/max_freq and governor
disk scheduler - optimize disk scheduler for flash memory across all blocks
---
Changelog
0.1
Initial release to public
0.2
Tweaked scheduler and send errors to null
0.3
Fixed scheduler bug
Added additional scheduler tweaks
Changed min_free_kbytes to 32mb
Changed bdi read_ahead_kb to 2048kb
Added system r/w mount
Added sync
0.4
Added quantum to scheduler tweak
Switch to noop scheduler
Added conditionals
Change CPU tweak to support cpu1
Change scaling_min to proper freq
0.5
Split script into 3 versions
Battery - most power savings
Midrange - balanced power savings/performance
Performance - all out speed
0.6
Combined script back into one generic version
Includes separate scripts for all purposes
Enhances prior scripts functionality
Rewrote init.d hook to work in all scenarios
Included BusyBox 1.19 with installation
0.6b
Updated script to fix unique error
---
Version 0.6b FINAL
Download: http://www.multiupload.com/FI1D93TV6Y
Mirror: http://www.mediafire.com/?71geufr3754j6be
amazing! should usher in a ton more dev for the X2
Great to hear from you again navenedrob! Loved your work on the fascinate.
Sent from my DROID X2 using XDA Premium App
Will this have any ill effects with the eclipse rom?
Sent from my DROID X2 using XDA App
Its for stock roms as stated in the 1st post
Sent from my DROID X2 using XDA App
Getting ready to run this but just want to clarify:
Install like any other. zip?
Use script manager to tweak values?
How to revert, if necessary?
Remove v6 supercharger before installing?
Thanks again.
Sent from my DROID X2 using XDA Premium App
garywojdan81 said:
Getting ready to run this but just want to clarify:
Install like any other. zip?
Use script manager to tweak values?
How to revert, if necessary?
Remove v6 supercharger before installing?
Thanks again.
Sent from my DROID X2 using XDA Premium App
Click to expand...
Click to collapse
Yes
Yes
Delete scripts from /system/etc/init.d, that's it
Optional
Kanibull said:
Its for stock roms as stated in the 1st post
Sent from my DROID X2 using XDA App
Click to expand...
Click to collapse
You can use this on Eclipse ROM. That is a stock ROM. A non-stock ROM would be a stock ROM with this or 2nd init already included, CM7, or MIUI.
Thanks man. Gonna load it as soon as I get back home.
Sent from my DROID X2 using XDA Premium App
Would using this allow zepplelinrox's 98kickasskernel to work as it should?
So are these scripts already optimized or are they stock values waiting to be tweaked? Is there some kind of guide as to exactly what the numbers mean or could you recommend some? Thanks!
Sent from my DROID X2 using XDA App
ashclepdia said:
Would using this allow zepplelinrox's 98kickasskernel to work as it should?
Click to expand...
Click to collapse
Wow, yeah it should indeed.
This should be posted at droidforums and droidxforums!
I have a few questions.
Using Script Manager I had to modify/change most of my scripts because Script Manager would try to run them and simply state there were syntax errors, which was simply not the case because on my oringial droid I could verify they would run using init.d and they would work.
So my question there is what's with the syntax error in script manager, and will my original scripts work? Second, are these automatically run as root...or?
zeppelinrox said:
Wow, yeah it should indeed.
This should be posted at droidforums and droidxforums!
Click to expand...
Click to collapse
If it hasn't already been done by the time im done eating ill get to linking up to share the goodness. Thanks for quick reply zepp.
Good stuff...
I know for a fact that they will be all over this like brown on poo at droidx...
0vermind said:
I have a few questions.
Using Script Manager I had to modify/change most of my scripts because Script Manager would try to run them and simply state there were syntax errors, which was simply not the case because on my oringial droid I could verify they would run using init.d and they would work.
So my question there is what's with the syntax error in script manager, and will my original scripts work? Second, are these automatically run as root...or?
Click to expand...
Click to collapse
Which busybox version?
That Rom you where talking about
What kind of Rom would it be, would be an aosp?
zeppelinrox said:
Which busybox version?
Click to expand...
Click to collapse
v1.19.0.git.adrynalyne
Installed in /system/xbin
0vermind said:
I have a few questions.
Using Script Manager I had to modify/change most of my scripts because Script Manager would try to run them and simply state there were syntax errors, which was simply not the case because on my oringial droid I could verify they would run using init.d and they would work.
So my question there is what's with the syntax error in script manager, and will my original scripts work? Second, are these automatically run as root...or?
Click to expand...
Click to collapse
I'm not sure what Script Manager is, so I can't really answer. All I can say is that I write all my scripts by hand, and they are all common shell scripts using bash language. As long as your shell scripts are written according to those specs, then I don't think you'd have any problems.
Anyone else, remember that you can use whatever init.d scripts you want, it shouldn't really matter as long as they somewhat pertain to the phone. Feel free to delete the included scripts.
Okay I set it all up and none of the scripts ran, so I did
Code:
/system/xbin/run-parts /system/etc/init.d > /data/initd.log
in adb and got back
run-parts: applet not found
Click to expand...
Click to collapse
What am I doing wrong?
After many hours of screwing around, I figured out how to get around your busybox run-parts thing which doesn't seem to be working on my phone. In it's place I put:
Code:
if [ -e /system/etc/init.d ]
list=`ls /system/etc/init.d/*`
for script in $list
do
sh $script
done
fi
Everything is working awesome now!! They really do seem to be running at start up!
This is something I realized when the init.d hack by naven was posted, it plain didn't work for me, and after some investigation i discovered that not all busybox versions had the run-parts applet.
It has come to my attention to that many users may not have the proper hack installed, at least the ones using my scripts, I had them check in /data for the zipaplign log and it was in fact not there.
I got it working by modding navens hack. Credit goes to him for his discovery.
Here is a link to the flashable zip. If you are using my scripts, check in /data for the zipalign log, if you don't have one, just flash this zip, reboot, and check again.
http://www.sendspace.com/file/9g6ngz
Thanks!
Edit (8/31/2011): Just so there is no confusion, this is not my new Speedy script, this is just a re-hack for init.d originally discovered by naven. This will just help those of you having problems with his hack. Obviously you need to be rooted and have recovery bootstrap.
Just flashed your zip. Log file in /data
Welcome back! Thanks for your work on the X2.
Sent from my DROID X2 using xda premium
Grapejelly!!
Sent from my DROID X2 using xda premium
Worked perfectly
Sent from my DROID X2 using XDA App
Is this a new version of your script then?
Do we have to flash this the same way with recovery (aka renaming it to update.zip) like i had to go with the manual gb update?
Nevermind, figured that out.. but why am i getting a signature verification on install? Where do i turn off sig verification?
SuBDivisions said:
Nevermind, figured that out.. but why am i getting a signature verification on install? Where do i turn off sig verification?
Click to expand...
Click to collapse
There is an option under advanced I think, in recovery, to enable/disable that.....
I dont have that option, unless now there is some other recovery peice im missing.. my recovery whichis Android System Recovery (3e) only has reboot, apply update, wipe data, wipe cache.
SuBDivisions said:
I dont have that option, unless now there is some other recovery peice im missing.. my recovery whichis Android System Recovery (3e) only has reboot, apply update, wipe data, wipe cache.
Click to expand...
Click to collapse
You need to use the modified boot -strap recovery available on this forum. D/L it & install it like any other app. When you open it, just read & follow the directions on the screen & you will get to the custom recovery where all good things flash from.
Sent from my DROID X2 using xda premium
SuBDivisions said:
I dont have that option, unless now there is some other recovery peice im missing.. my recovery whichis Android System Recovery (3e) only has reboot, apply update, wipe data, wipe cache.
Click to expand...
Click to collapse
You should be flashing this thru the Bootstrap Recovery, not the default Android Recovery.
Sent from my DROID X2 using Tapatalk
Ahh HA.. See i know i was missing something.. Thanks have been given.
Zip-align logs were not showing in /data/ for me, so I flashed this, and now they do.
I'm assuming that means the rest of the scripts weren't working either?
Cool. Going to flash this but need a quick question answered.
I have Busybox 1.19.0 installed. I downloaded "Busybox" from marketplace to install 1.18.4 but which location should I chose?
Options are /system/xbin/ or /system/bin/
Thanks
Sorry found this in original init.d hack thread:
BusyBox with run-parts binary, installed in /system/xbin - If you don't have BusyBox, you can download it from the market here.
Click to expand...
Click to collapse
hapyman said:
Cool. Going to flash this but need a quick question answered.
I have Busybox 1.19.0 installed. I downloaded "Busybox" from marketplace to install 1.18.4 but which location should I chose?
Options are /system/xbin/ or /system/bin/
Thanks
Sorry found this in original init.d hack thread:
Click to expand...
Click to collapse
You should be okay on 1.19.0 now, but busybox should always always be installed in xbin.
So which init is better or the working one?
gkitab said:
So which init is better or the working one?
Click to expand...
Click to collapse
Some people find that the re-hack (this thread) works (and the original does not), others find that the original hack works just fine. A way to test is to install my Speedy Gonzales scripts, reboot the phone, and then check in /data for a zipalign log. If not, then flash this re-hack.
I am running speedy. So should I us you init when using yours and his when trying his? How can we tell if yours is working and when using his if his is working? This is getting a bit confusing. I also noticed when I flashed speedy navens old oo got left behind. So I deleted al scripts in init folder and reflashed yours and all yours are now correct.
With his init and your script. Yours scripts are in there but no zipalign in data.
Should I start over by deleting unit folder flash your unit then speedy would that be the safe bet?
Thanks for staying.
gkitab said:
I am running speedy. So should I us you init when using yours and his when trying his? How can we tell if yours is working and when using his if his is working? This is getting a bit confusing.
Thanks for staying.
Click to expand...
Click to collapse
They are two separate things entirely. I posted the re-hack for those having troubles getting scripts to run with naven's original hack. The re-hack posted in this thread doesn't contain any init.d scripts, it's purely the hack. Like I said above, a good way to test his hack is to install my scripts (which it looks like you have), and then use a file manager like Root Explorer and navigate to /data, there should be a zipalign log, if there isn't then his hack isn't working.
Edit: Well, the biggest question is if the init hack you have installed is even working. I'm assuming you have naven's... try the above, let me know if the log is there or not.
I edited my post can you please check it and let me know what you think.
I do have his with your script.
I think I should I should delete init completely and start fresh with yours and your scripts. That sounds like safest bet. Or does naven init need to be there first then yours on top then your scripts. Thanks.
Does anyone use Supercharger v6 on AOKP? I tried using it, but I got an awk error, so I installed the modified busybox from their site, but it doesn't persist after reboot (reverts back to 20-cm9).
I guess my question is does anyone know if I can get these two to play nicely?
For people having this issue, please refer to zepplinrox's Supercharger v6 thread where you can find a script that will reinstall busybox 1.19.4 on boot.
Did you completelyremove all busybox information from your phone before installing the new version?
If so, try doing a cache and dalvik wrote in between (can't hurt) for kicks. If you get out working but can't get the minfrees to stick, run 99SuperCharger.sh as root and at boot.
Lemme know.
Clay
Sent from my SGH-I777 using XDA
use script manager, and have it set to run at startup
Sent from my SGH-I777 using Tapatalk 2
Phalanx7621 said:
use script manager, and have it set to run at startup
Sent from my SGH-I777 using Tapatalk 2
Click to expand...
Click to collapse
just the 99SuperCharger.sh file, not the entire script.
Oh, and for sure use sm, haven't used terminal emulator but sm is easy to navigate and get used to.
Clay
Sent from my SGH-I777 using XDA
Last I checked, completely removing busybox is dangerous business. I can't seem to do it anyways . But I removed about as much as I can using the BusyBox app, but it still reverts back to 1.20.0-cm9 after a reboot.
Then I tried manually deleting /system/bin and /sbin, but as expected that caused very bad things to happen .-.
lol, nvm, deleting /system/bin and /sbin just f-ed up my su binary. After replacing that, BusyBox (app) is still reporting that I have 1.20.0-cm9 installed.
When you open busy box what does it tell you at the top? 1.20 or whatever?
Do you then have the option to choose what version you wish to install? If so, what happens if you choose 1.19.4?
I originally chose version 1 of the version 1.20's then reverted back to 1.19.4. I'm SuperCharged fine. I'm running a different Rom and Kernel, but that seems to working for me
Clay
Sent from my SGH-I777 using XDA
It tells me 1.20.0-cm9 installed if I use the free version. If I use the paid version, I get "multiple busybox installed" (possibly from TB?)
I'll give 1.19.4 a shot.
1.19.4 still reverts back to 1.20.0-cm9 on reboot.
use the boot reinstaller version from the supercharger OP.
It reinstalls wraithdu's v1.19.4 busybox build on every boot for situations like yours.
zeppelinrox said:
use the boot reinstaller version from the supercharger OP.
It reinstalls wraithdu's v1.19.4 busybox build on every boot for situations like yours.
Click to expand...
Click to collapse
Lol, I was just reallllyyy hoping to find a way around that lol.
I created that tool because there is no way around that - except for fight fire with fire
lol, thanks zeppelinrox. Should I set that up with sm? Or somehow put that in init.d? Does SS99Supercharger work then?
Yeah just run it like you do all my other scripts...
After rebooting, check to see which busybox build is active
Problem is that it always defaults to 1.20.0-cm9, lol. Whatever, I've just put your busybox installer script in init.d and having it run right before SS99Supercharger, and all seems to work well. Thanks a lot for you help and the awesome script
heh... well that's what the boot reinstaller script does - it converts the normal installer script to a proper init.d script (renames it to 96busybox and removes sleep commands and other stuff)
Oh my bad, you had a script for that? o.0 I assumed you meant "just copy it into init.d xD"
Looking now...lol
ya... it's called boot reinstaller or something like that... lol
I'm running the latest stock rooted rom with init.d support. If I modify an init.d script or add an additional script, as soon as I reboot the my changes are gone. What is causing this? Is /system/etc/init.d part of the boot.img?
fldash said:
I'm running the latest stock rooted rom with init.d support. If I modify an init.d script or add an additional script, as soon as I reboot the my changes are gone. What is causing this? Is /system/etc/init.d part of the boot.img?
Click to expand...
Click to collapse
I take you are still S-ON and that is the reason. the system does not allows permenent write. There are ROMS that fixed this issue for people with S-ON. Check in the development section and check out the ROMS that support init.d with permanent write to /system.
Its specifaclly the kernel. Use the elemental kernel to fix that, or flash meanbean
Sent from my EVO using xda app-developers app
Thanks guys.
[Q]how do I install busybox for att HTC one. Can I just go through the playstore?
Sent from my HTC One using XDA Premium App
-Epix- said:
[Q]how do I install busybox for att HTC one. Can I just go through the playstore?
Sent from my HTC One using XDA Premium App
Click to expand...
Click to collapse
Yes, But you need to be on a kernel that disables write protection to the /system partition. If you're using the stock kernel (even if you are rooted) you won't be able to install anything to the system
Alright. So I need to find. Tutorial for installing a custom kernel. Has there been any down sides to installing them yet. I'd hate to brick my one.
Sent from my HTC One using XDA Premium App
-Epix- said:
Alright. So I need to find. Tutorial for installing a custom kernel. Has there been any down sides to installing them yet. I'd hate to brick my one.
Sent from my HTC One using XDA Premium App
Click to expand...
Click to collapse
No, no real downsides. There is a stock kernel floating around and the only thing that's different than what's on your phone now is the write protection has been removed
Excellent Ok so I have searched the forums and I find some things that say kernel but could you point me to a link.
Sent from my HTC One using XDA Premium App
busybox
in my oppinion you don't need busybox on the new kernel because obviosly everything you need from busybox is located inside
system/bin & system/xbin or some similar applets for the one busybox does have
just download terminal emulator "you'll need root access first" type these codes:
Code:
#su
#cd system/bin
#ls
for more applets just type:
Code:
#su
#cd system/xbin
#ls
for me i find s-on and selinux in general very helpful .. specially in kernel protection if you make a deadly mistake that cause system faliure and lose your IMEI and whatever ... not anymore on the new kernel .. i just hope they fix wifi connection issue .. other than that ... i pefere htc one on any new samsung devices with needless hardware and annoying software like knox
i changed my mind ... its so not busybox at all on the system/bin !! its like apps binaries that used by applications to do its perpose
but i dont want to turn my seLinux off so is there a way to install busybox binaries on CWM like su binary and rooting process ??
EDIT : i was wondering why does busybox shutting down after trying to install applets on device so i entered recovery mode , and using adb shell there i found out the applets works fine there !!!
so i looked inside bin and sbin directories on recovery mode .. and they was located inside /sbin on recovery mode
just to let you know sbin recovery i believe is like another user .. maybe the root user if we looked to it as a linux system .
Busybox on rail
At Google play .... It installe busybox at recovery