Ubuntu system under the ADB connect mobile phone

Source: Internet
Author: User

Found Ubuntu12.04 can not connect Xiaomi development, ADB devices can't see the device! It took a morning to make a success!

Xiaomi phone uses USB to connect to Ubuntu 12.04 system. Run the following command:

[Email protected]:~$ Lsusb

Bus 001 Device 001:id 1d6b:0002 Linux Foundation 2.0 root Hub

Bus 002 Device 001:id 1d6b:0002 Linux Foundation 2.0 root Hub

Bus 001 Device 002:id 8087:0020 Intel Corp Integrated rate Matching Hub

Bus 002 Device 002:id 8087:0020 Intel Corp Integrated rate Matching Hub

Bus 001 Device 003:id 0a5c:4500 Broadcom Corp bcm2046b1 USB 2.0 Hub (part of BCM2046 Bluetooth)

Bus 001 Device 004:id 138a:0008 Validity Sensors, Inc. VFS300 fingerprint Reader

Bus 002 Device 007:id 1a40:0101 Terminus technology INC 4-port HUB

Bus 002 Device 008:id 1a40:0101 Terminus technology INC 4-port HUB

Bus 002 Device 025:id 0461:4d22 Primax Electronics, LTD

Bus 002 Device 005:id 0c45:6481 Microdia

Bus 001 Device 005:id 413c:8161 Dell Computer Corp. Integrated Keyboard

Bus 001 Device 006:id 413c:8162 Dell Computer Corp. Integrated Touchpad [Synaptics]

Bus 002 Device 028:id 2717:904e

Bus 001 Device 007:id 413c:8160 Dell Computer Corp. Wireless 365 Bluetooth

Unplug your phone's USB cable, and then run:

[Email protected]:~$ Lsusb

Bus 001 Device 001:id 1d6b:0002 Linux Foundation 2.0 root Hub

Bus 002 Device 001:id 1d6b:0002 Linux Foundation 2.0 root Hub

Bus 001 Device 002:id 8087:0020 Intel Corp Integrated rate Matching Hub

Bus 002 Device 002:id 8087:0020 Intel Corp Integrated rate Matching Hub

Bus 001 Device 003:id 0a5c:4500 Broadcom Corp bcm2046b1 USB 2.0 Hub (part of BCM2046 Bluetooth)

Bus 001 Device 004:id 138a:0008 Validity Sensors, Inc. VFS300 fingerprint Reader

Bus 002 Device 007:id 1a40:0101 Terminus technology INC 4-port HUB

Bus 002 Device 008:id 1a40:0101 Terminus technology INC 4-port HUB

Bus 002 Device 025:id 0461:4d22 Primax Electronics, LTD

Bus 002 Device 005:id 0c45:6481 Microdia

Bus 001 Device 005:id 413c:8161 Dell Computer Corp. Integrated Keyboard

Bus 001 Device 006:id 413c:8162 Dell Computer Corp. Integrated Touchpad [Synaptics]

Bus 001 Device 007:id 413c:8160 Dell Computer Corp. Wireless 365 Bluetooth

The comparison found that the Bus 002 device 028:id 2717:904e is the Xiaomi phone

sudo gedit/etc/udev/rules.d/50-android.rules adds the following text to the open file:

subsystem== "USB", sysfs{idvendor}== "2717", mode== "0666"

subsystem== "Usb_device", sysfs{idvendor}== "2717", mode== "0666"

subsystem== "USB", attr{idvendor}== "2717", attr{idproduct}== "9039", symlink+= "android_adb"

sudo chmod a+rx/etc/udev/rules.d/50-android.rules

Note that this 50-android.rules file name should be arbitrarily named, tried 51-android.rules, 52-android.rules seems to be able to.

Note "subsystem==" USB ", sysfs{idvendor}==" 2717 ", mode==" 0666 "" This sentence is for Ubuntu 7.01 after the system identification

and "subsystem==" Usb_device ", sysfs{idvendor}==" 2717 ", mode==" 0666 "is used for system identification before Ubuntu 7.01. Equivalent to system compatibility.

[Email protected]:/etc/udev/rules.d$ sudo service udev restart//or restart Udev

Udev start/running, Process 7147

Run in the tools directory of the Android SDK (this step is important, you have to sudo, otherwise no effect)

[Email protected]:~/android-sdk/platform-tools$ sudo./adb kill-server

[Email protected]:~/android-sdk/platform-tools$ sudo./ADB devices

* Daemon not running. Starting it now on Port 5037 *

* Daemon started successfully *

List of devices attached

At this point, it turns out that no device appears under List of devices attached, which means that the ADB does not recognize the new USB device and is tangled.

If you are as miserable as I am, please do the following:

[Email protected]:~$ CD ~

[Email protected]:~$ CD. Android/

[Email protected]:~/.android$ ls

Adbkey adb_usb.ini~ AVD Debug.keystore repositories.cfg

Adbkey.pub androidtool.cfg Cache Default.keyset sites-settings.cfg

Adb_usb.ini androidwin.cfg ddms.cfg modem-nv-ram-5554

Please note this adb_usb.ini (if not, you can build one yourself)

[Email protected]:~/.android$ gedit Adb_usb.ini

The contents are generally as follows:

# ANDROID 3RD Party USB VENDOR ID LIST--does not EDIT.

# Use the ' Android update adb ' to GENERATE.

# 1 USB VENDOR ID PER line.

We'll add one line to it.

# ANDROID 3RD Party USB VENDOR ID LIST--does not EDIT.

# Use the ' Android update adb ' to GENERATE.

# 1 USB VENDOR ID PER line.

0x2717

Please note that this 0x2717 is the device number we get from the LSUSB command above.

Save, turn it off, and then

[Email protected]:~/android-sdk/platform-tools$ sudo./adb kill-server

[Email protected]:~/android-sdk/platform-tools$ sudo./ADB devices

List of devices attached

9109ce53 Device

Note that this line of 9109ce53 device is our identified Xiaomi phone. Ha ha

Then go and toss the Ddms under Eclipse.

Ubuntu system under the ADB connect mobile phone

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.