FORUMS
Remove All Ads from XDA

[GUIDE] [LINUX] Installing ADB and Fastboot on Linux & Device Detection "Drivers"

938 posts
Thanks Meter: 650
 
By XeoNoX, Senior Member on 12th October 2016, 03:25 AM
Post Reply Email Thread
Installing ADB and Fastboot on Linux & ADB Drivers Tutorial
For Debian-based distributions (Debian Ubuntu Mint etc.)
Installing ADB CLI tool ( Android Debug Bridge Command Line Interface Tool )
Installing ADB Drivers / Android Device Detection
- Accurate as of June 30, 2017
Reason for updated guide : Obsolete tutorials everywhere and info scattered, some are just for adb and others just for the drivers.

Before you begin be sure that you have set your Android Device
to enable USB Debugging. The steps are different for
every device. Google how to turn it on your specific device.
Google "Enable USB Debugging <device model>"
Once you have enabled USB Debugging you can follow the instructions below:

Open "TERMINAL" and do the follow:

Adds repository and install android tools and fastboot
Code:
sudo add-apt-repository ppa:nilarimogard/webupd8
Code:
sudo apt-get update
Code:
sudo apt-get install android-tools-adb android-tools-fastboot


Installs 32 Bit Compatibility libraries for 64-Bit Systems
Code:
sudo apt-get install ia32-libs

Packages needed for Ubuntu 13+ Updated 32-Bit Libraries
Code:
sudo dpkg --add-architecture i386
Code:
sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386

By now you Linux installation already has ADB and Drivers install
but now you need to configure it to detect the Various different types
of Hardware Vendor ID's. So do the following:


Create or Open the rules for 51-android.rules
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
If this is the first time you have added any udev rules the file will
be empty as gedit will have just created it for you. Go ahead and add
in the following. If you already had 51-android.rules it will open it.

With 51-android.rules open just insert the following Vendor ID's"
for your linux distro to be able to detect the device in adb

Code:
# udev rule to detect android devices
# These rules refer to http://developer.android.com/tools/device.html

# Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666", GROUP="plugdev"
# Archos
SUBSYSTEM=="usb", ATTR{idVendor}=="0e79", MODE="0666", GROUP="plugdev"
# Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", GROUP="plugdev"
# Azpen Onda
SUBSYSTEM=="usb", ATTR{idVendor}=="1f3a", MODE="0666", GROUP="plugdev"
# BQ
SUBSYSTEM=="usb", ATTR{idVendor}=="2a47", MODE="0666", GROUP="plugdev"
# Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666", GROUP="plugdev"
# Fairphone
SUBSYSTEM=="usb", ATTR{idVendor}=="2ae5", MODE="0666", GROUP="plugdev"
# Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666", GROUP="plugdev"
# Fujitsu Toshiba 	
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666", GROUP="plugdev"
# Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0666", GROUP="plugdev"
# Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
# Haier
SUBSYSTEM=="usb", ATTR{idVendor}=="201e", MODE="0666", GROUP="plugdev"
# Hisense
SUBSYSTEM=="usb", ATTR{idVendor}=="109b", MODE="0666", GROUP="plugdev"
# HTC, Wiko
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
# Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666", GROUP="plugdev"
# Intel
SUBSYSTEM=="usb", ATTR{idVendor}=="8087", MODE="0666", GROUP="plugdev"
# K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666", GROUP="plugdev"
# KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666", GROUP="plugdev"
# Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666", GROUP="plugdev"
# Lab126
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", MODE="0666", GROUP="plugdev"
# Lenovo
SUBSYSTEM=="usb", ATTR{idVendor}=="17ef", MODE="0666", GROUP="plugdev"
# LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666", GROUP="plugdev"
# Meizu
SUBSYSTEM=="usb", ATTR{idVendor}=="2a45", MODE="0666", GROUP="plugdev"
# Micromax
SUBSYSTEM=="usb", ATTR{idVendor}=="1ebf", MODE="0666", GROUP="plugdev"
# Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666", GROUP="plugdev"
# MTK
SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", MODE="0666", GROUP="plugdev"
# NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666", GROUP="plugdev"
# Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666", GROUP="plugdev"
# Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666", GROUP="plugdev"
# OnePlus Two (unknown vendor's name)
SUBSYSTEM=="usb", ATTR{idVendor}=="2a70", MODE="0666", GROUP="plugdev"
# Oppo
SUBSYSTEM=="usb", ATTR{idVendor}=="22d9", MODE="0666", GROUP="plugdev"
# OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666", GROUP="plugdev"
# Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10a9", MODE="0666", GROUP="plugdev"
# Pegatron
SUBSYSTEM=="usb", ATTR{idVendor}=="1d4d", MODE="0666", GROUP="plugdev"
# Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666", GROUP="plugdev"
# PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666", GROUP="plugdev"
# Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", GROUP="plugdev"
# Rockcwell Electronics
SUBSYSTEM=="usb", ATTR{idVendor}=="2207", MODE="0666", GROUP="plugdev"
# SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666", GROUP="plugdev"
# Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
# Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666", GROUP="plugdev"
# Sony
SUBSYSTEM=="usb", ATTR{idVendor}=="054c", MODE="0666", GROUP="plugdev"
# Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666", GROUP="plugdev"
# Spreadtrum
SUBSYSTEM=="usb", ATTR{idVendor}=="1782", MODE="0666", GROUP="plugdev"
# T & A Mobile Phones
SUBSYSTEM=="usb", ATTR{idVendor}=="1bbb", MODE="0666", GROUP="plugdev"
# Teleepoch
SUBSYSTEM=="usb", ATTR{idVendor}=="2340", MODE="0666", GROUP="plugdev"
# Texas Instruments UsbBoot
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", MODE="0666", GROUP="plugdev"
# Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666", GROUP="plugdev"
# Wearners
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", GROUP="plugdev"
# Wileyfox
SUBSYSTEM=="usb", ATTR{idVendor}=="2970", MODE="0666", GROUP="plugdev"
# XiaoMi
SUBSYSTEM=="usb", ATTR{idVendor}=="2717", MODE="0666", GROUP="plugdev"
# YU
SUBSYSTEM=="usb", ATTR{idVendor}=="1ebf", MODE="0666", GROUP="plugdev"
# Zebra
SUBSYSTEM=="usb", ATTR{idVendor}=="05e0", MODE="0666", GROUP="plugdev"
# ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0666", GROUP="plugdev"
# ZUK
SUBSYSTEM=="usb", ATTR{idVendor}=="2b4c", MODE="0666", GROUP="plugdev"
Save and exit when done editing.


Change the permission of this file by executing the following command as root:
Code:
chmod a+r /etc/udev/rules.d/51-android.rules
Reload the rules by executing the following command as root:
Code:
udevadm control --reload-rules
Add in the user group "plugdev" for the rules we just created.
Code:
sudo addgroup --system plugdev
And add your username to that group.
Replace <username> with your primary username that will use ADB without the <> around it.
Code:
sudo adduser <username> plugdev
#Other examples:
#sudo adduser JohnDoe plugdev
#sudo adduser JaneDoe plugdev
#sudo adduser BillyBob plugdev
So in these examples JohnDoe,JaneDoe, and BillyBob
were added to group "plugdev" to be able to use adb

FINALLY ADB IS READY AND GOOD TO USE!

Code:
adb kill-server
Code:
adb start-server
Code:
adb devices

NOTE: I know you can add the vendor ID's with no group such as
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666" (No UserGoup) and use it as
a shortcut to bypass the user groups, however as per Google's instructions it is
reccommended to make a user group, the reason may be for extra security
and to avoid possible vulnerabilities.

keywords: linux debian ubuntu drivers driver android kindle fire tv stick firestick debugging debug
guide tutorial setup learn how to install adb usb cable detect hardware
The Following 9 Users Say Thank You to XeoNoX For This Useful Post: [ View ] Gift XeoNoX Ad-Free
 
 
18th June 2017, 11:51 AM |#2  
eSpice's Avatar
Junior Member
Thanks Meter: 1
 
More
Works great on Linux Mint 18.1 Cinnamon 64bit.
Thanks.
28th June 2017, 06:57 PM |#3  
Junior Member
Spokane
Thanks Meter: 9
 
Donate to Me
More
Thanks Much
Required only slight modification to work on Kali rolling 2017.1
thankx
12th October 2017, 09:11 PM |#4  
Member
Thanks Meter: 4
 
