Monday, February 20, 2012

Errors trying to run ADB command not found (Android Debug Bridge)?


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:


shailesh@shailesh-desktop:~$ adb kill-server
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 'zdb' from package 'zfs-fuse' (universe)
 Command 'mdb' from package 'mono-debugger' (universe)
 Command 'tdb' from package 'tads2-dev' (multiverse)
 Command 'pdb' from package 'python' (main)
 Command 'jdb' from package 'openjdk-6-jdk' (main)
 Command 'ab' from package 'apache2-utils' (main)
adb: command not found


shailesh@shailesh-desktop:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games


shailesh@shailesh-desktop:~$ export PATH=$PATH:/home/shailesh/android-sdk-linux/platform-tools


shailesh@shailesh-desktop:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/shailesh/android-sdk-linux/platform-tools


shailesh@shailesh-desktop:~$ adb devices
List of devices attached 
emulator-5554 device

Sweet Success!

p.s. Adding to the system path in Windows is along the lines of :
  1. right-click '(My) Computer'
  2. Select 'Properties'
  3. Go to 'Advanced' or whatever tab you find 'Environment Variables'
  4. 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

1 comment: