[Guide] Setting up ADB [Windows]

Search This thread

btdag

Senior Member
Nov 25, 2009
828
19
Bournemouth
This guide was originally written by ante0 on VillainROM.co.uk. For the original click here. Due to some people having issues accessing VillainROM's website I have asked ante0 to give me permission to post the guide here. He happily obliged so thanks go to ante0 for this guide! :)

All I have done to it is change the layout and remove any unnecessary text.


Tools needed:
Android SDK
HTC Sync 3.0.5387 - get the latest if this is old
WinRAR - to extract Android's SDK files
Patience and time



1. Getting ADB (Android Debug Bridge)


ADB is a part of android's SDK. It can be obtained here. Please get the latest Windows version.

Next we need to "install" it.

This is done by simply extracting it to your hard drive:
Install WinRar, then right click on the zip file and choose "extract to".

I chose C:\ as the folder in the zip is named "android-sdk-windows", so you can find the files in C:\android-sdk-windows

After that is done we are now done with the "installing" part.

2. Setting up environment variables - access adb from outside of \android-sdk-windows\tools directory in a command prompt

Now that we have extracted all files we need to set up Windows environment variables to make our lives easier.

I always do this, because it saves you having to cd C:\android-sdk-windows\tools every time you load a cmd prompt.

Windows XP:
Right click on "My computer" and select "Properties"

Click on the "Advanced" tab in the box that appears, looks like the pic below.
envvar.gif


Click on the button named "Environment Variables".

Now, double click on the text entry named "Path" in the lower list box

