Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to connect a mobile phone with adb under Linux

Shulou Source: shulou.com Published: 2022-06-01 05:01:09 09月27日 Update

This article mainly shows you "how to connect a mobile phone with adb under Linux". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to connect a mobile phone with adb under Linux".

In Linux, the simulator can identify it directly, and there is no restriction on the use of adb, but after the phone is plugged into usb, adb does not recognize it. It displays a question mark, and the same is true in eclipse.

The solution is as follows:

1. Enter lsusb in bash and you can see many BUS devices, many of which are Linux Foundation 1.1 root hub. This is the port that is not plugged into the usb device, and another string will appear when the port is plugged into the phone. For example, mine is High Tech Computer Corp. And then write down its id:0bb4:0c02.

two。 Create a new 51-Android.rules file in the / etc/udev/rules.d directory as follows:

Java Code:

SUBSYSTEM== "usb | usb_device", SYSFS {idVendor} = = "0bb4", MODE= "0660", GROUP= "plugdev" SUBSYSTEM== "usb | usb_device", ATTR {idVendor} = = "0bb4", ATTR {idProduct} = = "0c02", SYMLINK+= "Android_adb" SUBSYSTEM== "usb | usb_device", ATTR {idVendor} = = "0bb4", ATTR {idProduct} = = "0c01", SYMLINK+= "Android_fastboot"

The idVendor here is the id noted in the * * step.

3. Execute the following command

Java Code:

Chmod aquir / etc/udev/rules.d/51-Android.rules sudo adb kill-server sudo adb devices

Then you will find that adb is ready to use.

The above is all the contents of the article "how to connect a mobile phone with adb under Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Mobile phone content article code port device learning help command character string file method easy to understand more organization simulator directory knowledge tape Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker macOS Shulou Tech Info Shulou Technology NVidia