ADB commands not working - Desire General

So i rooted my desire using the modaco r6 root.
I'm using defrost 1.0 atm and when I'm entering recovery i cant use any adb command, except for devices which show my desire in recovery mode.
all other commands return an error like:
su:
/sbin/sh: su: not found
logcat:
/sbin/sh: exec: line 1: logcat: not found
install
/sbin/sh: pm: not found
just to name a few.
i just got it so i don't know if they worked before.
however i did get one boot loop due to flashing the circle battery mode.
after which i recovered the nandroid backup.
If you need more info tell me what to do im clueless, im prolly just doing something very stupid.
Thanks in advance.

Go into partitions menu and mount /system then try.

No go doesn't even change the error.

so no ideas? i got no wifi or 3g connectivity atm so you guys are my last resort.
just some updates i flashed mcr 3.1 and it change in addition htc sync doesn't recognize my desire now.

you've cd to your android sdk tools folder right?
and youve typed in 'adb shell'?
when writing commands there should be a hash before the command?

Can you not boot into fastboot. Volume down and power. Then go to recovery. Then hold volume up and power. Select wipe data and wipe cache. Wouldn't that solve your wifi issues etc?

Wait...if you're using root r6 then your using fake flash aren't you? Try looking for r5 and use pauls recovery or look for amskghs recovery and use that. Pretty sure adb stuff doesn't work easily with fake-flash.

cgrec92 said:
you've cd to your android sdk tools folder right?
and youve typed in 'adb shell'?
when writing commands there should be a hash before the command?
Click to expand...
Click to collapse
yea i'm in the sdk tools folder when i'm typing commands otherwise the
"adb devices" wont work and it does.
i typed adb shell.
sorry about this but what is hash? :S
ephumuris
i tried using amghskmod recovery and it doesn't work as well, the errors are a bit different.
its just saying su not found instead of the whole /sbin/sh thing.

Hash = #
What exact commands are you doing and what are you trying to achieve?
I really want to help

