Hey,
So a few months ago, I installed either an older version of Busybox, or the newer version I installed never stuck. Basically, I have two folders that contain the busybox commands: /sbin and /system/xbin. In Terminal Emu., when I enter a Busybox command, it seems to only acknowledge the older folder (/sbin). eg if I type in "busybox ifconfig..." or "busybox ipconfig...." I'm told that there's no such command, in so many words. How do I go about fixing this?
Would it mess anything up if I moved the contents of the newer folder (/system/xbin) into /sbin ?
Also, should there be a busybox file located anywhere (ie a file in root that's executed when "busybox" is typed into Term. Emu?) I can only locate the one in the internal sdcard directory ("busybox-stericon")
Thanks
bumpity
alljokingaside said:
Hey,
So a few months ago, I installed either an older version of Busybox, or the newer version I installed never stuck. Basically, I have two folders that contain the busybox commands: /sbin and /system/xbin. In Terminal Emu., when I enter a Busybox command, it seems to only acknowledge the older folder (/sbin). eg if I type in "busybox ifconfig..." or "busybox ipconfig...." I'm told that there's no such command, in so many words. How do I go about fixing this?
Would it mess anything up if I moved the contents of the newer folder (/system/xbin) into /sbin ?
Also, should there be a busybox file located anywhere (ie a file in root that's executed when "busybox" is typed into Term. Emu?) I can only locate the one in the internal sdcard directory ("busybox-stericon")
Thanks
Click to expand...
Click to collapse
I'm no expert, but based on my experience with Linux, I'd say that the safest thing to do would be to create a symbolic link of all the files in /system/xbin/busybox (or wherever) to /sbin/busybox (or wherever)
If you could post the directory listings of "/sbin" and "/system/xbin" it might help.
alljokingaside said:
Hey,
So a few months ago, I installed either an older version of Busybox, or the newer version I installed never stuck. Basically, I have two folders that contain the busybox commands: /sbin and /system/xbin. In Terminal Emu., when I enter a Busybox command, it seems to only acknowledge the older folder (/sbin). eg if I type in "busybox ifconfig..." or "busybox ipconfig...." I'm told that there's no such command, in so many words. How do I go about fixing this?
Would it mess anything up if I moved the contents of the newer folder (/system/xbin) into /sbin ?
Also, should there be a busybox file located anywhere (ie a file in root that's executed when "busybox" is typed into Term. Emu?) I can only locate the one in the internal sdcard directory ("busybox-stericon")
Thanks
Click to expand...
Click to collapse
There is a directory hierarchy in the Android file system.
You can normally see three different directories for binaries. These have the following priority:
/system/bin
/system/xbin
/sbin
This means that if there are two binaries with the same filename, the binary in the more prioritised map will be executed.
In your case, the /system/xbin has a higher priority than /sbin.
As I see it, you have the following choices:
Keep them co-existing. To select an indiviual binary, enter
/sbin/busybox [function] [arguments]
or
/system/xbin/busybox [function] [arguments].
Remove the unwanted one.
If you are unsure of which you want to discard,
just enter the commands as written in the first choice (without any functions of course).
I hope this post helps you.
OK, I'm running into difficulties with this phone..
..It arrive pre-rooted, I installed Titanium Backup and removed iReader.
In the Play store I noticed that SuperUser and Google Keyboard needing updating but when I tried to do so all I got was "Error Installing - Package file was not signed correctly" which I assume has something to do with a slightly different version of the program initially installed?
Then I went into SuperUser itself, clicked on the spanner icon, scrolled down and tapped on the check for updates button..
..indeed it found an update and proceeded to update in a similar style terminal box.
However.. according to Titanium I no longer have root access, I quickly downloaded Root Checker Basic which also confirmed this.. bugger I thought.
Moving onwards, I just downloaded SRS Root from srsroot.com. Tried rooting and it exited out saying I already had root access.. hmmm, so then I removed root access, the phone rebooted and then I re-applied the root.
Although I am still suffering from not having proper root access :crying:
Please help me to get full root access back again, thanks in advance. :angel:
SpongeR0b said:
OK, I'm running into difficulties with this phone..
..It arrive pre-rooted, I installed Titanium Backup and removed iReader.
In the Play store I noticed that SuperUser and Google Keyboard needing updating but when I tried to do so all I got was "Error Installing - Package file was not signed correctly" which I assume has something to do with a slightly different version of the program initially installed?
Then I went into SuperUser itself, clicked on the spanner icon, scrolled down and tapped on the check for updates button..
..indeed it found an update and proceeded to update in a similar style terminal box.
However.. according to Titanium I no longer have root access, I quickly downloaded Root Checker Basic which also confirmed this.. bugger I thought.
Moving onwards, I just downloaded SRS Root from srsroot.com. Tried rooting and it exited out saying I already had root access.. hmmm, so then I removed root access, the phone rebooted and then I re-applied the root.
Although I am still suffering from not having proper root access :crying:
Please help me to get full root access back again, thanks in advance. :angel:
Click to expand...
Click to collapse
UPDATE : After running Root Checker Pro it told me that SuperSU wasn't installed.. I downloaded that from the play store and re ran Root Checker Pro, it now tells me..
Root Access is not properly configured or was not granted.
Super User Application Status:
SuperSU application - version 1.91 - is installed!
System File Properties for Root Access:
Standard Location
Check Command: ls -l /system/bin/su:
Result: /system/bin/su: No such file or directory
Analysis: File /system/bin/su does not exist.
Standard Location
Check Command: ls -l /system/xbin/su:
Result: -rwsr-sr-x root root 22364 2014-01-27 21:08 su
Analysis: Setuid attribute is present and root user ownership is present. Root access is correctly configured for this file! Executing this file can grant root access!
Alternative Location
Check Command: ls -l /sbin/su:
Result: /sbin/su: Permission denied
Analysis: File system permissions restricted and denied access.
Alternative Location
Check Command: ls -l /system/xbin/sudo:
Result: /system/xbin/sudo: No such file or directory
Analysis: File /system/xbin/sudo does not exist.
Root User ID and Group ID Status:
SU binary not found or not operating properly
System Environment PATH: /sbin /vendor/bin /system/sbin /system/bin /system/xbin
ADB Shell Default User:
ADB shell setting for standard access, stored in default.prop, is configured as: root user - ro.secure=0
Results provided on your K47/C9_89 device by Root Checker Pro version 1.3.4
Click to expand...
Click to collapse
I still have Root Explorer on the phone and seem to be able to navigate through the normally hidden directories.
Suggestions please!
To my surprise, I bit the bullet today and reset my phone to stock defaults..
..unfortunately even this still did not fix the incomplete root
Please help!
EDIT : I've been tinkering again.. Here's what I understand (and what I've done)
System\bin\ - Kinda not the most important place to store a file relating to an installed .apk's
System\xbin\ - The more important place (kinda like the System32 directory) relaing to installed .apk's
System\app\ - The directory where the .apk file's themselves live (kinda like Program Files\xxx Application)
Well I noticed I had an .apk in apps called root_Superuser.apk and this was present even after un-rooting my phone.
I removed this file, using these commands :
adb remount
adb pull /system/app/root_Superuser.apk
Seemingly this didn't remove the file, so then I tried :
adb remount
abd shell rm -f /system/app/root_Superuser.apk
After a quick reboot this had indeed removed Superuser, then I reused the SRS Tool to re-root.
Then I read that SU 3.0.2 was a safer bet.. (although it was a post from 2011 - attached)
So I downloaded that and proceeded to push the superuser.apk and su files into their correct places (as below)
adb remount
adb push superuser.apk /system/app/
adb push su /system/xbin/
adb push su /system/bin/
After the files were correctly in place I needed to set the correct file permissions, I did this as follows :
abd shell
[email protected]:/ # CHMOD 644 /system/app/superuser.apk
[email protected]:/ # CHMOD 777 /system/xbin/su
[email protected]:/ # CHMOD 777 /system/bin/su
Finally I realised I had given /xbin/su the incorrect permissions so ammended them to :
abd shell
[email protected]:/ # CHMOD 4755 /system/xbin/su
[email protected]:/ # CHMOD 4755 /system/bin/su
The reason why I am writing exactly what I did is so I myself don't forget anything and also to show others how to do stuff should I be doing it correctly!? I wasn't sure if the su needed to go into xbin or bin so I put it into both directories and thus I can remove which ever one is incorrect once I get a reply from somebody!
Here's my current log from Root Checker Pro - I shall not be doing anything else without further assistance.
Root Access is not properly configured or was not granted.
Super User Application Status:
Superuser application - version 3.0.2 - is installed!
SuperSU application - is NOT installed.
System File Properties for Root Access:
Standard Location
Check Command: ls -l /system/bin/su:
Result: -rwsr-xr-x root root 22140 2008-02-29 02:33 su
Analysis: Setuid attribute is present and root user ownership is present. Root access is correctly configured for this file! Executing this file can grant root access!
Standard Location
Check Command: ls -l /system/xbin/su:
Result: -rwsr-xr-x root root 22140 2008-02-29 02:33 su
Analysis: Setuid attribute is present and root user ownership is present. Root access is correctly configured for this file! Executing this file can grant root access!
Alternative Location
Check Command: ls -l /sbin/su:
Result: /sbin/su: Permission denied
Analysis: File system permissions restricted and denied access.
Alternative Location
Check Command: ls -l /system/xbin/sudo:
Result: /system/xbin/sudo: No such file or directory
Analysis: File /system/xbin/sudo does not exist.
Root User ID and Group ID Status:
SU binary not found or not operating properly
System Environment PATH: /sbin /vendor/bin /system/sbin /system/bin /system/xbin
ADB Shell Default User:
ADB shell setting for standard access, stored in default.prop, is configured as: root user - ro.secure=0
Results provided on your K47/C9_89 device by Root Checker Pro version 1.3.4
Click to expand...
Click to collapse
SpongeR0b said:
To my surprise, I bit the bullet today and reset my phone to stock defaults..
..unfortunately even this still did not fix the incomplete root
Please help!
EDIT : I've been tinkering again.. Here's what I understand (and what I've done)
System\bin\ - Kinda not the most important place to store a file relating to an installed .apk's
System\xbin\ - The more important place (kinda like the System32 directory) relaing to installed .apk's
System\app\ - The directory where the .apk file's themselves live (kinda like Program Files\xxx Application)
Well I noticed I had an .apk in apps called root_Superuser.apk and this was present even after un-rooting my phone.
I removed this file, using these commands :
adb remount
adb pull /system/app/root_Superuser.apk
Seemingly this didn't remove the file, so then I tried :
adb remount
abd shell rm -f /system/app/root_Superuser.apk
After a quick reboot this had indeed removed Superuser, then I reused the SRS Tool to re-root.
Then I read that SU 3.0.2 was a safer bet.. (although it was a post from 2011 - attached)
So I downloaded that and proceeded to push the superuser.apk and su files into their correct places (as below)
adb remount
adb push superuser.apk /system/app/
adb push su /system/xbin/
adb push su /system/bin/
After the files were correctly in place I needed to set the correct file permissions, I did this as follows :
abd shell
[email protected]:/ # CHMOD 644 /system/app/superuser.apk
[email protected]:/ # CHMOD 777 /system/xbin/su
[email protected]:/ # CHMOD 777 /system/bin/su
Finally I realised I had given /xbin/su the incorrect permissions so ammended them to :
abd shell
[email protected]:/ # CHMOD 4755 /system/xbin/su
[email protected]:/ # CHMOD 4755 /system/bin/su
The reason why I am writing exactly what I did is so I myself don't forget anything and also to show others how to do stuff should I be doing it correctly!? I wasn't sure if the su needed to go into xbin or bin so I put it into both directories and thus I can remove which ever one is incorrect once I get a reply from somebody!
Here's my current log from Root Checker Pro - I shall not be doing anything else without further assistance.
Click to expand...
Click to collapse
Great to see the Root Checker apps being used! Given you posted a link back to this thread in the Root Checker thread I'm posting my reply here.
The route I usually take and recommend, which does all of those steps you've performed, such as copying files and setting the correct permissions, is to load an "official" .zip file from the custom recovery.
If you have a custom recovery, I'd recommend loading SuperSU.zip, which has worked very well for me on my devices: http://forum.xda-developers.com/showthread.php?t=1538053
From the XDA post, there is a link to the .zip file that can be downloaded and loaded in the custom recovery: http://download.chainfire.eu/supersu
If you don't have a custom recovery, I think most of the steps you've taken are correct, but based on the Root Checker Pro output I'd be concerned that the Superuser.apk file you installed and the su binary aren't communicating and might be out of sync. This can be caused by many reasons but the solution is to make sure you installed a matching .apk and su binary.
Hope that helps and good luck!
joeykrim said:
Great to see the Root Checker apps being used! Given you posted a link back to this thread in the Root Checker thread I'm posting my reply here.
The route I usually take and recommend, which does all of those steps you've performed, such as copying files and setting the correct permissions, is to load an "official" .zip file from the custom recovery.
If you have a custom recovery, I'd recommend loading SuperSU.zip, which has worked very well for me on my devices: http://forum.xda-developers.com/showthread.php?t=1538053
From the XDA post, there is a link to the .zip file that can be downloaded and loaded in the custom recovery: http://download.chainfire.eu/supersu
If you don't have a custom recovery, I think most of the steps you've taken are correct, but based on the Root Checker Pro output I'd be concerned that the Superuser.apk file you installed and the su binary aren't communicating and might be out of sync. This can be caused by many reasons but the solution is to make sure you installed a matching .apk and su binary.
Hope that helps and good luck!
Click to expand...
Click to collapse
Thanks for your reply JoeyKrim, unfortunately I don't think a custom recovery is available for this phone at present? I've had SuperSu on my device and to be honest not a great deal worked using it. I've also had both CWM / TWRP installed on the phone and both of them cannot find a suitable ROM to implement. I guess because of the phone being fairly new and a knock off doesn't exactly help me! :cyclops:
I will re-root my device and if that isn't successful manually try to match both superuser.apk and su binary with yet another version of superuser!
EDIT :
Here's what I've tried this morning (unfortunately now I have ran out of time and must get ready for college)
adb remount
adb push Superuser.apk /system/app/
adb push su /system/xbin/
adb push su /system/bin/
adb shell
[email protected]:/ # CHMOD 644 /system/app/Superuser.apk
[email protected]:/ # CHMOD 4755 /system/xbin/su
[email protected]:/ # CHMOD 4755 /system/bin/su
Superuser available to download from http://hosted.androidsu.com/superuser/
Using: su-3.0.1-d-signed.rar I get Superuser v3.0.1 (36), Su binary vnull (legacy)
su-3.0.1-efgh-signed.zip I get Superuser v3.0.1 (36), Su binary vnull (legacy)
Unsure of differences between d & efgh versions? Moved onto next version..
su-3.0.2-efgh-signed.zip I get Superuser v3.0.2 (37), Su binary vnull (legacy)
Renamed ([email protected]:/ # mv Superuser.apk root_Superuser.apk) seemingly no difference?
I was wondering if root allowed apps were renamed as root_appName.apk - I've left the file
name as this (i.e. Superuser.apk is NOT in my system/app/ directory and yet Superuser still
runs fine???)
Superuser-3.0.6-efgh-signed (Only binary updated) v3.0.2 (37), Su binary vnull (legacy)
su-bin-3.0.3.2-efghi-signed.zip Superuser v3.0.2 (37), Su binary vnull (legacy)
Isn't Su binary 3.0.3.2 the more up to date binary??? According my my Superuser's self update
it is?
Trying this release? - Also copied Superuser.apk to root_Superuser.apk as well this time..
Superuser-3.1-arm-signed Unable to check the versions.. different menu
Additionally myt Root Explorer (root_Root explorer.apk) now cannot gain root access which
is the first time this has EVERY occured
Superuser-3.1.1-x86-signed Unable to check the versions.. different menu
OK, so I know for sure that 3.1 is a more recent version of Superuser than I have ever had on
my phone, and of course root explorer doesn't now work, so trying an older version..
Superuser-3.0.7-efghi-signed.zip Superuser v3.0.7(41), Su binary v3.1
Again.. Root explorer no longer working.. tried deleting root_Superuser.apk
(adb shell rm -f /system/app/root_Superuser.apk)
Hasn't seemed to do anything different.. Removing all SuperUser files, ran out of time to
experiment with. Annoyed that now even my Root Explorer isn't working, I seem to be going
backwards and not forwards!!
After un-rooting (using SRSRoot) I once again have access to my Root Explorer??? Weird.
Click to expand...
Click to collapse
O.K, I'm ready for step by step instructions, anybody know how to help me please?
EDIT :
Thanks to tijsh111 for providing a working root solution to my problem..
http://forum.xda-developers.com/showthread.php?t=2219062&nocache=1
Hi all,
This one is confusing me, feels like I am missing something really stupid...
I am trying to get my brother's phone rooted for him, and he already used some online tools to get halfway there (Unfortunately I don't know what these tools did or how they did it).
So right now if I run "adb root && adb remount && adb shell" I get a full root shell wirh RW access to the /system dir. From here I can copy the su binary into /system/bin and set:
chown 0:0 /system/bin/su
chmod 6755 /system/bin/su
After this I can run su from the adb shell (so the binary does work), but if I try to use terminal on the device itself su claims to have insufficient permissions, and the SuperSU/ BusyBox installers won't play nice for obvious reasons.
What have I missed out on?
Thanks in advance
PS: This is a repost of a question I asked in kinda the wrong place. Sorry about that.
Hello everyone,
I've updated my firmware to the latest version of my huawei ascend p7 making it impossible to root my phone. Now what I'm trying to do is get the non-rooted busybox working and replace the old links of commands with the ones in busybox. I'm using the following commands to do that:
First I export the path and such using:
Code:
export PATH=$PATH:/data/data/burrows.apps.busybox/app_busybox;
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/data/burrows.apps.busybox/app_bussybox
Now I'm able to use busybox in my terminal (only for that session, when I exit the terminal and restart it I would have to re-do the export path thing).
So... I wanted to replace all the links to those of busybox using the following command:
Code:
for c in `busybox --list`; do busybox ln -s busybox $c; done
This however outputs for each command for example cat:
Code:
ln: cat: Read-only file system
I've read somewhere that you can remount your system partition in order to make it writeable? Is this the way to do it? And if so what commands should I run? I have access through adb and a normal shell on the phone. Remember: it's non-rooted...
EDIT: seems like I can't remount /system without root priviledges...
Also I would like to be able to have a full colored bash shell with a bashrc (in which I can add the path to busybox aswell) if that's possible.
I'm using jackpal's android terminal emulator.
EDIT: I think I might've posted this on the wrong forum, if anyone is so kind as to move this to this forum: http://forum.xda-developers.com/ascend-p7/help I would greatly appreciate it. Altho I think this might be a general question rather then a model specific question.
Hi, I'd like to ask a general question about busybox. I've added busybox binary into ramdisk root directory of boot.img. I've set busybox binary permissions to 0777 in init.rc, in order to be sure not getting any denied permissions issues.
I've put an exec command into init.rc for using busybox cp and it worked because it really made a copy of default.prop in ramdisk root directory. I've also put a start service line into init.rc That service is essentially a busybox sh call for launching a shell script. Unfortunately, it seems shell script is not executed because some cp and echo commands which I put inside it have not effects.
Looking for around the www, it looked like redirection ('>', '>>', ...) is not prohibited by busybox. So, i've also tried to redirect
command output to a file, but file was not created.
So, how could I debug busybox? Any ideas?