[Q] Busybox & dmesg - Galaxy S II Q&A, Help & Troubleshooting

Hi! Sorry if this question was already asked, but I couldn't find something related..
I have SGS2 XXKG3, so I've downloaded Chainfires's rooted kernel XXKG3 and successfully flashed it. Then I tried to install SUFBS (root file manager and terminal) and it told me that I don't have busybox when I tried to mount /system as r/w. Also it offered to install free busybox from Market. I agreed.
Everything seemed to be OK until I found that droidwall cannot show me the log - it tells "dmesg: applet not found". Little research discovered that I have symlink /sbin/dmesg which refers to busybox. But my version of busybox doesn't support dmesg. Also I'd found normal dmesg (ELF-executable) under (probably, I don't remember) /system/bin. So I deleted the symlink (/sbin/dmesg) and everything worked OK again. But.. till reboot. After reboot the /sbin/dmesg was there again.
Little more research and I found that now I have two versions of busybox on my SGS2: one from Chainfire's kernel (dated 2009) and one that I've installed myself (dated 2011, sep). The latter (2011) has about 1.5 times more functions that Chainfire's. But 2009 has dmesg function whereas 2011 hasn't.
So here is the question: why /sbin/dmesg is automatically restored after boot? And what can I do to prevent it from restoring?
Also, do I need to do something to remove one copy of busybox or two of them will live OK with each other?

Guys, please help... I can't now write to developers' forums since I don't have enough posts, so my only hope is to write here

Related

[Q] Has anybody successfully installed OPENVPN on KF2 based roms ?

I have wasted more than 3 days trying to figure out how to configure openvpn
on S2.
I tried the following roms:
Villainrom 1.4
Cognition S2 v1.07
Skyrom 1.0
Lite'ning Rom v1.5
and none of them seems to work.
I tried everything mentioned in :
http://forum.xda-developers.com/showthread.php?t=1115984&highlight=openvpn
http://forum.xda-developers.com/showthread.php?t=1074492&highlight=openvpn
but openvpn does not work.
I also own a HTC desire and configuration files work without a problem.
I tried manually installing openvpn as described in the posts but it does not work.
The problems are:
If I install openvpn manually as described in the threads above it does not connect to the openvpn server.
I installed openvpn from the market by selecting the folder for the binary
/system/xbin
and tried all the possibilities for path for ifconfig/route.
- /system/bin
- /system/xbin
- /system/xbin/bb
The default folder for ifconfig/route should be /system/bin (result from which ifconfig) and only that selection does not give the horrible
"FATAL: Linux ifconfig failed: could not execute external program".
but openvpn still does not work.
Any ideas ?
Hello,
I have the same problem, with same error
but I have successfully get connected to my vpn (vpntunnel.se) but its useless since the route doesnt use the vpn connection.
If anyone could help...
i have same problem too. some help would be good
Could this help?
I'd love to get this working too but I have not made any attempts yet so I'm monitoring this thread.
Searching for that exact error message on google led me to this thread which you may already have found.
In particular, even though it's about the galaxy i5800, the following comment may shed some light:
you may not use the pre-installed busybox from samsung (which is found in /sbin). It is a reduced version of busybox that does not include suitable ifconfig- and route-commands for openvpn. thus you have to install a full version of busybox... normally this is done, when you root your phone according to descriptions found in this forum.
you can alternatively install titanium backup (which installs its own busybox) and copy the "full" busybox from titanum backup to /system/xbin.
Click to expand...
Click to collapse
Try to do it but impossible for me. Im with lite ing rom. Check my configuration tomorow
Sent from my GT-I9100 using XDA App
Alright, so after going nutts (several times) I solved this issue (several times) only to always find I dont really know what the error is. But then again, I know more about Geological disasters than I know about Android ...
Anyways, heres my solution which appears to work. However, it goes away once you reboot (easily fixed) and disappears completely after you update firmware - but I made shortcuts.
The thing is, that the original busybox is not installed where openvpn looks for it. Regardless of this, openvpn has no idea how to use ifconfig / route commands in /system/bin directory.
So this is what I do:
1) Install busybox (from the market, get ver 1.19) to /system/xbin
2) Install openvpn to /system/xbin and point ifconfig/route to /system/xbin/bb (during installation).
3) Link the new busybox to the /bb directory MANUALLY with these commands (customized to steps 1/2 - you can change them to your liking but dont forget to update step 3 as well):
ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
ln -s /system/xbin/busybox /system/xbin/bb/route
Click to expand...
Click to collapse
What it does is place a busybox link to ifconfig and route in /bb directory.
Funny thing - Whenever I tried linking ifconfig/route to other places (like /system/xbin) it just didn't work. It made the tunnel, but tun0 int was always down (thats why it says "connect to as xx.xx.xx.xx" missing the tunnel internal IP - as in, no routing).
Challanges - when you soft reset, something dies. Not sure if its the busybox or the links. However, simply "reinstalling" busybox to /system/xbin solves it (its not really reinstalling, its just going into the busybox installer. Its only recreating links).
When you install an update/new cfw, everything dies. Reinstall busybox and re-enter the link commands.
Hope this helps, hope some android programmer tells me why it works this way. gluck.

