Debugging the android program on eclipse on a mobile phone real machine in linux (ubuntu12.04)

Source: Internet
Author: User

The simulator is too slow, and the effect of running programs on the simulator is still a little different from that on the real machine after all. Therefore, we recommend that you use the real machine for debugging as much as possible. Connect your android phone to your computer through a USB cable, and then perform the following steps:

1. Create a 51-android.rules file in the/etc/udev/rules. d/directory. The file content is:

SUBSYSTEM = "usb", ENV {DEVTYPE} = "usb_device", MODE = "0666"


2. $ sudo chmod a + rx/etc/udev/rules. d/50-Android.rules

3. $ sudo/etc/init. d/udev restart


4. Go to the tools directory of the android sdk and run platform-tools.

$ Sudo./adb kill-server
$ Sudo./adb start-server


5. $ sudo adb devices

The device model you connected to is displayed. If the device name is displayed as "???", It is probably because of your 51-android.rules file. Repeat the previous steps.

6. Open eclipse and run your program. Then you can see the running result on your android 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.