[Q] Terminal shell is broken/inaccessible - Acer Iconia A500

Sorry if this is a stupid question, I'm a bit noobish(most experience is on desktop linux)
I have an Iconia A500 tablet which I rooted. Later I became a little bored of the default android shell and decided to replace it with bash. It worked fine. Unfortunately, I later required the default shell again(bash wasn't routing it's output to adb for some reason) and rather stupidly fired up Root Browser and deleted bash from system/bin, then closed it. I had followed the instructions in the first post here: http://forum.xda-developers.com/showthread.php?t=537827 to install bash as the default shell. But now it doesn't exist and I can't get into a terminal. The SuperUser app depends on the shell to give root permission so I can't even get back into Root Browser to restore bash. So now I basically have NO SHELL. The default shell still exists as sh0, but with no way of gaining root permissions I'm now stuck. Is there anything else I can do to restore the shell? Luckily my device isn't bricked, so a factory reset isn't out of the question, but I really don't wanna do that.
UPDATE:
Turns out flashing an update.zip replaces system binaries

Related

[Q] Command Prompt Issue When Trying To Exit ADB Shell?

Hi this is my first post on the site and i would appreciate it if anyone could help me with this problem. (I know your probably fed up of hearing about rooting problems but anyway!)
I have succesfully installed ADB and as far as i know it seems to be working properley as i can access the ADB shell on my device.
However when i get to a certain stage of the rooting process it all seems to go wrong.
wiki.cyanogenmod.com/index.php?title=HTC_Tattoo:_Full_Update_Guide
I have been using the above rooting guide (can't hyperlink first post!) and i cannot get past stage 7 of the process because the 'exit' command doesnt seem to work in Command Prompt (Windows 7) and it is stopping me from being able to exit the ADB Shell. I have tried other ways of exiting the shell such as ctrl+C but this kills ADB completely and i think that it is undoing the previous steps of the guide.
I do get the message:
uid=0(root) gid=1000(shell) groups=1003(graphics),1004(input),1007(log),1011(adb),1015(sdcard_rw),3001(net_bt_admin),3002(net_bt),3003(inet)
so i think that i have successfully rooted the device but i cannot proceed to push the 'su' file to the device as i can't exit the adb shell, i just keep getting lists of text saying reboot (-n) (-p) and everytime i use the exit command nothing seems to happen and the flashing # symbol keeps coming back.
Has anybody else had this problem? or have any idea of how to stop the ADB Shell with any other commands other than 'exi't or Ctrl+C?
Cheers.
If device is rooted, by writing in command prompt the command "adb shell", must appear the symbol #, if the symbol $ appears the device isn't rooted.
If you cannot use adb from pc, run on device a terminal emulator(you can find one on market) the above command to see if you're rooted. Then you can give the next commands from terminal emulator(maybe you need to copy the nessecary files on sd card and change the related paths to point to sd card)
I'm having the exact same problem while rooting my HTC Tattoo (on Windows 7).
I have Android 1.6 (Donut), the baseband is 13.29a.55.13H_3.35.07.33, kernel is 2.6.29-gf922713 and build is 1.67.173.37.
Please help and thanks in advance . I really want to install CyanogenMod 7...
more info
When i say i have rooted the device i mean temporarily by pushing and changing the 'm7' file, the problem is pushing the 'su' file to the device to make the root permanent.
I do get the # symbol when in ADB Shell but only after changing m7 on the device. As i cannot complete the whole rooting process the # is not there permanently and it returns to the $ symbol.
Thanks for the reply, i will try and do it using a terminal on the device. Do you not need root access to use a terminal app?
I'm having the same issue. When I input exit it stucks into that loop and then I got to ctrl+c, and of course the root does not stick
From that point forward I can't do anything else...
If someone overcome the problem please post.
I just used this app to root a zte blade with a new greek stock rom:
http://forum.xda-developers.com/showthread.php?t=803682
Seems to work for almost all devices and in first post have some info about root levels and links to a workaround for devices that have some lock which prevents the full rooting.
I didn't tried anythink cause the rooting process was successful, but you can try this app and if still have problems try to follow the instructions given.
Good luck.
If you have your mobile rooted can you just use this commands:
cd /data/local/bin/
chmod 755 flash_image
flash_image recovery /sdcard/recovery-clockwork-x.x.x.x-click.img
to perform a recovery flash? Without using the su command?
I don't remember if I tried it, but, if it works I recommend using Androot for rooting the device, it worked for me(checked by Root Checker ).
I'm mentioning this just because you recommended the SuperOneClick app.
Update:
For all trying to get thing done, follow the instructions on 1Click modified by tenis and flash the latest cyanogenmod.
It worked!!!
I got it to work using androot. Cm7 is awesome
Sent from my HTC click using XDA App
exit command in adb seems to lock up
like omgsufc, I also reach this stage and can see the message:
uid=0(root) gid=1000(shell) groups=1003(graphics),1004(input),1007(log),1011(a db),1015(sdcard_rw),3001(net_bt_admin),3002(net_bt ),3003(inet)
Again, like omgsufc, when I issue the command:
# exit
ADB shell seems to go into some kind of loop. Pressing ctrl-c or ctrl-d also give the same results. I thus can't go to the next stage. Any help or clues would be greatly appreciated.
I'm on Ubuntu 11.04.
TIA for any help.
Finally got it to work
No matter what I did, rooting using m7 just didn't work for me (Ubuntu 11.04). Running 'while ./m7 ; do : ; done' got me temporarily rooted as issuing 'id' shows me at 'uid=0(root)'. However, issuing 'exit' just left me in a long loop in the terminal from which it never recovers, and hence I could not complete the root process this way.
So I tried androot, which appeared to root me right away. Issuing 'su' in Android Terminal worked, and doing the same in ADB Shell also gets me to the # prompt. However, issuing the 'flash_image recovery' failed no matter what I did. I tried ROM Manager after this initial androot root: it gives me a success message after flashing ClockworkMod recovery, but when I reboot into recovery it just fails. Fastboot also failed consistently.
Finally, when I tried Terminal Emulator to get root access by issuing the command 'su', it says permission denied, even though Terminal Emulator gave me root access.
So... I unrooted Androot. Again trying to root using m7 I got the same problems as before.
I didn't bother trying flash_image or fastboot and instead tried rooting with androot. After doing so, this time Terminal Emulator allowed root access, which gave me some hope.
So I pulled out ROM Manager again, and woot! My Tattoo is on CyanogenMod 7 and am I a happy camper! I like what Cyanogen has given us: ADW Launcher is as good for me as Sense ever was... actually it's better. And finally I get to use all the new apps I've been wanting to use but wouldn't run on Android 1.6.
So thank you Cyanogen, thank you xda-developers, particularly KalimochoAz, thank you Koushik Dutta for ROM Manager, and thank you, whorever developed androot!

- exec '/system/bin/sh' failed: No such file or directory (2) -

I am running the cm7 rom but last night I installed busybox and ran the v6 supercharger script. Now my wifi no longer works. I tried to install the new version of cm7 but I get this error when i try to access dab shell.
adb shell
- exec '/system/bin/sh' failed: No such file or directory (2) -
Is it possible to fix this? if not what is the easiest way to return to stock and start over. Thank you.
rydinsmoothx said:
I am running the cm7 rom but last night I installed busybox and ran the v6 supercharger script. Now my wifi no longer works. I tried to install the new version of cm7 but I get this error when i try to access dab shell.
adb shell
- exec '/system/bin/sh' failed: No such file or directory (2) -
Is it possible to fix this? if not what is the easiest way to return to stock and start over. Thank you.
Click to expand...
Click to collapse
Not gonna happen unless you can get into recovery or have the special usb cable to throw your device into fastboot (search the unbricking thread for more information on that). If you get lucky and can fix it + revert to stock, I would not install cm7 again until doing so is more noob friendly and forgiving.
The issues people are having with installing cm7 and severely screwing up their kindle are pretty epidemic due to the issues with recovery for those that don't prepare ahead of time for the possibility of disaster. The maintainer should really either close it out for now to the public or make the disclaimer much larger.
I have the same error. This is end. Only Factory Cable can help you but even with this cable I'm not sure what you can restore it.
i can still operate the kindle fire. I'm looking in /system/bin folder and it appears i am missing the sh file. if i replace it can i gain dab shell access again? if this is possible where can i get the sh file?
rydinsmoothx said:
i can still operate the kindle fire. I'm looking in /system/bin folder and it appears i am missing the sh file. if i replace it can i gain dab shell access again? if this is possible where can i get the sh file?
Click to expand...
Click to collapse
Operate how? Also, please don't double post in 2 threads.
My bad . It boots into cm7. I'm missing the sh file for some reason. Wifi also stopped working and Some apps don't work. This Happened after i used v6 supercharger. My goal is to go back to stock but I can't access adb shell.
rydinsmoothx said:
My bad . It boots into cm7. I'm missing the sh file for some reason. Wifi also stopped working and Some apps don't work. This Happened after i used v6 supercharger. My goal is to go back to stock but I can't access adb shell.
Click to expand...
Click to collapse
Could be a bit more explicit. Boots as in "yay, i see a logo and can't use my device beyond a paperweight that displays the cm7 logo" or boots as in "yay, i can use my device like normal and it's not bricked or malfunctioning"
Anyways, if you actually have root privileges and can mount system in read/write, get the sh binary out of the CM7 download by unzipping it or whatever and copy it over, making sure to match the owner/group and permissions that the other things in the /system/bin directory have. Since I'm guessing you're not command line savvy, I recommend doing this in root explorer or buying it if you do not have it.
Also, many of us do not own kindles and a larger % are also not running cm7 on their kindle so saying "i ran some random script that I won't say what it does and where I found it" does not help your situation either as far as getting a helpful answer.
Can you type ADB DEVICES at your command line and get a device? What about fastboot? Can you get devices to show there while at the command line?If yes, I am sure you can flash the CWM recovery to get ADB, then follow the steps to get back to stock...Dont blame me though if it doesnt work
I got the script script from someone in the cm7 thread, its supposed to opitimize the ram usage thus making the rom more smooth. He said it worked for him so I gave it a shot. I think it unrooted my kindle because I can't gain root access with root explorer. My devices shows up in adb devices but since I can't use adb shell I can't enable the fast boot.

[q] help needed on 6.2.1

Hi all,
I got my KF few days back, Rooted it, before I could install the android market, got forced update to 6.2.1. 2 days ago saw this new root method using BurritoRoot. Tried rooting it, seems successful, however, now when I arrived at the home page, I cant even open the Superuser app at all. It goes the same for the Root Explorer - prompting:
"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. Click ok and restart the app and try again. Make sure u respond correctly to the Superuser prompt." Then it comes with a force close.
Seriously I do not know whats wrong with it, now i cant even use the root explorer for me to install Android Market.
Anybody can help me with it?
Million Thanks.
did you use the superuser-2.apk ?
http://forum.xda-developers.com/showthread.php?p=20645033&highlight=superuser-2+apk#post20645033
b63 said:
did you use the superuser-2.apk ?
http://forum.xda-developers.com/showthread.php?p=20645033&highlight=superuser-2+apk#post20645033
Click to expand...
Click to collapse
Im using the ROOT INSTALL - Method 1 and I downloaded the file from Rootzwiki, apparently the file is named "com.noshufou.android.su-1.apk". and I used the following commands:
adb root
adb remount
adb push su /system/xbin/su
adb shell chown 0.0 /system/xbin/su
adb shell chmod 06755 /system/xbin/su
adb install com.noshufou.android.su-1.apk
adb reboot
So which means I should use the Superuser -2.apk instead?
What should I do now? Download the Superuser-2 file and repeat the whole process again???
thanks.
yes - the new version seems to be the only one working with burritoroot
consider to use KFU to make things easier:
http://forum.xda-developers.com/showthread.php?t=1399889
should be option 2 (permanent root with superuser)

semi-success: delayed update to 6.3 and preserved root

This did not go exactly as I had planned but it ended up ok anyway and I learned some.
I am using a rooted stock rom. First, my idea was to prevent the auto update to 6.3. Second, I wanted to see if it was possible to somehow preserve root so that I wouldn't have to re-root after the update, because I am not really thrilled by the idea of installing a new boot loader and so on; I would prefer to make the minimum modifications necessary to do what I need.
The first goal appeared to be well-served by using droidwall. I used whitelist mode and blocked everything that I couldn't tell had an obvious need to access the net. I posted more detail here. From the time the update started going out until today when I had time to actually try my update, I did not receive the update automatically. So that appeared to work.
Next, my idea was to simply make a copy of /system/xbin/su to a place that wouldn't get overwritten by the update.
# mkdir /data/lunchmeat
# cat /system/xbin/su > /data/lunchmeat/salami
# chmod 6755 /data/lunchmeat/salami
The idea being that since it's still setuid root, I'd be able to execute it and become root after the update. (I just picked a silly name in case something looked for su and blew it away).
So, I turned off wifi, disabled droidwall, manually updated (copied the updates into kindleupdates and so on) and after it rebooted, I opened the terminal app and tried to execute my salami binary. I got permission denied, and the superuser app said that superuser permission was denied on the terminal app. Hmmm....
Couldn't figure out why it was behaving that way so I thought I'd try adb root, and whadya know, I had a root shell.
remounted /system read-write, copied su back into /system/xbin, renamed /system/bin/check_rooted to /system/bin/check_rootedx, created an empty executable /system/bin/check_rooted, and rebooted...
...and everything is (rooted) as it was before. I re-enabled droidwall. google play seems to be working.
Why did 'adb root' work for me after the update? That might be a good question to answer, since it could make the re-rooting process much simpler for people! 2 or 3 commands and you're done.
edit: ohhhhh, stupid me! /data is mounted nosuid. / seems to get blown away on every reboot, so even if I remount it read/write and put su there, it gets lost.
And, also, I just remembered that I did what jcase said in this post which is what allowed me to keep adb root working.
So, so far this idea is going nowhere.

Removing ads on 5.1.1

I have found a way to remove ads on 5.1.1, it is exactly the same way as 5.0.1 except you NEED root for it to work.
Type in the following commands in a command prompt. Be sure USB debugging is on and it is securely connected to your computer. Although you do type reboot as the last command, the tablet turns off, just press the power button . This was successful on two of my tablets.
Code:
adb shell
su
At this point grant superuser access from the tablet
Code:
pm hide com.amazon.kindle.kso
exit
reboot
In theory this should work from a terminal emulator straight on your tablet but I have not tried it out
EDIT:
I should have explained the process better as some people are getting confused.
1. Make sure you have the correct drivers and USB debugging turned on your tablet.
2. Download this one click tool to gain root access if you have not done so already. Make sure to disable OTA updates from the tool as well (not necessary for removing ads but will be useful in the future).
3. Open a command window on your computer and type the commands above. If you have root you should get a
Code:
#
symbol after typing the su command.
Hello, it's my first post here so I apologize if the question is basic - I went thru all of the steps in other fourms last night and got Google Play to install just fine and even temporarily I appear to get the lock ads to remove but at best that doesn't seem to last past a reboot. After some further reading I found that unfortunately the kindle did a OTA update to 5.1.1 and that explains the reason I've been unable to permanently get rid of those lock ads.
I read your post, but I'm unclear on what I need to do to get root access (I mean without completely rooting the thing) I ran ADB from a windows command line, but I get a "not found" command when i type in SU..here's what it looks like (I'm putting my typing in bold, and the auto generated command line stuf in regular):
========================================
c:\amazon>adb shell
[email protected]:/ $ su
su
/system/bin/sh: su: not found
127:[email protected]:/ $
=====================================
Since I've only done the automated scrip that is supposed to allow google play and remove ads, I didn't really expect to have root access, but I'm hoping there's some way I can get this to work without trying to fully root the kindle. If I have to go that route I might as well get rid of the entire Kindle OS... I don't actually want to do that, as I use amazon prime so a lot of the default junk that comes with this kindle is useful.
Big-T said:
Hello, it's my first post here so I apologize if the question is basic - I went thru all of the steps in other fourms last night and got Google Play to install just fine and even temporarily I appear to get the lock ads to remove but at best that doesn't seem to last past a reboot. After some further reading I found that unfortunately the kindle did a OTA update to 5.1.1 and that explains the reason I've been unable to permanently get rid of those lock ads.
I read your post, but I'm unclear on what I need to do to get root access (I mean without completely rooting the thing) I ran ADB from a windows command line, but I get a "not found" command when i type in SU..here's what it looks like (I'm putting my typing in bold, and the auto generated command line stuf in regular):
========================================
c:\amazon>adb shell
[email protected]:/ $ su
su
/system/bin/sh: su: not found
127:[email protected]:/ $
=====================================
Since I've only done the automated scrip that is supposed to allow google play and remove ads, I didn't really expect to have root access, but I'm hoping there's some way I can get this to work without trying to fully root the kindle. If I have to go that route I might as well get rid of the entire Kindle OS... I don't actually want to do that, as I use amazon prime so a lot of the
default junk that comes with this kindle is useful.
Click to expand...
Click to collapse
Yeah it could have been better explained, they meant that process works if your tablet is rooted.
You won't get root commands to work in shell like that if it isn't rooted. Like it says the su file isn't there.
A lot changed yesterday with respect to 5.1.1 and root.
So you could use the temporary root found yesterday to gain access. Should be able to disable it from there. (First two code boxes there show the temp root access and the resulting prompt, the third lets you make it permanent). Though not sure why rooting it is tantamount to removing the entire OS tbh anyway.
http://forum.xda-developers.com/amazon-fire/orig-development/root-t3272362
Pond-life said:
Yeah it could have been better explained, they meant that process works if your tablet is rooted.
You won't get root commands to work in shell like that if it isn't rooted. Like it says the su file isn't there.
A lot changed yesterday with respect to 5.1.1 and root.
So you could use the temporary root found yesterday to gain access. Should be able to disable it from there. (First two code boxes there show the temp root access and the resulting prompt, the third lets you make it permanent). Though not sure why rooting it is tantamount to removing the entire OS tbh anyway.
http://forum.xda-developers.com/amazon-fire/orig-development/root-t3272362
Click to expand...
Click to collapse
Thank you! It appears I finally got the ads cleared permanently although I had a few hiccups along the way. I'm going to try to step-by-step this for anyone else that may have problem like I did (First andriod device, first time messing with one)
1) Got my kindle yesterday and it did an automatic over the air update to 5.1.1 - Found instructions for installing the google play store and removing ads in this excellent thread http://forum.xda-developers.com/amazon-fire/general/installing-google-framework-playstore-t3216122
2) Downloaded "Amazon-Fire-5th-Gen-Install-Play-Store.zip" file from rootjunkysdl.com but had some problems getting my device to recognize correctly. I found the only drivers to work on two seperate computers were from the amazon website https://developer.amazon.com/public/resources/development-tools/ide-tools/tech-docs/05-setting-up-your-kindle-fire-tablet-for-testing#Introduction
3) After I got the drivers to install I ran the "1-Install-Play-Store.bat" file from step #1. The batch file guided me thru everything and the Google Playstore worked just fine. At first I thought I got rid of the lock screen ads as well, but after my first reboot the ads came back.
4) This thread pointed out that with the new 5.1.1 updated you had to have root access enabled. I tried to do so, but the commands weren't working. The problem was, I was missing a critical step that wasn't explicitly stated in the other threads YOU MUST INSTALL THE ROOT_FIRE.ZIP and point your command prompt window to this extracted folder...even though the zip file in step#1 has an adb.exe it's missing other files to get you root acees
http://rootjunkysdl.com/?device=Amazon%20Fire%205th%20gen
5) After unpacking and running the commands as provided, the ads are gone. I'm attaching a link to a screenshot of my command window so folks can see what they should be typing in:
https://www.dropbox.com/s/icyyzr14limkosu/Capture.JPG?dl=0
Big-T said:
Thank you! It appears I finally got the ads cleared permanently although I had a few hiccups along the way. I'm going to try to step-by-step this for anyone else that may have problem like I did (First andriod device, first time messing with one)
1) Got my kindle yesterday and it did an automatic over the air update to 5.1.1 - Found instructions for installing the google play store and removing ads in this excellent thread http://forum.xda-developers.com/amazon-fire/general/installing-google-framework-playstore-t3216122
2) Downloaded "Amazon-Fire-5th-Gen-Install-Play-Store.zip" file from rootjunkysdl.com but had some problems getting my device to recognize correctly. I found the only drivers to work on two seperate computers were from the amazon website https://developer.amazon.com/public/resources/development-tools/ide-tools/tech-docs/05-setting-up-your-kindle-fire-tablet-for-testing#Introduction
3) After I got the drivers to install I ran the "1-Install-Play-Store.bat" file from step #1. The batch file guided me thru everything and the Google Playstore worked just fine. At first I thought I got rid of the lock screen ads as well, but after my first reboot the ads came back.
4) This thread pointed out that with the new 5.1.1 updated you had to have root access enabled. I tried to do so, but the commands weren't working. The problem was, I was missing a critical step that wasn't explicitly stated in the other threads YOU MUST INSTALL THE ROOT_FIRE.ZIP and point your command prompt window to this extracted folder...even though the zip file in step#1 has an adb.exe it's missing other files to get you root acees
http://rootjunkysdl.com/?device=Amazon%20Fire%205th%20gen
5) After unpacking and running the commands as provided, the ads are gone. I'm attaching a link to a screenshot of my command window so folks can see what they should be typing in:
https://www.dropbox.com/s/icyyzr14limkosu/Capture.JPG?dl=0
Click to expand...
Click to collapse
Think it might depend when you downloaded the Amazon-Fire-5th-Gen-Install-Play-Store.zip, the zip has been around for some time and he updated it several times last night and somewhat confusingly kept the same name for it and the batch file inside.
The current zip and a few other versions last night has the root riles in the "files" directory that the batch uses them from there. Even then the order of the commands isn't ideal I don't think as the block the ads one comes in the install google play one before the root install which it relies on it.
I think if adb shell pm hide com.amazon.kindle.kso was moved to the blocking 5.1.1 OTA section and updated the same way those OTA hides were to
adb shell su -c "pm disable com.amazon.kindle.kso"
so that section would be
adb shell su -c "pm disable com.amazon.otaverifier"
adb shell su -c "pm disable com.amazon.device.software.ota"
adb shell su -c "pm disable com.amazon.settings.systemupdates"
adb shell su -c "pm disable com.amazon.kindle.kso"
5? You know everything failed in that pic right?
Pond-life said:
5? You know everything failed in that pic right?
Click to expand...
Click to collapse
Yeah, lol! [laughing with not at] It looks like the commands are failing because he's already in su! Something weird happened at the line:
adb wait-for-device && adb shell
. . . and he went into su (#), so subsequent shell and su fail, but the "pm hide" works! But then the one "exit" takes him out, as though he actually was only in shell. This is really strange.
Worked perfectly! Thanks
I was having issues with the supertool and even another manual entry way of blocking ads, but this seems to have worked.
Thank you!
If you're rooted, why not use an app instead of doing this via adb.
S6 EDGE TMO
dEris said:
If you're rooted, why not use an app instead of doing this via adb.
S6 EDGE TMO
Click to expand...
Click to collapse
Amazon lockscreen ads are not the same as google ads. The lockscreen ads don't go away with ad blockers. That was the first thing I tried after root. Of course, someone could just make an app that runs this script specifically for this device but I find this way pretty simple
phonehunter59 said:
Amazon lockscreen ads are not the same as google ads. The lockscreen ads don't go away with ad blockers. That was the first thing I tried after root. Of course, someone could just make an app that runs this script specifically for this device but I find this way pretty simple
Click to expand...
Click to collapse
You can disable apps with app freezer apps in the play store. Therefore, instead of using adb to disable apps, use an app. App app app lol
S6 EDGE TMO

Categories

Resources