Ubuntu 64 with Android 64 Bundle cannot find adb executable

I'm using Ubuntu 12.04 LTS version. I've tried the steps suggested by 'amo-ej1', but my 'dpkg' didn't have 'add' or 'architecture' options.

However, the following worked for me:

1) Install 'adb' and 'fastboot' provided by the following third-party PPA.

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install android-tools-adb android-tools-fastboot

2) Replace the copy of 'adb' and 'fastboot' provided by the official Android SDK with those installed from the above step:

cp /usr/bin/adb <path-to-your-adt-sdk-package>/sdk/platform-tools/adb
cp /usr/bin/fastboot <path-to-your-adt-sdk-package>/sdk/platform-tools/fastboot

3) Restart(re-execute) your eclipse binary.

Full credits: http://www.webupd8.org/2012/08/install-adb-and-fastboot-android-tools.html

IMPORTANT EDIT (ALTERNATE SOLUTION):

Although the above would resolve your error (and you can proceed with the Android App tutorial), as I found, ADT will also need 'aapt' (another 32-bit binary) located in:

 <path-to-your-adt-sdk-package>/sdk/build-tools/android-x.x/

And unfortunately, the link that I provided above doesn't provide this binary.

So, here's my other solution:

1) Update your system

Open 'Update Manager' => 'Settings' => 'Updates
Check "Recommended Updates (precise updates)"
Update the updates that are being shown

2) Install ia32-libs

sudo apt-get install ia32-libs

And I finally was able to install 'ia32-libs'. To know why 'ia32-libs' wouldn't install in the first place, please read the answer posted by 'slangasek' here: https://askubuntu.com/questions/136394/cannot-install-ia32-libs


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)

On Ubuntu 12.10 x86_64 the package to run 32bits are ia32-libs and ia32-libs-multiarch.

If you type

file adb

You'll see that adb is a 32 bit file on a 64 bit system. You need the ia32 packages to emulate and run this file. But you can't!

The problem right now is you cannot download these packages, they're trying to convert it to something I guess x86_64. Here you can read about convert in the package NEWS:

summary of the conversion:

"ia32-libs (20090808ubuntu27) precise; urgency=low

  • ia32-libs is now a transitional package depending on ia32-libs-multiarch, the i386-only package which depends on all the 32-bit library packages previously included in ia32-libs itself. As a result, ia32-libs will be uninstallable for some time during the precise cycle, while the dependent libraries are updated to be coinstallable using multiarch. Developers are encouraged to help with the conversion process for these libraries, described at:

    http://wiki.debian.org/Multiarch/Implementation

    -- Steve Langasek "

So if you try to edit your source.list file to grab it from older repo you'll break packages. So ubuntu 12.10 people have to wait or adb is compile or whatever to 64 bit.

edit:

Debian 7.0 will support multiarch where x64 version can run x32 binary. source: http://www.debian.org/News/2013/20130504

Tags:

Ubuntu

Android