[Q] Help with setting up adb shell - EVO 4G Q&A, Help & Troubleshooting

I must be stupid or something cause I'm stuck on getting this to work. Can someone help me finalize setting up adb shell?
This is where I am so far:
I have installed phone driver and Android SDK. In SDK have installed packages API 2 through 8, usb driver package 3, etc.
What do I need to do when opening SDK manager? My phone is in tether mode but it just sits there. What am I not doing?
Thanks.

No love from the community on this one??

I'm a little confused.
When you set the evo to usb debugging and open a command prompt, cd to your sdk/tools dir, enter "adb devices" does your evo show up? It should be listed as a serial #.

Yes.....an HT### serial comes up which I am assuming is the phone. Guessing I can now just run the commands I need and it will communicate with the phone?
My confusion was that I was running the SDK Manager.exe and expecting it to find my phone and produce the adb shell.

Ok! You should be good to go. Just enter "adb shell" and you are set.

Good deal....thx.

Ok....thought I had this working. However, when in adb shell any commands I put in tells me "adb: not found".
What do I need to do from this point?

Let me clarify this.....
When I list devices it does find my phone. But, when issuing the adb shell command and trying to enter anything from the "#" prompt it always says "adb: not found".
I must be missing a step or something.

I'm kind of confused, mostly because I don't know what it is you're doing in a shell, but once you're in the shell and you get the # sign, there's no need to type in adb before your commands, for example, from the command line you would navigate to your tools folder. For me it would be
cd AndroidSDK/tools
./adb shell
Some jibber jabber about daemon starting
#
From then on I could run whatever command I planned on running in the shell like
echo 1 > /sys/class/leds/flashlight/brightness
And not
./adb echo 1 > /sys/class/leds/flashlight/brightness

CCallahan said:
Let me clarify this.....
When I list devices it does find my phone. But, when issuing the adb shell command and trying to enter anything from the "#" prompt it always says "adb: not found".
I must be missing a step or something.
Click to expand...
Click to collapse
What exactly are you trying to accomplish? Then we can determine what's going on.

I'm running Myn's RLS4 and am trying to change the power bar in the notifications.
Trying to follow the instructions in this link: http://forum.xda-developers.com/showthread.php?t=836721

OK. What part are you getting stuck at?
Edit: for this code, you do not need to be in the ADB shell:
Code:
adb remount
adb push widget.txt /system/customize/
adb reboot
You just need to cd to your tools folder of the SDK in your command prompt.

CCallahan said:
I'm running Myn's RLS4 and am trying to change the power bar in the notifications.
Trying to follow the instructions in this link: http://forum.xda-developers.com/showthread.php?t=836721
Click to expand...
Click to collapse
The commands he has given here
Code:
adb remount adb push widget.txt /system/customize/ adb reboot
do not require you to be in an adb shell, you just open up the command window do an adb remount then type in his commands one by one and male sure you have the .txt file that specifies what widgets you're going to use is in the tools folder of your AndroidSDK folder so that adb can locate and push it to its respective directory.

Ok...that worked.
Knew I was doing something wrong. Was trying to run those commands from the adb shell....makes sense that it could not find adb.
Thanks.

i have no adb shell at all can anyone help?

Related

adb shell

ok so i tried to follow the instructions to get my phone rooted!
but im running into a snag....
im here roughly
Check if your phone is detected by ADB
Open up Command Prompt (Go to run, type in cmd, press enter)
Type in
Code:
cd C:\android-sdk-windows\tools === Press Enter
adb devices === You should see your device listed
adb shell === you should see # in the next line
Now you are all set to run adb commands
Note: for a list of commands type in 'adb' in cmd
CONGRATS YOU NOW HAVE ADB FULLY RUNNING!
except when i type adb shell i get a "$" instead of a "#" in the next line
im not sure if i did something wrong/installed drivers wrong or what??!! any help would be appreciated!
to get your phone rooted, read the rooting tutorial in the development section.
but, in answer to your question, you are getting the '$' instead of the '#' because you do not have root access in your shell.
to have root access in shell, you need to have installed the rooted img, which will then allow for temporary installation of a custom recovery, which must be pushed while the phone is in recovery mode already. then, you can adb shell to the root prompt
ok im very very new too all this! so i apologize up front for not knowing exactly what your talking about! i have been following this guide to root my phone-
forum.xda-developers(DOT)com/showthread.php?t=532719
(take out the (DOT) and make it .com
some1 on this site refereed it to me because i needed to know how to do EVERYTHING from start to finish!
so i am still stuck any help(detailed very detailed help) would be appreciated!

I'm lost. Need rooting help.

I'm lost as hell. I found this thread:
http://www.androidpolice.com/2010/06...credible-next/
I did the unrevoked thing and I see this icon called SuperUser Permissions in my app list.
Am I able to proceed and fully root or do I have to re-do the root with the Toast method? This looks too complicated and by the way I tried the ./adb thing on my mac and I get errors saying "No such file or directory".
gqstatus0685 said:
This looks too complicated and by the way I tried the ./adb thing on my mac and I get errors saying "No such file or directory".
Click to expand...
Click to collapse
adb isn't installed on a Mac out of the box; You'll need to go download the Android SDK. Untar it somewhere (I put it in ~/), then open a term, do:
Code:
cents-macbook-pro:~ $ cd android-sdk-mac_86/tools/
cents-macbook-pro:~/android-sdk-mac_86/tools $ ./adb
CentroniX said:
adb isn't installed on a Mac out of the box; You'll need to go download the Android SDK. Untar it somewhere (I put it in ~/), then open a term, do:
Code:
cents-macbook-pro:~ $ cd android-sdk-mac_86/tools/
cents-macbook-pro:~/android-sdk-mac_86/tools $ ./adb
Click to expand...
Click to collapse
Massive Brain Freeze.. What do you mean by "(I put it in ~/)"?
I downloaded the Android SDK already. I understand what terminal is so when I download the Android SDK where do I place it?
Am I pointing terminal to the directory? Android SDK is currently in a folder on my desktop.
gqstatus0685 said:
Massive Brain Freeze.. What do you mean by "(I put it in ~/)"?
I downloaded the Android SDK already. I understand what terminal is so when I download the Android SDK where do I place it?
Am I pointing terminal to the directory? Android SDK is currently in a folder on my desktop.
Click to expand...
Click to collapse
~ in most flavors of Unix/Linux is short for your home directory. In MacOS, ~ is /Users/<username>. *nix pro-tip:
Code:
cents-macbook-pro:~ $ echo ~
/Users/cent
So in my case, ~ is short for /Users/cent.
If it's on your desktop, open a terminal and type:
Code:
cd ~/Desktop/android-sdk-mac_86/tools
-OR-
Code:
cd /Users/cent/Desktop/android-sdk-mac_86/tools
And then you can proceed to issue your adb commands. Just remember to prefix it with "./", which tells MacOS to look in the current directory for the adb command.
Code:
cents-macbook-pro:~/android-sdk-mac_86/tools $ ./adb devices
List of devices attached
HT05RHL1XXXX device
Ok. I think I'm just going to pay someone to do this for me. I'm getting a migraine.
So I'm basically typing the below:
~/android-sdk-mac_86/tools $ ./adb devices (Do I type this in one line)
List of devices attached
HT05RHL1XXXX device
I ran the thing and it doesn't show my phone listed.
I've got the time, if you have the money!
1. Make sure USB debugging is enabled. On your phone, go to Settings -> Applications -> Development, and make sure "USB debugging" is checked.
2. Make sure your USB cable is connected to your phone and computer.
3. Open a terminal
4. Type "cd ~/Desktop/android-sdk-mac_86/tools" and press enter.
5. Type "./adb devices" and press enter.
If it lists your device, you're then good to go to start following the rooting instructions!
You're the best dude. It was the USB debugging that was giving me the problem.
Good deal man, glad you got that part worked out! Have fun getting your root on!
this is the easiest way to do it....it worked for me
http://forum.xda-developers.com/showthread.php?t=701152
Do i have to keep dubugging mode on or can I turn it off before I root it. I did the command:
"cd ~/Desktop/android-sdk-mac_86/tools"
and then
adb push PC36IMG.zip /sdcard (Doesn't do anything. I tried without the space and some stuff popped up. Can I just manually put it on my SDcard?
gqstatus0685 said:
Do i have to keep dubugging mode on or can I turn it off before I root it. I did the command:
"cd ~/Desktop/android-sdk-mac_86/tools"
and then
adb push PC36IMG.zip /sdcard (Doesn't do anything. I tried without the space and some stuff popped up. Can I just manually put it on my SDcard?
Click to expand...
Click to collapse
Debugging mode needs to stay on if you want to use adb. You can turn it off once you root, but it won't hurt to leave it on.
The push command should tell you the number of bytes transfered. You need to make sure that the file you are pushing is in the current directory you're in (tools), or manually enter the path, like "./adb push ~/Downloads/PC36IMG.zip /sdcard"
But yes, you can mount the card as a disk drive and copy the file there in Finder.

adb files needed on sdcard?

Need lil help with adb... reinstalled all drivers and reinstalled android sdk and install all tools/updates.. still giving me same no adb errors.. Im nand unlock with engineering bootloader.
wasd321 said:
Need lil help with adb... reinstalled all drivers and reinstalled android sdk and install all tools/updates.. still giving me same no adb errors.. Im nand unlock with engineering bootloader.
Click to expand...
Click to collapse
Your problem is that you're entering adb commands inside shell.
Once you see the # sign, after typing adb shell, that means that the adb commands will no longer work. So, your commands that begin with adb will NOT work if you see the # sign..
Also, for commands like adb devices and remount, they need to be run outside of shell or rather from your AndroidSDK\tools PATH directly.
This will work:
Code:
C:\android-sdk\tools:
adb remount
adb devices
adb shell
This won't work:
Code:
C:\android-sdk\tools:
# adb remount
# adb devices
# adb shell
Notice the # sign (this happens when you type adb shell), this means you're now root and now using shell -- you cannot run the adb commands inside shell, you have to instead use Linux commands, or specifically commands from BusyBox.
Just to clarify: Some commands can be sent outside of the shell, but they have to be preceded by "adb". For example:
Code:
adb reboot recovery
Others will only work inside of the shell, like ls, mv, cd, and so forth. Search for an adb command listing (you do have a Google phone, after all) and it may help to familiarize yourself with basic Linux terminal commands as well - a lot of them are accepted by adb.
SilverZero said:
Just to clarify: Some commands can be sent outside of the shell, but they have to be preceded by "adb". For example:
Code:
adb reboot recovery
Others will only work inside of the shell, like ls, mv, cd, and so forth. Search for an adb command listing (you do have a Google phone, after all) and it may help to familiarize yourself with basic Linux terminal commands as well - a lot of them are accepted by adb.
Click to expand...
Click to collapse
Yea, I was aware of this, just decided not to mention it. Thanks for pointing it out though.

[Q] Cant get ADB to work!!!

Ok so i used adb to root my phone when i first got it. set up the sdk tools file and all of that, however im having trouble trying to push a framework-res file back to my phone. actually no adb commands will work. i keep getting this message "/sbin/sh: adb: not found" can someone pleaseeee help me figure this out
chingy51o said:
Ok so i used adb to root my phone when i first got it. set up the sdk tools file and all of that, however im having trouble trying to push a framework-res file back to my phone. actually no adb commands will work. i keep getting this message "/sbin/sh: adb: not found" can someone pleaseeee help me figure this out
Click to expand...
Click to collapse
What exactly are you doing? You're not in the shell are you? If so, exit the shell and do it at the dos command prompt.
chingy51o said:
Ok so i used adb to root my phone when i first got it. set up the sdk tools file and all of that, however im having trouble trying to push a framework-res file back to my phone. actually no adb commands will work. i keep getting this message "/sbin/sh: adb: not found" can someone pleaseeee help me figure this out
Click to expand...
Click to collapse
wrong section. did you cd to the tools folder inside sdk folder
Make sure you have the SDK installed and when you open up Command Prompt type in "cd C:\Program Files (x86)\android-sdk-windows\tools" Obviously programs folder would be wherever you have your SDK located. After you type that in, type ADB Shell and you should be in.
Blindlabel said:
Make sure you have the SDK installed and when you open up Command Prompt type in "cd C:\Program Files (x86)\android-sdk-windows\tools" Obviously programs folder would be wherever you have your SDK located. After you type that in, type ADB Shell and you should be in.
Click to expand...
Click to collapse
it sounds like he's already in shell which he souldn't be. he needs to just be in a command prompt. you can't use the adb push command when in shell
This result from the command "adb" not being found.
Two ways to fix, either go to the folder with the adb executable in it, right-click, "Open terminal here." And then "adb" will work.
Second way is to copy the adb executable to /usr/bin. (I think xD) (One of the */bins.)
Good luck!
so im not supposed to run the whole cd\ cd sdk cd tools... all that stuff?
chingy51o said:
so im not supposed to run the whole cd\ cd sdk cd tools... all that stuff?
Click to expand...
Click to collapse
Oops, that's my bad. I assumed you were in Linux. If you are windows, then follow that other guy's instruction. (cd to blah blah) but if Linux thenfollow mine.
Moved to Q&A. Please do not post questions in the Development thread.

[Q] Help Running Command with ABD

I have a problem. I'm running ViperOne and I've been told I need to run this command
adb shell su restorecon -FR /data/media/0
Here is the issue, I don't know how. This is because 1) I'm inexpierenced and 2) I think there is an issue.
When I open up my android folder with my htc plugged in and run that command I keep getting the "error:closed"
I'm told I need to update adb, but I thought I did. I can't get this to work. Someone help?
Hey there, to update ADB through the console, go to the tools folder, its on the same level as platform-tools, run a command prompt from there, by shift-right clicking and hitting open command window here, then type;
android update adb
after that it should tell you to restart the server, and you should be good.
Good Luck!

Categories

Resources