( ADB Help ) how-to set ADB & Windows $Path

Search This thread

eugene373

Retired Recognized Developer
Aug 11, 2009
5,844
7,424
eb-productions.proboards.com
HOW-TO Fix **ADB is not recognized in the CMD**

Navigate to & Left_Click on Start >
Right_Click on Computer >
Left_Click on Advance System Settings >
Left_Click on Environment Variables >
Left_Click on New ( User Variables ) >

Variables Name: ADB ( Or anything you want )
Variables Value: ;C:\SDK\tools ( Just like this, This is the Path of my adb.exe )

You must put a ; in front of ;C:\ ( adb Path goes here / Variables Value: )

That's it.. You now have set up adb to work Global via cmd prompt on win7
~Eugene
 
Last edited:

thesparky007

Senior Member
Oct 15, 2008
1,781
972
HOW-TO Fix **ADB is not recognized in the CMD**

Navigate to & Left_Click on Start >
Right_Click on Computer >
Left_Click on Advance System Settings >
Left_Click on Environment Variables >
Left_Click on New ( User Variables ) >

Variables Name: ADB ( Or anything you want )
Variables Value: ;C:\SDK\tools ( Just like this, This is the Path of my adb.exe )

You must put a ; in front of ;C:\ ( adb Path goes here / Variables Value: )

That's it.. You now have set up adb to work Global via cmd prompt on win7
~Eugene
or you can just open up command prompt and cd^ (adb folder location)
 

Tiffany84

Inactive Recognized Themer
Jul 27, 2010
6,280
3,323
OK, so I don't know what I did wrong but I named the variable name to adb and then the variable value ;C:\Program Files (x86)\Android\android-sdk\platform-tools which is where my adb.exe is located. But if I open up a command prompt and do adb devices it says:

C:\Users\Tiffany>adb devices
'adb' is not recognized as an internal or external command,
operable program or batch file.

If I cd to that location adb works but I thought it would be cool to just open a command prompt and be able to use adb but it's not working for me. Any suggestions or do u see anything wrong?
 

RyteSyde

Senior Member
Aug 23, 2010
82
45
OK, so I don't know what I did wrong but I named the variable name to adb and then the variable value ;C:\Program Files (x86)\Android\android-sdk\platform-tools which is where my adb.exe is located. But if I open up a command prompt and do adb devices it says:

C:\Users\Tiffany>adb devices
'adb' is not recognized as an internal or external command,
operable program or batch file.

If I cd to that location adb works but I thought it would be cool to just open a command prompt and be able to use adb but it's not working for me. Any suggestions or do u see anything wrong?

Tiffany, try this from a cmd prompt:
path = %path%;C:\Program Files (x86)\Android\android-sdk\platform-tools

then adb should work regardless of where you are in cmd
 

Tiffany84

Inactive Recognized Themer
Jul 27, 2010
6,280
3,323
Tiffany, try this from a cmd prompt:
path = %path%;C:\Program Files (x86)\Android\android-sdk\platform-tools

then adb should work regardless of where you are in cmd

AHH, You are awesome. That worked. So should I delete that variable that I added or just leave it there?

Edit: Ok. So it works when I add that path but if I close that prompt and then reopen and try to use adb with out adding that path again I get the error. So do I have to do that every time I open the command prompt?
 
Last edited:

RyteSyde

Senior Member
Aug 23, 2010
82
45
AHH, You are awesome. That worked. So should I delete that variable that I added or just leave it there?

Edit: Ok. So it works when I add that path but if I close that prompt and then reopen and try to use adb with out adding that path again I get the error. So do I have to do that every time I open the command prompt?

No you shouldn't have to if you open the cmd window with admin rights and set the path=. Run cmd as administrator or use the posts above and edit the path variable and add a ; to the end of it and then the path to platform-tools

either way should work

and if you get that to stick you won't need the other variable you added before
 
  • Like
Reactions: Tiffany84

Tiffany84

Inactive Recognized Themer
Jul 27, 2010
6,280
3,323
No you shouldn't have to if you open the cmd window with admin rights and set the path=. Run cmd as administrator or use the posts above and edit the path variable and add a ; to the end of it and then the path to platform-tools

either way should work

and if you get that to stick you won't need the other variable you added before

Ok, so I ran the cmd prompt as admin and it still won't stick. So your saying I need to add ; before C: and at the end of it? Sorry. Not the greatest with pc's. Thanks for trying to help though.
 

RyteSyde

Senior Member
Aug 23, 2010
82
45
Ok, so I ran the cmd prompt as admin and it still won't stick. So your saying I need to add ; before C: and at the end of it? Sorry. Not the greatest with pc's. Thanks for trying to help though.