At the end of it, add ";C:\android-sdk-windows\Tools"
(";" is required at the start so windows knows it's a new entry.)

Click on OK to exit out of the dialog, then OK again to get out of My computer's properties. After you reboot your computer you'll have it set up.

Windows 7/Vista:
Right click on "Computer" and select "Properties"

In the System window that appears click on "Advanced System settings" located in the left list

Click on the Advanced tab in the box that appears, then on the "environment variables" button.

Double click on "Path" located in the lower list box.

At the end of it, add ";C:\android-sdk-windows\Tools"
(";" is required at the start so windows knows it's a new entry.)

Now click on OK, then OK again to exit. Restart and all will be set up.

3. Making sure USB works
(original guide linked to my old driver guide - here are new details)

Install the very latest version of HTC Sync - 3.0.5387 is the latest at time of writing but get the latest if this is old

This should install the correct drivers regardless of whether you're on 64-bit, 32-bit, Vista, 7 or XP.

4. Using ADB
(unedited)

I won't list all commands you can use here. I will only list some examples...
Remember to plug your phone in your usb cable (I've forgotten sometimes... lol)
Start by opening a command prompt.
This is done by opening up the startmenu then click on "Run..." (Alternative way: Windowskey + R).
In the "Run..." box, enter "cmd" without quotes.
If you have some knowledge of using a cmd prompt you don't need to read the next part.
To navigate you mainly use the commands CD and DIR.
Here's an image of what it looks like
dos-command-prompt1.gif

C:\Documents and settings\jwork> tells you what your current working folder is.
To get out of it, use the command "cd ..".
This will go back one folder, so your new location will be C:\Documents and settings>
One more "cd .." will take you to C:\.
Now, lets say you have a folder named Images in C:\. To enter it you use "cd Images".
If you want to list all files in that folder, enter the command "dir".
Now you might have a image named image01.jpg in that folder, that you want to get to your phone.
Use the command adb push image01.jpg /sdcard/
It should notify you now if the push was successful.
You can check if the image is on your sdcard by using the command "adb shell ls /sdcard/".
That should conclude this guide...
One more thing, if you just enter "adb" it will show a list of all commands with descriptions.


Any questions? Just post here.
 
Last edited:

jubo1236

Member
Dec 7, 2010
18
0
Hi

i really need some help here. whenever i type adb into the command box , i get "adb" is not recognised as an internal or external command , operable program or batch file. But i have alrdy installed the ADB by extracting it to a folder.
Right now im trying to install a custom rom and im stuck at accessing the recovery page :( pls help meee
 

busbutt

Senior Member
Jul 27, 2010
56
2
Sounds like you haven't successfully added adb to your DOS path. Re-read section 2 again and make sure you followed the instructions correctly.
 

x_crossbone_x

Member
Nov 9, 2010
43
0
That's awesome!!! It's a nice tutorial for the newbies! And it benefits me, I reli like it!!

Thx!!!

Sent from my E15i using XDA App
 

xaviersjs

New member
Jan 14, 2011
2
0
Hi

i really need some help here. whenever i type adb into the command box , i get "adb" is not recognised as an internal or external command , operable program or batch file. But i have alrdy installed the ADB by extracting it to a folder.
Right now im trying to install a custom rom and im stuck at accessing the recovery page :( pls help meee

I had the same problem because the path was incorrect. I found the adb command in
Code:
android-sdk-windows/platform-tools/
rather than in
Code:
android-sdk-windows/tools/
 

ayk33

Senior Member
Oct 16, 2008
840
115

1. Getting ADB (Android Debug Bridge)


ADB is a part of android's SDK. It can be obtained here. Please get the latest Windows version.



hi,
thanks for the explanation both for you and ante0 but can you reload the link if possible becaue i cannot download the file for the first step? it gives error
 

im2cool92

New member
Feb 21, 2011
1
0
No matter what I do. I always get the "adb" is not recognised as an internal or external command , operable program or batch file. What am I doing wrong?
 

NeatBee

Member
Jul 30, 2010
13
0
Chester
Google has recently changed where adb can be found in the sdk. Just un-zip it anywhere i recommend the C drive, so it should look like this C:\android-sdk-windows\
Then browse to this folder and launch 'SDK Manager'
Open the window 'Choose packages to install' (it should open automatically first time) and choose to install the 'Android SDK Platform-tools, revision *'
To set the variable paths, do as in the first post and add these variable strings (assuming you unzipped it to C:\android-sdk-windows\ if not just modify it so it matches where you unzipped it to

Code:
;c:\android-sdk-windows\tools;c:\android-sdk-windows\platform-tools

Then you're good to go! :D
 
Last edited:

radrian92

Senior Member
Nov 16, 2010
962
176
Placentia
After doing all the above stated i still can't execute any commands. I typed "adb devices" and it just says the devices that are linked but it doesn't give me a serial number.
Google has recently changed where adb can be found in the sdk. Just un-zip it anywhere i recommend the C drive, so it should look like this C:\android-sdk-windows\
Then browse to this folder and launch 'SDK Manager'
Open the window 'Choose packages to install' (it should open automatically first time) and choose to install the 'Android SDK Platform-tools, revision *'
To set the variable paths, do as in the first post and add these variable strings (assuming you unzipped it to C:\android-sdk-windows\ if not just modify it so it matches where you unzipped it to

Code:
;c:\android-sdk-windows\tools;c:\android-sdk-windows\platform-tools

Then you're good to go! :D
 

retskrad

Senior Member
Oct 7, 2010
570
35
I have tried to restart the computer, sign in and out, install SDK again and again, changed the PATH in Enviromentor variables ... but still refuses ADB to work!

I typed "C: \ android-sdk-windows \-platform tools," in the PATH box and restarted the computer. Then I typed "adb" in CMD, but it is all the time: "'adb' Is Not Recognized as an internal or external command,
operable program or batch file. "

Is crazy! What is the problem?

BTW, I have installed the driver for my phone and selected "USB debugging".
 

NeatBee

Member
Jul 30, 2010
13
0
Chester
You've typed the path wrong. Delete the path you've already put in it and copy this one
Code:
;C:/android-sdk-windows/platform-tools/;C:/android-sdk-windows/tools/;
 

shinigamy

Member
Feb 7, 2011
5
0
hello

You've typed the path wrong. Delete the path you've already put in it and copy this one
Code:
;C:/android-sdk-windows/platform-tools/;C:/android-sdk-windows/tools/;

I think you are using wrong format, \ instead of /

For me I used "C:\Program Files\Android\android-sdk-windows\platform-tools\;C:\android-sdk-windows\tools\;"
in order to make it work"....ignore quotes.

Yet when I try to do the push command with some files

it gives me error: devise not found :confused:
anyone have clue?!
Thanks
 
Last edited:

findpranav

Member
Mar 23, 2011
24
1
sorry for the silly question but will the same steps help to setup a path for windows 7
because i really need to know how to use it as well if someone acn post a link for steps to use it it would be really appreaciated
thanks

EDIT: extremely sorry did not read the full post there is already a guide for windows 7
thanks for the post
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    This guide was originally written by ante0 on VillainROM.co.uk. For the original click here. Due to some people having issues accessing VillainROM's website I have asked ante0 to give me permission to post the guide here. He happily obliged so thanks go to ante0 for this guide! :)

    All I have done to it is change the layout and remove any unnecessary text.


    Tools needed:
    Android SDK
    HTC Sync 3.0.5387 - get the latest if this is old
    WinRAR - to extract Android's SDK files
    Patience and time



    1. Getting ADB (Android Debug Bridge)


    ADB is a part of android's SDK. It can be obtained here. Please get the latest Windows version.

    Next we need to "install" it.

    This is done by simply extracting it to your hard drive:
    Install WinRar, then right click on the zip file and choose "extract to".

    I chose C:\ as the folder in the zip is named "android-sdk-windows", so you can find the files in C:\android-sdk-windows

    After that is done we are now done with the "installing" part.

    2. Setting up environment variables - access adb from outside of \android-sdk-windows\tools directory in a command prompt

    Now that we have extracted all files we need to set up Windows environment variables to make our lives easier.

    I always do this, because it saves you having to cd C:\android-sdk-windows\tools every time you load a cmd prompt.

    Windows XP:
    Right click on "My computer" and select "Properties"

    Click on the "Advanced" tab in the box that appears, looks like the pic below.
    envvar.gif


    Click on the button named "Environment Variables".

    Now, double click on the text entry named "Path" in the lower list box

    At the end of it, add ";C:\android-sdk-windows\Tools"
    (";" is required at the start so windows knows it's a new entry.)

    Click on OK to exit out of the dialog, then OK again to get out of My computer's properties. After you reboot your computer you'll have it set up.

    Windows 7/Vista:
    Right click on "Computer" and select "Properties"

    In the System window that appears click on "Advanced System settings" located in the left list

    Click on the Advanced tab in the box that appears, then on the "environment variables" button.

    Double click on "Path" located in the lower list box.

    At the end of it, add ";C:\android-sdk-windows\Tools"
    (";" is required at the start so windows knows it's a new entry.)

    Now click on OK, then OK again to exit. Restart and all will be set up.

    3. Making sure USB works
    (original guide linked to my old driver guide - here are new details)

    Install the very latest version of HTC Sync - 3.0.5387 is the latest at time of writing but get the latest if this is old

    This should install the correct drivers regardless of whether you're on 64-bit, 32-bit, Vista, 7 or XP.

    4. Using ADB
    (unedited)

    I won't list all commands you can use here. I will only list some examples...
    Remember to plug your phone in your usb cable (I've forgotten sometimes... lol)
    Start by opening a command prompt.
    This is done by opening up the startmenu then click on "Run..." (Alternative way: Windowskey + R).
    In the "Run..." box, enter "cmd" without quotes.
    If you have some knowledge of using a cmd prompt you don't need to read the next part.
    To navigate you mainly use the commands CD and DIR.
    Here's an image of what it looks like
    dos-command-prompt1.gif

    C:\Documents and settings\jwork> tells you what your current working folder is.
    To get out of it, use the command "cd ..".
    This will go back one folder, so your new location will be C:\Documents and settings>
    One more "cd .." will take you to C:\.
    Now, lets say you have a folder named Images in C:\. To enter it you use "cd Images".
    If you want to list all files in that folder, enter the command "dir".
    Now you might have a image named image01.jpg in that folder, that you want to get to your phone.
    Use the command adb push image01.jpg /sdcard/
    It should notify you now if the push was successful.
    You can check if the image is on your sdcard by using the command "adb shell ls /sdcard/".
    That should conclude this guide...
    One more thing, if you just enter "adb" it will show a list of all commands with descriptions.


    Any questions? Just post here.