Friday, 27 May 2011

Failed to get the adb version: Cannot run program "/home/ajay/devtools/android/android-sdk-linux_x86/tools/adb": java.io.IOException: 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 http://archive.canonical.com/ 
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 
 
 http://www.eclipse.org/downloads/
  
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":java.io.IOException: error=13, Permission denied
 
 For 64-bit systems please download Eclipse 64 versions 
  and configure it as earlier with android.. 
 
 Please,
           Let me know if not working ..(Tested in 3.5.2 and Ubuntu 11.04)
 
Ajay Kumar Meher
  (Freshers Lab) 


19 comments:

  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,
    sun-java6-jre,
    sun-java6-bin,
    sun-java6-source

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

    ReplyDelete
  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)
    http://packages.ubuntu.com/hardy/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

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

    ReplyDelete
  4. hi Bharat,

    Can you share the error log please...

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

    ReplyDelete
  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":java.io.IOException:error=13, Permission denied"

    ReplyDelete
  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...

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  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...

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

    Happy commenting...

    ReplyDelete
  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..

    ReplyDelete
  14. This comment has been removed by the author.

    ReplyDelete
  15. Ajay ,

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

    http://stackoverflow.com/questions/8343729/failed-to-get-adb-version-error-13-in-ubuntu-11-10

    ReplyDelete
  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: http://download.eclipse.org/releases/indigo
    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 http://archive.ubuntu.com/ubuntu/ oneiric main restricted universe multiverse
    deb http://security.ubuntu.com/ubuntu/ oneiric-security main restricted universe multiverse
    deb http://archive.ubuntu.com/ubuntu/ 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.

    -Eric

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

    -Ajay

    ReplyDelete
  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):
    http://ubuntuforums.org/showthread.php?t=474790

    ReplyDelete