Depending on what windows version you are, for windows 7 you have to right click on an open spot on the desktop
and go to properties>advanced> Environment Variables, but for windows 8 you have go into control panel>system>Advanced setting > Environment Variables= Add new,
then the name should be ADB, and the path should be(go into the folder C:\Android\android-sdk\platform-tools,
click in the address bar of the folder and right-click to copy the address and paste that) and press ok ok ok.
Now open cmd(command prompt) and it should say C:\USER\(NAME OF YOUR COMPUTER) then after that you type: cd C:\Android\android-sdk\platform-tools (or whatever the file path is that you copied earlier, but "cd" before it tells your computer that is reading that file path as a virtual CD) now press enter. now type: "adb.exe" minus the quotation marks, this will start ADB. Now you can type whatever anyone has told you to type. Good Luck.
Please correct me if I am wrong and message me for clarification.
CD does not mean read as CD. It literally translates to Change Directory
Also if you add to path there is no reason to CD to the directory. That's the whole point of adding to path variables.
Sent from my Galaxy Nexus
Related
These are the instructions I followed:
- Download the Android SDK for Macintosh at: http://developer.android.com/sdk/
- Extract it
- Download Fastboot for OSX (If not included with SDK)
- Extract fastboot and place it in your /tools folder.
- Open up a terminal window
- type: pico .bash_profile (this will create a .bash_profile)
- type the following in the new screen: export PATH=${PATH}:<sdkfolder>/tools
- Hit CNTRL + X
- Hit Y (for yes to save)
- It will return you to the terminal screen… type: exit
- Restart terminal.
but when i type adb in terminal i get this:
-bash: adb: command not found
what am i doing wrong?
I would suggest doing these steps again
Open up a terminal window
- type: pico .bash_profile (this will create a .bash_profile)
- type the following in the new screen: export PATH=${PATH}:<sdkfolder>/tools
- Hit CNTRL + X
- Hit Y (for yes to save)
- It will return you to the terminal screen… type: exit
- Restart terminal.
basically its not recognizing the adb command because its not properly installed (at least thats what i think, i havent used it in a while)
type the following in the new screen: export PATH=${PATH}:<sdkfolder>/tools
Click to expand...
Click to collapse
Did you actually type that exactly as shown, or did you replace <sdkfolder> with, well, the SDK folder like you were supposed to? Because if not that'll be why it isn't working.
Now in the step where it says <sdkfolder> do I just put the name of the folder that I extracted from my zip file sorry for the stupid question I'm usually on top of things but today isn't my day lol thanks
Yes loccy i did put macosx86 something in that part but in the step after i click CNTRL + X and click Y it still wont return to the original terminal screen instead it says file to be created: .bashprofile im not on my computer right now but thats what it said so i click enter and it returns me to my original terminal screen.
Oh wait do i have to put <macosx86 something something> like this or like this: macosx86 something something by itself with out the little arrows?
lmao dude point it towards the path
for example, in windows if
c:\\androidsdk\tools
was where the tools folder of the sdk was located, then the command would be
export PATH=${PATH}:c:\\androidsdk\tools
Click to expand...
Click to collapse
modify it so the path is what it is on your mac
I followed all of these instructions. Link: Here
But when I try to navigate to AndroidSDK folder in my home directory I can't get adb shell to start.
Code:
cd ~/AndroidSDK/tools
adb shell
After that the terminal says command not found and stuff.....anyone know how to set up adb shell on linux? (I'm running linux mint 10 specifically but I am a experienced linux user, i've used ubuntu and linux mint 10, so if you give me ubuntu commands for fixing this i can convert them into linux mint commands if need be).
Thanks for helping me get this set up on linux. I've mainly been a windows user and as easy as it would be for me to dual boot into windows instead i'm trying to make linux my main operating system slowly b/c i'm liking this operating system more than windows 7. so before i do that I want to make sure i know how to complete all the task i would want to do on windows 7 on linux instead, starting with adb shell
Those instructions are for an earlier version of android SDK. I am sure you downloaded and installed the latest from google's official website. If so, the adb command has moved to a different folder - platform-tools.
Do a search in the android sdk folder for "adb.exe", you should be able to find it and then use that folder as your base adb folder. Alternatively, you can setup the folder to be part of the path, that way you can execute adb from anywhere. If you need help, let me know.
andythegreenguy said:
Those instructions are for an earlier version of android SDK. I am sure you downloaded and installed the latest from google's official website. If so, the adb command has moved to a different folder - platform-tools.
Do a search in the android sdk folder for "adb.exe", you should be able to find it and then use that folder as your base adb folder. Alternatively, you can setup the folder to be part of the path, that way you can execute adb from anywhere. If you need help, let me know.
Click to expand...
Click to collapse
Can you give me full instructions on how to set up adb using the latest android sdk from google? Thanks
Sent from my DROIDX using XDA App
kifno said:
Can you give me full instructions on how to set up adb using the latest android sdk from google? Thanks
Sent from my DROIDX using XDA App
Click to expand...
Click to collapse
What I found when setting up mine on linux was to start adb, navigate to the tools directory where you have it setup, and use the command "./adb shell" minus the quotes. This seems to work fine, I don't know why. I beat my head against the wall, and don't remember how I found out about this. It's safe to say, the ./adb should need to be used with all the adb commands.
Kifno check the dev section for my thread on how to install adb on Ubuntu should help you out. It might be buried but I posted a full guide.
Edit---- If you look on my thread on how to indtall adb in windows. On the bottom of the post its a link to my other thread..
Yea it's me Again. With the
Modified .HERO.
Step-by-step guide to setting up android sdk on linux:
1. On your linux box, go to http://developer.android.com/sdk/index.html and download the package for linux
2. Create a "androidsdk" folder in your home folder
3. Unzip the contents of the "android-sdk-linux_x86" from inside the tgz file - into the above folder. You should have "add-ons", "platforms", "tools" and "SDK-readme.txt" in the above folder
4. Open a terminal window and navigate to androidsdk -> tools directory
5. Execute command "android" without quotes - this should open a UI
6. Go to available packages and install all packages you need
7. Once it has installed everything, exit the application
8. Navigate to your androidsdk/platform-tools directory - you should have adb there.
Now you can run adb from here or setup your computer to run from anywhere - following steps are to setup so that you can run adb from anywhere...
1. Append the following code in your .profile file - replacing "full path to your platform-tools directory" with the actual path with quotes:
if [ -d "full path to your platform-tools directory" ] ; then
PATH="full path to your platform-tools directory:$PATH"
fi
2. Save your .profile
3. Logout and log back in.
Now you should be able to execute adb from anywhere on the linux box, when you login using your credentials.
andythegreenguy said:
Now you can run adb from here or setup your computer to run from anywhere - following steps are to setup so that you can run adb from anywhere...
1. Append the following code in your .profile file - replacing "full path to your platform-tools directory" with the actual path with quotes:
if [ -d "full path to your platform-tools directory" ] ; then
PATH="full path to your platform-tools directory:$PATH"
fi
2. Save your .profile
3. Logout and log back in.
Now you should be able to execute adb from anywhere on the linux box, when you login using your credentials.
Click to expand...
Click to collapse
the bold is where i'm having trouble....where is the .profile file located?
also would this be the correct full path leading to platform tools? (so i can know when i get ready to do the .profile file thingy once you explain that)
~/AndroidSDK/platform-tools
btw thanks for the help (clicking thanks button.....lol)
edit: i also just got this problem
Code:
kevin-Satellite-L305 platform-tools # ./adb shell
error: insufficient permissions for device
it won't let me launch adb shell even after i typed su and put in my password
.profile is in your home directory. You can get to your home directory from anywhere in linux by typing "cd $HOME" at the shell prompt without quotes and as is here. If you know of DOS, you can relate to a .profile file as an autoexec.bat, that executes everytime a user logs in.
You need the absolute path to the platform-tools folder - which you can get by being in that folder and typing "pwd" without quotes.
The last error, it has something to do with your computer OS not recognizing your device.
1. Go to /etc/udev/rules.d
2. Look for a file 99-android.rules - if one does not exist, create one
3. Append the following line to the file: SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", OWNER="linux user name" GROUP="linux user group", replacing linux user name and linux user group with the actual values.
4. Save the file and restart your computer
This should do it.
ok i'm writing a batch file that i've saved to my usb...the intent is so that when it is run it automatically copies a simple batch file with just "cmd" to the desktop then runs it....essentially a directory change without using cd
for some unknown reason i can't do a simple cd c:\this\directory\desktop from a command prompt thats run from the flash drive. also when its originally open, it is opened with G:\my_usb\commands, from this command prompt if i start, or call the .bat on the desktop it still runs from the USB location rather than the desktop location....if i open it via mouse clicking it opens from the desktop directory
so what does my batch file need to look like in order to run a file on the usb but change the directory to the desktop?
the files look like this:
copy cmdd.bat c:\users\tiwey\desktop
start C:\users\tiwey\desktop\cmdd.bat
and:
cmd
very simple files but i've tried varitions such as
copy cmdd.bat c:\users\tiwey\desktop
cd c:\users\tiwey\desktop
start C:\users\tiwey\desktop\cmdd.bat
no luck or:
copy cmdd.bat c:\users\tiwey\desktop
cd c:\users\tiwey\desktop
call C:\users\tiwey\desktop\cmdd.bat
but alas nothing works...any help?
forget all that....i can' believed i typed all that out just to realize i never tried cd /d c:\
OK, for those of you who prefer the simple shell/DOS interface for adb but HATE typing all the startup commands such as devices, shell, remounting the system folder rw then back to ro...this is for you.
I included an automated selection for the local.prop modification to keep adb shell root for Moto devices that haven't patched the exploit.
For a DOS prompt within the Utility, select DOS prompt, do your push/pull etc, then type 'exit' without the ' ' and it will bounce right back to the menu. select shell and you're back in shell. Select mount system rw, shell ro; and it will start adb shell, mount system rw...do your thing, then type 'exit' to exit the shell and the Utility will then remount the system as ro again.
Is it super fancy?? NO. Will it work on all phones all the time, more than likely; it's not that fancy. BUT, if you're like me and just want to get to business in adb; then this should make life EZ...
DIRECTIONS FOR USE:
Download file, and SAVE the zip file to the folder where you keep your ADB tools....depending on your particular installation, that can be in tools, or platform-tools. Unzip the file in that folder. Once you have the file unzipped there, right-click and send to desktop (create shortcut to the application on your desktop).
Now you have a shortcut on your desktop for the utility. Double-click the shortcut, and it will open a DOS window with a simple numbered menu for using basic ADB commands and frequent items.
Once in the window, choose option 5 or close the window to exit.
If you don't get the size/type font you want, right click the DOS window and select properties, then choose the font you want. Save for all future windows with the same name. It will ask you if you want to save the information to your shortcut, click YES and it will now open with your preferred font every time.
ENJOY.
Let me know what you think, but it works for me. Figured I'd share.
trying to start learning to dev, however I need help setting up usb access for the Bionic. Anyone care to help a newb?
ROB281 said:
trying to start learning to dev, however I need help setting up usb access for the Bionic. Anyone care to help a newb?
Click to expand...
Click to collapse
these should help you out
http://forum.xda-developers.com/showthread.php?p=19446284#post19446284
how-to-get-adb-to-work-on-ubuntu
1. Make sure you have the Android SDK for Linux installed with the package for Platform Tools. Take your SDK folder and move it to your home folder, so that for example to navigate to my SDK folder I type: cd /home/miles/android-sdk-linux/
2. Edit your environment path variable. Everyone uses a more complicated way but I change my Linux distribution quite regularly, almost all based off of Ubuntu, and this is a very easy way that I figured out how to do it. Open up a Terminal and type:
sudo gedit /etc/environment
you will be prompted for your password, then a document will open. you can at the end of the text, inside the last quotation mark, type :/home/username/android-sdk-linux/platform-tools:/home/username/android-sdk-linux/tools mine looks like this::
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/brandon/android-sdk-linux/platform-tools:/home/brandon/android-sdk-linux/tools" then save it and exit the word processor
3. Now you have to set up your computer so that it recognizes the Android device through ADB. To do this, type this exactly: sudo gedit /etc/udev/rules.d/51-android.rules
A blank file should open up for you. Assuming you are using a Bionic, copy and paste this, SUBSYSTEM=="usb", ATTR{idVendor}=="22B8", MODE="0666", GROUP="plugdev"
if you are using or will be using any other device go to the link below this text for developer.android.com and scroll down to the manufacturer of your device and take the 4 characters and put them where 22B8 is above. I have various devices and my girl has a droid and my dad so I go ahead and set it up to work with all. All you have to do to set up the file for multiple devices is copy and paste the text above on separate lines for each manufacturer you will be developing for, and replace the value following {idVendor} with the respective value for that Manufacturer. For example HTC would be "0BB4". After you have this file setup, you don't need to type anything else, just save it and exit. Then in the terminal type: sudo restart udev
Link for ADB vendor ID's
http://developer.android.com/guide/developing/device.html
4. Make sure your android device has Debugging enabled. To do this go to Settings > Applications > Development and make sure the box for debugging is checked. After this, plug your phone up to the computer and type: adb devices
If you get an error with the command, just restart your computer and it should then work, that just means that your path environment hadn't taken its new effect. and if it still doesn't recognize adb as a command from the terminal, open up that /etc/environment file and make sure the pathname to your android-sdk platform tools is entered correctly.
This is what I do every time I have to set my computer up for development on my device. Also you should check out the Android Source pages at http://source.android.com/