Hi guys
How can I add BusyBox to my (custom) ROM?
My ROM is based on the rootedupdate.zip version 1.21.405.2 with superuser 2.1.
I hope anybody can help me.
Well, this kitchen - http://forum.xda-developers.com/showthread.php?t=633246 has an option to add busybox to a ROM. You could either look at the 'add_busybox' script and figure out how it works or just use the kitchen.
I use this kitchen in the version 0.51.
I don't see a option to add BusyBox in the menu..
At the folder "scripts" is a script called add_busybox.
But how can I add it to my ROM?
Thank you for your help.
EDIT: It's a Desire ROM.
nickiberli said:
I use this kitchen in the version 0.51.
I don't see a option to add BusyBox in the menu..
At the folder "scripts" is a script called add_busybox.
But how can I add it to my ROM?
Thank you for your help.
EDIT: It's a Desire ROM.
Click to expand...
Click to collapse
I stand corrected. You are right. There is no option in the menu for that. However, if you select #2 (add root permissions), it will optionally add busybox. If that doesn't work for you, you can try different things...
1) look through the 'add_busybox' script and see what it does
2) find a ROM that has busybox installed, and see if you can tell how they added it
After looking at the script myself, it looks like it just copies the busybox binary to /system/xbin and then does some needed mods to the update-script.
yeah, busybox is just a binary
$ busybox
BusyBox v1.16.2 android full (2010-03-28 22:34:45 EDT) multi-call binary.
It simply contains many basic binaris in it.
wget, for example, is busybox wget
I am really tearing my hair out over this one, and I cannot find a solution no matter what I do. I have searched everywhere I can think of and no one seems to have a solution.
Device & ROM: HTC Incredible S (vivo) with CM7.1 Nightlies (#139)
Problem: Busybox doesn't work. I tried using the Logging Checker app By TrevE but kept getting the error "ls: no such tool", which I thought was was odd. So I tried manually calling ls in terminal emulator and via adb shell, same error, so I assumed busybox was borked. I also noticed Titanium backup was using it's internal busybox, presumably because it couldn't get access to the system one either.
Attempts to fix:
First I tried re-installing busybox via Stericson's app from the market, it recognised I have the default CM7 one installed and updated it to the latest version. Still get the same problem.
I tried setting permissions to be avalible for everything on both busybox files (bin and xbin). Same error.
I tried manually deleting busybox via root explorer from bin and xbin and reinstalling, Stericsson's app now says I have multiple versions installed. Same error.
I tried wiping and reinstalling my ROM. Still same error.
This is really driving me crazy and I have run out of ideas. Can anyone help? I am not a "noob" I have been using android for a couple of years as well as dabbling in ROM & Kernel dev, I know how to use a search, one guy here mentions the same problem but never says if he got it fixed, and this guy says re-installing his ROM corrected it. Has anyone else seen this problem before?
There might be copy on your sdcard. You could delete that as well and try a "clean" install.
Also, check your path to make sure xbin and bin are included
As a last resort, or maybe the first step, you can install it manually.
Unzip the app and extract the busybox binary. If I recall correctly, they are in the assets folder as .png files. Pick a version.
mount the system as read-write
mount -o remount,rw /your/system/partition/here /system
you can type "mount" to see where /system is mounted
Push or copy the binary file to /system/xbin/buysbox
this is easier said then done since you don't have cp or mv!
ghetto copy should work - "cat /sdcard/busybox.png > /system/xbin/busybox
make it executable "chmod 755 /system/xbin/busybox"
let busybox do the heavy lifting "/system/xbin/busybox --install /system/xbin/"
remount the system as read only
busybox mount -o remount,ro /system
Please use the Q&A Forum for questions Thanks
Moving to Q&A
Manual install worked, thanks man! Well, it worked in so far as I can use the tools from terminal emulator, but the logging app still gives me ls:no such tool. Titanium Backup can see the system busybox though which is good.
It might be using an aboslute path like /system/bin/ls to call ls. Maybe add a link? That is the hard part about manual install- you might have some toolbox links or other executables in other path directories.
sent from my cyanogen(mod) vision
I'm having the same problem. I have Busybox installed, but TrevE's Logging Checker says "ls: no such tool".
Did you find a solution for this problem?
Add a link? Try "busybox which ls" it's probably not pointing to busybox. You might have to add some absolute paths and other nonsense.
sent from my cyanogen(mod) vision
Thanks for the reply. "which busybox ls" replies:
# which busybox ls
/system/xbin/busybox
/system/xbin/ls
It looks like you have ls linked. Maybe the logger tool is looking for it in /system/bin? Have a look in there and see if there is a link or binary. It could be a toolbox link?
Lastly, check permissions- maybe it's not executable/accessible?
sent from my cyanogen(mod) vision
I've tried creating a symlink in /system/bin and it still doesn't work, so I sent TrevE a private message; I'll update this thread when he replies.
l0st.prophet said:
I am really tearing my hair out over this one, and I cannot find a solution no matter what I do. I have searched everywhere I can think of and no one seems to have a solution.
Device & ROM: HTC Incredible S (vivo) with CM7.1 Nightlies (#139)
Problem: Busybox doesn't work. I tried using the Logging Checker app By TrevE but kept getting the error "ls: no such tool", which I thought was was odd. So I tried manually calling ls in terminal emulator and via adb shell, same error, so I assumed busybox was borked. I also noticed Titanium backup was using it's internal busybox, presumably because it couldn't get access to the system one either.
Attempts to fix:
First I tried re-installing busybox via Stericson's app from the market, it recognised I have the default CM7 one installed and updated it to the latest version. Still get the same problem.
I tried setting permissions to be avalible for everything on both busybox files (bin and xbin). Same error.
I tried manually deleting busybox via root explorer from bin and xbin and reinstalling, Stericsson's app now says I have multiple versions installed. Same error.
I tried wiping and reinstalling my ROM. Still same error.
This is really driving me crazy and I have run out of ideas. Can anyone help? I am not a "noob" I have been using android for a couple of years as well as dabbling in ROM & Kernel dev, I know how to use a search, one guy here mentions the same problem but never says if he got it fixed, and this guy says re-installing his ROM corrected it. Has anyone else seen this problem before?
Click to expand...
Click to collapse
I don't have the correct answer as of right now, but I believe why both you and I are getting "ls: no such tool" when running Logging Checker app By TrevE is because ls is being called from toolbox and not busybox, if you where to adb shell into your phone and run /system/bin/toolbox ls you get the same error, also when I looked into the APK theres a file called "AtLeastHaveTheBallsToTellMeYouLOLedReadingThis.smali" and yes I did LOL when I read the file name but there are instances with toolbox ls being called.
I'll keep you posted if I figure it out.
Running "/system/bin/toolbox ls" from adb shell does give me the same "ls: no such tool" error.
I unzipped the APK and didn't find the funny file you mention, thou...
dserodio said:
Running "/system/bin/toolbox ls" from adb shell does give me the same "ls: no such tool" error.
I unzipped the APK and didn't find the funny file you mention, thou...
Click to expand...
Click to collapse
Unzipping just the APK alone won't let you see the file, it's a binary xml file to my knowledge, I had to use a tool called android-apktool, once you decode the APK its inside the folder called smali/com/treve/loggingtest/.
Finally figured it out, I had to copy the toolbox binary from an Android emulator and put it on my phone along with setting up the right permissions and group and now toolbox ls outputs. I checked Logging Checker and now I get a listing of files inside the app.
spellnight said:
Finally figured it out, I had to copy the toolbox binary from an Android emulator and put it on my phone along with setting up the right permissions and group and now toolbox ls outputs. I checked Logging Checker and now I get a listing of files inside the app.
Click to expand...
Click to collapse
Could you please provide specifics? I have all the SDK tools installed, but where is the "toolbox binary from an Android emulator" located? Did you run the Emulator and adb pull the toolbox you needed from it? Where did you put it on your phone to make it work, and what permissions and group are necessary? I would also like to use Logging Checker but I get the same error running evo-deck-1.3. While re-flashing may work, I'm worried it won't and then be stuck in the same place. Thanks.
Perhaps someone just happens to know if evo-deck-1.3 has Carrier IQ or not? I tried searching and couldn't find any specific mentions from the dev or users. Flipz actually preemptively pulled Carrier IQ from Fresh ROM 8 months ago when he didn't even know what it was, major kudos to him.
Same issue here: CM7.1 toolbox binary doesn't support "ls"
I have the same issue. Installed Logging Checker app By TrevE (thanks!) but get the "ls: no such tool" msg.
TrevE's app installs busybox (and its associated links) in /system/xbin, but for some reason his app appears to invoke "/system/bin/toolbox ls" which produces that message.
I can't find any other "ls" on the system other than the one in /system/xbin which is a link to /system/xbin/busybox.
Maybe I should just replace the toolbox binary with busybox after nandroiding?
I PMed TrevE but he has a lot going on right now.....
*update*: I did try remounting /system as rw and then # cd /system/bin; mv toolbox toolbox_save; cp /system/xbin/busybox . ; mv busybox toolbox
That changed the behaviour of the logging checker app; now it says "empty" instead of "ls: no such tool", but it also broke many commands that were linked to toolbox such as "vmstat". Also it didn't fix the registration problem with the app (says I haven't donated even though I've purchased the key app).
So I undid the changes (before I screwed anything else up) and rebooted.
At this point you might as well use the detector on Market by Voodoo or Lookout because troubleshooting this may well take longer than just using another detector. I do worry though that those who need removal will still be forced to TrevE's app but may find it not working after paying for the license key. Be careful though! I'm sure that malicious "detectors" will start popping up, which will be their own spyware at best and possibly extract the data from CIQ at worst.
V8 of TrevE's app and key fixed the problem for me
Thanks again to TrevE for creating this! I installed Version 8 and everything was fixed.
I had installed the latest busybox installer (v7.3) by Stericson. It had an option to uninstall existing busybox installations.
Since I had multiple versions of busybox already installed on my P500, I decided to uninstall a few of them but on hitting uninstall it seems it removed a lot of binaries.
Now when I try to use any application that requires root it simply FC's.
Then I tried using ADB shell but it gave me the following error:
-exec /system/bin/sh: No such file or directory
I then manually tried to look into /system/bin from FileExpert app that I had installed on my mobile. I had almost every required essential binaries but sh was missing.
Therefore I did a adb push of sh from one of my other phones(a ZTC blade). It was successful but now ADB shell gives another error:
/system/bin/sh: Permission denied(13)
I need someones help in this. Am I proceeding the correct way. If yes, how do I set permissions without adb shell?
Also I few more points I had noticed (If it might me helpful)
--------------------------------------------------------
1) adb devices: now gives some generic device name (e.g- 80565403440...). Previously I think it was something like "LGP500" if I am not mistaken.
2) only /system/bin now holds some binaries. No binaries are to be found on other locations like /system/xbin, etc.
3) Is copying sh from another phone the correct way to proceed? Or shells are different for different mobiles. If yes, can a P500 owner provide a sh from /system/bin please? Thanks.
[EDIT: The problem has been resolved. Setting executable permission externally and making a adb push worked out. Only thing I needed was a Linux installation and VirtualBox saved my day. Windows powershell may also work it seems but I didnt try it.
I assumed the binary compiled for ZTC Blade will work successfully for the days to come. Thanks XDA]
Can someone please provide me the sh binary from P500 please? It resides in the /system/bin folder.
Also if anyone knows how to use the phones internal memory without adb and set file permissions, it would be a great help.
Someone please provide the sh binary from /system/bin . I will try pushing it with executable permissions set outside to see if it works...
I have BB 1.18.4 still from the old doomlord kit, installed into system/xbin, and I noticed that some mods/tweaks/apps require it installed in /xbin, while others need it into /bin. So my question is, if I use Busybox Installer to install the 1.20.2 to both folders, will it harm my device having two busyboxes installed at the same time?
You could install it in xbin and then symlink it to bin.
Sent from my Nexus 7
Err, how to symlink it? I find something like console commands searching around, but i don't know where to put them =(
I think you have some learning to do.
You can install busybox in both directories. The order of directories in $PATH will prevent issues with having it installed twice.
Sent from my Nexus 7
Thanks, I'll go directly with the double install then.
Just one more thing that just happened, I usually use Busybox Installer for that, but when I select the installation for the right version, before dowloading the install files, it stops and says I have a bad internet connection, even tho my 3G works perfectly. Did anyone else experience this?
BillGoss said:
I think you have some learning to do.
You can install busybox in both directories. The order of directories in $PATH will prevent issues with having it installed twice.
Sent from my Nexus 7
Click to expand...
Click to collapse
Yeah, I know this is old thread, but I have some related questions: if busybox is already installed in system/bin by kingroot, why should I install a binary update in system/xbin as busybox installer wants to do by default? If it is in both paths, which one is going to do the job? or... Why do I actually want to have two busybox copies in two separate directories if I "can" have just one? And last: most people suggest to install busybox in system/xbin, so why kingroot choose to do it in system/bin?...
Man quetion.. I'm curious what the answers are to these please!..
K, I'm rooted, with hasoon's toolkit, have Titanium Backup, I can delete system apps, back them up,..., no problem.
BUT, installing BusyBox is a no go
edit -> still having problems reinstalling busybox - i wrote a script to flash it to the system/xbin folder through cwm, which works, but i can't make the permission for busybox to execute stick after a reboot - whenever i reboot, i have to manually set it to execute in root explorer or it's useless.
Can someone help me write a cwm script to flash busybox to /system/xbin through cwm and make it permanently executable ?
bumping this - need help - anyone ?
edit -> still having problems reinstalling busybox - i wrote a script to flash it to the system/xbin folder through cwm, which works, but i can't make the permission for busybox to execute stick after a reboot - whenever i reboot, i have to manually set it to execute in root explorer or it's useless.
Can someone help me write a cwm script to flash busybox to /system/xbin through cwm and make it permanently executable ?
give this a shot
http://forum.xda-developers.com/showthread.php?t=1772338