What is it?
adb is abbreviated for “Android Debug Bridge”. It comes with the Android Development SDK but it can be installed separately too. It allows users to send commands to the Android phone via PC. It will be helpful in cases if you are tinkering with your phone and reached some nearly bricked condition.
In my case: I have a Zuk Z1 and I have installed TWRP recovery and Cyanogen 13 installed as of now. There might be some case or something went wrong that I can’t boot into my phone and even recovery isn’t working. Then booting the phone into bootloader might help. But I didn’t find any way to boot into bootloader without going into recovery. And suppose recovery isn’t working too. Then adb can help you here. You may use adb to boot into bootloader and then flash recovery and the OS later on.
On debian based systems e.g. Ubuntu, you may install it like:
sudo apt-get install android-tools-adb android-tools-fastboot
If it didn’t work, then see here. It will get you adb and fastboot.
The problem was that after installing adb, I connected the phone and fired the command:
but it wasn’t listing my device.
So after searching a bit, I got a solution.
First you need to know the vendor id of your device. Search the Internet for that.
Other thing you can try is connect your phone to Linux PC and from terminal type:
and look for your device and then look for “idVendor” field. For example mine is: 0x2b4c
Another thing you may try is to use following command from terminal:
after booting the phone into the bootloader.
So coming back to my problem, my device wasn’t getting listed on running adb devices.
The solution is that you need to create/edit a file ~/.android/adb_usb.ini and write it as:
# ANDROID 3RD PARTY USB VENDOR ID LIST — DO NOT EDIT.
# USE ‘android update adb’ TO GENERATE.
# 1 USB VENDOR ID PER LINE.
# ie 0x2207
And place the vendor id at the end, like I did above. Save file and run adb devices again. It will list the device but it will be unauthorized. Now your phone should pop up a permission box to allow the connection. Allow it (tick always).
Then do the following to restart the adb server (with sudo).
Try reconnecting the phone after disconnecting if it didn’t work.