64-bit version of adb and fastboot?

时光总嘲笑我的痴心妄想 提交于 2019-12-22 09:33:40

问题


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?


回答1:


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



回答2:


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




回答3:


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



回答4:


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.




来源:https://stackoverflow.com/questions/21717178/64-bit-version-of-adb-and-fastboot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!