Debugging of android phones on slackware linux

Source: Internet
Author: User

In windows, android phones can directly communicate with android mobile devices by installing google's usb driver and using the pea clip or 91 assistant. But it is different on linux. Next we will introduce how to use the adb command on slackware linux 13.37 x86_64 to debug the android program.

My android phone model is coolpad7260 and android2.3.5.

Mobile Terminal:

1. Open the development and debugging options on the mobile phone end, that is, set --> Application --> Development --> USB debugging.

2. Connect the USB cable to the PC.

PC end:

1. Download the android SDK on the official android website (download the latest version), or directly download the android source code (this is time-consuming), and then compile the SDK through the source code. In either method, the executable program adb can be found in the platform-tools directory of the SDK. It is best to place the absolute PATH of the SDK's platform-tools in the environment variable PATH, so that you can directly use the adb command in linux shell.

2. After a large-brand Mobile Phone (such as HTC, Samsung, Huawei, and ZTE) is inserted into a PC, the connected android mobile phone device can be directly seen using the adb devices command. But there is a problem with the coolpad7260 mobile phone. the USB drive of this mobile phone is not written into SerialNumber, and the adb program needs to read the SerialNumber in the USB device driver to get the device, therefore, by default, the coolpad7260 mobile phone is inserted into the PC and the adb devices command cannot be used to debug the application. Solution: in linux, $ HOME /. the android/directory contains an adb_usb.ini configuration file, which writes the VendorID of coolpad7260 to this file (the VendorID of coolpad7260 is 0x05C6 and 0x1EBF, one row ).

3. Run the adb command to view the inserted android device.

# Adb devices

List of devices attached

???????????? Device

???????????? The reason is that the USB driver of the coolpad7260 mobile phone does not write the SerialNumber, but why is it ???????????? I have not investigated it in depth.

You can run the following command if the device cannot be seen after you run the adb command:

# Adb kill-server

# Adb start-server

# Adb devices

In addition, I have not tried to add udev rules for some linux distributions, such as Ubuntu. If you really need it, you can refer to it on the official website of android.


From linuxhunter
 

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.