Friday, 27 May 2011

Failed to get the adb version: Cannot run program "/home/ajay/devtools/android/android-sdk-linux_x86/tools/adb": error=2, No such file or directory solved

Please follow these steps to setup your Eclipse and Android for both 32 and 64 bit systems(both for Windows 7 and Ubuntu 11.04 natty and less than that)

Step 1: Find in search area in Ubuntu Software Center as follows.
            sun-java6-jdk, sun-java6-jre, sun-java6-bin, sun-java6-source
If all these not found then please issue these following commands accordingly,

sudo add-apt-repository "deb 
lucid partner"

sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin
sudo apt-get install sun-java6-bin 
sudo apt-get install sun-java6-jdk
Note: when package is downloaded completely it asks for the agreement to accept. 
please use "left-right" enter button to select those options( for beginners only)
sudo apt-get install ia32-libs(Must get installed for amd64 and other 64 bit systems)
After all installation please configure your default java as follows for
 " /usr/lib/jvm/java-6-sun/jre/bin/java " by issuing the following command 
and select as given above by giving a number when it ask.
(this is only required for those who have already installed open-jdk

 sudo update-alternatives --config java 

 For 32-bit systems please download Eclipse-32 bit
Eclipse IDE for Java EE Developers, 205 MB      
(Select 32-bit download there)

Unzip it and change the properties-permissions of "eclipse" to read-write(all)
and tick on executable.
Double-click on it and start configuring your android
"If not configured properly please find it in my configure-android-eclipse
properly post".

For those who are getting error: adb not found or no directory or executables
found error.

Copy ../android/platform-tools/adb to your /tools/ folder

Then restart your eclipse and again try to re-create your adb.

Can not Create SD Card Error
Check whether you kept your android sdk in "/home/user_name/" or not.
 please keep it there otherwise. 
If your Error Code 13 is showing then You might be using a
 64-bit system and trying to use Eclipse of 32-bit. Because of which it is giving error code 13
 Failed to get the adb version: Cannot run program "
/home/ajay/Android/Android SDK/ android-sdk-linux_x86/
platform-tools/adb" error=13, Permission denied
 For 64-bit systems please download Eclipse 64 versions 
  and configure it as earlier with android.. 
           Let me know if not working ..(Tested in 3.5.2 and Ubuntu 11.04)
Ajay Kumar Meher
  (Freshers Lab) 


  1. is there any other method to get rid of this error

    Am using Internet via Mobile so it's hard to download sun-java6-jdk,

    am currently using
    Ubuntu 11.04 (32 bit)
    Eclipse 3.5.2 (32 bit)
    ADT - 14

  2. Hi VenomVendor,

    Well working with Ubuntu or any Linux OS, the packages are designed in such a way that almost none is available without a dependency. So better I suggest you to find some cafe where you can get wifi or a proper LAN connection for updating the system. Incase trying to download from other sources you can use
    (ex: sun-java6-jre)

    to download the whole package with dependencies.
    Try to download others. But I can't guarantee cent percent that this will work. If works please comment on this so others must get benefited.

    Thanks & Regards,

    Ajay Kumar Meher

  3. not working..It still shows the same error.

  4. hi Bharat,

    Can you share the error log please...

  5. Hey, thanks a lot, work fine on Linux Mint 12!

  6. Not working for me too. When eclipse is started it shows "Failed to get the adb version: Cannot run program "android-sdk-linux_x86/platform-tools/adb", Permission denied"

  7. Hi dipu,
    as earlier discussed please check your system type(32 bit/64 bit). In many cases if its 64 and you are trying to run 32 bit eclipse will result this error code: 13 normally. Better download 64 bit eclipse from given link above.Another basic problem with file mode. please change file mode to executable. then try...

    Please do not forget to reply if it works...

  8. This comment has been removed by the author.

  9. HI
    i also got same problem like that
    please u help me to disolve that ??

    i am currently using
    Ubuntu 11.10 (64 bit)
    Eclipse 3.7.0 (64 bit)
    ADT - 14

  10. hello

    I have a same problem. Solution still doesn't working for me.
    I'am using
    ubuntu 11.10
    eclipse 3.7.0
    all 64 bit

  11. on ubuntu please use eclipse 3.6 Later updates I did not tested... may be Ganymede, Galileo or Helios...

    Check your Systems as 64 or 32 bit... then install as per your systems...

  12. Please add your errors or error code too... while posting comments.. will help me to answer (If really I know..)

    Happy commenting...

  13. Hi LoKienYUen,

    As one of my post I added the solution.. I think you have missed it. Anyways, I am writing the solution below,

    Change your eclipse IDE to 64 version(Download it from the link I posted earlier..). as your os is of 64 bit. Then try it...

    Please reply.. If it worked.. So other can get the benefit..

  14. This comment has been removed by the author.

  15. Ajay ,

    I use 32-bit ubuntu and eclipse. The problem stil exists

  16. I am also using Eclipse on Ubuntu with ADT plugin. I fixed my error that I would keyword describe as: "cannot run program" adb "no such file or directory"

    There was advice on Internet about installing getlibs. I did that, though I had to ignore a dangerous sounding warning about the tool being of poor quality.

    I may have done things in an needlessly roundabout way.

    1) Through Eclipse, installed new software:
    Selected Linux Tools
    Restarted Eclipse
    2) Installed getlibs. Internet postings said Eclipse Android plugin was trying to use 32 bit libs which were missing. (Question: How can I tell how many bits my Eclipse is and how many bits my Ubuntu is. Do I have to decipher it from version numbers or is there an explicit way to see the bits?
    3) Tried to use apt-get, but somehow my /etc/apt/sources.list had extra lines at the end
    4) vi'd /etc/apt/sources.list so it contained only three lines:
    deb oneiric main restricted universe multiverse
    deb oneiric-security main restricted universe multiverse
    deb oneiric-updates main restricted universe multiverse
    5) That fixed apt-get. Then I did this (from another site):
    sudo apt-get clean
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get dist-upgrade

    That last one took FOREVER
    6) Then I
    getlibs adb

    My guess is that I could have skipped a lot of this. But it worked.


  17. Hi Eric,
    Thanks for sharing a nice solution. Hope my readers will get there problem solved... here itself..


  18. hey eric4brs, thank you so much!!
    your sugestion worked for me.

    for the new developers, this page will help to install the "getlibs" (I had to learn):

  19. Hi,
    i am using linux 18.04 and eclipse 4.19 version, when i am trying to run framewrok i am facing below errors , please can you provide solution for this. Cannot run program "adb": error=2, No such file or directory
    at java.base/java.lang.ProcessBuilder.start(
    at java.base/java.lang.ProcessBuilder.start(
    at java.base/java.lang.Runtime.exec(
    at java.base/java.lang.Runtime.exec(
    at java.base/java.lang.Runtime.exec(