1. Configure Environment Variables
Enter the terminal and enter
Sudo gedit ~ /. Bashrc
Append at the end of the file:
1 |
#set path for android sdk tools |
2 |
export PATH=$PATH:/your_android-sdk-linux_path/tools/ |
3 |
export PATH=$PATH:/your_android-sdk-linux_path/platform-tools/ |
The your_android-sdk-linux_path here is the absolute path
2. Save and synchronize updates
Source ~ /. Bashrc
3. If adb is directly run
Adb devices
* Daemon not running. starting it now *
* Daemon started successfully *
List of devices attached
???????????? No permissions
No permission
4. Switch to root and run steps 1 and 2 again.
Then restart the adb service.
Adb kill-server
Adb start-server
After leaving root, you can also use adb.
5. If Step 3 still does not work, refer to the following methods:
(1) plug in the mobile phone and enter the terminal:
Lsusb
Will list all occupied usb devices.
Find your own device:
Bus 002 Device 004: ID 17ef: 6019 Lenovo
Bus 002 Device 003: ID 04c5: 1356 Fujitsu, Ltd <-------- this is my Device. Write down this line.
Bus 002 Device 002: ID 8087: 0024
Bus 002 Device 001: ID 1d6b: 0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087: 0024
Bus 001 Device 001: ID 1d6b: 0002 Linux Foundation 2.0 root hub
(2) Continue terminal Input
Sudo gedit/etc/udev/rules. d/70-android.rules
Add the following statement
SUBSYSTEM = "usb", ATTRS {idVendor} = "04c5", ATTRS {idProduct} = "1356", MODE = "0666"
(The red and green words are the ones we wrote above, respectively)
Save.
(3) terminal Input
Sudo chmod a + rx/etc/udev/rules. d/70-android.rules
Sudo service udev restart
(4) unplug the usb, re-connect it (very important), and then execute:
Adb devices
In this way, you can view the device.