ADB Question - EVO 4G Q&A, Help & Troubleshooting

So I 'm getting brave and decided I want to learn more about modding so that means I need to know at least the most basic of ADB commands.
Well I set up the Android SDK several weeks ago and to my best knowledge it was/is working i.e. from the command window (I'm using Win 7 so I use Shift-Right click to access in the Android sdk tools folder) I can type
adb devices
and my phone shows up.
From there I can type
adb shell
Now here is where it gets wonky
I can't use any adb commands or else I'll get an
"adb: not found" error
I can use the -ls command and a2sdcheck commands without any issues. I can even use the reboot and reboot recovery commands ONCE I don't use ADB in front of it.
So simple commands such as adb push/pull is off limits.
I have also tried in recovery mode but the same thing happens.
I'm sure I'm just missing something small but this is turning out to be really frustrating
And yes I do connect with Charge Only and USB debugging is checked.
Thanks in advance for any help
Sent from my PC36100 using XDA App

I could be wrong, but once you type adb shell I think you have to grant it Super user permission from the phone.

I just read the the SU log and didn't see a request resembling anything from adb or my computer. I also didn't notice a prompt to do so but wasn't really paying attention. I need to check on that but if someone else can clarify or tell me how to grant access that would be great. Thx for the response
Sent from my PC36100 using XDA App

Reconnected my phone and typed adb shell and there was no prompt for SU permissions. I'm thinking this may not be applicable or else you wouldn't be able to connect adb in recovery mode right?
Sent from my PC36100 using XDA App

Here is a tut on using adb. ADB Basics

I clicked on your link and it's taking me to a scanning app. Is that correct?
Nvm got it now
Sent from my PC36100 using XDA App

No it should take you to a thread here in XDA about ADB basics. That's where it takes me. Here try this: http://forum.xda-developers.com/showthread.php?t=694250
I found it in the development section in one of the stickies called
HTC EVO helpful/popular threads (Look here First!)

Babysitting my daughter right now so can't really read that link. I'm pretty sure I've read it before though.
Sent from my PC36100 using XDA App

Ok sorry I couldn't be more help. I am sure you are missing something very small because it sounds to me like it should be working. Make sure you have the right adb driver installed.

Moved to Q&A. This isn't development

Thx pulsar for the move. Sorry about that.
Housry thx for all your input.
I did read that link before and there was a link that confirmed that my ADB is set up correctly.
At the very first cmd prompt I can do adb devices and see my phone.
Then I can type adb shell and I get the # prompt
From there I can't issue anymore adb commands or else I get "adb: not found" error
I can issue reboot or reboot recovery commands BUT without adb in front of it and my phone will respond accordingly.
I can use the ls commands and search the subdirectories. Pushboot even works when I need to change my bootanimations. All this leads me to believe that adb is indeed set up correctly including the drivers so why doesn't the other adb commands work?!
This is really frustrating because I can't even begin to experiment with ADB if I can't get the most basic commands to function.
I know it's probably something small I'm missing and I hope someone will be able to point me in the right directions. Thanks again
Who knows, maybe this is a good thing. I might be able to get in all kind of trouble with my phone otherwise.

Wow on a whim I switched out the USB cable and now everything is working great. Geez.
Sent from my PC36100 using XDA App

ok, you are making a simple yet solvable mistake:
once you type adb shell, you are inside the phone's linux terminal. of course, your phone doesnt have adb in it. a shell is a great tool, and is used very, very often to diagnose problems, make stuff, incorperate stuff, test stuff. if you are in a shell, just type
exit
to get back out. then your adb commands should work.

Related

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.

[Q] ADB Shell

So, you'll have to bear with me because I've only had about 30 minutes worth of exposure with adb and all that goes along with it, but I'm having some trouble with a simple command. I'm trying to change the directory to /sbin/ but the command isn't working. It's keeps telling me "permission denied" Any ideas?
Just to give a liitle background information, I screwed up the partition in my phone and am trying to fix them via http://forum.cyanogenmod.com/topic/6...ernal-storage/ . My phone doesn't boot, but I can get in to recovery.
Thanks ahead of time.
This should be in the Q&A section....
Sent from my ADR6300 using XDA App
The link to the article doesn't work, so I can't see what it is that you're trying to do.
shell game
I believe with the use of adb shell you don't have to enter the adb push/pull whatever commands. Once you are in the shell, you are in the OS itself.
To quote the Talking Heads "Well, how did I get here?"
Once you type adb shell, you type su
Once su (superuser is what that stands for) is typed, the prompt should change from a $ to a #.
From that point, you are in the OS as the superuser, and can issue the commands w/out the adb prefix.
** more astute coders/adb users - please edit/correct/add input as needed **
This helped my understanding quite a bit - start @ the Removing Bloat section: http://www.jonamerica.com/technology/howto-root-the-htc-droid-incredible/
jermaine151 said:
The link to the article doesn't work, so I can't see what it is that you're trying to do.
Click to expand...
Click to collapse
http://forum.cyanogenmod.com/topic/6433-solved-messed-up-partitions-on-internal-storage/
smtom said:
I believe with the use of adb shell you don't have to enter the adb push/pull whatever commands. Once you are in the shell, you are in the OS itself.
To quote the Talking Heads "Well, how did I get here?"
Once you type adb shell, you type su
Once su (superuser is what that stands for) is typed, the prompt should change from a $ to a #.
From that point, you are in the OS as the superuser, and can issue the commands w/out the adb prefix.
** more astute coders/adb users - please edit/correct/add input as needed **
This helped my understanding quite a bit - start @ the Removing Bloat section: http://www.jonamerica.com/technology/howto-root-the-htc-droid-incredible/
Click to expand...
Click to collapse
Thanks! I appreciate any help I can get. I really would like to salvage my phone. I'm going to give it another go here shortly.

Having problems rooting

ADB is not friendly to me. I was able to root my g1 with pure ease. I cant get started with adb, I dont know why I cant get $, I've read several guides and I'm just about to give up. I'm running 2.2 on my g2.
I do have a couple of questions:
Are rooting with rage or visionary 14 the only way to root?
Are there any root guides out there that dont require ADB?
ADB is a ****ing pain in the ass to me, especially since I've tried everything and cant get it to work. Also, the drivers that go on Win7 64bit just dont work.
Also when I do have root, can I get android updates?
Any help would be thankfully appreciated. Sorry if I'm a pain in the ass, but I'd like to know if there is an easier way.
I think you need the q&a section
Sent from my HTC Vision using XDA App
This will help u get adb working...
http://forum.xda-developers.com/showthread.php?t=865685
If you can't figure out adb, you definitely shouldn't be rooting your phone.
Some ROMS disable OTA notifications while others allow it. However, so long as you have a custom recovery, even if you get the notification and download it, you wont be able to flash it.
dictionary said:
If you can't figure out adb, you definitely shouldn't be rooting your phone.
Some ROMS disable OTA notifications while others allow it. However, so long as you have a custom recovery, even if you get the notification and download it, you wont be able to flash it.
Click to expand...
Click to collapse
while my knowledge of adb isnt stellar, I have run into problems using it. I'm going to try this new link to the guide and see if it works.
Still if anyone knows other solutions, chime in.
Try the guide linked above. The drivers in the HTC Sync package (see the guide) definitely do work on Win 7 64-bit.
Clicked on SDK Manager.exe and it gave me the attached message; anti-virus is off and bare ass minimum services are running and I added the line in variables.
Any ideas?
sorry about the ****ty pics
cwis said:
Clicked on SDK Manager.exe and it gave me the attached message; anti-virus is off and bare ass minimum services are running and I added the line in variables.
Any ideas?
Click to expand...
Click to collapse
Did you definitely add it to your path as it is suggesting in that window ? If so, I think you may need to reboot to pick that change up.
I did that just in case.
Actually, that path field was empty. So, I added it as is.
look up droid explorer
I made some leeway:
C:\Program Files (x86)\android-sdk-windows\tools>adb shell
$
$ adb push su /sdcard/su
$ adb push su /sdcard/su
$ adb: permission denied
good grief!!!!!!!
I've completely removed visionary before starting this procedure. Did I need temproot before attempting this?
Downloading and installing Droid Explorer. Thanks!
Also, I'm using this guide: http://forum.xda-developers.com/showthread.php?t=834228
No matter what I've done, permission denied.
The steps you are trying are actually to get temproot (it's an alternate method to Visionary), so you don't need to already be temprooted.
You don't want to run "adb push" commands after you have run "adb shell". ADB commands will no longer work until you exit the shell (simply type exit and hit enter---you'll notice your command prompt will change back to normal). If you are following the guide you linked to, you'll notice adb shell is not run prior to running the first push command.
ianmcquinn said:
The steps you are trying are actually to get temproot (it's an alternate method to Visionary), so you don't need to already be temprooted.
You don't want to run "adb push" commands after you have run "adb shell". ADB commands will no longer work until you exit the shell (simply type exit and hit enter---you'll notice your command prompt will change back to normal). If you are following the guide you linked to, you'll notice adb shell is not run prior to running the first push command.
Click to expand...
Click to collapse
^^^^ what he said.
You are trying to run adb on your phone there, which isn't right. That's your phone's command prompt, the "$". "adb" is something totally different on your phone. You need to run the adb commands on your PC. That's why "adb shell" worked (because you ran it on your PC), then "adb push" didn't (because you tried to run it on your phone).
steviewevie said:
^^^^ what he said.
You are trying to run adb on your phone there, which isn't right. That's your phone's command prompt, the "$". "adb" is something totally different on your phone. You need to run the adb commands on your PC. That's why "adb shell" worked (because you ran it on your PC), then "adb push" didn't (because you tried to run it on your phone).
Click to expand...
Click to collapse
I did run the commands from my pc. But still permission denied.
cwis said:
I did run the commands from my pc. But still permission denied.
Click to expand...
Click to collapse
"permission denied" is a message from your phone, not your PC.
The $ prompt that you copied and pasted up shows that you were running the commands on your phone. As soon as you do "adb shell", then any commands you are entering after that are going on your phone, even though they're physically being typed on your PC - because your PC has started a command prompt on your phone, as shown by the $ prompt.
cwis said:
I did run the commands from my pc. But still permission denied.
Click to expand...
Click to collapse
Basically, don't start by typing adb shell. The instructions you are trying to follow don't even say to do that anywhere. I highly recommend you reread the instructions very carefully and follow them exactly. Rooting this phone is actually pretty simple if you just do exactly as the guide states. If you don't know what you are doing and mistype something in some of the later steps though, you can seriously screw up your phone...
I think part of the confusion is that the commands listed on the guide all have "$" at the beginning of them, probably because whoever wrote that was using a Linux PC or maybe a Mac. You are actually executing these commands from your Windows command shell so they will look more like:
D:\Android SDK\platform-tools>adb push su /sdcard/su
Click to expand...
Click to collapse
(depending on where you have the SDK installed)
instead of:
$ adb push su /sdcard/su
Click to expand...
Click to collapse
but of course you only need to type:
adb push su /sdcard/su
Click to expand...
Click to collapse
Again these are typed from your windows command shell.

[Q] before I begin rooting, one question...

So I just set up ADB (I THINK) can someone tell me if I did it correctly or not? When I typed in "adb devices" on the cmd thing a bunch of stuff popped up. After watching a video the guy said type "adb shell" for to test to see if it works and I got a msg saying "adb server is out of date. killing... *daemon started successfully"
So is my ADB set up properly so I can now begin rooting??
I dont recommend ADB try using this method.
http://forum.xda-developers.com/showthread.php?t=928160
Sent from my HTC Vision using XDA Premium App
what's wrong with ADB??
I would at least have it set up in case you need it before you root. It might save you from bricking (it has for me).
It doesn't sound set up correctly. When I run adb devices, it says the serial number, nothing else.
Sinistah_ said:
what's wrong with ADB??
Click to expand...
Click to collapse
ADB isn't required to root, and if you're having troubles and have no other need for the SDK or ADB, it can be a lot of unnecessary work.
for awhile it said it was incorrect or sumthin when I'd type "adb devices" into the cmd. Then when I messed with the path a bit and when I typed "adb devices" again, all this stuff popped up. Then I did the "adb shell" and that last thing popped up. What should I do??
martonikaj said:
ADB isn't required to root, and if you're having troubles and have no other need for the SDK or ADB, it can be a lot of unnecessary work.
Click to expand...
Click to collapse
so with this said, can I still use the method shown on wiki to root or do I have to do it the way with Visionary/Gfree??
Sinistah_ said:
so with this said, can I still use the method shown on wiki to root or do I have to do it the way with Visionary/Gfree??
Click to expand...
Click to collapse
I rooted my MyTouch4G with visionary/gfree/terminal emulator. No adb required but its a lifesaver if your phone can't boot!
well now I'm confused on what to do... Do I continue trying to fix this ADB problem or do I just do this other method everyones mentioning.
Sinistah_ said:
well now I'm confused on what to do... Do I continue trying to fix this ADB problem or do I just do this other method everyones mentioning.
Click to expand...
Click to collapse
They really aren't as separate of methods as you think. Every command you enter in ADB can be done by manually moving files into the proper locations, and executing commands via the Terminal Emulator app in the Market instead of the command window (via ADB) on your computer.
So when using the wiki instructions, instead of using cmd commands I use terminal emulator instead??
Sent from my T-Mobile G2 using XDA App
How am I supposed to do the first step on the wiki guide without abd??? I don't get it.
Sent from my T-Mobile G2 using XDA App

Categories

Resources