LByte said:
yea i'm in the sdk tools folder when i'm typing commands otherwise the
"adb devices" wont work and it does.
i typed adb shell.
sorry about this but what is hash? :S
ephumuris
i tried using amghskmod recovery and it doesn't work as well, the errors are a bit different.
its just saying su not found instead of the whole /sbin/sh thing.
Click to expand...
Click to collapse
I had your same problems and felt retarded too, but it might be something funky with the dos command prompt in windows. Follow these instructions to make adb commands universal so it doesn't matter what directory the dos command prompt thinks you're in (because obviously it didn't actually move you to the tools folder somehow even though you instructed it too):
- Also, Mikey1022 has reminded me to add the "ADB" directory path as a system variable in windows...
To do this right-click on "My Computer" and select Properties. Next select the Advanced tab(Advanced Settings in Vista) then select Environment Variables.
Click "New" under System Variables and add the following:
Variable: adb
Value: C:\android-sdk-windows-1.1_r1\tools
This was found here: sorry can't post link to give proper credit, but do a google search for adb for dummies or adb commands, it's an xda forum post...

The thread looks dead, but im going to post the possible solution anyway.
PM commands like install and uninstall doesnt work in recovery mode, so if you want to use them, run the commands when the phone had booted normally.

i have same problem? anyone help me
adb error /sbin/sh: exec: line 1: logcat: not found

Related

How To Use ADB On Mac With Htc Hero

I've spent hours trying to workout how to use adb
I'm using Amon_RA's recovery image and want to run a BART backup but it forces you to use adb, which i can't workout
help please!!!
Did you download the Android SDK for OS X?
Please give us some more information, such as the steps you've taken and any errors or other information you get from the Terminal.
yes i have downloaded the sdk from the website
but everytime i even check what devices are connected etc it fails
i open terminal, drag the tools folder into it, it then ses its created a directory
when i try to put in the commands "adb devices" or "bart" however, it ses there is no such command
do i need to put my phone into recovery, or mass storage or something
im stumped
You need to add the tools directory to PATH variable on your computer
Here's how you do it (the alternative way is easier):
Run this in Terminal
Code:
cd
nano .bash_profile
a text editor will open. add this:
Code:
export PATH=${PATH}:/path-to-android-sdk/tools
where you replace "path-to-android-sdk" with the real path.
Alternatively you could run this command in the terminal:
Code:
echo -e "\nexport PATH=${PATH}:/path-to-android-sdk/tools" >> .bash_profile
What you have done is to tell the shell to also look inside the tools directory when entering a command
Oh, in addition to Repp's suggestions, I know in Linux (and I dunno about everyone else) I need to be root to run adb properly. So maybe become root on the Mac. To do so, you need to be an Admin user, not a regular user, and at the Terminal, type
Code:
sudo -s
and then enter your user password when prompted.
okay ive done that, i dont know if it came back with the right response tho
i tried the first method and got into the text editor, i then typed what you said and it returned no response, i dont know if this is correct?
if so what do i do next?
Rather than altering your path, you can also navigate to the sdk/tools directory and run adb like so:
Code:
./adb devices
But you have to be inside the directory where the "adb" command lies.
Also, see my note above regarding root users.
Aah sorry. Just save and exit (press Ctrl+X and answer yes to whether or not you want to save). You could also try the alternative way.
craig0r said:
Oh, in addition to Repp's suggestions, I know in Linux (and I dunno about everyone else) I need to be root to run adb properly. So maybe become root on the Mac. To do so, you need to be an Admin user, not a regular user, and at the Terminal, type
Code:
sudo -s
and then enter your user password when prompted.
Click to expand...
Click to collapse
I have always used it as normal user and it has worked. Don't know why you would need to be root
how dyou get into the directory?
i usually just drag the tools folder into terminal.
is this correct?
DaNiEl FrEnCh said:
how dyou get into the directory?
i usually just drag the tools folder into terminal.
is this correct?
Click to expand...
Click to collapse
At the Terminal type
Code:
cd /Users/YourUserName/path/to/android_sdk/tools/
./adb devices
Repp said:
I have always used it as normal user and it has worked. Don't know why you would need to be root
Click to expand...
Click to collapse
Yeah, it's weird, but it works for me.
You change directory in the terminal with the command cd. So if I wanted to go to the Desktop directory I would write:
Code:
cd ~/Desktop
(~ is like a shortcut for your home directory which is the same as the directory /Users/your-username)
Did any of the methods work (they should )?
to repp, ive done that, all i need to know now is how to use the bart backup function from Amon_RA's recovery image, in adb
craig0r said:
Yeah, it's weird, but it works for me.
Click to expand...
Click to collapse
And it doesn't if you're not root?
DaNiEl FrEnCh said:
to repp, ive done that, all i need to know now is how to use the bart backup function from Amon_RA's recovery image, in adb
Click to expand...
Click to collapse
And it worked?
Unfortunately I have never done that so I can't help you there
how can i check if it worked?
Just run adb from any directory which is not the tools directory.
For example:
Code:
cd
adb devices
where the first line (cd) changes directory to your home directory (the command cd without a path does that) and the other one should list connected devices. As long as it doesn't say
Code:
-bash: adb: command not found
or anything like that, you should be fine
EDIT: If you want to use adb, you don't have to do the "cd" part first. This time only
its working now i can seee what devices i have
Code:
Dans-MacBook:tools Dan$ ./adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
HT98DL900002 device
but the main reason i want to use it, is to use it with Amon_RA's recovery
i neeed to do a BART backup so i can switch from the 2.1 rom from lox too 3.0 from modaco
I have never used BART, but unless I'm mistaken, it does almost the same thing as a nandroid backup (?). You could try that instead. Don't know about Amon_RA, but it's possible from MoDaCo's fastboot (linked to and explained how to install here)
other than that, there's nothing I can do
Repp said:
And it doesn't if you're not root?
Click to expand...
Click to collapse
That's right. Probably something to do with permissions in /dev/. It doesn't bother me enough to go hunting the problem down.

ADB not seeing Evo

Sorry if this is a repost. But hopefully someone can help me out. I'm fully rooted, full nandroid unlock.full 100 yeards. Now this morning I was going to do the process for "Permanently replacing your recovery with ClockworkMod Recovery Image"
But for some strange reason, ADB doesn't see my Evo. I tried running "Command prompt" as administrator also and it wasa no go. I typed "adb devices" and my device wasn't listed like it was yesterday before I did a full nandroid Unlock.
Do anyone have any tips on how I can resolve this issue?
If this helps, I running the Bugless Beast Rom.
Thanks
You might have forgotten a step or two.
Open cmd
Type cd c:\android-sdk-windows\tools\ or wherever your sdk tools folder is.
Then it should work.
thanks. I'll give that a try and reply back
Strange thing....before I rooted/flashed a rom I created a Nandroid backup (I think it was stock. It doesn't have Superuser Permission in my list of Apps). Well I reverted back to that nandroid backup and now ADB sees my Evo.
I will flash back to my previous rom and trywhat you posted. Hopefully tat'll work
phatalboom said:
You might have forgotten a step or two.
Open cmd
Type cd c:\android-sdk-windows\tools\ or wherever your sdk tools folder is.
Then it should work.
Click to expand...
Click to collapse
Yeah, I tried what you suggested and itstill didn't see my Evo. I guess my only option is to revert back, then do the process.
Sometimes you need to restart the adb server. Try the following:
Code:
adb kill-server
adb shell
If you get a '#' then you're in.
I'm having same issues and it's not working. My device is not being seen. Do you I have to have the Evo in charging mode or Disk Mode?
chuckhriczko said:
Sometimes you need to restart the adb server. Try the following:
Code:
adb kill-server
adb shell
If you get a '#' then you're in.
Click to expand...
Click to collapse
or, you could just try
adb kill-server
adb start-server
lol
then check with
adb devices
seriously though, you may have put on a bad image. did you check the md5 hash? if not, do. there are threads around here on how to do that, if you are using windows. i don't have the link, because linux just has a command for it.
Try doing:
killall adb
sudo -s
adb devices
You must run adb as root on ur pc
timothydonohue said:
or, you could just try
adb kill-server
adb start-server
lol
then check with
adb devices
seriously though, you may have put on a bad image. did you check the md5 hash? if not, do. there are threads around here on how to do that, if you are using windows. i don't have the link, because linux just has a command for it.
Click to expand...
Click to collapse
Thanks for trying to help me out. But it still didn't work.
toastcfh said:
Try doing:
killall adb
sudo -s
adb devices
You must run adb as root on ur pc
Click to expand...
Click to collapse
What do you mean that I must run adb as root on my pc, i don't know what that mean. Do you mean run it by using the "Command prompt" program?
Also this only happens to me on the Bugless Beast Roms. When I revert back to my 1st nandroid backup that I was using before I flashed any rom, everything worked fine.
Is USB debugging enabled?
CentroniX said:
Is USB debugging enabled?
Click to expand...
Click to collapse
Thanks ...that fixed it! I enabled it typed "adb devices" and it showed up. thanks again!
No problem, glad you got it working! When I first started out I ran in to that trap over-and-over. Now I just make it a rule of thumb to turn it on after flashing and leave it on.
Have fun!
I would have started another thread, but this is basically a similar problem to the one I had at first with adb.
Ok...I was trying to install a rosie.apk that was in a zip format. Long story short, the OP informed me that he made a mistake and provided me the wrong information as to reinstalling the rosie.apk. He was giving me steps to "push it" via adb, instead of flashing it.
No problem to Poster and thanks for help if you reading this . But anyways after all that, When I open up "Cmd" and type anything with adb in front of it...adb devices, adb shell..., i get the message that adb is not recognized as a internal or external command. Before this incident happened i was able to just type "adb devices" and my Evo would show.
Do anyone know how to fix this?
By the way I also tried typing all the commands in the previous posts...and I get the same error message.
**Update** I got it working I had to redo the path. All is good now.
Thanks much!
You need to be in the tools directory of the sdk so cmd can find the adb command.

[Q] rooting slide in ubuntu

Hey If anyone can help i have a few questions about rooting the slide in ubuntu
the "loop" script will not run regardless of what i do....also i can't seem to get the phone to show up with adb devices when i am in the bootloader
i can see the phone when it is in the rom but for some reason it won't show in the bootloader
thanks in advance
just type
Code:
adb devices
in terminal, and then when you select recovery and press enter, press "ENTER, UP, ENTER, UP, ENTER, UP...) really fast...and hope it works! if not lather, rinse, repeat...
There are instructions in the rooting thread on making an equivalent script for MacOS (which should work under Linux as well.) If you tried to run a DOS batch file under Linux thinking it would work...well, that's a judgment for another day
-------------------------------------
Sent via the XDA Tapatalk App
The Mac script does not run as a sh script on linux.
(PS: don't for the ./ before adb on a linux term. (./adb etc...))
beartard said:
There are instructions in the rooting thread on making an equivalent script for MacOS (which should work under Linux as well.) If you tried to run a DOS batch file under Linux thinking it would work...well, that's a judgment for another day
-------------------------------------
Sent via the XDA Tapatalk App
Click to expand...
Click to collapse
Sent from my T-Mobile myTouch 3G Slide using Tapatalk
Ive got a loop script for linux that I can send you when I get home. And like Indikut said, don't forget to add "./" before adb.
chrisinaz said:
Ive got a loop script for linux that I can send you when I get home. And like Indikut said, don't forget to add "./" before adb.
Click to expand...
Click to collapse
No need for the ./ if you added the sdk tools folder to your PATH.
Why that MacOS script doesn't work in bash on Ubuntu is beyond me. It looks to be formatted correctly.
Code:
#!/bin/sh
while [ 1 ]; do
adb devices;
sleep .25;
done
You could always use the following equivalent:
Code:
#!/bin/sh
watch -n .25 adb devices;
done
Assuming adb is in your path, this would run it every 1/4 second. You could, of course, change it to suit your location for adb (/usr/local/bin/adb or other location).
Cool thanks ..I will try that for the loop script
The other issue I have is that I can't see my phone as a device when I type adb devices in the bootloader ...it works fine when the phone is in the rom tho....I tried searching for the problem but I can't seem to find a solution ....I may just have overlooked it tho
beartard said:
Why that MacOS script doesn't work in bash on Ubuntu is beyond me. It looks to be formatted correctly.
Code:
#!/bin/sh
while [ 1 ]; do
adb devices;
sleep .25;
done
You could always use the following equivalent:
Code:
#!/bin/sh
watch -n .25 adb devices;
done
Assuming adb is in your path, this would run it every 1/4 second. You could, of course, change it to suit your location for adb (/usr/local/bin/adb or other location).
Click to expand...
Click to collapse
thanks again for the help with my problem i have a feeling the macos script would of worked i was using the wrong command i ended up typing "sh loop.sh" and it ran the script ....alltho i don't see it spamming adb devices ...it seems to just output it one time ....
now all i have to do is get the phone to show up when its in the bootloader....off to the search button i go
newspeak said:
thanks again for the help with my problem i have a feeling the macos script would of worked i was using the wrong command i ended up typing "sh loop.sh" and it ran the script ....alltho i don't see it spamming adb devices ...it seems to just output it one time ....
now all i have to do is get the phone to show up when its in the bootloader....off to the search button i go
Click to expand...
Click to collapse
As soon as you hit power to go to recovery either A) Activate the stupid script or B) mash ENTER+UP+ENTER+UP+ENTER until your keys fall off. I only got it to work the latter way.
Also, in Linux I've found that you'll get ???????? NO PERMISSIONS unless you do sudo ./adb devices.
The first time you run adb in a session, it should be started with sudo, since that starts the adb daemon. After that, any normal user's permissions (like running the script) should be ok. Make it easy on yourself and copy the adb executable to some place in your path (I use /usr/local/bin/). That way, you can delete the entire SDK unless you have plans for developing apps for Android.
I tried using my second code snippet above as loop.sh. I didn't go any higher, but it really doesn't have to work really quickly. I went up to .5 (executing "adb devices" twice a second) and it worked fine. You won't see a scrolling output like you would in DOS. The screen just updates if/when new info comes up (like showing the phone offline or in recovery.) When you get to the phone icon with the red triangle, hit VolUp and Power at the same time to get the recovery menu. The rest of the normal root tutorial should work for you.
ok thanks again for the help so far....here is where i am at ...i put adb in /usr/local/bin ...i can use adb devices ....the script is working for me but now when i get to the point where i push over the first file it says permission denied
i make sure to start adb with sudo ....i even tried running everything from a root terminal but i still get the same thing....i have already tried killing the adb server and restarting it with root permissions ...i have tried pushing the file with devices still listed as offline
kind of at a loss
here is what i get btw
"[email protected]:~/androidsdk/tools$ adb push ota.zip /sdcard/update.zip
failed to copy 'ota.zip' to '/sdcard/update.zip': Permission denied
[email protected]:~/androidsdk/tools$
"
I'm using a pretty fresh install of Ubuntu Lucid. I haven't messed with my user's groups or anything, so it's still fairly stock.
All I've done is copied adb to /usr/local/bin. The first run of adb (adb devices) is done as root using sudo. You could try running "sudo adb root" to begin with, and see if that makes a difference. After that, I can run any adb push commands as the normal user in GNOME's terminal.
Assuming you're set up like I am, if you're getting a permissions error after doing that, I'd hazard a guess and say the problem is on the phone's side rather than the computer.
Check and make sure USB debugging is checked in your settings. Beyond that, I'm stumped.

Recovery help

I have rooted and flashed to the latest recovery image. i can not get into adb recovery. every time i try i get the following prompt ~# followed by my command and then file not found. Anybody had this problem that knows how to fix. thanks
shadow635 said:
I have rooted and flashed to the latest recovery image. i can not get into adb recovery. every time i try i get the following prompt ~# followed by my command and then file not found. Anybody had this problem that knows how to fix. thanks
Click to expand...
Click to collapse
sounds like you are getting adb. What happens if you just run "adb shell"? What is the exact command you are trying to run?
cd/system/app is the command entered. i am following the post for removing apps. i have entered clockwork, gone to partitions and then went to unmount. connected to pc and type adb remount. get remount succeeded. type adb shell and the following prompts
~#cd/system/app (command)hit enter
cd/sytem/app
/sbin/sh: cd/sytem/app: not found
did u mount the system and SD partitions?
Yes tried both mount and unmount and get the same messages
Sent from my ADR6300 using Tapatalk
shadow635 said:
~#cd/system/app (command)hit enter
cd/sytem/app
/sbin/sh: cd/sytem/app: not found
Click to expand...
Click to collapse
Need a space between "cd" and "/".
If you're not a unix person and are entering these commands without knowing what they do, it's important to enter them exactly as described. Better yet, cut & paste rather than type them.
thanks will try that i did cut and paste will try adding space to command

[Q] Temporary Nand Unlock

How do you gain temporary nand unlock? All i wanted to do is copy 2 files into the /system/xbin/bb which doesnt seem to work with root explorer despite super user permission, copy paste just wont work.
Any ideas how to copy paste these 2 files without going to full s-off? Would the adb method work? or any other apk that can do the job?
Thanks in advance for those who can help and any tips is very much appreciated.
In recovery with adb.
TheGhost1233 said:
In recovery with adb.
Click to expand...
Click to collapse
any links to it? a guide perhaps? thanks for the tip.
Make a nandroid before messing with the system partition.
Then:
Code:
adb remount
adb push <file_name> /system/xbin/bb
This is what i think it is just looking at the basic adb commands, here is some more info about moving stuff to the system partition.
TheGhost1233 said:
Make a nandroid before messing with the system partition.
Then:
Code:
adb remount
adb push <file_name> /system/xbin/bb
This is what i think it is just looking at the basic adb commands, here is some more info about moving stuff to the system partition.
Click to expand...
Click to collapse
btw, how do i get to adb with recovery?
You do know that adb is part of the android sdk and not some function/app on the phone?
To get adb working (i hope you already installed it) just boot in to recovery, connect the usb cable, and launch adb via command prompt or terminal.
TheGhost1233 said:
You do know that adb is part of the android sdk and not some function/app on the phone?
To get adb working (i hope you already installed it) just boot in to recovery, connect the usb cable, and launch adb via command prompt or terminal.
Click to expand...
Click to collapse
many thanks! i will try this tommorow.
Use the update.zip I attached in this thread, you don't need to worry about adb then.
http://forum.xda-developers.com/showthread.php?t=885506&page=2
Sent from my HTC Desire using XDA App
Ghettonine said:
many thanks! i will try this tommorow.
Click to expand...
Click to collapse
Ok I did my best, read alot about adb and followed some tips but I just cant seem to get these things working. I need a DETAILED step by step procedure.
I feel such a noob today, can anyone please help?
Basically, I just wanted to copy "ifconfig" and "route" from "/system/xbin" to "system/xbin/bb" and thats it! Im s-on by the way and dont want a full s-off just to copy paste 2 files.
I tried rebooting in recovery with adb and run some commands on "adb shell", many things came out and I have no idea what it ment.
Well many things came out is not such a great description. So i have no idea if something is wrong or something happened which you did not expect.
Boot again in to recovery and connect adb.
The type "adb devices" this should output something like:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
HT##########
If this does not happen you don't have a connection and most likely have driver issues (only if you are on windows). If you do get a connection next thing to do is mount the system partition as read/write. To do this type "adb remount".
The output should be "remount succeeded"
Next type "adb shell"
This should give "#" as output .
Since you know where the files are and where you want them to go type "mv /system/xbin/ifconfig /system/xbin/bb" and hit enter, you don't get any conformation about this. Next type "mv /system/xbin/route /system/xbin/bb"
To check if they go moved correctly type " ls /system/xbin/bb", now you should see the files listed.
Next type "exit" to end the adb shell.
Then type "adb reboot".
If this doesn't work you need to give more info about the errors you get or maybe someone else has a better description.
A completly other method is, if you are able to copy the files to your computer, useing the .zip mercianary linked to, just make sure the system/app folder is empty and that you make the system/xbin/bb folder and place the files in there. Then just follow the instructions.

Categories

Resources