Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu 64 with Android 64 Bundle cannot find adb executable

Tags:

android

ubuntu

I'm experiencing the following problem when trying to run adb on Ubuntu 12.10, x86_64:

[2013-02-19 20:56:04 - adb] Unexpected exception 'Cannot run program 
"/home/user/adt-bundle-linux-x86_64/sdk/platform-tools/adb": error=2, 
No such file or directory' while attempting to get adb version from 
'/home/user/adt-bundle-linux-x86_64/sdk/platform-tools/adb'

I located adb, tried chmod +x adb and it just doesn't work. I also tried chmod +x platform-tools/ and chmod +x tools/. After that I tried ./adb

I've Googgled for the problem. They were talking about ia32 package. Ubuntu can't locate that package nor the ia32 multi arch whatever.

System is Ubuntu 12.10 64 and I downloaded adt-bundle-linux-x86_64.zip package and just unzip it.

What am I doing wrong ? Thank you!

like image 900
mythicalprogrammer Avatar asked Feb 20 '13 05:02

mythicalprogrammer


1 Answers

On Debian 7 I bumped in the same issue.

Diagnosis:

edb@lapelidb:~/today$ ldd /opt/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb
    not a dynamic executable
edb@lapelidb:~/today$ file  /opt/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb
/opt/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped

Solution: Adding support for 32-bit support and the required 32-bit libraries:

edb@lapelidb:~/today$ sudo dpkg --add-architecture i386
edb@lapelidb:~/today$ sudo apt-get update 
edb@lapelidb:~/today$ sudo apt-get install libc6:i386 libstdc++6:i386

Et voila:

edb@lapelidb:~/today$ ldd /opt/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb
    linux-gate.so.1 =>  (0xf772a000)
    librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xf770a000)
    libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xf7706000)
    libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xf76ec000)
    libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf7600000)
    libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xf75da000)
    libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf75bd000)
    libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xf745a000)
    /lib/ld-linux.so.2 (0xf772b000)
like image 122
amo-ej1 Avatar answered Sep 25 '22 00:09

amo-ej1