whatever is in your path variable, leave that and just add this to the end:
;C:\Program Files (x86)\Android\android-sdk\platform-tools
 

Tiffany84

Inactive Recognized Themer
Jul 27, 2010
6,280
3,323
whatever is in your path variable, leave that and just add this to the end:
;C:\Program Files (x86)\Android\android-sdk\platform-tools

I named it adb and then the blank spot for the value I just copied and pasted what u had and still nothing. I give up. I guess stuff isn't meant to be easy for me. Story of my life. Thank u so much for trying to help.
 

RyteSyde

Senior Member
Aug 23, 2010
82
45
I named it adb and then the blank spot for the value I just copied and pasted what u had and still nothing. I give up. I guess stuff isn't meant to be easy for me. Story of my life. Thank u so much for trying to help.

I was referring to updating the system path. Where you created the variable, underneath that should be the "System variables" section. Scroll down in that the the variable "path" and double click it. Move the cursor to the end of the line entry and paste in the ;C:\...etc... line from above
 

Tiffany84

Inactive Recognized Themer
Jul 27, 2010
6,280
3,323
I was referring to updating the system path. Where you created the variable, underneath that should be the "System variables" section. Scroll down in that the the variable "path" and double click it. Move the cursor to the end of the line entry and paste in the ;C:\...etc... line from above

BAM!!!!!!!!!!!!!!!!!!!!! Thank u for not giving up on me even though I had. That did it. I"M giving u all my thanks for the day. Thank u again. I really appreciate it.
 

Dave2582

Senior Member
Apr 22, 2010
239
20
41
Boston, MA
I always wanted to know how to set adb so you can use it anywhere. Editing the path in the system variable worked for me. Thanks RyteSyde.
 

Molikai1988

Member
Jul 15, 2012
19
6
Oak Ridge
The right way to avoid weird issues.... [Noob Proof sorry in advance]

It actually works perfect if you just do the following:
1. Right Click My Computer -> Properties
2. On the left pane, Find and Click "Advanced system settings"
3. Under the "Advanced" Tab Find and Click "Environment Variables..."
4. In the box for "User variables for [your name here; e.g. David]" there will be a button that says "New..." Click it.
5. Now you have a box in front of you with two fields:
1. Variable name: entering path here is really safer and can help to avoid clogging up the environment namespaces (cluttering your ram/registry)
Code:
Path
2. Variable value: directory containing the adb.exe you want to use**; i.e.
Code:
C:\Android\sdk\platform-tools
**to find this with ease search for "adb.exe" or look for it in "...sdk\platform-tools\" or "sdk\tools".
**This is a version dependent thing for the Android SDK which folder its in.
6. Click OK on all the dialogs and exit the windows we opened here.
7. Hit the windows key + R and type cmd.exe; hit Enter
8. Type adb into the newly opened cmd window. hit Enter
9. If adb runs all is well. Your DONE. If not continue to step 10.
--If it work stop here!--
10. At this point we are going to select our entry from step 5. (in Environment variables...)and delete it. Otherwise windows has two pointers to our adb.exe.
11. Navigate in the "System variables" box and scroll down until you see Path in the Variable Column. Select it and Click "Edit..."
12. Click inside "Variable value:" go to the very end of this and drop a ";" no spaces. Enter the value from Step 5.2
13. Click OK/Apply on all dialogs and reboot your PC.
14. Repeat steps 7-9 and if all is well your done. If not you may need to redownload the AndroidSDK from here: http://developer.android.com/sdk/index.html then repeat this guide.

The reason for first trying to do this under "User" as opposed to "System" is if you need to track your changes to Path in case anything goes wrong as it can be a daunting task to go through the System version (its really full of stuff that needs to be there XD )
But don't take my word for it: My path
Code:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static
and my Windows is brand new Store-bought not OEM. It tends get get bigger the more stuff windows needs to globally keep track of that doesn't live in C:\Windows\

Hope this helped!
 

Grandkai

New member
Nov 30, 2014
1
0
whatever is in your path variable, leave that and just add this to the end:
;C:\Program Files (x86)\Android\android-sdk\platform-tools

I could really use some help I have a windows vista 32-bit
The first time I tried to set up adb I messed up bad and deleted my original environment variable path
so now I can't even do it because I need my original environment variable path then ;C:\Program Files (x86)\Android\android-sdk\platform-tools
I didn't create a system restore point so I am screwed is there anyway I can recover my original environment variable path?:eek:
 

h4z3d