More
Hello,
it doesn't work for me. I have the Galaxy S7 Exynos. USB debugging works under Windows.

Linux (Debian Jessy, 4.3.0-0.bpo.1-amd64 #1 SMP Debian 4.3.5-1~bpo8+1 (2016-02-23) x86_64) recognizes the phone:
Quote:

~lsusb
Bus 001 Device 003: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II], GT-I9300 Phone [Galaxy S III], GT-P7500 [Galaxy Tab 10.1]

Quote:

[Thu Oct 12 22:06:58 2017] usb 1-7: new high-speed USB device number 4 using xhci_hcd
[Thu Oct 12 22:06:58 2017] usb 1-7: New USB device found, idVendor=04e8, idProduct=6860
[Thu Oct 12 22:06:58 2017] usb 1-7: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[Thu Oct 12 22:06:58 2017] usb 1-7: Product: SAMSUNG_Android
[Thu Oct 12 22:06:58 2017] usb 1-7: Manufacturer: SAMSUNG
[Thu Oct 12 22:06:58 2017] usb 1-7: SerialNumber: ce77760b22234d4002
[Thu Oct 12 22:06:58 2017] cdc_acm 1-7:1.1: ttyACM0: USB ACM device
[Thu Oct 12 22:06:58 2017] usbcore: registered new interface driver cdc_acm
[Thu Oct 12 22:06:58 2017] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

/etc/udev/rules.d/51-android.rules contains
Quote:

# Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev"

My user account is in plugdev group.

But still, "adb devices" only shows an empty "List of devices attached" list.

What can I do?? I installed the "android-tools-adb" package.

My phone shows this message (see attachment)
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20171012-221742.jpg
Views:	400
Size:	215.2 KB
ID:	4300941  
31st December 2017, 03:20 PM |#5  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by cybtrash

Hello,
it doesn't work for me.

same here, guide NOT for debian users since repository packages outdated?
19th January 2018, 08:27 PM |#6  
XeoNoX's Avatar
OP Senior Member
Thanks Meter: 650
 
More
maybe you need the new ATTR{idVendor}== for the newer devices, google used to have it located at https://developer.android.com/studio/run/device.html but seems like they moved it, i tried to find it but couldnt, maybe if you search around better luck than me and you will find it.
18th March 2018, 02:41 PM |#7  
Junior Member
Thanks Meter: 0
 
More
Don't work for me.
Ixion E140, Ubuntu 16.04.
17th May 2018, 11:54 PM |#8  
Junior Member
Thanks Meter: 1
 
More
Android Studio
Quote:
Originally Posted by John-VEG

..

try directly with official tools
6th June 2018, 03:32 AM |#9  
Junior Member
Thanks Meter: 0
 
More
My SC7731 phone is not recognized by regular ADB on Ubuntu. How can https://developer.android.com/studio...platform-tools help the situation?
17th June 2018, 04:41 PM |#10  
XeoNoX's Avatar
OP Senior Member
Thanks Meter: 650
 
More
Quote:
Originally Posted by John-VEG

My SC7731 phone is not recognized by regular ADB on Ubuntu. How can https://developer.android.com/studio...platform-tools help the situation?

make sure you are using a good USB cable, not all USB cables are made the same and some have the wiring different, if you arent sure then connect it to a windows PC using the SAME USB cable and see if its detected, if it is then proceed with the instructions below:

this site will help you colect info on your usb device and right the rules for it
http://weininger.net/how-to-write-ud...b-devices.html
The Following User Says Thank You to XeoNoX For This Useful Post: [ View ] Gift XeoNoX Ad-Free
20th June 2018, 08:17 AM |#11  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by XeoNoX

make sure you are using a good USB cable, not all USB cables are made the same and some have the wiring different, if you arent sure then connect it to a windows PC using the SAME USB cable and see if its detected, if it is then proceed with the instructions below:

this site will help you colect info on your usb device and right the rules for it
http://weininger.net/how-to-write-ud...b-devices.html

I just had to
Code:
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
Code:
unzip \platform-tools-latest-linux.zip
Code:
sudo cp platform-tools/adb /usr/bin/adb
Post Reply Subscribe to Thread

Tags
guide tutorial adb linux install

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes