64-bit version of adb and fastboot? - android

I'm catching the error below on Debian 7.3, x64 (fully patched).
I'm pretty certain its because adb is 32-bit even in the 64-bit distro of its SDK tools
$ which adb
/opt/android-sdk/platform-tools/adb
$ /opt/android-sdk/platform-tools/adb
bash: /opt/android-sdk/platform-tools/adb: No such file or directory
$ file /opt/android-sdk/platform-tools/adb
/opt/android-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
I don't want to install hundreds of megabytes of 32-bit binaries just to support adb and fastboot. (See, for example, Ubuntu 64 with Android 64 Bundle cannot find adb executable).
I know there's an outstanding feature request from 2012 at Please port SDK tools to 64-bit on Linux (adb, aapt, etc), but no action has been taken (even no acknowledgement).
Does anyone know if Google makes a 64-bit version of adb? If not, does Google have any plans on providing them?

Good news. it is now officialy maintained by the fine folks at Debian.
just install android-tools-adb (you also have fastboot and a few others) from the main debian repo (no need to add repo as this is there by default)
it is native amd64 architecture!
$ sudo aptitude install android-tools-adb
...
$ file /usr/bin/adb
/usr/bin/adb: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=b36a05975f3d903a4f0ee3e02b581cc71ddedf26, stripped

Nobody comes here looking for answers to this question anymore since the packages distributed with Android SDK come in 64-bit flavor by default now.
So I am just writing down version numbers for the last 32-bit packages for future reference:
build-tools_r23.0.3
platform-tools_r23.0.1

If you are running debian/ubuntu 12.04 follow this guide to add the ppa for the 64bit fastboot and adb
http://bernaerts.dyndns.org/linux/74-ubuntu/245-ubuntu-precise-install-android-sdk
If you do not need the SDK and just need the android-tools, do
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install android-tools-adb android-tools-fastboot
If you want the SDK API on your precise 64 bit, then sorry, you have to install ia32-libs.
Newer than 12.04 (12.10 and above) I think android-tools-adb and android-tools-fastboot 64bit are in the universe respository. No additional PPA necessary.
David

Instead of use a repository, and if you prefer to work with your downloaded Android SDK, you should use this procedure that is decribed here.
To resume:
Install the Android SDK
Add the i386 MultiArch support to your Debian:
sudo dpkg --add-architecture i386
Update your package list
sudo apt-get update
And install the following i386 packages
sudo aptitude install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
Now, all the Android SDK platform tools should work.
Edit (2014/06/06): The solution has been already answered on this Stackoverflow post.

Related

Kivy Python For Android Installation And App Deployment

So I could finally get a decent output in a shell about Kivy Python-For-Android installation and distro build. The thing is that I cannot seem to get the compass example to work at all. A force close is activated right after running the app.
I'm using the latest toolchain and the old doesn't seems to work... An error about old chain not supported any more.
The thing is that I'm using the latest version of SDK and NDK. The documentation ask for android API 14 but it's not found on the android manager repository. All APIs are present but not API 14 so I use API 17.
The installation script I manage to put together with things out of the current doc to make it work on: Ubuntu 15.10 x64
#### Tested On x64 System ####
# Enable Restricted, Universe & Multiverse Repositories
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu$(lsb_release -sc) main universe restricted multiverse"
# Add x86 Packets
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y build-essential ccache git zlib1g-dev python2.7 python2.7-dev libncurses5:i386 libstdc++6:i386 zlib1g:i386 openjdk-7-jdk unzip ant python-pip cython autoconf libtool
sudo pip install virtualenv
git clone https://github.com/kivy/python-for-android.git
cd python-for-android
python setup.py install
export ANDROIDSDK="/media/$(logname)/EXTSave/android-sdk-linux"
export ANDROIDNDK="/media/$(logname)/EXTSave/android-ndk-r11b"
export ANDROIDAPI=17
export ANDROIDNDKVER=11
# EXTSave is an HDD Partition
python-for-android apk --private /media/$(logname)/EXTSave/compass --requirements=python2 --package=org.pirate.kaizoku --name="Kaizoku" --version=0.1
How can I compile an example or something? Is there something wrong?
Since I'm no professional programmer I forgot/didn't know how to check the logs but after more searching I finally found my error! The program was not not able to import the kivy framework. I forgot to add it in:
python-for-android apk --private /media/$(logname)/EXTSave/compass --requirements=python2,sdl,kivy --package=org.pirate.kaizoku --name="Kaizoku" --version=0.1
Since the original installation code is working I will make some changes for automation and leave it here for future reference for faster approach to the framework.
For future problems use the logs to check any problems:
python-for-android logcat

Cannot run program " xx/sdk//tools/emulator": java.io.IOException: error=2, No such file or directory

