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.
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.