[Q] Backtrack 5 no longer working on Atrix. HELP

Hello all,
I recently put backtrack 5 on my atrix and was really enjoying having a pentesting suite on my mobile phone.
I used the method and image from this thread
http://forum.xda-developers.com/showthread.php?t=1074169&page=26
Everything worked perfectly for a while until...
I updated to 4.5.91 GB OTA and now it no longer works.
When attempting to start BT I get this
Code:
#startbt
losetup:applet not found
mount: applet not found
mount :no such file or directory
mount :no such file or directory
mount :no such file or directory
net.ipv4.ip_forward=1
Setting /etc/resolv.conf to Google open DNS 8.8.8.8 and 8.8.8.4
startbt cannot create /data/local/bt/etc/resolve.conf: directory non-existent
startbt cannot create /data/local/bt/etc/resolve.conf: directory non-existent
startby cannot create /data/local/bt/etc/hosts directory non-existent
It looks to me like the backtrack image is not getting mounted, thus the directories cannot be found.
Can someone please explain to me what in the world happened, and perhaps how I can go about fixing this?
I am rooted and do have busybox installed. Both are confirmed through the rootcheck app.
Also I apologize for not posting this in the thread in the thread I mentioned before, but post count prevents me from posting in dev forums.
If someone successfully solves my issue I would be glad to donate a a few bucks to the dev of their choice.
EDIT***
Nevermind It is fixed. Just in case others are having similar issues I will explain what was wrong...
After I updated to GB and re-rooted, I ran rootcheck to verify that I had root access. One thing I noticed is that my rootcheck claimed I didnt have busybox installed. So I reinstalled it. Like a dummy I installed it /system/xbin instead of /system/bin. Simply installing it to the correct place fixed things. I feel silly. Mods feel free to delete this.

[Q] ICS 4.0.3 Lost su permissions even though device was rooted

