Go Back   Android Forums > Android Development > Android System Mods, Scripts and Hacks > Rooted Devices Only

Like Tree16Likes
  • 3 Post By Sepero
  • 2 Post By Sepero
  • 1 Post By Sepero
  • 1 Post By Xieon
  • 1 Post By veletron
  • 1 Post By scary alien
  • 1 Post By rhino889a
  • 2 Post By rhino889a
  • 1 Post By DNRDustin
  • 1 Post By rhino889a
  • 2 Post By Sepero

test: Reply
 
LinkBack Thread Tools
Old February 27th, 2013, 08:27 PM   #1 (permalink)
Linux Guru
Thread Author (OP)
 
Sepero's Avatar
 
Join Date: Aug 2010
Posts: 939
 
Device(s): LG Motion 4G
Carrier: MetroPCS

Thanks: 1,141
Thanked 579 Times in 227 Posts
Default BootBuddy - Run Boot Scripts from SDcard (a safe alternative to init.d)

(The OLD BootBuddy thread can be found here)

UPDATE:
Due to lack of time, BootBuddy has limited development support from me for now. BootBuddy was originally designed to work on a select number of LG phones (Motion, Spirit, L9) but may work for many others. The code is open source and anyone may contribute to development if they choose. I would be happy to feature your updates and I welcome support for new devices. Cheers.
https://github.com/Sepero/bootbuddy


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-
  • Much more Safe than init.d. If you have a script that is malfunctioning, just boot with the sdcard out, and put the sdcard back in after your device reaches home screen. Your device is Saved, No Problem!
  • 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.
  • 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.
  • 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.


REQUIREMENTS:



INSTALL:
  1. Start Script Manager, and allow/grant root access.
  2. Navigate to the bb_install.sh file.
  3. Tap on the file to show the menu options.
  4. At the top, highlight the "Su" icon.
  5. On the top-left, tap "Run".
The script will run quickly. It will automatically detect your sdcard location 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.
  1. Download the file 00rw_system.sh into your boot_buddy_scripts folder.
  2. Download the file 99sys_mount_info.sh into your boot_buddy_scripts folder.
  3. Reboot your phone.
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)
  1. Start Script Manager, and allow/grant root access.
  2. Navigate to the bb_install.sh file.
  3. Tap on the file to show the menu options.
  4. ** Type --uninstall in the text area labeled Arguments.
  5. At the top, highlight the "Su" icon.
  6. 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.

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.

Tell us about your results!!!

BootBuddy source code: http://github.com/Sepero/bootbuddy
pmb116, DNRDustin and twogbsd like this.

Advertisements
Sepero is offline  
Last edited by Sepero; August 3rd, 2014 at 04:45 AM.
Reply With Quote
The Following 7 Users Say Thank You to Sepero For This Useful Post:
DNRDustin (April 10th, 2014), funkyman (March 3rd, 2013), pmb116 (February 28th, 2013), puyow18 (March 13th, 2013), sammyz (April 4th, 2013), tigerstown (July 9th, 2014), twogbsd (February 27th, 2013)
sponsored links
Old February 27th, 2013, 08:28 PM   #2 (permalink)
Linux Guru
Thread Author (OP)
 
Sepero's Avatar
 
Join Date: Aug 2010
Posts: 939
 
Device(s): LG Motion 4G
Carrier: MetroPCS

Thanks: 1,141
Thanked 579 Times in 227 Posts
Default

LIST OF USER SCRIPTS MADE SPECIFICALLY FOR BOOTBUDDY:
(Mention your script and get listed here)
Device specific scripts:






MAKING A NEW SCRIPT COMPATIBLE:

For maximum compatibility with BootBuddy your script should be able to run with the standard busybox shell, and simply have a file name in the following format-
NNaaaaa_aaaaa

NN- A 2 digit number like "00", to indicated how soon or late a script should run in relation to other scripts. If the internal sdcard mount location is moved, it should be done at the prefix "50". Your script must run as prefix "49" or earlier to access the sdcard at it's default location ("51" or later at the moved location). If you are unsure what to use, most general scripts will be safe with the digit prefix "10".

aaaaa_aaaaa- This is the name of the script. It should be in all lowercase, and may use letters, numbers, periods, and underscores. An underscore_ should be used to separate words. For example "10my_fancy_script_v1.5"
pmb116 and twogbsd like this.
Sepero is offline  
Last edited by Sepero; April 25th, 2013 at 11:15 PM.
Reply With Quote
The Following 2 Users Say Thank You to Sepero For This Useful Post:
pmb116 (February 28th, 2013), twogbsd (February 27th, 2013)
Old February 28th, 2013, 01:22 PM   #3 (permalink)
Senior Member
 
rhino889a's Avatar
 
Join Date: May 2012
Location: Somewhere in the Internet
Gender: Male
Posts: 1,001
 
Device(s): Lg Motion,Lg Motion,Lg Motion
Carrier: Pidgeon

Thanks: 1
Thanked 177 Times in 128 Posts
Default

This is fricken awesome. Once i get the concept of writing scripts and finding premade scripts i will totally utilize this .
My daily entertainment phone . Movies ,music browsing emails text.
Toss in a different sdcard and my phone is an agressive machine set for more serious functions.Within 2 minutes my playstation is nasa server

My new script wasnt coded properly crap, yank sd and everything is fine. I think this has far more value than people think
This is more for people that look at thier phone as laptop and not just a phone.
And i was never asked to pay for it.
__________________
Can someone post a link to Google?
This Message Was Sent To You From ..."MikeHawk"
rhino889a is offline  
Reply With Quote
Old March 3rd, 2013, 06:51 PM   #4 (permalink)
Junior Member
 
Join Date: Mar 2012
Location: earth
Posts: 53
 
Device(s): LG Motion 4g [Rooted]
Carrier: Metrooooooo

Thanks: 41
Thanked 7 Times in 7 Posts
Default

Color me stupid, but can i drag and drop any script i find to be safe for the device on the boot buddy scripts folder, or do you need to modify that script to work with boot buddy? i noticed that all the scripts so far that are for boot buddy end with .sh and im a noob so i am not familiar with this.
funkyman is offline  
Reply With Quote
Old March 3rd, 2013, 09:16 PM   #5 (permalink)
Linux Guru
Thread Author (OP)
 
Sepero's Avatar
 
Join Date: Aug 2010
Posts: 939
 
Device(s): LG Motion 4G
Carrier: MetroPCS

Thanks: 1,141
Thanked 579 Times in 227 Posts
Default

@funkyman
The .sh extension refers to "SHell script". Linux scripts often have this extension, but it's not 100% necessary. Scripts may have another extension, or no file extension at all and still be able to run just the same.

If the script creator says that the script will work with BootBuddy (or init.d), and the script is made for your device, then it should be safe.

Doing anything else is at your own risk.
funkyman likes this.
Sepero is offline  
Reply With Quote
The Following User Says Thank You to Sepero For This Useful Post:
funkyman (March 3rd, 2013)
Old March 12th, 2013, 07:58 PM   #6 (permalink)
Linux Guru
Thread Author (OP)
 
Sepero's Avatar
 
Join Date: Aug 2010
Posts: 939
 
Device(s): LG Motion 4G
Carrier: MetroPCS

Thanks: 1,141
Thanked 579 Times in 227 Posts
Default

Quote:
Originally Posted by rhino889a
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.
Yes, you will want to write your code in this format

Code:
# Wrap the delayed code in a function so it doesn't stop other scripts.
delayed_code () {
    busybox sleep 10 # Waits for 10 seconds.
    ## The code you want to run after waiting ##
}

# The & sign tells it to run the function in the background so that other scripts can continue.
delayed_code &
Sepero is offline  
Reply With Quote
Old March 12th, 2013, 10:37 PM   #7 (permalink)
Senior Member
 
rhino889a's Avatar
 
Join Date: May 2012
Location: Somewhere in the Internet
Gender: Male
Posts: 1,001
 
Device(s): Lg Motion,Lg Motion,Lg Motion
Carrier: Pidgeon

Thanks: 1
Thanked 177 Times in 128 Posts
Default

Thanks alot this will help greatly
When i get a script running with this i will post a copy. As i think certain settings will need this feature.
rhino889a is offline  
Reply With Quote
Old March 14th, 2013, 03:39 PM   #8 (permalink)
Senior Member
 
rhino889a's Avatar
 
Join Date: May 2012
Location: Somewhere in the Internet
Gender: Male
Posts: 1,001
 
Device(s): Lg Motion,Lg Motion,Lg Motion
Carrier: Pidgeon

Thanks: 1
Thanked 177 Times in 128 Posts
Default

So would it be safe to say the busybox sleep number can be modified in the bb.sh in /data
To put a delay on every script in the bb folder?
rhino889a is offline  
Reply With Quote
Old March 14th, 2013, 09:12 PM   #9 (permalink)
Linux Guru
Thread Author (OP)
 
Sepero's Avatar
 
Join Date: Aug 2010
Posts: 939
 
Device(s): LG Motion 4G
Carrier: MetroPCS

Thanks: 1,141
Thanked 579 Times in 227 Posts
Default

The BootBuddy script is located at /data/boot_buddy.sh

Feel free to edit it at your own risk. BootBuddy has it's own delay currently. Every 1 second it will check to see if the sdcard has been mounted. After the sdcard has been found as mounted, it will then proceed to run all the scripts in the boot_buddy_scripts folder.
Sepero is offline  
Reply With Quote
Old March 29th, 2013, 03:53 PM   #10 (permalink)
Senior Member
 
rhino889a's Avatar
 
Join Date: May 2012
Location: Somewhere in the Internet
Gender: Male
Posts: 1,001
 
