What Is DDMS And How It Works?

What is DDMS?

Android provides a debugging tool called the Dalvik Debug Monitor Server (DDMS). Last blog posted in this forum How to draw 3D graphics.

In this article we will cover:

I) what is the advantages of DDMS?
II) How DDMS works?

I) Advantages of DDMS:

i) DDMS provides port-forwarding services.
ii) Screen capture on the device.
iii) Thread and heap information on the device.
iv) Logcat.
v) Process.
vi) Radio state information.
vii) Incoming call and SMS spoofing, location data spoofing, and more.

II) How DDMS works : To use DDMS open the perspective DDMS : go to

Window->Open Perspective->Other, DDMS

You will see a new outlook like this:

Now take a look into the elements of DDMS:

Devices: In the top left corner we can see a tab “Devices”. There we can get the list of devices and emulator which are on line (for more understanding see the below picture). Below each instance of the Emulator or device, we have all processes that are running in this instance.

From left to right we will see some icons:

I) Bug: This shows you the debugger state. If it is green that means we are connected to the debugger and if it is red we are disconnected from the debugger.

II) Multiple–rows icon: It is an “Update thread” button if we will click on this we will get the information about running thread in the “Thread” tab.

III) Stop icon: To stop the selected process.

IV) Screen Capture icon: By clicking on this we will get a picture of our device/emulator screen.

Threads: We can view the thread information for the selected process. To check thread information, go to Devices tab; select the process that you want to examine the threads for. Click the Update Threads button. And you will get thread information in Thread tab.

Heap: this will allows you to view how much heap memory a process is using. This information is useful in tracking heap usage at a certain point of time during the execution of your application.

Go to Devices tab; Click on the update heap -> Click on the Cause GC

You will get Heap information like this:

Allocation Tracker: This allows you to track, in real time, where objects are being allocated when you perform certain actions in your application. This information is valuable for assessing memory usage that can affect application performance.

Go to Devices tab; select the process -> click the Start Tracking button-> it will begin allocation tracking ->click on the get allocation

You will get a view like this:

To stop tracking -> click the Stop tracking button

File Explorer: This will allow you to view, copy, and delete files on the device. This feature is useful in examining files that are created by your application or if you want to transfer files to and from the device.

In the Devices tab, select the emulator that you want to view the file system for.

Click the Pull file button: To copy a file from the device, locate the file in the File Explorer.
Click the Push file button: To copy a file to the device.

Leave a Comment:

crimit says June 30, 2011


deepa says July 4, 2011

Hello sushant!

Sir,can you please send me Broadcast Receiver example!

Article » How to handle bluetooth settings from your application says August 19, 2011

[…] This is a sample activity which shows How to enable and disable bluetooth settings from your application. Last post published in this forum is What is DDMS and how it works. […]

Naveen Kumar says October 15, 2011

hi can u plz tell me how to show pdf file in android….

deepa says November 8, 2011

dear sir!
can u send me the code for how to read a sms inbox and sentitem from native messaging App
and how to send the database to webserver

prashant says January 10, 2012

hello sir,i am using grid view..and in grid i am arranging 9 images..so when i a click on any image so next image can be open..so what is the solution or idea?

Anubhav Gupta says April 8, 2012

actually i don’t have any idea about the interview question.so,can you please send me the interview question of Android Application.

Anubhav Gupta says April 8, 2012

actually i don’t have any idea about the interview question.so,can you please send me the interview question of Android Application.

pankaj patil says May 12, 2012

hii sir plese send me interview question and pdf

jagadeesh says August 31, 2012

hi its good one.can you Explain about ADB exactly because its also coming debugging part

parthipan says January 29, 2013

its nice one because i don’t know how to get it.

Add Your Reply