The Android Debug Bridge (adb) is a tool lets you manage the state of an emulator instance or Android-powered device.
I was trying to run it for the first time on my ubuntu 9.10 box and I kept getting this error:
desktop:~/dev/Android/android-sdk-linux/tools$ adb
No command 'adb' found, did you mean:
Command 'cdb' from package 'tinycdb' (main)
Command 'gdb' from package 'gdb' (main)
Command 'aub' from package 'aub' (universe)
Command 'dab' from package 'bsdgames' (universe)
Command 'mdb' from package 'mono-debugger' (universe)
Command 'arb' from package 'arb' (multiverse)
Command 'tdb' from package 'tads2-dev' (multiverse)
Command 'pdb' from package 'python' (main)
Command 'jdb' from package 'openjdk-6-jdk' (main)
Command 'jdb' from package 'sun-java6-jdk' (multiverse)
Command 'ab' from package 'apache2-utils' (main)
adb: command not found
What was I doing wrong?
A quick google search shows me the error of my ways.. I haven't added my Android SDK tools directory to my system path!
It should go something like this...
open a terminal window and type:
$ echo $PATH
---(should return the directories associated with $PATH)
$ export PATH=$PATH:/home/YOUR-USERNAME/sdk/tools
---(replace with path to your tools directory, you may need to add 'sudo' to the beginning of this cmd)
Update: later versions of the SDK have ADB moved to the platform-tools directory, so adjust the above accordingly.
$ echo $PATH
---(you should now see your tools directory added to the end of the $PATH variable)
$ adb devices
---(now adb should do something, if nothing else at least error, no devices)
And now I get:
List of devices attached
emulator-5554 device
Sweet Success!
p.s. Adding to the system path in Windows is along the lines of :
- right-click '(My) Computer'
- Select 'Properties'
- Go to 'Advanced' or whatever tab you find 'Environment Variables'
- Select 'Path' then 'Edit' and add your new path in.
Update: if you are using 64-bit linux you may need to also install the ia32-libs package like so:
sudo apt-get install ia32-libs
When I do "export PATH=$PATH:/home/myusername/sdk/tools" it says
ReplyDelete"Export not found"
help please
Hi Speedy,
ReplyDelete.. Are you sure that you've got the correct path listed to your tools directory?
I've just re-run mine to check and this is what I need to run for my current sdk location:
"export PATH=$PATH:/home/glenn/Dev/android-sdk-linux_x86/tools"
..That works for me.
I think you might have your path incorrect.
Actually, I got the same error when I included a 'sudo' at the front, so if you're doing that, try it without it.
If you're using Eclipse, the easiest way to find the path is go into Window\Preferences\Android and copy that and add a 'tools' on the end.
Hope that helps,
Glenn
OK but now I get "* daemon not running. starting it now on port 5037 *
ReplyDelete* daemon started successfully *
List of devices attached
???????????? no permissions"
Ok I think I got it now.
ReplyDeleteit says
"* daemon not running. starting it now on port 5037 *
* daemon started successfully *"
Awesome.
ReplyDeleteHope it all works, let me know if there's anything else I can help with.
it keeps saying "not recognized as internal or external command......"
ReplyDeleteDepending on what version of the SDK you downloaded you may need to add the sdk/platform-tools to your system path.
ReplyDeleteI still get your original error.
ReplyDeleteEven if I move into the directory or click on the adb icon in Nautilus it won't seem to do anything.
Hi all
ReplyDeleteI want to install flash apk file on android emulator. But when run command ./adb install flash_for_21.apk on linux terminal then error occur.
Error:
daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: device not found
please suggest what i do?
thanks
awinash kumar
Hi all
ReplyDeletei am install successfully flash apk file on android emulator. Problem is does not open live video.
What problem not understand.
thanks
awinash
Thank You...
ReplyDeleteIts working.
thanks a lot. Great help
ReplyDeleteThanks for annnouncement. I can resolve on Ubuntu11.04.
ReplyDeleteThanks for this post. I have solved my problem with this help..
ReplyDeleteI am trying to put this webtop mod on my phone and when I enter the first line: adb push domain_policy.conf /tmp/ I get is device not found error and so far I am not getting any feedback in the forum where the webtop mod is located... Anyone know whats up with this and why its saying this?
ReplyDeleteThanx it worked...
ReplyDeleteHello,
ReplyDeleteI followed your steps, though it still reads the same initial errors, i.e.,
No command 'adb' found, did you mean:
Command 'cdb' from package 'tinycdb' (main)
Command 'gdb' from package 'gdb' (main)
Command 'dab' from package 'bsdgames' (universe)
Command 'zdb' from package 'zfs-fuse' (universe)
Command 'kdb' from package 'elektra-bin' (universe)
Command 'tdb' from package 'tads2-dev' (multiverse)
Command 'pdb' from package 'python' (main)
Command 'jdb' from package 'openjdk-6-jdk' (main)
Command 'jdb' from package 'openjdk-7-jdk' (universe)
Command 'ab' from package 'apache2-utils' (main)
Command 'ad' from package 'netatalk' (universe)
adb: command not found
Any comments as to how am I supposed to proceed?
Thanks,
Sachin.
Hi Sachin,
DeleteIf you type 'echo $PATH' in a terminal do you see your android 'platform-tools' directory?
Cheers,
Glenn