Device(s): Lg Motion,Lg Motion,Lg Motion
Carrier: Pidgeon

Thanks: 1
Thanked 177 Times in 128 Posts
Default

Thank you
And i wanted to add something about boot buddy that can be very valuable in the future

You can install BootBuddy now ,even if you have absolutley no intentention of using it

Next month you may have some issue with your phone

Maybe you dont have current backup and may lose valuable info if you unbrick
Maybe a little script can be run by bootbuddy at boot to correct the problem

Like this guy who installed a galaxy voice app that screwed his phone up.he installed as system app so reset wont fix

He will probably have to unbrick since he has no recovery

If he had bootbuddy ,a simpke
Mount system/app/galaxy whatever
Rm system/app/galaxy whatever

Or sometging like that i guess
rhino889a is offline  
Reply With Quote
sponsored links
Old June 27th, 2013, 05:11 PM   #11 (permalink)
Member
 
Xieon's Avatar
 
Join Date: May 2012
Gender: Male
Posts: 117
 
Device(s): LG Optimus F6-Rooted Running CM11 Beta, LG Motion 4G - Rooted F Firmware Cracked Screen, LG Connect
Carrier: Metro PCS

Thanks: 6
Thanked 14 Times in 7 Posts
Default

*FIXED*
I use Rom Toolbox Pro, and I had App2SD set to "external". If you use this program, or a similar app2sd program you must set it to "AUTOMATIC" or it will not work. I switched it to automatic, and the program installed flawlessly, without even needing a reset.

Left below for reference
_____________________
I spent a while messing around with BootBuddy to get it back to the way I wanted it to function, now I'm getting errors when I try to install apps, says I have no free memory.

Maybe move interal_fs to sdcard? (
Sepero likes this.
Xieon is online now  
Last edited by Xieon; June 27th, 2013 at 05:29 PM.
Reply With Quote
The Following User Says Thank You to Xieon For This Useful Post:
Sepero (June 28th, 2013)
Old September 19th, 2013, 04:16 PM   #12 (permalink)
New Member
 
Join Date: Aug 2013
Posts: 7
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Post Boot Buddy -vs- Crond / crontab

Hello Everyone;

Well - I'm sorry I didn't see this thread sooner: it would have saved me a lot of time fighting the system.

After about 3 days worth of hacking around, my environment works the way I want it to and I got <crond> and <crontab> to work.

NOW:

o / and /system mount as read-write.

o tcsh starts up and reads the .tcshrc file.

o I can run cron jobs.

o my external memory card is known as sdcard1 instead of extSdCard.

regards,
tony
TOMOTH is offline  
Reply With Quote
Old September 20th, 2013, 02:14 AM   #13 (permalink)
Linux Guru
Thread Author (OP)
 
Sepero's Avatar
 
Join Date: Aug 2010
Posts: 939
 
Device(s): LG Motion 4G
Carrier: MetroPCS

Thanks: 1,141
Thanked 579 Times in 227 Posts
Default

Very cool. Thanks for sharing!
Sepero is offline  
Reply With Quote
Old January 20th, 2014, 02:09 PM   #14 (permalink)
New Member
 
Join Date: Jan 2014
Posts: 5
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Sepero View Post
Hi JPowers2112,
Due to lack of feedback on different phones, I'm going to have to discontinue support for BootBuddy. Sadly, bootbuddy is currently only expected to work with a few phones: (LG Motion 4G, LG Spirit, L9, and perhaps a few more LG phones on MetroPCS). This is due to some inconsistencies between device manufacturers.

With your phone, it unfortunately, sounds like the script isn't working properly. I recommend following the instructions to uninstall BootBuddy. As an alternative you may want to try installing the popular init.d solution on xda forums.

If you need further assistance on BootBuddy, please write on that thread. I am subscribed to both threads, so I will see your message over there.
BootBuddy didn't even install, so there's nothing to uninstall. I had the phone turned on overnight, and the script was still running.
JPowers2112 is offline  
Reply With Quote
Old January 24th, 2014, 12:39 PM   #15 (permalink)
New Member
 
Join Date: Sep 2010
Posts: 5
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 1 Time in 1 Post
Default Unfortunately, install not working for me

Just a note to folks that if, when trying this, you get errors about 'sed' or other linux command line apps then you need to install/update busybox to get the latest linux packages or to add those that are missing. Download: https://play.google.com/store/apps/details?id=stericson.busybox and run the app on the device to install/update busybox.

Nigel
Sepero likes this.
veletron is offline  
Reply With Quote
The Following User Says Thank You to veletron For This Useful Post:
Sepero (January 26th, 2014)
Old March 25th, 2014, 12:43 PM   #16 (permalink)
Senior Member
 
rhino889a's Avatar
 
Join Date: May 2012
Location: Somewhere in the Internet
Gender: Male
Posts: 1,001
 
Device(s): Lg Motion,Lg Motion,Lg Motion
Carrier: Pidgeon

Thanks: 1
Thanked 177 Times in 128 Posts
Default

i been trying to get this running on my motion
But it wont execute scripts from my sd card
BB instaled fine. have 775 perms for bb folder on my external sd
but they wont execute. when i run the BB.sh i get Cant find sh applet
logs say Running the file but cant find .sh
Funny thing is i can run scripts directky from the sd card
I am running firmwarw F ,busybox 1.22.1,Gamwrheorys OC kernel
I tried modifying the mount file in Proc but it doesnt stick
Anybody have a clue?

it just not letting the system execute any of my files
rhino889a is offline  
Last edited by scary alien; March 31st, 2014 at 09:18 AM. Reason: post restored
Reply With Quote
Old March 25th, 2014, 03:46 PM   #17 (permalink)
Linux Guru
Thread Author (OP)
 
Sepero's Avatar
 
Join Date: Aug 2010
Posts: 939
 
Device(s): LG Motion 4G
Carrier: MetroPCS

Thanks: 1,141
Thanked 579 Times in 227 Posts
Default

The permissions on the boot_buddy_scripts folder do not matter. They will run no matter what.

BootBuddy - Run Boot Scripts from SDcard (a safe alternative to init.d)

Go to the link section YOUR FIRST SCRIPTS. Try them. If it still doesn't work, try to uninstall/reinstall boot buddy. Tell us your results.
Sepero is offline  
Last edited by Sepero; March 26th, 2014 at 07:24 AM.
Reply With Quote
Old March 25th, 2014, 05:00 PM   #18 (permalink)
Senior Member
 
rhino889a's Avatar
 
Join Date: May 2012
Location: Somewhere in the Internet
Gender: Male
Posts: 1,001
 
Device(s): Lg Motion,Lg Motion,Lg Motion
Carrier: Pidgeon

Thanks: 1
Thanked 177 Times in 128 Posts
Default

well i can execute the scripts directly from inside the boot buddy folder on my sd card
But have negative results at boot up
i even executed the install recovery.sh then i executed the script in /data
i also tried to execute the sxripts on my sd card through terminal emulator which told me Pernission Denied
Even though the sd folder and scripts show full permissions ,I am not able to execute them from the system
rhino889a is offline  
Last edited by scary alien; March 31st, 2014 at 09:18 AM. Reason: post restored
Reply With Quote
Old March 25th, 2014, 08:57 PM   #19 (permalink)
Senior Member
 
rhino889a's Avatar
 
Join Date: May 2012
Location: Somewhere in the Internet
Gender: Male
Posts: 1,001
 
Device(s): Lg Motion,Lg Motion,Lg Motion
Carrier: Pidgeon

Thanks: 1
Thanked 177 Times in 128 Posts
Default

i am wondering if there may be i ssues with the latest busybox
i just installed this to ny l9 with same issues

both have the latest busybox installed to xbin
installs seem to work fine as i dont seem to be having any other troubles
oh well i will keep tinkeriing with it
rhino889a is offline  
Last edited by scary alien; March 31st, 2014 at 09:19 AM. Reason: post restored
Reply With Quote
Old March 26th, 2014, 07:43 AM   #20 (permalink)
Linux Guru
Thread Author (OP)
 
Sepero's Avatar
 
Join Date: Aug 2010
Posts: 939
 
Device(s): LG Motion 4G
Carrier: MetroPCS

Thanks: 1,141
Thanked 579 Times in 227 Posts
Default

Boot buddy doesn't require scripts to have executable permission.

Short explanation:
Boot buddy executes a new shell instance, and feeds the script into it.

Long explanation:
Sdcards usually do not support executable permissions, because they are vfat (windows fat32) filesystem. Fat32 filesystems do not recognize executable flags. On Windows, anything can be executable if you just name it *.exe. For Android (Linux), special mounting is required to allow executing files (and it would result in every file on the sdcard becoming executable). Because of this, it's just easier to execute a new busybox shell and give it the script to read.

Hopefully that answers some questions for ya. Best of luck getting it resolved.
Sepero is offline  
Reply With Quote
sponsored links
Old March 26th, 2014, 02:33 PM   #21 (permalink)
Senior Member
 
rhino889a's Avatar
 
Join Date: May 2012
Location: Somewhere in the Internet
Gender: Male
Posts: 1,001
 
Device(s): Lg Motion,Lg Motion,Lg Motion
Carrier: Pidgeon

Thanks: 1
Thanked 177 Times in 128 Posts
Default

Edit.

Note for lg motion
if you use Pathkicks Lte2VU2 2nd init (2nd version) cwm recovery
Every single time you use the app
IT installs Busybox 1.81.1
i made a modified app that no longer does this
rhino889a is offline  
Last edited by scary alien; March 31st, 2014 at 09:20 AM. Reason: post restored
Reply With Quote
Old March 26th, 2014, 06:19 PM   #22 (permalink)
Senior Member
 
rhino889a's Avatar
 
Join Date: May 2012
Location: Somewhere in the Internet
Gender: Male
Posts: 1,001
 
Device(s): Lg Motion,Lg Motion,Lg Motion
Carrier: Pidgeon

Thanks: 1
Thanked 177 Times in 128 Posts
Default

ok
so on my L9
there was not an sh in the xbin folder
so i copied sh from my bin folder and pasted to xbin
then in the bootbuddy script in data,i removed (busybox) from the (busybox sh) line
now it works for me

Now my motion has an sh in xbin and it shows it linked to busybox
so i am gonna work on it next
rhino889a is offline  
Last edited by scary alien; March 31st, 2014 at 09:21 AM. Reason: post restored
Reply With Quote
Old March 26th, 2014, 06:49 PM   #23 (permalink)
Senior Member
 
rhino889a's Avatar
 
Join Date: May 2012
Location: Somewhere in the Internet
Gender: Male
Posts: 1,001
 
Device(s): Lg Motion,Lg Motion,Lg Motion
Carrier: Pidgeon

Thanks: 1
Thanked 177 Times in 128 Posts
Default

on mt motion
copied sh from bin pasted in xbin
removed (busybox) from (busybox sh) lines from the data/boot_buddy script
changed the log to go to the sdcard
works great

then i moved the data/boot_buddy.sh to my bin folder
remived .sh from boot_buddy.sh
then i changed install_recovery.sh lines to this

(system/bin/boot_buddy)

bootbuddy no longer exists in data

now i have gametheorys kernel on my motion it has sysinit as a boot service
so i use it to exec bootbuddy instead of install_recovery_sh

now i am going to see if i can add run parts and logwrapper to view script exec results in logcat
rhino889a is offline  
Last edited by scary alien; March 31st, 2014 at 09:22 AM. Reason: post restored
Reply With Quote
Old March 28th, 2014, 09:45 PM   #24 (permalink)
Linux Guru
Thread Author (OP)
 
Sepero's Avatar
 
Join Date: Aug 2010
Posts: 939
 
Device(s): LG Motion 4G
Carrier: MetroPCS

Thanks: 1,141
Thanked 579 Times in 227 Posts
Default

Hey rhino889a,
If you found the answer to your problem, it would be good if you posted it for others. It looks like it may have helped you to install busybox into /system/xbin (instead of /system/bin)

Not sure
Sepero is offline  
Reply With Quote
Old March 30th, 2014, 06:38 AM   #25 (permalink)
AF Contributor
 
divinebovine's Avatar
 
Join Date: Aug 2012
Posts: 1,017
 
Device(s): Kyocera Rise, Kyocera Hydro, PCD/ZTE/Alcatel Virgin Mobile Venture/JukeB
Carrier: Not Provided

Thanks: 148
Thanked 283 Times in 213 Posts
Send a message via AIM to divinebovine Send a message via MSN to divinebovine
Default

rhino889a, why did you edit your posts down to nothing?
__________________
Known on most forums as theholycow. See my other hacking interest.

110GB free at Surdoc! Or 2.5GB @ Dropbox. Or 20GB @ Copy. For Android backup, 1.3GB @ GCLoudBackup.com - just enter code DHY4B2. Bonuses at dozens of other cloud storage services.
divinebovine is offline  
Reply With Quote
The Following 2 Users Say Thank You to divinebovine For This Useful Post:
scary alien (March 31st, 2014), Sepero (April 6th, 2014)
Old March 31st, 2014, 09:23 AM   #26 (permalink)
not really so scary
 
scary alien's Avatar
 
Join Date: Mar 2010
Location: Indy
Posts: 17,291
 
Device(s): LG Nexus 5, Samsung Galaxy Nexus, Asus Nexus 7, Moto Droid X, HTC Droid Eris
Carrier: T-Mobile

Thanks: 32,638
Thanked 14,892 Times in 7,289 Posts
Default

Quote:
Originally Posted by divinebovine View Post
rhino889a, why did you edit your posts down to nothing?
, but posts have been restored.

Thanks!
Sepero likes this.
scary alien is online now  
Reply With Quote
The Following 5 Users Say Thank You to scary alien For This Useful Post:
D-U-R-X (March 31st, 2014), divinebovine (April 2nd, 2014), Mikestony (March 31st, 2014), Sepero (April 6th, 2014), Unforgiven (March 31st, 2014)
Old April 3rd, 2014, 12:00 PM   #27 (permalink)
Senior Member
 
rhino889a's Avatar
 
Join Date: May 2012
Location: Somewhere in the Internet
Gender: Male
Posts: 1,001
 
Device(s): Lg Motion,Lg Motion,Lg Motion
Carrier: Pidgeon

Thanks: 1
Thanked 177 Times in 128 Posts
Default

So the issue is that the latest versions of busybox do not have sh support
As well as some older versions
i upgraded from a version that had sh support
so i had an empty sh applet that was symlinked to busybox which no longer functioned
So adding a working sh applet (i copied mine from bin)
And removing (busybox) from the (busybox sh) lines from the bootybuddy bootscript in /data
Solved everything for me

you can look at the busybox applet manager
or in terminal emulator type

su
busybox

this will display all the applets your version of busybox supports as well as if they are simlinked or not

So now i have bootbuddy working
i wanted to integrate it to the system an add more control to it

so i made the bootbuddy boot script run from /system/bin instead of /data
added a second applet with a slightly exec path

now my bootybuddy_scripts folder on my ext sd contains 3 folders
bb1
bb2
control
run scripts go in either bb1 or bb2
the control folder has several sh scripts that allow you to turn bb1 or bb2 On or Off or simply Run them now.
So this allows a second profile and abilty to switch between the 2 or turn them off
if anybody wants to try it.I can upload it somewhere
Its set for the sd path of the LgMotion and is a manual install( copy-paste set permissions)

NOTE
it seems that adding .bak to your scripts in your bootbuddy_scripts folder DOES NOT stop it from being executed. Just so you need to be careful
Sepero likes this.
rhino889a is offline  
Last edited by rhino889a; April 5th, 2014 at 12:28 PM.
Reply With Quote
The Following User Says Thank You to rhino889a For This Useful Post:
Sepero (April 6th, 2014)
Old April 4th, 2014, 07:28 PM   #28 (permalink)
Linux Guru
Thread Author (OP)
 
Sepero's Avatar
 
Join Date: Aug 2010
Posts: 939
 
Device(s): LG Motion 4G
Carrier: MetroPCS

Thanks: 1,141
Thanked 579 Times in 227 Posts
Default

Quote:
Originally Posted by rhino889a View Post
NOTE
it seems that adding .bak to your scripts in your bootbuddy_scripts folder DOES NOT stop it from being executed. Just so you need to be careful
That is correct. Boot buddy will try to run any file in its folder (and any file extension). You have to move scripts out of the folder to stop them from running.

I'm glad to hear you got the problem solved. It sounds like you have gotten to know how Boot buddy works Very Very well. I don't know anyone that has studied BB as indepth as you have. Congratulations on all your modifications.
Sepero is offline  
Reply With Quote
The Following User Says Thank You to Sepero For This Useful Post:
scary alien (April 4th, 2014)
Old April 6th, 2014, 06:43 PM   #29 (permalink)
Senior Member
 
rhino889a's Avatar
 
Join Date: May 2012
Location: Somewhere in the Internet
Gender: Male
Posts: 1,001
 
Device(s): Lg Motion,Lg Motion,Lg Motion
Carrier: Pidgeon

Thanks: 1
Thanked 177 Times in 128 Posts
Default

thanks for the script
It is very valuable to me
i play with tons of init.d scripts,I often run them in realtime but found that run at boot can cause different results
Bootbuddy can make these tests safer

I was thinking about playing with a script or two for people without knowledge of adb or revovery
or just another option for repair

like put a script and a launcher in a folder
bootup and bootbuddy fixes a deleted launcher
or replaces a borked build.prop,uninstalls a bootlooping app.
Just an idea on another way this script can be used
scary alien and Sepero like this.
rhino889a is offline  
Reply With Quote
The Following 2 Users Say Thank You to rhino889a For This Useful Post:
scary alien (April 6th, 2014), Sepero (April 6th, 2014)
Old April 10th, 2014, 02:55 PM   #30 (permalink)
Member
 
Join Date: Apr 2011
Location: Nor-Cal
Gender: Male
Posts: 184
 
Device(s): Alcatel One Touch Fierce
Carrier: MetroPCS

Thanks: 14
Thanked 34 Times in 24 Posts
Default

could this be easily modified to work with a device like the Alcatel One Touch Fierce? we have no custom recovery, and this seems like the way to go if we are ever going to at least get a second init without bricking our phones.

-edit-
Awesome, running shell scripts on boot like a boss! Made a few minor changes to your installer and now it works like a charm on my device.
Sepero likes this.
DNRDustin is offline  
Last edited by DNRDustin; April 10th, 2014 at 07:37 PM.
Reply With Quote
The Following User Says Thank You to DNRDustin For This Useful Post:
Sepero (April 11th, 2014)
sponsored links
Old April 11th, 2014, 05:07 PM   #31 (permalink)
Senior Member
 
rhino889a's Avatar
 
Join Date: May 2012
Location: Somewhere in the Internet
Gender: Male
Posts: 1,001
 
Device(s): Lg Motion,Lg Motion,Lg Motion
Carrier: Pidgeon

Thanks: 1
Thanked 177 Times in 128 Posts
Default

here is copy of the modified bootbuddy
gives you 3 profile options
the abilty to run 1,2 or all 3 or turn bootbuddy completly off
it runs from your system so it will persist through a factory reset ( data wipe)
There is no installer
but is very easy
paste 3 files to system/bin
1 folder to ext sd
add 3 lines to
etc/install-recovery.sh or system/bin/sysinit
(some phones have sysinit some dont) i think most phones will run install-recovery.sh
simply make one if you dont have it already.
instructions included

scripted for mountpoints of LgMotion

if your phone is different you will need to modify the 3 files that go in /system/bin to point to your ext sd

once done open your boot_buddy_scripts folder on your ext sd
open the on_off_run folder
use root browser,root explorer or any script manager to (turn on) any or all of the 3 profile choices.
reboot, if sucessfull you will see a text file from bootbuddy on your sd card

these changes were modeled to resemble a tweak system i made about a year ago
and is the oerfect addition to this http://androidforums.com/motion-4g-all-things-root/840966-tweakers-kit-modified-init-d-sysctl-system.html#post6520829
Attached Files
File Type: zip Modified_BootBuddy.zip (5.3 KB, 7 views)
File Type: zip install-recovery.zip (191 Bytes, 7 views)
Sepero likes this.
rhino889a is offline  
Last edited by rhino889a; April 11th, 2014 at 11:11 PM.
Reply With Quote
The Following 2 Users Say Thank You to rhino889a For This Useful Post:
scary alien (April 11th, 2014), Sepero (April 12th, 2014)
Old May 2nd, 2014, 08:54 AM   #32 (permalink)
Member
 
TheEmpathicEar's Avatar
 
Join Date: Jun 2013
Location: MA of USA
Gender: Male
Posts: 349
 
Device(s): LG Optimus F6
Carrier: MetroPCS

Thanks: 24
Thanked 15 Times in 11 Posts
Question

@Sepero
I sent U a private message about rooting the LG Optimus F6 that I just got.

Will BootBuddy work on this phone [after I get it rooted]?
TheEmpathicEar is online now  
Reply With Quote
Old May 2nd, 2014, 04:48 PM   #33 (permalink)
Linux Guru
Thread Author (OP)
 
Sepero's Avatar
 
Join Date: Aug 2010
Posts: 939
 
Device(s): LG Motion 4G
Carrier: MetroPCS

Thanks: 1,141
Thanked 579 Times in 227 Posts
Default

Hi Ear. I do not know if BootBuddy will work with LG Optimus F6. You may test running it at your own risk.
Sepero is offline  
Reply With Quote
Old May 3rd, 2014, 01:35 AM   #34 (permalink)
Member
 
Join Date: Apr 2011
Location: Nor-Cal
Gender: Male
Posts: 184
 
Device(s): Alcatel One Touch Fierce
Carrier: MetroPCS

Thanks: 14
Thanked 34 Times in 24 Posts
Default

You might need to modify the script to get it to work properly, but it wont hurt anything on its own.
DNRDustin is offline  
Reply With Quote
The Following User Says Thank You to DNRDustin For This Useful Post:
scary alien (May 3rd, 2014)
Old May 3rd, 2014, 08:51 PM   #35 (permalink)
Senior Member
 
rhino889a's Avatar
 
Join Date: May 2012
Location: Somewhere in the Internet
Gender: Male
Posts: 1,001
 
Device(s): Lg Motion,Lg Motion,Lg Motion
Carrier: Pidgeon

Thanks: 1
Thanked 177 Times in 128 Posts
Default

Doesnt the mnt script in the OP check the mnt point then generate a text
If so just run that script with any script manager or file browser that will run scripts
That will tell you what you need

If you dont know how to modify the script
post the path to your ext sd and i "or someone"will fix it
rhino889a is offline  
Reply With Quote
Old May 4th, 2014, 05:35 PM   #36 (permalink)
Member
 
Join Date: Apr 2011
Location: Nor-Cal
Gender: Male
Posts: 184
 
Device(s): Alcatel One Touch Fierce
Carrier: MetroPCS

Thanks: 14
Thanked 34 Times in 24 Posts
Default

The script calls for EXTERNAL_STORAGE, it didnt work on my fierce. That doesnt mean it wont work, just that it might not.
DNRDustin is offline  
Reply With Quote
Old May 4th, 2014, 07:15 PM   #37 (permalink)
Linux Guru
Thread Author (OP)
 
Sepero's Avatar
 
Join Date: Aug 2010
Posts: 939
 
Device(s): LG Motion 4G
Carrier: MetroPCS

Thanks: 1,141
Thanked 579 Times in 227 Posts
Default

The installer attempts to automatically find the sdcard location using this line
Code:
[ -n $EXTERNAL_ADD_STORAGE ] && EXTERNAL_STORAGE=$EXTERNAL_ADD_STORAGE
Basically saying- Use whatever is listed in $EXTERNAL_STORAGE, but if $EXTERNAL_ADD_STORAGE is set, use that instead.

Unfortunately, a lot of devices have some tricky or unknown ways to identify the sdcard. The install script could be modified and replace the above line with this
Code:
EXTERNAL_STORAGE="/mnt/external/sdcard"
Change "/mnt/external/sdcard" to the mount location of your real sdcard, and the install may run just fine on any device.

Rhino889a and DNRDustin know enough to get it set up.

EDIT:
I almost, forgot- If your system doesn't respond to the file "/system/etc/install-recovery.sh", then Boot Buddy still won't work. Since your phone is an LG, there's a good chance it will work.
DNRDustin and TheEmpathicEar like this.
Sepero is offline  
Last edited by Sepero; May 5th, 2014 at 05:24 PM.
Reply With Quote
The Following User Says Thank You to Sepero For This Useful Post:
scary alien (May 4th, 2014)
Old May 4th, 2014, 07:19 PM   #38 (permalink)
Member
 
TheEmpathicEar's Avatar
 
Join Date: Jun 2013
Location: MA of USA
Gender: Male
Posts: 349
 
Device(s): LG Optimus F6
Carrier: MetroPCS

Thanks: 24
Thanked 15 Times in 11 Posts
Question

Quote:
Originally Posted by Sepero View Post
The installer attempts to automatically find the sdcard location using this line
Code:
[ -n $EXTERNAL_ADD_STORAGE ] && EXTERNAL_STORAGE=$EXTERNAL_ADD_STORAGE
Basically saying- Use whatever is listed in $EXTERNAL_STORAGE, but if $EXTERNAL_ADD_STORAGE is set, use that instead.

Unfortunately, a lot of devices have some tricky or unknown ways to identify the sdcard. The install script could be modified and replace the above line with this
Code:
EXTERNAL_STORAGE="/mnt/external/sdcard"
Change "/mnt/external/sdcard" to the mount location of your real sdcard, and the install may run just fine on any device.

Rhino889a and DNRDustin know enough to get it set up.
My LG Optimus F6 has:
Internal>/storage/sdcard0
External>/storage/external_SD

This is not "standard" is it?
TheEmpathicEar is online now  
Reply With Quote
Old May 5th, 2014, 05:22 PM   #39 (permalink)
Linux Guru
Thread Author (OP)
 
Sepero's Avatar
 
Join Date: Aug 2010
Posts: 939
 
Device(s): LG Motion 4G
Carrier: MetroPCS

Thanks: 1,141
Thanked 579 Times in 227 Posts
Default

The standard on regular Linux is to mount drives under /mnt, but for Android, I'm not sure Google has even issued a standard (though they really should).

Anyway, the line to insert would look like this
Code:
EXTERNAL_STORAGE="/storage/external_SD"
I forgot one thing (I'll go back to my previous post and add it in). If your system doesn't respond to the file "/system/etc/install-recovery.sh", then Boot Buddy still won't work. Since your phone is an LG, there's a good chance it will work.
Sepero is offline  
Reply With Quote
The Following User Says Thank You to Sepero For This Useful Post:
scary alien (May 5th, 2014)
Old May 10th, 2014, 11:49 PM   #40 (permalink)
Senior Member
 
rhino889a's Avatar
 
Join Date: May 2012
Location: Somewhere in the Internet
Gender: Male
Posts: 1,001
 
Device(s): Lg Motion,Lg Motion,Lg Motion
Carrier: Pidgeon

Thanks: 1
Thanked 177 Times in 128 Posts
Default

Or you could modify the actual bb file in data/
you couldnt go wrong.

The top is telling it the path where to send the log

next is the telling the path to mount
then the path to execute

change the last 2 paths to your phone

Note for booting
my L9 will run install-recovery.sh
But i found in System/vendor is script the runs at boot .Which bootbuddy and init.d scripts can started with.
this file might be on other phones i dont know
If your kernel execs sysinit that can be used .
i think i was able to use post_boot b.sh before
Attached Files
File Type: zip boot_buddy.sh.zip (383 Bytes, 0 views)
rhino889a is offline  
Last edited by rhino889a; May 11th, 2014 at 12:42 AM.
Reply With Quote
The Following User Says Thank You to rhino889a For This Useful Post:
scary alien (May 11th, 2014)
sponsored links
Old May 11th, 2014, 08:17 AM   #41 (permalink)
Member
 
TheEmpathicEar's Avatar
 
Join Date: Jun 2013
Location: MA of USA
Gender: Male
Posts: 349
 
Device(s): LG Optimus F6
Carrier: MetroPCS

Thanks: 24
Thanked 15 Times in 11 Posts
Question Does Boot Buddy Address these concerns?

Proposal/Theory for External SD storage solution on F6
TheEmpathicEar is online now  
Reply With Quote
Reply


Go Back   Android Forums > Android Development > Android System Mods, Scripts and Hacks > Rooted Devices Only
Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 09:59 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.