I have installed android SDK and android eclipse plugin successfully on Ubuntu 12.10.
I created the AVD in eclipse, and now it's not running. This is the output error I receive when I run the AVD:it tips:
Starting emulator for AVD 'avd'
Failed to start emulator: Cannot run program "/home/sancai/android/adt-bundle-linux-x86_64-20130522/sdk//tools/emulator": java.io.IOException: error=2, No such file or directory
I find information via google, everyone says this is because my system version is 64, while the adt only support 32, to install: sudo apt-get install ia32-libs, when I installed the 32-bit library, other problems arise such as the library file association to other libraries, but has no other library files are fully,it tips:
sancai#ubuntu:~$ sudo apt-get install ia32-libs
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
ia32-libs : Depends: ia32-libs-multiarch but it is not installable
E: Unable to correct problems, you have held broken packages.
sancai#ubuntu:~$ sudo apt-get install ia32-libs-multiarch
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ia32-libs-multiarch is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'ia32-libs-multiarch' has no installation candidate
This should help:
Go to xx/sdk/tools and run:
mv emulator emulator.bak
ln -s emulator64-arm emulator
No need to install any ia32 libs.
This is the answer http://astroelec.blogspot.com/
(using Debian)
Installing ia32-libs will no longer work as debian has moved to multiarch support.
Solution. Use Multiarch
Multiarch support makes installing libraries from the i386 distribution easy...
sudo dpkg --add-architecture i386
sudo aptitude update
sudo aptitude install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
Now launch eclipse, and everything should now work just fine.
In my configuration, I have set up the virtual devices to use Intel Atom system image. Lawrence Angrave from the University Illinois said in his Coursera androidapps101 course that it will run faster than the ARM image. So this works for me:
mv emulator emulator_bak
ln -s emulator64-x86 emulator
You do not need install packages any more!
In directory tools, there are many types of emulator, while my computer works with emulator64-arm! My system is Linux Mint 16 amd64! Good luck!
./emulator64-arm #yxphone -sdcard yxsd -scale 0.8
it's easy,this is my solutions.
copy and paste, this lines in your terminal.
apt-get install libncurses5:i386 \
libstdc++6:i386 \
zlib1g:i386
good luck!!
This might help
sudo aptitude install ia32-libs lib32ncurses5 lib32stdc++6

Ubuntu 64 with Android 64 Bundle cannot find adb executable

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!
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)
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 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
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
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

Bash cannot find adb even though it's definitely there

I'm running ArchLinux, kernel 3.4.4, bash version 4.2.29. I downloaded the android sdk from here: http://developer.android.com/sdk/index.html
Once extracted I did, did ~/android-sdk-linux/tools/android and installed the SDK platform tools package.
From there I tried the following:
> ls -l ~/android-sdk-linux/platform-tools/adb
-rwxr-xr-x 1 mediocregopher mediocregopher 204436 Jun 28 13:20 /home/mediocregopher/android-sdk-linux/platform-tools/adb
> file ~/android-sdk-linux/platform-tools/adb
/home/mediocregopher/android-sdk-linux/platform-tools/adb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped
> ~/android-sdk-linux/platform-tools/adb
bash: /home/mediocregopher/android-sdk-linux/platform-tools/adb: No such file or directory
Clearly the file is there and at the very least executable, why can't bash seem to find it? I've tried adding the platform-tools folder to my path as well as sudo and su-ing, but no matter what it seems like the file is not found. Does anyone know what could be happening?
You're running on a 64bit system and you do not have the 32bit compatibility libraries installed.
The error is actually coming from the fact that it can't find the 32bit ld.so.
If you're using ubuntu/debian, I think you just need to sudo apt-get install ia32-libs and it should work.
For 'modern' versions of Ubuntu (13.10 and higher), the accepted answer is not working anymore: They removed the '32 bit compability libraries' and instead you need to use multiarch packages that happily coexists next to each other. See What happened to the ia32-libs package? on AskUbuntu.
Instead you need to install the 32 bit version of libc:
sudo apt-get install libc6:i386
Next, I encounterd that a 32 bit version of libstdc++ is also required by adb:
sudo apt-get install libstdc++6:i386
Now adb should be working (again).
Android SDK on a 64-bit linux machine shows that some other libraries are required as well. I did not seem to require them as well, but might have had them installed already.

Eclipse on x64 Fedora

I have installed eclipse and android SDK on Fedora 17. In eclipse I got this error
/home/jakub/Android/android-sdk-linux/platform-tools/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
I tried install this packages: ncurses-libs.i686 libstdc++.i686 libgcc.i686, but always got that error
i got it working on 64bit CentOS using a stackexchange answer i cannot find at the moment. It basically involved appending .i686 to several package names, ie:
yum install libstdc++.i686
ia32-libs does not formally exist as an rpm. However, on my Ubuntu 10.04 box
dpkg --listfiles ia32-libs | wc
indicates there are 1456 files in ia32-libs to make 32bit stuff work on 64bit Debian based platforms. i certainly did not install 1456 .i686 packages. So just now, i entered
$ rpm -qa | grep i686
libX11-1.3-2.el6.i686
libstdc++-4.4.6-4.el6.i686
openssl-1.0.0-25.el6_3.1.i686
libXau-1.0.5-1.el6.i686
SDL-1.2.14-3.el6.i686
glibc-2.12-1.80.el6_3.7.i686
libgcc-4.4.6-4.el6.i686
libxcb-1.5-1.el6.i686
libXrandr-1.3.0-4.el6.i686
zlib-1.2.3-27.el6.i686
libselinux-2.0.94-5.3.el6.i686
openssl-devel-1.0.0-25.el6_3.1.i686
nss-softokn-freebl-3.12.9-11.el6.i686
ncurses-libs-5.7-3.20090208.el6.i686
krb5-libs-1.9-33.el6_3.3.i686
libXext-1.1-3.el6.i686
libcom_err-1.41.12-12.el6.i686
libXrender-0.9.5-1.el6.i686
keyutils-libs-1.4-4.el6.i686
When i find the original answer i used, i will post it back here.
did you used android in fedora before.?
System requirements
Operating Systems
Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit)
Mac OS X 10.5.8 or later (x86 only)
Linux (tested on Ubuntu Linux, Lucid Lynx)
GNU C Library (glibc) 2.7 or later is required.
On Ubuntu Linux, version 8.04 or later is required.
64-bit distributions must be capable of running 32-bit applications.
link:
because SDK is 32bit
try to use: yum install ia32-libs

Categories

Resources