Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Android ADB should I keep on Ubuntu?

I noticed that running adb version show an outdated version 28 on my Ubunutu 22.04 system. I'm not sure how adb was previously installed, maybe through the apt package android-sdk-platform-tools?

$ which adb
/usr/bin/adb

$ adb version
Android Debug Bridge version 1.0.41
Version 28.0.2-debian
Installed as /usr/lib/android-sdk/platform-tools/adb

$ dpkg -l | grep android-sdk-platform
ii  android-sdk-platform-tools                                  28.0.2+6                                                       amd64        Tools for interacting with an Android platform
ii  android-sdk-platform-tools-common                           28.0.2+6                                                       all          Tools for interacting with an Android platform - Common files

Android Studio has a much newer version 34 of adb. Android Studio's System Settings > Android SDK shows Android SDK Location to be /home/gv/Android/Sdk.

$ /home/gv/Android/Sdk/platform-tools/adb version
Android Debug Bridge version 1.0.41
Version 34.0.3-10161052
Installed as /home/gv/Android/Sdk/platform-tools/adb
Running on Linux 5.19.0-41-generic (x86_64)

What is your recommendation to fix this mismatch in adb? I am mainly using Android Studio and adb for Flutter development with Vscode. I am unsure if these changes can affect working on Flutter with Vscode.

Any suggestions? Thanks

like image 348
gameveloster Avatar asked Sep 07 '25 08:09

gameveloster


1 Answers

You actually have to go to the place where you installed your sdk,

by default on ubuntu 22.04.3 LTS if you installed it with sudo apt install,

is placed in /usr/lib/android-sdk/platform-tools/adb !

you should delete platform-tools/. Go to android developer at

https://developer.android.com/studio/releases/platform-tools

download latest version of plateform-tools et replace it anywhere you have it

in my case /usr/lib/android-sdk/ > extract it > renaim it ' plateform-tools' in final you have been /usr/lib/android-sdk/platform-tools/.

sudo apt update that's good !

$ adb version 
Android Debug Bridge version 1.0.41 Version 34.0.4-10411341
Installed as /usr/lib/android-sdk/platform-tools/adb
Running on Linux 6.2.0-26-generic (x86_64)
like image 90
enok.seth Avatar answered Sep 09 '25 05:09

enok.seth