Device(s): LG Motion 4G
.
Pirates are people who attack ships. People who share software are good neighbors.
Carrier: MetroPCS
Thanks: 553
Thanked 402 Times in 170 Posts
Boot_Buddy - Run Boot Scripts from SDcard (root users)
(The NEW BootBuddy thread can be found here)
INTRODUCTION: Boot Buddy will allow you to run Linux shell scripts when your Android device is booting up. It will run your scripts early in the boot process, before the home screen appears.
The intended audience is generally intermediate to advanced users, and those who want to play with shell scripting on their device.
FEATURES: BootBuddy is similar to init.d scripts, but with a core difference that it stores boot scripts on your SDcard instead of the internal system. This allows for several interesting enhancements. Feature listing-
Boot Buddy is designed from the start to run scripts right from your SDcard. Just download any scripts to your boot_buddy_scripts directory and they're ready to run. (No more screwing around with permissions and files in your /system/etc/init.d/*)
SDcard storage allows you to copy a script to another device, or multiple devices easily.
If you have a script that is malfunctioning, just boot your device with the sdcard out, and put the sdcard back in after your device reaches home screen. No Problem!
Boot Buddy's author has several years of scripting and programming experience. It is streamlined, fast, and doesn't perform worthless functions like repeatedly logging the authors name and time (*hint to a t-init author*).
Clear goals of making operation simple, intuitive, and clean.
If you're currently using an "init.d" solution, BootBuddy can integrate seamlessly with it.
If you try BootBuddy and you don't like it, the installer also works as an uninstaller for easy clean removal.
BootBuddy is Open Source GNU GPL. Open for anyone to modify and improve upon.
As a developer, I make software to operate the way I would want if I were an end user, because I actually do use it, and I am an end user like you.
The script will run quickly and create a folder on your sdcard named "boot_buddy_scripts". In that folder, you put the scripts you want to run at system boot. A log file will be kept at /data/boot_buddy.log
If you need your scripts to run in order, they are ordered by filename using the busybox "sort" program. They will run in alphabetical order using this format 0-9A-Za-z.
YOUR FIRST SCRIPTS: (OPTIONAL)
Here are a couple example scripts you may use.
The Android /system is normally mounted with read-only permissions by default. We will change that with the first script listed below. It will cause /system to be remounted to read-write permissions during boot.
The second script will create a file at every boot named /mnt/sdcard/sys_mount_info.txt. That txt file will give us information about how /system is currently mounted.
Download the file 00rw_system.sh into your boot_buddy_scripts folder.
That's it, you just installed 2 new scripts and had them run at boot. It's Really just that simple to add startup scripts to your system.
To verify they are running, use any text viewer to open the file /mnt/sdcard/sys_mount_info.txt. It may show more than one line of text. There should be a line similar to this:
/dev/block/(device specific text) /system (fstype) rw,(more text)
The rw means that /system was successfully remounted as read-write during boot.
At any time you can delete either script if you choose. Easy!
UNINSTALL: If for any reason you find you don't want or don't like Boot Buddy, you can cleanly uninstall it using the installer bb_install.sh. These instructions are almost identical to installing. (All match the installation steps, except step 4)
Type --uninstall in the text area labeled Arguments.
At the top, highlight the "Su" icon.
On the top-left, tap "Run".
Boot Buddy will be uninstalled. It will not remove the contents of your boot_buddy_scripts folder. If you have an "init.d" system installed, it will cleanly remove only Boot Buddy parts and leave the rest.
ADVANCED NOTES:
Boot Buddy will Not cause harm to your system, but it may not work on custom roms. Also, it may fail to detect the real location of your SDcard. It requires that /system/etc/install-recovery.sh is run during the boot process, and that file will be created if it does not exist. Also the file /data/boot_buddy.sh will be created. The script /system/etc/install-recovery.sh will run /data/boot_buddy.sh. The script /data/boot_buddy.sh will run the scripts on your sdcard. The file /data/boot_buddy.log will log any script output.
Leave feedback on your results!!!
For Windows and Mac users- If you download the installer to your pc first, do not edit the installer with a text editor. Your computer will add hidden markers at the ends of each line that will prevent the installer from running. If you want to edit it, you should do so on a Linux pc or directly on your Android device.
Device(s): LG Motion 4G
.
Pirates are people who attack ships. People who share software are good neighbors.
Carrier: MetroPCS
Thanks: 553
Thanked 402 Times in 170 Posts
Yes. The main difference is that scripts go on your SDcard, instead of storing in the internal system of your device.
I invite everyone with a little scripting experience to look at the bb_install.sh code. It is very straight forward and should be relatively clear to read.
Device(s): Kyocera Domino, Freeform II, Freeform III, LG Connect, LG Motion, Samsung Galaxy S III
Carrier: MetroPCS
Thanks: 78
Thanked 159 Times in 140 Posts
I got it to work. I used script manager free. When I tapped on the file in the root browser it gave me options on what to open the file as and I chose script and then it went to the menu where you select "su" and run.
I deleted the file and redownloaded it, followed the instructions again and it worked fine.
Device(s): LG Motion 4G
.
Pirates are people who attack ships. People who share software are good neighbors.
Carrier: MetroPCS
Thanks: 553
Thanked 402 Times in 170 Posts
First thing, do not worry about Boot Buddy harming your system. It is designed to be very safe. It's good you reported this. I'll work to help you resolve it in PM and we can post the solution here afterwards.
EDIT:
I see my post came late. Good to see that it worked out for you. Just an incomplete download.
Last edited by Sepero; December 23rd, 2012 at 08:14 PM.
Device(s): HTC Evo V 4G,Triumph CM7 TG=Reloaded, Intercept UD6, HTC Wildfire S HBOOT Unlocked w/s-off
Carrier: Virgin Mobile
Thanks: 294
Thanked 730 Times in 541 Posts
Would you tell me what the major differences are between your product and something like mounts2sd? I just downloaded that yesterday and have been looking into it. Thanks, OB
Device(s): LG Motion 4G
.
Pirates are people who attack ships. People who share software are good neighbors.
Carrier: MetroPCS
Thanks: 553
Thanked 402 Times in 170 Posts
Hey OverByter. I assume this link is what you're referring to. I actually never heard of mount2sd before you brought it to my attention. After looking it over, it looks like it performs some really neat things. Unfortunately, it can't really be compared to Boot Buddy.
The reason is because Boot Buddy doesn't move apps, cache, data, or anything by default. It simply runs scripts when your phone boots up. You might ask, "What scripts?". Well, immediately after installing, it will run No scripts at all. The scripts to go with Boot Buddy are an addon. It's like Boot Buddy enables a script plugin system.
It might help to think of the "Startup" folder on Windows, except Boot Buddy only runs shell scripts, not apps. (But it might be possible to have a script that starts an app)
If someone writes a script to be run at every boot, Boot Buddy is a very easy way to enable that to happen. The script only needs to be copied into the Boot Buddy sdcard folder, and that's it. Until the script is removed, it will run everytime the device is started.
Device(s): LG Motion 4G
.
Pirates are people who attack ships. People who share software are good neighbors.
Carrier: MetroPCS
Thanks: 553
Thanked 402 Times in 170 Posts
Thanks for letting me know your problem. I recently updated Boot Buddy and I introduced a small syntax error. It has been corrected. Sorry for the inconvenience.
Last edited by Sepero; December 30th, 2012 at 02:44 PM.
Device(s): LG Motion with frequency incipio case
LG Optimus M
Carrier: Metro since day one
Thanks: 2
Thanked 5 Times in 5 Posts
Quote:
Originally Posted by Sepero
Thanks for letting me know your problem. I recently updated Boot Buddy and I introduced a small syntax error. It has been corrected. Sorry for the inconvenience.
Device(s): LG Motion 4G
.
Pirates are people who attack ships. People who share software are good neighbors.
Carrier: MetroPCS
Thanks: 553
Thanked 402 Times in 170 Posts
HarunATL I received your PM. I'm glad you got it working.
After downloading the Opera browser, you were able to successfully download the script and run it on your phone.
Google Chrome and the Default Android browser do not appear to download files properly from the host (www.mediafire.com). The downloaded files are malformed.
Downloaded files best with Firefox or Opera browsers.
I just wanted to thank you publicly for the help that you have,given me.So far so good as long as i dont run into the "insufficient memory "monster when i install my apps .Very cool.Thank you.
The Following User Says Thank You to HarunATL For This Useful Post:
So i have everything installed and both scripts seem to be running. My goal was to move apps from my sd to external sd, i moved Need For Speed to the boot_buddy folder in external sd, but its still in sd/android/data too, so now im taking up more space. what am i doing wrong?
Device(s): LG Motion 4G
.
Pirates are people who attack ships. People who share software are good neighbors.
Carrier: MetroPCS
Thanks: 553
Thanked 402 Times in 170 Posts
If you moved your NFS folder into the boot_buddy_scripts folder, then you made a mistake in following the directions. If you have a question related to moving your apps around when moving your sdcard, you want to post that here: [GUIDE] Mounting Your Real SDcard to /mnt/sdcard (v2 for LG Motion 4G)
Device(s): lg motion 4g, rooted and tweaked
sg tab 2 7' rooted stock jb
Carrier: MetroPCS
Thanks: 190
Thanked 965 Times in 496 Posts
Ok. Dl via opera to get past the < error and got this..
Error resolving interpreter:/system/xbin/sh does not exist
Using default shell
exec sh '/mnt/sdcard/Download/bb_install.sh'
/sdcard/Download/bb_install.sh' <
/mnt/sdcard/Download/bb_install.sh[7]: sed: not found
/mnt/sdcard/Download/bb_install.sh[23]: [: 0: unexpected operator/operand
You're not root
Yes, its rooted.
__________________
looking for local miami music? in a miami band and want free promo and show tips, no strings attached? www.facebook.com/hahopromotions show updates, music news and free stuff!!! i help here for free, so i figured i can do this too!!! enjoy!
Device(s): LG Motion 4G
.
Pirates are people who attack ships. People who share software are good neighbors.
Carrier: MetroPCS
Thanks: 553
Thanked 402 Times in 170 Posts
@Tokenpoke
The following lines leads me to think that you do not have busybox installed-
Error resolving interpreter:/system/xbin/sh does not exist
Using default shell
/mnt/sdcard/Download/bb_install.sh[7]: sed: not found
You should have busybox installed at the location
/system/xbin/busybox
Hopefully that resolves it for you. I will look over the OP and script and update them to indicate this information if necessary. Thanks
Device(s): lg motion 4g, rooted and tweaked
sg tab 2 7' rooted stock jb
Carrier: MetroPCS
Thanks: 190
Thanked 965 Times in 496 Posts
Quote:
Originally Posted by Sepero
@Tokenpoke
The following lines leads me to think that you do not have busybox installed-
Error resolving interpreter:/system/xbin/sh does not exist
Using default shell
/mnt/sdcard/Download/bb_install.sh[7]: sed: not found
You should have busybox installed at the location
/system/xbin/busybox
Hopefully that resolves it for you. I will look over the OP and script and update them to indicate this information if necessary. Thanks
Was installed but reinstalled and it works now o.O
This worked perfectly, but then I updated busy box (using Stericson's updater), & now it won't work at all. I put busybox back in system/xbin, deleted & reinstalled Boot Buddy, now I get "unexpected <" error.
Edit: (I meant the linked guide to mount your Real SDcard worked perfectly.)
Last edited by unicyclist; February 17th, 2013 at 08:26 PM.
Device(s): LG Motion with frequency incipio case
LG Optimus M
Carrier: Metro since day one
Thanks: 2
Thanked 5 Times in 5 Posts
Quote:
Originally Posted by unicyclist
This worked perfectly, but then I updated busy box (using Stericson's updater), & now it won't work at all. I put busybox back in system/xbin, deleted & reinstalled Boot Buddy, now I get "unexpected <" error.
You need to install busybox correctly... Theres many apps on the play store... Once you find the correct one it should work
Thats how I solved my error thing
The Following User Says Thank You to orangejuicebox For This Useful Post:
@unicyclist
Are you saying that installing Boot Buddy gives you this error?
"unexpected <" error
I (stupidly) updated BusyBox. Boot Buddy no longer mounted my SD card "as God intended". It was reset to external_sd. So I tried uninstalling & reinstalling, and I got the "unexpected <" error. I reinstalled an older version of BusyBox to system/xbin and now I get "sh: applet not found"
Quote:
Originally Posted by orangejuicebox
You need to install busybox correctly... Theres many apps on the play store... Once you find the correct one it should work
Device(s): LG Motion with frequency incipio case
LG Optimus M
Carrier: Metro since day one
Thanks: 2
Thanked 5 Times in 5 Posts
pfft Umm IDK I forgot there's two APpS busy box and busy box installer.... You have to let it install automatically and yes the versions do matter this would be easier if I wasn't buzzedter
pfft Umm IDK I forgot there's two APpS busy box and busy box installer.... You have to let it install automatically and yes the versions do matter
Edit: Busybox Installer worked. I used version 1.14.3 and installed to system/xbin, not system/bin. Then redownloaded the bb_install script using Opera Mini.
Device(s): LG Motion with frequency incipio case
LG Optimus M
Carrier: Metro since day one
Thanks: 2
Thanked 5 Times in 5 Posts
Quote:
Originally Posted by unicyclist
Edit: Busybox Installer worked. I used version 1.14.3 and installed to system/xbin, not system/bin. Then redownloaded the bb_install script using Opera Mini.
Device(s): LG Motion 4G
.
Pirates are people who attack ships. People who share software are good neighbors.
Carrier: MetroPCS
Thanks: 553
Thanked 402 Times in 170 Posts
@adanmex
I'm glad you ask. I really like that idea, but unfortunately I do not plan to do that for two primary reasons.
Having more than one way to install BootBuddy means a greater possibility for software bugs to occur. (and debugging scripts can be a real pain , especially running it on multiple types of devices in a pre-boot environment)
If I have to choose one install method, I must currently choose installing it as a script, because CWM cannot be installed to all devices. Keeping the installer as a script provides the greatest compatibility with all devices.
Hopefully that answers your question satisfactorily. Thanks for the suggestion.
Device(s): LG Motion 4G
.
Pirates are people who attack ships. People who share software are good neighbors.
Carrier: MetroPCS
Thanks: 553
Thanked 402 Times in 170 Posts
@MotoTriumphant
That's a good question. Unfortunately, I don't really know how it would be done. If it's possible, the files to do this are in the location
/data/data/com.eclipse.android.razr.bootstrap/files/
Hopefully you are able to figure it out. I'd be interested in knowing the answer also
Is there away to get an individual script loaded by bootbuddy to stall or delay?
Say i am trying to change a system setting but system overwrites what my bootbuddy script did.
__________________
Want fights or tutorials? All Leagues and styles.Pm me.
#### SENT FROM MY SHOE PHONE ####