Configure the android development real machine connection debugging in ubuntu10.10

Source: Internet
Author: User

My laptop is a Windows XP + ubuntu10.10 dual system. The Android development environment is configured in both systems, but it only runs simultaneously in XP.ProgramToo many, at least 360 + anti-virus software should be run, so with AVD added, the machine cannot be directly stuck, so we decided not to start the simulator and directly debug it on the real machine, windows connection is still relatively easy, I am HTC Desire Z, after the connection configuration under the driver is good, drive http://download.csdn.net/source/3018592

In Windows, the connection to the real machine quickly succeeded. Therefore, my hands itch and I want to configure Ubuntu as well. After I enter Ubuntu and connect my mobile phone to my notebook, I can use it for debugging, however, the target device of eclipse displays a bunch of small question marks "??? ", When the program is running, select the "???" It is useless. After searching for the tutorial on the Internet for a long time, I finally succeeded. Now I will summarize and write down the success process.

First, you must configure the android development environment in Ubuntu.ArticleIt is written in, and will not be repeated here.

After the mobile phone is connected to the laptop, you must enable USB debugging on the mobile phone, and then type "lsusb" in terminal"

Ritter @ Ritter-hasee :~ $ Lsusb
Bus 003 device 002: Id 04fc: 05da Sunplus Technology Co., Ltd
Bus 003 device 001: Id 1d6b: 0001 Linux Foundation 1.1 root Hub
Bus 002 device 001: Id 1d6b: 0001 Linux Foundation 1.1 root Hub
Bus 001 device 007: Id 0bb4: 0c91 high tech Computer Corp.
Bus 001 device 005: Id 0133: 0158 RealTek semiconducorp. USB 2.0 multicard Reader
Bus 001 device 002: Id 0133: 8187 RealTek semiconducorp. rtl8187 Wireless Adapter
Bus 001 device 001: Id 1d6b: 0002 Linux Foundation 2.0 root Hub

I am an HTC mobile phone, So bus 001 device 007: Id 0bb4: 0c91 high tech Computer Corp. Is my mobile phone device. Pay attention to the 0bb4 after the ID, which is more important.

Then type "CD/etc/udev/rules. d /"

Ritter @ Ritter-hasee :~ $ CD/etc/udev/rules. d/
Ritter @ Ritter-hasee:/etc/udev/rules. d $

Go to this directory and create the document "50-android.rules"

Ritter @ Ritter-hasee:/etc/udev/rules. d $ sudo gedit 50-android.rules

The name should be random, but the online tutorials are called this, so I also name it. After Entering the document, enter the following two lines of content:

Subsystem = "USB", sysfs {"high tech Computer Corp." }== "0bb4", mode = "0666"
Subsystem = "USB", ENV {devtype} = "usb_device", mode = "0666"

As you can see, because the ID of my mobile phone is 0bb4, sysfs {"high tech Computer Corp. "} =" 0bb4 ". If your mobile phone is not from HTC, you can use" lsusb "to view the details and modify it as needed. Copy the second line as is. I wrote the first line at the beginning, but I tried it. I found the second line on the internet, saying it was a panacea, and I wrote it later. The result was successful, it is better for readers to write both lines like this.

After the document content is complete, grant all permissions to everyone, "sudo chmod 777 50-android.rules"

Ritter @ Ritter-hasee:/etc/udev/rules. d $ sudo chmod 777 50-android.rules

Then enter"Sudo/etc/init. d/udev restart", Restart the connection to the USB device.

Then go to the android SDK decompression path and go to platform-Tools

Ritter @ Ritter-hasee:/etc/udev/rules. d $ CD/home/Ritter/android-sdk-linux_86/platform-tools/
Ritter @ Ritter-hasee :~ /Android-sdk-linux_86/platform-tools $

Enter "sudo./ADB kill-server"

Ritter @ Ritter-hasee :~ /Android-sdk-linux_86/platform-tools $ sudo./ADB kill-Server

Enter "sudo./ADB start-server"

Ritter @ Ritter-hasee :~ /Android-sdk-linux_86/platform-tools $ sudo./ADB start-Server

* Daemon not running. Starting it now on port 5037 *
* Daemon started successfully *

Enter "./ADB devices"

Ritter @ Ritter-hasee :~ /Android-sdk-linux_86/platform-tools $./ADB Devices

List of devices attached
Sh0b5rt08771 Device

At this time, my mobile phone number is correctly displayed. It indicates that the real machine connection is successful. In eclipse, you only need to configure the target in run deployments as a mobile device to install the program to the real machine for debugging.

PS:

For the next connection, if the device is displayed as "???", Remember to go to platforms-tools under Android SDK

Run

"Sudo./ADB kill-server"

"Sudo./ADB start-server"

"Sudo./ADB devices"

You can see the device that is correctly identified.

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.