Android Ddms App

Source: Internet
Author: User

specifically visible http://developer.android.com/tools/debugging/ddms.html. Ddms a bridge for the IDE and Emultor, the real Android device. Developers can see the process running on the target machine/out-of-the-box status through DDMS, can be Android screen to the development machine, can see the heap information of the process, can view the Logcat information, can see the process allocated memory situation, can be like the target machine to send text messages and call, can Send geolocation information to developers like Android. You can debug a process like GDB attach. The full version of DDMS is available under the SDK Tools directory, and can be run directly. The following is an example of Eclipse's DDMS perspective, which provides a brief introduction to DDMS functionality.

Like Debug,java's perspective, after installing ADT there will be a DDMS perspective, open.

The Device window lists all the processes in the emulator, and the upper-right corner of the row buttons are: Debug a process, update a process, update the process stack information, stop a process, the last Picture button when crawling Android current screen.

When you select a process and press the Debug process button, you can debug at the source level if there is code for the process in eclipse. A bit like gdb attach. The picture Grab button is also very useful to bring the current Android display desktop to your machine.

The window on the right has the threads, heap, File Explorer tab. Displays thread statistics, stack information, and Android file system, respectively.

File Explorer is useful for uploading files to an Android phone, or downloading them from a mobile phone or deleting them. When the File Explorer tab is selected, press the three buttons below to upload, download, and delete your Android phone's filesystem.

Emulator control is also very important, through which it can send text messages like a phone, call, has updated the phone location information.

Summary:the DDMS functionality currently provided by Eclipse ADT is only a fraction of the real DDMS, and you can use all of the features directly using the DDMS under Tools. One of the features that looks at the memory allocation of a process is more useful.

DDMS Full Name: Dalvik Debug Monitor Service

? One, the role of DDMS it provides screenshots, view thread and heap information, LOGCAT, process, broadcast status information, analog call calls and SMS, virtual geographic coordinates and so on.

Two, Ddms how to work 1, each Android application runs in a Dalvik virtual machine instance, and each virtual machine instance is a separate process space. The threading mechanism of virtual machines, memory allocation and management, mutexes, etc. are all dependent on the underlying operating system. All Android apps have threads that correspond to one Linux thread, so virtual machines can rely more on the operating system's thread scheduling and management mechanisms. 2,ddms the role of an intermediary between the IDE and the device or emulator. A devicemonitoringservice is established between the 3,DDMS and ADB to monitor the device when it starts. When the device is disconnected or linked, the service notifies DDMS. 4, when a device is linked, a vmmonitoring service is established between DDSM and ADB to monitor the virtual machine on the device. 5, establish a link with the debugger of the virtual machine on the device by Adbdeamon, so that Ddms starts to talk to the virtual machine.

Three, Port 1, for each virtual machine on the device DEBUGGER,DDMS will open a listening port. The port starts at 8600. 2,8700 Port

Four, left panel 1, on the left shows all the currently available emulators or device lists and the list of virtual machines that each device is currently running. Virtual machines are displayed according to the package life of the program. 2, these lists allow you to find the virtual machine running the activity you want to debug. Next to each virtual machine is the "Debuggerpass-through" port, and the link to one of the ports is linked to the corresponding virtual machine on the device. However, when using DDMS, you only need to link to port 8700 because DDSM forwards all the traffic to the currently selected virtual machine. This way, it is not necessary to reconfigure the debugger port each time the virtual machine is switched. 3, when a running program calls the Waitfordebugger () function, the client name will be displayed next to a red icon, know debugger connected to the corresponding virtual machine, which is debugger will turn green. 4. If you see the fork icon, it means that the DDMS is used to not open the port of the virtual machine and cannot establish debugger to establish a connection with the virtual machine. If you see all of the virtual machines, it is likely that there is another DDSM instance running. Five, right panel 1,info The general information about the selected VM is shown here, including the process ID, package name, and virtual machine version.

2,threads

? The Threads view lists all the threads for this process. ID: The unique thread ID assigned by the virtual machine, in Dalvik, which is an odd number starting from 3. Tid:linux thread id,forthe main thread in a process, this would match the ProcessID. Stauts: Thread state, running: Executing program code sleeping: Thread.Sleep () Monitor: Waiting for a listening lock to be accepted. Wait:Object.wait () Native: Executing native code vmwait: Waiting for virtual machine zombie: Thread in Dying process init: Thread initializing (we can't see) starting: Thread is starting (we can't see) Utime: Cumulative time to execute user code stime: Cumulative time to execute system code name: the name of the thread?

4,VM Heap

Shows the status of some heaps, updated during garbage collection. When a virtual machine is selected, the Vmheap view cannot display data, you can click the green "Show heap Updates" button on the right side of the bread, and then click "Cause GC" to implement garbage collection update heap status.

6,allocationtracker In this view, we can track the memory allocation of each selected virtual machine. Click on "Starttracking" and click "Get Allocations" to see.

7,emulatorcontrol Here, you can simulate some device states and behaviors. Telephonystatus: Change the state of phone voice and data scheme, simulate different network speed. Telephonyactions: Send analog phone calls and SMS to the simulator. Locationcontrols: Sending virtual location data to the simulator allows us to perform operations such as positioning. It can be done in manual. Enter the latitude and longitude sent to the simulator, or through GPX and KML files.

Six, other 1,fileexplorer open File Explorer via device > File Explorer. Here you can browse files, upload and delete files, of course, there is a corresponding permission restrictions.

2,screencapture is available through device > Screen capture.

3,exploringprocesses through device >show process status, the information here is output through the shell command "Ps-x".

4,examine Radio State detects broadcast status through device >dump Radio.

5,stop a virtualmachine stop a virtual machine by using the Actions > Halt VM.???

?

?

?

Android Ddms App

Related Article

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.