Senior Member
Nov 23, 2014
62
23
30
Houston, TX
I could really use some help I have a windows vista 32-bit
The first time I tried to set up adb I messed up bad and deleted my original environment variable path
so now I can't even do it because I need my original environment variable path then ;C:\Program Files (x86)\Android\android-sdk\platform-tools
I didn't create a system restore point so I am screwed is there anyway I can recover my original environment variable path?:eek:

http://xdaforums.com/showthread.php?t=2317790

I would personally use this seeing it's one click go.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    HOW-TO Fix **ADB is not recognized in the CMD**

    Navigate to & Left_Click on Start >
    Right_Click on Computer >
    Left_Click on Advance System Settings >
    Left_Click on Environment Variables >
    Left_Click on New ( User Variables ) >

    Variables Name: ADB ( Or anything you want )
    Variables Value: ;C:\SDK\tools ( Just like this, This is the Path of my adb.exe )

    You must put a ; in front of ;C:\ ( adb Path goes here / Variables Value: )

    That's it.. You now have set up adb to work Global via cmd prompt on win7
    ~Eugene
    6
    I named it adb and then the blank spot for the value I just copied and pasted what u had and still nothing. I give up. I guess stuff isn't meant to be easy for me. Story of my life. Thank u so much for trying to help.

    I was referring to updating the system path. Where you created the variable, underneath that should be the "System variables" section. Scroll down in that the the variable "path" and double click it. Move the cursor to the end of the line entry and paste in the ;C:\...etc... line from above
    4
    Ok, so I ran the cmd prompt as admin and it still won't stick. So your saying I need to add ; before C: and at the end of it? Sorry. Not the greatest with pc's. Thanks for trying to help though.

    whatever is in your path variable, leave that and just add this to the end:
    ;C:\Program Files (x86)\Android\android-sdk\platform-tools
    3
    OK, so I don't know what I did wrong but I named the variable name to adb and then the variable value ;C:\Program Files (x86)\Android\android-sdk\platform-tools which is where my adb.exe is located. But if I open up a command prompt and do adb devices it says:

    C:\Users\Tiffany>adb devices
    'adb' is not recognized as an internal or external command,
    operable program or batch file.

    If I cd to that location adb works but I thought it would be cool to just open a command prompt and be able to use adb but it's not working for me. Any suggestions or do u see anything wrong?

    Tiffany, try this from a cmd prompt:
    path = %path%;C:\Program Files (x86)\Android\android-sdk\platform-tools

    then adb should work regardless of where you are in cmd
    2
    The right way to avoid weird issues.... [Noob Proof sorry in advance]

    It actually works perfect if you just do the following:
    1. Right Click My Computer -> Properties
    2. On the left pane, Find and Click "Advanced system settings"
    3. Under the "Advanced" Tab Find and Click "Environment Variables..."
    4. In the box for "User variables for [your name here; e.g. David]" there will be a button that says "New..." Click it.
    5. Now you have a box in front of you with two fields:
    1. Variable name: entering path here is really safer and can help to avoid clogging up the environment namespaces (cluttering your ram/registry)
    Code:
    Path
    2. Variable value: directory containing the adb.exe you want to use**; i.e.
    Code:
    C:\Android\sdk\platform-tools
    **to find this with ease search for "adb.exe" or look for it in "...sdk\platform-tools\" or "sdk\tools".
    **This is a version dependent thing for the Android SDK which folder its in.
    6. Click OK on all the dialogs and exit the windows we opened here.
    7. Hit the windows key + R and type cmd.exe; hit Enter
    8. Type adb into the newly opened cmd window. hit Enter
    9. If adb runs all is well. Your DONE. If not continue to step 10.
    --If it work stop here!--
    10. At this point we are going to select our entry from step 5. (in Environment variables...)and delete it. Otherwise windows has two pointers to our adb.exe.
    11. Navigate in the "System variables" box and scroll down until you see Path in the Variable Column. Select it and Click "Edit..."
    12. Click inside "Variable value:" go to the very end of this and drop a ";" no spaces. Enter the value from Step 5.2
    13. Click OK/Apply on all dialogs and reboot your PC.
    14. Repeat steps 7-9 and if all is well your done. If not you may need to redownload the AndroidSDK from here: http://developer.android.com/sdk/index.html then repeat this guide.

    The reason for first trying to do this under "User" as opposed to "System" is if you need to track your changes to Path in case anything goes wrong as it can be a daunting task to go through the System version (its really full of stuff that needs to be there XD )
    But don't take my word for it: My path
    Code:
    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static
    and my Windows is brand new Store-bought not OEM. It tends get get bigger the more stuff windows needs to globally keep track of that doesn't live in C:\Windows\

    Hope this helped!