Android day01-Basics

Source: Internet
Author: User

First, the use of DDMS

the full name of the DDMS is the Dalvik Debug Monitor service, which is the Dalvik virtual Machine Debug Monitor in the Android development environment. It provides us with examples of screenshots for a test device, viewing running threads for a particular process, and heap information, LOGCAT, broadcast status information, analog phone calls, receiving SMS, virtual geographic coordinates, and more.

After entering DDMS, the interface is as follows:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/A6/wKiom1Wj8gKzIlawAAmzvyZS-zI453.jpg "title=" DDMS feature. PNG "alt=" Wkiom1wj8gkzilawaamzvyzs-zi453.jpg "/>


Ii. use of the ADB

ADB's all-called Android Debug Bridge, is the role of the Debug bridge. With ADB we can easily debug the Android program via DDMS in Eclipse, which is the debug tool.

Before using the ADB directive, the ADB directory should be configured in the environment variable path so that it can be used directly on the cmd command line.

commonly used ADB commands:

1.adb devices: Lists all Android devices connected to the current computer (including the real machine and simulator) and can view the serial number of the device as a unique identification of the device.

2.adb occupies a port of 5037, you can enter the cmd in the Netstat-oan command to list all the ports currently occupied by the computer, by looking at the 5037 port corresponding to the PID, to the Task Manager query, you know which application occupies this port , you can turn this program off.

3.ADB Kill-server: Interrupts the ADB service, and devices in DDMS can see that the device disappears.

4.ADB start-server: Restart the ADB service, you can see that the device appears again in the devices in DDMS.

5.ADB [-S Android device serial number] install [-r] apk file with drive letter path: Install the application.

If the device has more than 1 devices, you need to specify the-s plus parameter to specify the device serial number (can be viewed through the devices command)

-R refers to a forced installation, that is, if you do not use-R, the installation will fail if there is an application that will be installed on the device. Such as:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/A4/wKioL1Wj-zejOtAoAAH4fuxWos0546.jpg "title="-r.png "alt=" Wkiol1wj-zejotaoaah4fuxwos0546.jpg "/>

6. ADB [-S Android device serial number] Uninstall application package Name: Uninstall the application.

If the device has more than 1 devices, you need to specify the-s plus parameter to specify the device serial number (can be viewed through the devices command)

Because the application's package name uniquely identifies the application, the package name allows the application to be uninstalled.

7. ADB [-S Android device serial number] Shell: Enter the device's Linux directory, the command will appear #, indicating waiting for the user to enter the Linux instructions. The File Explorer's device files directory in DDMS is listed with the Linux instructions.

# ls-l: List phone directory information

# logcat: View phone log information





This article is from the "line of the World" blog, please be sure to keep this source http://4259297.blog.51cto.com/4249297/1673947

Android day01-Basics

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.