Debug Xiaomi mobile phone connection in Ubuntu

Source: Internet
Author: User
A recent project needs to use linux to develop Android programs! I found that there was no connection to Xiaomi development in Ubuntu! It took me one afternoon to complete the operation! Check it out! The Xiaomi phone uses USB to connect to the Ubuntu10.04 system. Run the following command: www.linuxidc.com @ linuxidc :~ $ LsusbBus007Device001: ID1d6b: 0001LinuxFoundation1. 1

A recent project needs to use linux to develop Android programs! I found that there was no connection to Xiaomi development in Ubuntu! It took me one afternoon to complete the operation! Check it out!

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

Www.linuxidc.com @ linuxidc :~ $ Lsusb

Bus 007 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub

Bus 006 Device 002: ID 17ef: 1003 Lenovo

Bus 006 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub

Bus 005 Device 003: ID 046d: c06c Logitech, Inc.

Bus 005 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub

Bus 004 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub

Bus 003 Device 003: ID 0a5c: 2110 Broadcom Corp. Bluetooth Controller

Bus 003 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub

Bus 002 Device 001: ID 1d6b: 0002 Linux Foundation 2.0 root hub

Bus 001 Device 005: ID 18d1: 9025

Bus 001 Device 001: ID 1d6b: 0002 Linux Foundation 2.0 root hub

Unplug the USB cable from your phone and run the following command:

Www.linuxidc.com @ linuxidc :~ $ Lsusb

Bus 007 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub

Bus 006 Device 002: ID 17ef: 1003 Lenovo

Bus 006 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub

Bus 005 Device 003: ID 046d: c06c Logitech, Inc.

Bus 005 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub

Bus 004 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub

Bus 003 Device 003: ID 0a5c: 2110 Broadcom Corp. Bluetooth Controller

Bus 003 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub

Bus 002 Device 001: ID 1d6b: 0002 Linux Foundation 2.0 root hub

Bus 001 Device 001: ID 1d6b: 0002 Linux Foundation 2.0 root hub

We found that Bus 001 Device 005: ID 18d1: 9025 is the phone of Xiaomi.

Sudo gedit/etc/udev/rules. d/53-android.rules Add the following text to the open file:

SUBSYSTEM = "usb", SYSFS {idVendor} = "04e8", MODE = "0666"

SUBSYSTEM = "usb", ATTR {idVendor} = "04e8", ATTR {idProduct} = "685e", SYMLINK + = "android_adb"

Sudo chmod a + rx/etc/udev/rules. d/53-android.rules

Www.linuxidc.com @ linuxidc:/etc/udev/rules. d $ sudo service udev restart // or restart udev

Udev start/running, process 7147

Run it in the tools directory of the android sdk (this step is very important and must be sudo, otherwise it will not work)

Www.linuxidc.com @ linuxidc :~ /Star2011/SDK/android-sdk-linux/platform-tools $ sudo./adb kill-server

Www.linuxidc.com @ linuxidc :~ /Star2011/SDK/android-sdk-linux/platform-tools $ sudo./adb devices

* Daemon not running. starting it now on port 5037 *

* Daemon started successfully *

List of devices attached

Then, you can directly use the adb shell operation. You can also use Eclipse for debugging.

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.