If we installed ADB, Fastboot using Ubuntu packages as mentioned in our another post, “How to Install ADB and Fastboot on Ubuntu ?” , higher chances are the versions are quite old. As in our case, even with Ubuntu 22.04, ADB and Fastboot versions was “28.0.2”.
And we wanted both versions to be latest ( which is 33.0.1 when writing this post). So, here is what you can do to update and use latest version.
Once you install Android Studio, it will create an SDK directory at /home/myuser/Android/Sdk
This Sdk directory will have platform tools directory as,
$ pwd /home/myuser/Android/Sdk/platform-tools
$ tree . ├── adb ├── fastboot
Now, we can first remove the existing adb, fastboot versions if we have installed using Ubuntu Packages,
$ sudo apt-get remove adb fastboot
Now, we need to export PATH of platform-tools and modify .bashrc to make sure its added to path everytime we start the terminal.
$ vim ~/.bashrc
And append, below line at the end,
Now, restart the terminal or open a new tab, and if you check you should have the latest ADB and Fastboot Versions.
$ adb --version Android Debug Bridge version 1.0.41 Version 33.0.1-8253317
$ fastboot --version fastboot version 33.0.1-8253317