Hi XDA Community,
Your forums have helped me in the past and I spent some time scouring the posts before posting this one as I couldn't find anything that was specific to my issue. Since this is my first post, I thought that I would save a ping pong of responses, by being fairly expansive on what the problem is and what I have tried; thus hoping to pinpoint my issue a little quicker.
Device Details:
---------------------
Model Number: GT-I9100
Android Version: 4.0.3
Kernel Version: [email protected] #3
Build Number: IML74K.XWLP3
ROM Firmware: Samsung-Updates.com-GT-I9100_O2U_1_20120326173406_jiut50pyip.zip (via Samsung Kies)
Rooting Method / Kernel: Odin3v185 / CF-Root-SGS2_XX_XEO_LPQ-v5.3-CWM5
Summary
--------------
Since the beginning of July 2012, I successfully upgraded from Gingerbread v2.3.6 to ICS v4.0.3 using Samsung Kies then initiated root privileges by using the CF-Root Kernel via Odin (versions shown above) - All has been working fine 100%.....
However, it appears that I seem to have lost my SU permissions and may have disabled my root access, even though my device was rooted and I would appreciate any assistance from anyone who might have time to shed some light on the situation.
Behaviour of Apps I have tried that require root
-------------------------------------------------------------------
SuperSU
SuperSU Pro v0.96 lists in the 'Apps' tab (denoted by a green # symbol) that I have granted all relevant Apps that require SU privileges. This includes AdFree, BusyBox Pro, Root Checker Basic, Root Explorer, SetCPU, Terminal Emulator, Titanium Backup, Triangle Away.
Terminal Emulator
Terminal Emulator displays the following and when I enter the su command at the prompt, I just see a carriage return with a grey block. In other words, I do not see the # symbol denoting I have su privileges.
a/local/bin:$PATH
[email protected]:/ $su
Root Explorer
Root Explorer no longer displays a directory listing and simply displays a pop up from SuperSU after tapping on Root Explorer, "Root Explorer has been granted superuser permission for an interactive shell." then the following message from Root Explorer itself:
"Root Explorer has not yet managed to obtain root access. Because of issues with Superuser, this often happens the first time the app is run but is usually fine from then on."
Root Checker Basic
Apart from the App stating "Please wait for Root Check to be complete. Systems appears to be running very slow" after tapping on the [Verify Root Access] button. It never seems to provide an output after a few minutes waiting. My conclusion is that it cannot get su permissions.
BusyBox Pro
SuperSU displays the message that Titanium Backup has been given root access, however I get the following message:
"Asking for root rights..."
Then after a few minutes I receive this most enlightening output:
"Sorry, I could not acquire root privileges. This application will *not* work! Please verify that your ROM is rooted and includes BusyBox and try again.
This attempt was made using the "/system/xbin/su" command."
I read somewhere that Titanium Backup uses it's own BusyBox installation and not the system wide BusyBox package so I went in to the Titanium Backup preferences and selected 'Troubleshooting settings' then chose 'Force system BusyBox' to see if my issue was a BusyBox specific problem. Again, it failed so not sure if it is BusyBox or my SU permissions that have somehow got corrupted or been disabled.
Additional Information
-------------------------------
Using 'ES File Explorer', I can confirm that the following file's exist at the appropriate location paths:
/system/xbin/su
/system/xbin/busybox
Conclusion so far
-------------------------
It appears that on the face of it that I have lost my root permissions, so I removed apps from SuperSU, then uninstalled the App (e.g. Root Explorer, Terminal Emulator et al.); then performed the rooting procedure again via ODIN and the CF-Root kernel. The process itself worked flawlessly and so after it rebooted, I installed the Apps in question from the Google Play Store again and they prompted to be granted SuperSU privileges. Unfortunately, the same issues arose where it appears that it cannot communicate with either the su command or BusyBox to do what it requires.
Does anyone have any ideas as the phone is fine apart from this and although performing a Titanium Backup backup around two weeks ago, I would sooner not have to wipe everything if I can help it. I wonder if it is an update that somehow confused things...Either way, I cannot use Titanium Backup to backup/restore due to it requiring SU/root permissions, of which I do not seemingly have anymore.
Any ideas please as I am scratching my head and have gone blurry eyed at spending hours viewing various forums and posts?
follow this steps:
1. Unroot your phone with the unroot method here
2. To be sure, unroot again with the method here
3. ROOT your phone again using Any of the Rooting methods in the links provided in step 1 or 2.
Good luck
ICS 4.0.3 Lost su permissions even though device was rooted - Resolved
:good: Issue Resolved :good:
Many thanks for contributing to my issue. I had come across the post before in your links and although the directions were not completely related, there was a section pertaining to a zip file that I must have missed.
Conclusion
----------------
As can be read in the post, I was unsure if my issue related to losing root, a possible corrupt su file itself or BusyBox. As you will see on the link below, Busy Box actually creates hundreds of symbolic links (symlinks) and due to my perhaps overzelous approach to wanting a quick fix; I must have inadvertently created too many links with different versions of Busy Box and therefore when an App that was correctly added and granted SU permissions within SuperSU, when it then communicated with Busy Box / su to authenticate; I can only imagine it got confused and was lost with all the dead symlinks. The net result was that although SuperSU stated that it had granted permissions to the Apps requiring root, it never got to communicate with the su file contained within /system/xbin. I hope that makes sense, well at least I am pretty sure that is what happened.
Solution
------------
Firstly, I cleared all entries contained within SuperSU and therefore removing all Apps from being granted with root access (they didn't have it anyway at the moment).
I saved the zip file contained at the following link on to my external SD card and choosing to 'install zip from sd card' within the CWM Recovery (Volume Up + Power + Home button); effectively this uninstalls Busy Box completely from your device, including hundreds of symlink files - including many which in my instance was causing issues with Apps that required root to function correctly.
Busy Box Uninstaller v1.0 here
I restarted my device and downloaded Busy Box from Google Play Store and when I opened Root Explorer and the other aforementioned Apps shown in this post, they prompted to be granted root permissions (SuperSU) and voila....it worked ! :good:
I hope this may help other droid users experiencing similar symptoms.

[Q] Howto upgrade the busybox properly ??

Hi,
I tried to upgrade the busybox with different manner (busybox, busybox installer, manual installation from xda), but no one works properly.
Each time i broke the original Archos busibox, so i lose the adb shell.
Can someone explain to me the good way to upgrade the busybox?
Thanks.
SirOch
Hi,
Nobody to explain a clean upgrade of the busybox?
cheers
SirOch said:
Hi,
Nobody to explain a clean upgrade of the busybox?
cheers
Click to expand...
Click to collapse
Google? also XDA has a great search feature have you tried that? :silly: Any particular reason why you want/need to upgrade busybox?
Hi,
As i said, i tried the different busybox installers and the installation was ok, but i each time, i lost the shell from adb.
That's just my problem.
So i just want to understand why the upgrade of the busybox broke the original archos busybox?
Moreover some application need to have other busybox installed.
Regards.
David
SirOch said:
Hi,
As i said, i tried the different busybox installers and the installation was ok, but i each time, i lost the shell from adb.
That's just my problem.
So i just want to understand why the upgrade of the busybox broke the original archos busybox?
Moreover some application need to have other busybox installed.
Regards.
David
Click to expand...
Click to collapse
Ahhh right, the quest for knowledge Your problem is as much to do with adb ( /sbin/adbd to be precise ) as it is to do with busybox, firstly you've probably wiped out the symlinks in /bin, especially /bin/sh which is the location that adbd on archos looks to run the when you do adb shell from your desktop. This is not the default location which just about every other android OEM adheares ,that is /system/bin/sh.
If you are going to upgrade the archos busybox be aware that a large number of symlinks back to /bin/busybox exist not only in /bin but also in /usr/bin /usr/sbin
Archos for reasons I still haven't fathomed, really went to town on restructuring and customized Android on the platform level.
A little tip if you've got more question, to save you bumping threads , which really does upset some folks round here... you'll probably get more more if you add more details, such as error messages etc. Saying " i lost the shell from adb." doesn't really help anyone who might be able to offer assistance. There about 10 different ways adb can fail to connect, Did the device disappear from the list or report as offline. or even come up with the message "- exec '/bin/sh' failed: No such file or directory (2) -".??
Hopefully that's helped.
Hi SirOrch,
i don't know why you loose your adb shell, but concerning busybox... the things on Archos tablets are like this:
Basically on a non rooted device we got a squashfs image mounted read only.
This image contains the stock busybox compiled by Archos (sharing system's uclibc) with limited functionality,
but containing enough tools to handle the daily job.
The path to this busybox is "hard-coded" as well. It's location is /bin which is the second entry in the path environment.
You might check that by typing printenv in your console.
The first entry should be /data/local/bin on your device.
So if you like to replace stock busybox with an advanced one, you should make sure that it will be installed to /data/local/bin.
Often there's no need to use all this apk Android Market stuff to get a proper busybox installation.
Sometimes it's little better to really understand what's happening under the hood.
Most busybox app's are statically linked, because with a static binary you don't have to take care of the device's libc or uclibc.
So you might easily extract on of the apk's or get one from xda-developers.
There are many floating around in the end.
If got one push it to /data/local/bin with adb.
You might need softlinks in this directory as well. This could be done by hand as well.
Anyway if you are a lazy person, who doesn't care about what's happening, go to the market install busybox.
Then check at /data/local/bin if it is there.
If it got installed elsewhere, some commands will still use stock busybox.
Extended commands might then use the installed one.
So check it out...
EDIT:
... aaaargh again simultaneous posting.
scholbert
Hi gentlemen,
Thanks for your help and sorry to forget to give you the error message i had:
the message was : - exec '/bin/sh' failed: No such file or directory (2) -
After investigation i found my mistake:
- In manual mode, i forget to change the ownership of busybox to root in /bin.
- when i tried to use any application from the market, the busybox was well updated in /system/xbin but the application also delete the busybox in /bin and don't change the symlinks in /bin. That's explain why adb shell won't work.
Regards.
SirOch

[INFO] JRummy BusyBox Installer Warning

I thought I'd post this...even though I'm a noob...so that others can benefit if possible. If you're using the JRummy BusyBox installer, please be careful with the Advanced Install option. Here's why:
After rooting my phone I installed JRummy's BusyBox installer. First, after checking busybox.net for the latest stable install version, I did a full install without the symlink apps option selected. Then I did another full install with the symlink apps option checked. Finally, after reading through the entire list of available commands and what they did, I decided to do an advanced install. I selected "Remove Symlinks" for each of the busybox commands I wanted NOT to have available in Terminal Emulator.
Soon after the advanced installation, I noticed that Terminal Emulator wasn't working. Then I noticed that my WiFi connection wasn't working...specifically the part in which the phone attempts to lease an address using DHCP. After emailing the developer with my issue, I tried to re-install BusyBox manually based on a link he included in the reply. I could push the file to the phone using 'adb push' but when I tried to open a shell to run the install commands, I would get the following error: exec '/system/bin/sh' failed: No such file or directory (2) . Long story short, I had to re-flash the phone using Odin to fix it.
In the AFWall+ logs, around the time I ran the Advanced Install, there were a bunch of entries like this: ld_library_path=/vendor/lib:/system/lib busybox rm /system/xbin/strings exit. There may have been a -s after the 'rm' command and before the directory but I'm not completely sure. After I flashed the phone with Odin, I opened Root Explorer and took a look at the files under /system/bin/. I noticed that the commands that can be run without installing busybox...like ls, or ifconfig...were linked to 'toolbox'. /system/bin/sh was linked to mksh.
After more research and reading, I'm about 90% sure what happened. Here's an excerpt from the email I sent to the developer:
<snip>
Basically, the "Remove Symlinks" option in your app does either one of two things:
It removes the directories entirely
It removes the symlinks to busybox, but doesn't restore the original symlinks that were present before busybox was installed.
<snip>
So if you're using this particular installer, please be careful with the Advanced Option.
Please help
MonaLisaOverdrive said:
I thought I'd post this...even though I'm a noob...so that others can benefit if possible. If you're using the JRummy BusyBox installer, please be careful with the Advanced Install option. Here's why:
After rooting my phone I installed JRummy's BusyBox installer. First, after checking busybox.net for the latest stable install version, I did a full install without the symlink apps option selected. Then I did another full install with the symlink apps option checked. Finally, after reading through the entire list of available commands and what they did, I decided to do an advanced install. I selected "Remove Symlinks" for each of the busybox commands I wanted NOT to have available in Terminal Emulator.
Soon after the advanced installation, I noticed that Terminal Emulator wasn't working. Then I noticed that my WiFi connection wasn't working...specifically the part in which the phone attempts to lease an address using DHCP. After emailing the developer with my issue, I tried to re-install BusyBox manually based on a link he included in the reply. I could push the file to the phone using 'adb push' but when I tried to open a shell to run the install commands, I would get the following error: exec '/system/bin/sh' failed: No such file or directory (2) . Long story short, I had to re-flash the phone using Odin to fix it.
In the AFWall+ logs, around the time I ran the Advanced Install, there were a bunch of entries like this: ld_library_path=/vendor/lib:/system/lib busybox rm /system/xbin/strings exit. There may have been a -s after the 'rm' command and before the directory but I'm not completely sure. After I flashed the phone with Odin, I opened Root Explorer and took a look at the files under /system/bin/. I noticed that the commands that can be run without installing busybox...like ls, or ifconfig...were linked to 'toolbox'. /system/bin/sh was linked to mksh.
After more research and reading, I'm about 90% sure what happened. Here's an excerpt from the email I sent to the developer:
<snip>
Basically, the "Remove Symlinks" option in your app does either one of two things:
It removes the directories entirely
It removes the symlinks to busybox, but doesn't restore the original symlinks that were present before busybox was installed.
<snip>
So if you're using this particular installer, please be careful with the Advanced Option.
Click to expand...
Click to collapse
Hello I installed BusyBox and I had same issue with WIFI also others for example after reboot of my tablet wholle setting is set to orignaly(language and everithing).How can put back everithing?Does exist some apps etc???Thank you.
OMG... i installed busybox with this app into /system/xbin on my dopo d7015 with advanced install... and then the problems started... 0 total internal size, wifi not acquiring ip with dhcp ... no factory restore could fix it. then i eventually learned that /system/bin/sh didn't exist when trying to adb shell. i've downloaded an sh binary and copied it, now i have valid internal total size, and android terminal works... but wifi won't even turn on now! like an idiot i didn't backup before i started playing with the tablet... i have no clue as to how to fix it! please someone help me!
With one version of this app, it said Busy box 1.20.x is not compatible for my phone. But busy box installer by Stericson does the job perfectly.
Sent from my GT-S5360 Gadget of Mass Destruction using xda-app
Using CWM........Busybox Commands........No I use my hands

Categories

Resources