FORUMS
Remove All Ads from XDA

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

5,827 posts
Thanks Meter: 7,490
 
By eugene373, Retired Recognized Developer on 10th July 2011, 02:23 AM
Post Reply Email Thread
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
The Following 12 Users Say Thank You to eugene373 For This Useful Post: [ View ] Gift eugene373 Ad-Free
 
 
10th July 2011, 02:36 AM |#2  
thesparky007's Avatar
Senior Member
Thanks Meter: 975
 
More
Quote:
Originally Posted by eugene373

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)
10th July 2011, 02:43 AM |#3  
eugene373's Avatar
OP Retired Recognized Developer
Thanks Meter: 7,490
 
Donate to Me
More
Quote:
Originally Posted by thesparky007

or you can just open up command prompt and cd^ (adb folder location)

or copy the exe and the needed dll's to system32

however when i type adb it better just work regardless of what folder I'm in...

If you are running .bat & a Noob it will never work.... Just follow the Directs posted in OP
10th July 2011, 07:16 AM |#4  
Senior Member
Flag Nashville
Thanks Meter: 264
 
More
Thanks OP for the tip.
This is the easiest way to start adb.
10th July 2011, 08:15 AM |#5  
Tiffany84's Avatar
Recognized Themer
Thanks Meter: 3,366
 
Donate to Me
More
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?
10th July 2011, 08:32 AM |#6  
RyteSyde's Avatar
Member
Thanks Meter: 45
 
More
Quote:
Originally Posted by Tiffany84

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
The Following 3 Users Say Thank You to RyteSyde For This Useful Post: [ View ] Gift RyteSyde Ad-Free
10th July 2011, 08:35 AM |#7  
Tiffany84's Avatar
Recognized Themer
Thanks Meter: 3,366
 
Donate to Me
More
Quote:
Originally Posted by RyteSyde

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?
10th July 2011, 09:15 AM |#8  
RyteSyde's Avatar
Member
Thanks Meter: 45
 
More
Quote:
Originally Posted by Tiffany84

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
The Following User Says Thank You to RyteSyde For This Useful Post: [ View ] Gift RyteSyde Ad-Free
10th July 2011, 09:20 AM |#9  
Tiffany84's Avatar
Recognized Themer
Thanks Meter: 3,366
 
Donate to Me
More
Quote:
Originally Posted by RyteSyde

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.
10th July 2011, 09:25 AM |#10  
RyteSyde's Avatar
Member
Thanks Meter: 45
 
More
Quote:
Originally Posted by Tiffany84

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
The Following 4 Users Say Thank You to RyteSyde For This Useful Post: [ View ] Gift RyteSyde Ad-Free
10th July 2011, 09:32 AM |#11  
Tiffany84's Avatar
Recognized Themer
Thanks Meter: 3,366
 
Donate to Me
More
Quote:
Originally Posted by RyteSyde

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.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes