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 ?
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 \
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With