First step: View USB information:
In Terminal input command LSUSB
12345678 |
[Email protected]:~$ lsusbbus001Device002: ID8087:0024Intel Corp Integrated Rate Matching Hubbus002Device002: ID8087:0024Intel Corp Integrated Rate Matching Hubbus001Device001: ID1D6B:0002Linux Foundation2.0Root Hubbus002Device001: ID1D6B:0002Linux Foundation2.0Root Hubbus001Device005: ID093A:2510Pixart Imaging,Inc. Optical Mousebus001Device004: ID064E:8122Suyin Corp. Bus002Device006: ID -D1:9025Google INC. |
The following is usually the name of the handset manufacturer or Google Inc.
My is Xiaomi 1s is 18d1, write down the ID that need to use later.
Step Two: Create a new/etc/udev/rules.d/50-android.rules file:
In the terminal input command
1 |
/etc/udev/rules.d/-android.rules |
Then type in the text box that pops up
1 |
SUBSYSTEM= ="USB", attr{idvendor} = ="Device code ″, MODE="0666 |
The device code is the four digits obtained in the first step.
Step Three: Add permissions for the newly created file:
1 |
777 /etc/udev/rules.d/-android.rules |
Fourth step: Add the Device ID in ~/.android/adb_usb.ini 0x18d1
1234567 |
[Email protected]:/$ cd ~/. Android/[email protected]:~lsadbkey androidwin.cfg Debug. KeyStore repositories.cfgadbkey.pub avd default.keyset sites- Settings.cfgadb_usb.ini Cache Modem-NV-Ram-5554androidtool.cfg ddms.cfg Modem-NV-Ram-5556[email protected]:~/.android$ Gedit Adb_usb.ini |
Add 0X18D1 to the last line of the INI file
1234 |
3 -- ' android update adb ' 1 USB VENDOR ID PER line. 0xd1 |
Save.
Fifth step: Restart the Udev service
1 |
sudo service udev restart |
Sixth step: Close the ADB process, CD to the Platform-tools directory of the ADT tool,
12 |
sudo./ADB kill-Serversudo./ADB devices |
If successful, it will appear
123 |
List of devices attached emulator-5554 devicefddd4c1d Device |
If you later experience the display device or offline status in Eclipse, you can restart your phone, turn off and reopen the USB debugging option, and your phone may ask you if you want to permanently use this computer for debugging, and choose OK to make the display device online in eclipse