adb files needed on sdcard? - EVO 4G Q&A, Help & Troubleshooting

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.

Related

[HOWTO] ADB for Macintosh Users Only for complete beginners!

I AM NOT RESPONSIBLE FOR ANY PROBLEMS YOU CAUSE!
So you are stumbling around XDA and you really want some kind of app or something, but you think you cant because you have a Mac, well I am here to tell you wrong.
The biggest and most used mistake for mac users when trying to use ADB is this:
HTML:
Inas-iMac:~ Hans$ /AndroidSDk/tools
-bash: /AndroidSDk/tools: is a directory
Inas-iMac:~ Hans$
Well this is how you do it!
Watch this!
http://www.youtube.com/watch?v=GLAMG4xU_lE
To make your phone go into debug mode go to settings/applications/development and check debug
DO NOT MOUNT PHONE! Just let it be
I did not go to deep into the process because this is made for complete beginners!
Why not follow the official SDK install instructions and add the path to bash_profile..
developer.android.com/sdk/installing.html#Installing
In my opinion that's not too hard for a newbie.. (i managed to do that) And after doing that you don't need to change directories with cd command, you can just type adb whatevercommand from your home dir which is the default location when you open the terminal.
Drag and drop is a little a fail.... one can add "alias" (linux can do it, probably mac too)
Little How-to:
Code:
$ nano ./bashrc
add and adapt the following line to bashrc:
Code:
alias adb="/home/carbonyle/android-sdk-linux_86/tools/adb"
now you just have to type "adb" from a terminal emulator to run it, eg:
Code:
$ adb shell
# reboot recovery
or
Code:
adb install ./Download/myFavortiteApp.apk
and so on...
ps: we don't need to "adb remount" at worst we can just "adb kill-server" then "adb start-server" if the device is not accessible

Ok, seriously...what is a shell?!?!

