Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install specific adb version on Linux

Tags:

android

adb

I would like use specific adb version for connect devices. For connect external emulator, i try to use adb connect localhost:5555, i've this result :

[adb]: adb server version (36) doesn't match this client (40); killing...
[adb]: * daemon started successfully

For install adb, i use apt install adb but i've only version 1.0.36.

Anyone know if i can install and use version 1.0.40 of adb ?

like image 336
s-leg3ndz Avatar asked Aug 25 '26 06:08

s-leg3ndz


2 Answers

In my Dockerfile I use:

  mkdir -p /usr/local/android-sdk \
  && cd /usr/local/android-sdk/ \
  && curl -OL https://dl.google.com/android/repository/platform-tools-latest-linux.zip \
  && unzip platform-tools-latest-linux.zip \
  && rm -f platform-tools-latest-linux.zip \
  && ln -s /usr/local/android-sdk/platform-tools/adb /usr/bin/adb \
  && export PATH=/usr/local/android-sdk/platform-tools:${PATH} \
  && echo "export PATH=/usr/local/android-sdk/platform-tools:${PATH}" >> /etc/profile \
like image 169
lojza Avatar answered Aug 26 '26 19:08

lojza


You can download specific version of the platform tools by using

wget https://dl.google.com/android/repository/platform-tools_r<specific-version>-linux.zip

But there is little correlation between platform-tool version and adb version.

For example platform-tools_r29.0.5-linux has adb version 41. You can take a look at release notes for the particular adb version you want.

After downloading, follow @lojza answer for setting up soft links for your system.

like image 32
Arnab Mitra Avatar answered Aug 26 '26 19:08

Arnab Mitra



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!