To mess around with Android-powered devices sooner or later you will need Android SDK or more precise two of its components: Android Debug Bridge (or ADB) and Fastboot.
ADB is a command line tool that send terminal commands from your computer to phone connected via USB. While ADB is usually used in the process of rooting or modifying the phone, commands can be sent to unrooted devices too. I am using ADB to reboot device or boot it into recovery mode. More info about ADB can be found on official documentation.
Fastboot is a tool to modify firmware of the device. It allows sending commands to bootloader, therefore you can flash custom system images and recoveries. You can’t flash whole ROMs with it, so usually partitions are written one-by one (bootloader, radio, system, boot, recovery). Not all devices support Fastboot, for instance Rockchip-based devices (e. g. GeekBox) use own application to flash images called upgrade_tool. For more info on Fastboot see nice wiki page at Cyanogenmod or Wikipedia.
Installing both ADB and Fastboot on Linux Mint (or any Ubuntu based distribution) is easy as running following command in terminal:
sudo apt-get install android-tools-adb android-tools-fastboot
It is also recommended to declare rules for main Android phone manufacturers in udev. Perform that by executing three commands below:
sudo wget -O /etc/udev/rules.d/51-android.rules https://raw.githubusercontent.com/NicolasBernaerts/ubuntu-scripts/master/android/51-android.rules sudo chmod a+r /etc/udev/rules.d/51-android.rules sudo service udev restart
To see what ADB version you’ve got, run:
Which will output something like:
Android Debug Bridge version 1.0.31
I don’t remember exact reason why, but I had to update ADB to more recent version than was on Ubuntu’s repository, so I ran:
wget -O - https://skia.googlesource.com/skia/+archive/cd048d18e0b81338c1a04b9749a00444597df394/platform_tools/android/bin/linux.tar.gz | tar -zxvf - adb sudo mv adb /usr/bin/adb sudo chmod +x /usr/bin/adb
And got following adb version:
Android Debug Bridge version 1.0.32
Update December 11th: as of now repository already contains version Android Debug Bridge version 1.0.32, so no need to install manual update.
That’s it – you’re ready to root your device or upgrade already rooted one.
Have fun unlocking full Android potential!
bro even I had to type those 3 (at the end) and adb started working …but fastboot didnt. do u know the command for tht also.
I mean my adb was not woring. then i typed
wget -O - https://skia.googlesource.com/skia/+archive/cd048d18e0b81338c1a04b9749a00444597df394/platform_tools/android/bin/linux.tar.gz | tar -zxvf - adb
sudo mv adb /usr/bin/adb
sudo chmod +x /usr/bin/adb
similarly is there any coomad for fastboot
Do you get any error when trying to use Fastboot?
Which Linux do you use?
I’m a Linux newb but another site said you should proceed the install command with:
sudo apt update
So, the commands are issued as follows:
sudo apt update
sudo apt install android-tools-adb android-tools-fastboot
Yes, it is always a good idea to refresh repository lists with
You saved me of troubling to not being detecting my device in Android Studios ADB.
Thanks sir, nice tutorials.
You are a genius Gytis! this worked for me for adb devices; the vital part is declaring rules for android phone manufacturer for udev without which the device is never recognized. But I think you need to do the same declaration for fastboot in bootloader which has a different ID for usb for the same android? my fastboot does not detect the device in the bootloader section. correct me if I am wrong. My adb has recognized my device and fastboot does not. Any advice is always welcome