First install adb and fastboot:
sudo apt install android-tools-adb android-tools-fastboot
Now, add permissions for access as non-root user:
First we need to identify the tag of the device:
For any phone in fastboot, check without connecting device:
lsusb
Bus 002 Device 004: ID 0480:0210 Toshiba America Inc Bus 002 Device 003: ID 1058:0820 Western Digital Technologies, Inc. My Passport Ultra (WDBMWV, WDBZFP) Bus 002 Device 002: ID 2109:0812 VIA Labs, Inc. VL812 Hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 008: ID 04f2:b56c Chicony Electronics Co., Ltd Bus 001 Device 007: ID 0bda:b008 Realtek Semiconductor Corp. Bus 001 Device 005: ID 046d:c534 Logitech, Inc. Unifying Receiver Bus 001 Device 003: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory Bus 001 Device 004: ID 1d57:ad05 Xenta Bus 001 Device 002: ID 2109:2812 VIA Labs, Inc. VL812 Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Now connect usb and retry:
lsusb
Bus 002 Device 004: ID 0480:0210 Toshiba America Inc Bus 002 Device 003: ID 1058:0820 Western Digital Technologies, Inc. My Passport Ultra (WDBMWV, WDBZFP) Bus 002 Device 002: ID 2109:0812 VIA Labs, Inc. VL812 Hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 008: ID 04f2:b56c Chicony Electronics Co., Ltd Bus 001 Device 007: ID 0bda:b008 Realtek Semiconductor Corp. Bus 001 Device 005: ID 046d:c534 Logitech, Inc. Unifying Receiver Bus 001 Device 003: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory Bus 001 Device 006: ID 18d1:d00d Google Inc. Bus 001 Device 004: ID 1d57:ad05 Xenta Bus 001 Device 002: ID 2109:2812 VIA Labs, Inc. VL812 Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The additional line for the device is: 18d1:d00d Google Inc.
So create or edit the file /etc/udev/rules.d/99-android.rules as root:
sudo gedit /etc/udev/rules.d/99-android.rules
I added the following since I found the first one was for adb and the second in fastboot mode:
SUBSYSTEM=="usb", ATTRS{idVendor}=="2a70:9011", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev" TEST=="/var/run/ConsoleKit/database", RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}" SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1:d00d", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev" TEST=="/var/run/ConsoleKit/database", RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"
Restart udev:
sudo service udev restart
You may need to restart linux.
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
He is a full stack developer, whose favorite languages are currently Python and Vue.js. He is also fluent in Javascript, Flutter/Dart, Perl, PHP, SQL, C and bash shell scripting. He loves Linux, and can often be found tinkering with linux kernel code, and source code for GNU applications. He used to be an active developer on XDA forums, and his tinkered ROMS used to be very popular in the early 2000s.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.