- on your PC open a shell again and do:
Click to expand...
Click to collapse
I have tried and tried to find a simple explanation of 'what is a shell?' and get more and more confused.
Is this ADB? What is ADB and where is all that code everyone says to type supposed to go? I have the sdk, I have eclipse...I have never found 'a shell'
Now...here is what I think I know...
- Is that DOS window you get from run>command line a shell?
- What is with some people running ADB from C: directory and others saying you have to get all the way to the sdk directory?
(BTW...at one point I went into command window and ran some adb kill command on a running app in my emulator...it worked...but I still have NO idea what I did.)
So...is there an "Extremely" simple explanation of what this is all about"?
---------
From a wiki I got this "COMMAND.COM – shell for various DOS versions including Windows 95-98-ME, also present in the operating systems of the Windows NT-2000 and XP substreams. MS-DOS Command.com is directly available when using OS/2 on a dual-boot configuration." which is why I attempted the above.
But if command.com is a shell why dont we say that...why all this shell business?
I know many of you are shaking your head...but lets assume I am like 70 and need you to teach me how to double click...lets go with that...
Shell is the command line, there are a few different programs that are run as command shells; bash (is the default one for most linux distros) and command.com (is the default for windows). If you use ADB Shell it basicly routes your phones bash shell through to your command line (be it windows or linux) You need to use a terminal emulator to access the shell on your phone directly (they can be found in the market)
ADB is the Android Debug Bridge it allows us to remotely access phones shell, push files to the phone, pull files from the phone, some other stuff to. It is part of the Android SDK and thus is bundled with it. I do belive HTC Sync might install it as well, however.
adb shell
'nuff said
midri said:
Shell is the command line, there are a few different programs that are run as command shells; bash (is the default one for most linux distros) and command.com (is the default for windows). If you use ADB Shell it basicly routes your phones bash shell through to your command line (be it windows or linux) You need to use a terminal emulator to access the shell on your phone directly (they can be found in the market)
ADB is the Android Debug Bridge it allows us to remotely access phones shell, push files to the phone, pull files from the phone, some other stuff to. It is part of the Android SDK and thus is bundled with it. I do belive HTC Sync might install it as well, however.
Click to expand...
Click to collapse
Ok...thanks for trying to clear it up.
Now..you run the command....adb shell...from command.com (in windows?) So are you actually setting up a shell inside a shell? Earlier I found a post that said...
- on your PC open a shell again and do:
adb shell
Click to expand...
Click to collapse
Now I tried that...I cd back to C:\ and typed in adb shell...and got an error about adb not being recognized internal/external command.
So...see...still so much newbies can't find...
SteelH said:
adb shell
'nuff said
Click to expand...
Click to collapse
uhm....see and that helps no one...ok well doesn't help me at all. If you asked me to explain the adenosine tri-phosphate cycle and I said...ATP baby...would that help at all?
I thought not.
sablesurfer said:
Now I tried that...I cd back to C:\ and typed in adb shell...and got an error about adb not being recognized internal/external command.
So...see...still so much newbies can't find...
Click to expand...
Click to collapse
because you either have to do it from the "android-sdk/tools" folder or add the path to the environment variables in the advanced system properties.
t3project said:
because you either have to do it from the "android-sdk/tools" folder or add the path to the environment variables in the advanced system properties.
Click to expand...
Click to collapse
Ah hah...ok. I recall just following the instructions on the error message that popped up and it had the whole path in there. (Had to reach back to my DOS (win3.1) days to do that in command window.)
Ok...so this is what I figured out from a video and your comment. Right click 'my computer'...'advanced' tab...'environment variables' button. Then find the 'Path' option in the system variables section and ADD...';C:\path\to\folder\android'
Once I have that then just from any old prompt it will find ADB? I can be at c:\> or c:\documents and Settings\sablesurfer>
Is that right?
Ok...all this research lead to next question about the shells...if you type adb shell....does that mean the phone must be connected to computer? I guess so now that I write that out...because you only use adb shell to interact with the phone in first place...right?
You need to add the /tools folder in the android ask folder to your path. i.e. c:\android-sdk\tools if that is where you extracted it. All the tools like adb.exe and fastboot.exe are in the tools did not the android-sdk folder.
frankenstein\ said:
You need to add the /tools folder in the android ask folder to your path. i.e. c:\android-sdk\tools if that is where you extracted it. All the tools like adb.exe and fastboot.exe are in the tools did not the android-sdk folder.
Click to expand...
Click to collapse
Ok, good to know!
Thanks everyone for being patient!
So found this reference to shell that is different from what I have seen so far...
"1 After switching to a root shell (# prompt), type mount and press Enter."
What is 'a root shell'? From little bit of research it seems you type sudo su to get to a root shell? Where are you typing that? On the pc or on the phone? In command.com on pc or ... in what on the phone?

[Q] Help with setting up adb shell

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?

ADB

