Reputation: 340
I'm not very familiar with Ubuntu. Right now, I'm on adb version 1.0.32, I need adb version 39 or newer. Whatever I do I seem to be stuck at v.32 . I've tried uninstalling adb with
sudo apt-get remove android-tools-adb android-tools-fastboot
and re-installing with
sudo apt-get install android-tools-adb android-tools-fastboot
adb version
is still showing 32. Help!
Update: I also tried
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip \platform-tools-latest-linux.zip
sudo cp platform-tools/adb /usr/bin/adb
sudo cp platform-tools/fastboot /usr/bin/fastboot
But after that, when I run adb version
, I get -bash: /usr/bin/adb: cannot execute binary file: Exec format error
Upvotes: 5
Views: 18808
Reputation: 97
You could update, upgrade, uninstall adb, then reinstall adb.
sudo apt remove android-tools-adb
sudo apt remove android-tools-fastboot
sudo apt update && sudo apt upgrade
sudo apt install android-tools-adb android-tools-fastboot
Upvotes: 1
Reputation: 340
The problem turned out to be in the fact that our Raspberry Pi's were on armv71 processors. Which are 32 bit processors. And 32-bit processors are not able to run adb versions newer than 1.0.32 because those are all meant for 64-bit processors. Once we upgraded to 64-bit, I was able to update adb.
Upvotes: 2
Reputation: 4625
Remove adb
the installed version from Ubuntu repository:
sudo apt purge adb
Create an alias:
alias adb='/usr/bin/adb'
alias fastboot='/usr/bin/fastboot'
check it:
adb --version
Then add it to your ~/.bashrc
:
cat <<EOF >> ~/.bashrc
alias adb='/usr/bin/adb'
alias fastboot='/usr/bin/fastboot'
EOF
run:
source ~/.bashrc
Upvotes: 0