Due to Linux security settings and other reasons, non-root users are limited to use external devices or some hardware interfaces. The sdks officially provided by Google do not work directly. For example, if you cannot find a device or display a bunch of question marks and PermissionDenied. Remember to read the solutions officially provided by Google before, and grant the specified USB device read and write permissions to common users. & Nb
Due to Linux security settings and other reasons, non-root users are limited to use external devices or some hardware interfaces. The sdks officially provided by Google do not work directly. For example, if you cannot find a device or display a bunch of question marks and Permission Denied.
Remember to read the solutions officially provided by Google before, and grant the specified USB device read and write permissions to common users.
First use lsusbCommandView the usb Device connected to the computer and find the vendor ID and product ID of the Android mobile phone, for example, Bus 001 Device 004: ID 0133: 0001, then 0th and 0001 correspond to the vendor ID and product ID respectively. Tip: Check the lsusb result before connecting to the mobile phone, connect the mobile phone, and find the new line of records in lsusb. The vendor ID of some small Chinese stocks may be set to Google or HTC. In fact, it doesn't matter if the vendor ID is set to anything. It's just a sign.
Step 2: edit the/etc/udev/rules. d/70-android.rules file. Write the following content (tested in Ubuntu ):
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="0001",MODE="0666"
Replace 0 and 0001 with the corresponding vendor ID and product ID.
Step 3: grant read and execution permissions: chmod a + rx/etc/udev/rules. d/70-android.rules
Finally, unplug the phone, restart adb, and insert it back to the phone: adb kill-server
View the device list to verify successful adb devices
In fact, it is much easier for Linux to connect to Android phones than Windows. At least we don't need to find drivers in the world.