Ubuntu 64 with Android 64 Bundle cannot find adb executable
Asked Answered
C

5

13

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!

Canvass answered 20/2, 2013 at 5:4 Comment(1)
Also see 64-bit version of adb and fastboot? It appears the Debian maintainers added native support for the x86_64 platform recently. That is, you no longer need ia32-libs-multiarch and its 700 MB of dependencies.Mariande
M
19

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)
Moulmein answered 7/9, 2013 at 15:25 Comment(1)
And: apt-get install ia32-libs android-tools-adb android-tools-fastboot android-tools-fsutils :) Very nice introduction bernaerts.dyndns.org/linux/75-debian/… . Andorid tools is exist in wheezy-backports version 4.2.2Zebec
T
9

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

Transfinite answered 30/9, 2013 at 19:21 Comment(2)
Installing all 32 bit libs is bit of a carpet bomb approach, but at least it works.Achernar
Using adb and fastboot from 3rd party PPA works on Kubuntu 14.04 LTS 32bit version.Nitrobenzene
C
5

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

Canvass answered 20/2, 2013 at 16:39 Comment(2)
the 32 bit stuff x86-32 is not emulation.Viral
x64 is a bad/confusing name for x86-64 used only by microsoft (as far as I know)Viral
P
0

I use debian_x64

add i386 lib

dpkg --add-architecture i386 sudo apt-get update sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

ldd /home/yourname/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb

when you found “android-sdks/build-tools/17.0.0/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory”

you can try sudo apt-get install ia32-libs sudou apt-get install zlib.i686

restart your computer and try again

Precondition answered 17/12, 2013 at 1:26 Comment(0)
M
-1

unzip that file with this:

sudo tar xvfz adt-bundle-linux-x86.zip -C /opt/android

than run that code:

sudo chown -R your_user_name /opt/android

i think it will work

Measureless answered 20/2, 2013 at 6:26 Comment(9)
The first command doesn't work: <code>$ sudo tar xvfz adt-bundle-linux-x86_64.zip -C /opt/android gzip: stdin has more than one entry--rest ignored tar: Child returned status 2 tar: Error is not recoverable: exiting now</code> I'm trying the unzip command instead?Canvass
try this: sudo mkdir /opt/android sudo chown -R your_user_name /opt/android then unzip it with normal way an copy to /opt/androidMeasureless
It seems like I can't execute any 32 bit files and I need the ia32 package but ubuntu doesn't have it. I follow your way and it can't execute adb.Canvass
try this to install ia32: sudo apt-get install ia32-libs-multiarchMeasureless
i've tried it. I also tried sudo dpkg --add-architecture i386 and then sudo apt-get update and then sudo apt-get install ia320libs-multiarchCanvass
Sorry, i miss sth. while i am copying and pasting this code, i write x86 you can use x86_64 toMeasureless
I didn't understand your last comment. I think my ubuntu kde 12.10 x86_64 installation is wrong somehow =/ I guess I have to reinstall my ubuntu. Thank you for your help.Canvass
no you don't need. I 'm now at my office and use a windows computer. So i have to do something by copying from somewhere and past to here. So delete every thing inside this the folder /opt/android and unzip adt-bundle-linux-x86_64.zip in itMeasureless
I deleted everything in /opt/android and uzip the zip to the /opt/android directory. I believe the problem is that my 64bit OS cannot runt 32bit program and I need the ia32 package for it.Canvass

© 2022 - 2024 — McMap. All rights reserved.