I'm trying the rage root method after reading up on all the stuff. I managed to get adb installed and connected, but i can't use adb actions.
I type in c\androidsdk\tools\adb shell
$ su
$ SUermission denied
even without su, if i try to type "adb push su /sdcard/su" it says adb permission denied.
I have kept my phone screen on as per another thread, but i do not get a prompt that asks for adb permissions. Am i missing an app or something? I do have debugging and screen awke both on.
I have placed the g2 root folder in the androidsdk\tools\ folder, both just the files and the entire folder just to be sure.
Obviously I'm new to adb, so If i'm doing something completely wrong just let me know.
as long as you're not rooted (temp or perma) you can't use "su" in adb-commands... If you tell a little more about what you're trying to push, then I can help some more
Im just trying to root the phone with rage since visionary seems unreliable.
Im trying to adb push the su/ sdcard/su as per the first line of instruction in the rage temp root guide
hehe... I used the visionary root, and it have worked good for me btw, I think you should've posted in the rage-thread instead of opening a new topic, but now it's already opened so here it goes
firstly... are you sure you're in the right folder, and have the folder "su" in there?
If so, don't go into "adb shell"... use the lines exactly as stated in the OP. adb inside an adb shell won't give the results you want... Post back if it doesn't work
$ adb push su /sdcard/su
$ adb push Superuser.apk /sdcard/Superuser.apk
$ adb push rage /data/local/tmp/rage
$ adb push busybox /data/local/tmp/busybox
$ adb push root /data/local/tmp/root
$ adb shell chmod 0755 /data/local/tmp/*
Click to expand...
Click to collapse
I don't think Im using adb right then, how do I just type in "adb push ...?" If I do that, it just says that the command is not recognized internally or externally.
For example,
Adb push su/ sdcard/su
gives me that error.
I've tried to set a path directly to adb, but that didn't work, so I was manually going
AndroidSKD\tools\ Adb push su/ sdcard/su but that also didnt work.
I don't have the $ prompt without shell, is that wrong?
I'm pretty sure Im in the right folder, as androidsdk\tools\adb gives me the adb directory, just nothing else works. What exactly does SU folder mean? I have the su file in the tools folder, dont know about the su folder.
Ok, my adb stuff is in c:\tools .. so when I first open command prompt, I have to type this:
cd c:\tools
That puts me into the correct folder. If yours is in C, then you'd probably have to do this:
cd c:\androidsdk\tools
Then type:
adb devices
It should at least give you SOME sort of output, either with your device number (if it's connected, and adb is working properly), or just say devices, with no numbers (incorrectly)
dwang93 said:
I don't think Im using adb right then, how do I just type in "adb push ...?" If I do that, it just says that the command is not recognized internally or externally.
For example,
Adb push su/ sdcard/su
gives me that error.
I've tried to set a path directly to adb, but that didn't work, so I was manually going
AndroidSKD\tools\ Adb push su/ sdcard/su but that also didnt work.
I don't have the $ prompt without shell, is that wrong?
I'm pretty sure Im in the right folder, as androidsdk\tools\adb gives me the adb directory, just nothing else works. What exactly does SU folder mean? I have the su file in the tools folder, dont know about the su folder.
Click to expand...
Click to collapse
You, apparently, need to read some more.
Do it exactly as written here
http://forum.xda-developers.com/wiki/index.php?title=HTC_Vision#Rooting_the_G2
FYI you will not see the $ symbol. that just indicated the next line you have to enter in commnad prompt. Each time you see $ just mean you type that line then press enter. Wait to see a result of transfer from prompt then enter next line and so on.
rsxtypes72 said:
You, apparently, need to read some more.
Do it exactly as written here
http://forum.xda-developers.com/wiki/index.php?title=HTC_Vision#Rooting_the_G2
Click to expand...
Click to collapse
This!! I'll be kind though.
Make your life easy. Unzip the contents of g2TempRoot, to your tools folder, in sdk. So, unzip the g2temproot to your desktop. Go into that folder. Copy all, and move them to c:\androidsdk\tools. Now, once that's done, go into command prompt. cd c:\androidsdk\tools. Then, do as follows, as per that link
$ adb push su /sdcard/su
$ adb push Superuser.apk /sdcard/Superuser.apk
$ adb push rage /data/local/tmp/rage
$ adb push busybox /data/local/tmp/busybox
$ adb push root /data/local/tmp/root
$ adb shell chmod 0755 /data/local/tmp/*
(Sorry I couldn't be of more help, as I used VisionaryR12 and it worked fine for me.)
One more word of advise...
I would recommend you try temp root first.
Become used to using adb then try to get full root.
When you use temp root everything you do is temporary only.
Rebooting will reset everything back to stock so its good practice.
thanks for the help guys, but i figured it out. I just wasn't in the right directories from the get go.
Edit: Just finished the perm root! And it didn't brick.
dwang93 said:
thanks for the help guys, but i figured it out. I just wasn't in the right directories from the get go.
any tips on going onto the perm root?
Click to expand...
Click to collapse
Read .. research .. double check .. triple check .. and right before you do it .. check again. As you're doing it, go over every letter, space, and character to make sure it's as it should be.
On the subject of adb, I have it installed, but when I run adb devices to find my phone, I get "???????????? no permissions". What am I doing wrong here?
Daughain said:
On the subject of adb, I have it installed, but when I run adb devices to find my phone, I get "???????????? no permissions". What am I doing wrong here?
Click to expand...
Click to collapse
Upload a screen shot of your command window
with the error
dwang93 said:
thanks for the help guys, but i figured it out. I just wasn't in the right directories from the get go.
Edit: Just finished the perm root! And it didn't brick.
Click to expand...
Click to collapse
dude..I think I am doing something like you...could you please post what you did....I think is an issue of directories..but I'm not that familiar with adb and i have not been able to figure this out.....
Thanks!!!

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.

Categories

Resources