Skip to main content

What is DDMS & How it works?

Android provides a debugging tool called the Dalvik Debug Monitor Server (DDMS).

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




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.






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.



Comments

Popular posts from this blog

Fragment: App loads with white screen for 3 secs before showing proper UI

Issue: 1) When my application start then white/black screen appears, and then main UI is display.  2) Before my fragment load in activity black/white screen appears for 3/4 seconds and then fragment load. Solution: To fix this nasty problem, update the /res/values/styles.xml to include <item name="android:windowDisablePreview">true</item> or <item name="android:windowBackground">@android:color/black</item> for example : <!-- Application theme. -->  <style name="AppTheme" parent="AppBaseTheme">  <!-- All customizations that are NOT specific to a particular API-level can go here. -->  <item name="android:windowDisablePreview">true</item>  <!-- <item name="android:windowBackground">@android:color/black</item> -->  </style>

Android: The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files

Solution Try the following any one solution and problem will go away: 1)  Apply following steps: Close the project and reopen it. Clean the project (It will rebuild the buildpath hence reconfiguring with the JDK libraries) OR Delete and Re-import the project and if necessary do the above steps again. 2)  Apply following steps: Go to properties of project with the build error (right click > Properties) View the "Libraries" tab in the "Build Path" section Find the "JRE System Library" in the list (if this is missing then this error message is not an eclipse bug but a mis-configured project) Remove the "JRE System Library" Hit "Add Library ...", Select "JRE System Library" and add the appropriate JRE for the project (eg. 'Workspace default JRE') Hit "Finish" in the library selection and "OK" in the project properties and then wait for the re-build of the project Hopefully th

Error: Retrieving parent for item: No resource found that matches the given name after upgrading to AppCompat v23

My project is going on easily but suddenly what I found below bugs when developing an app. I know it's minor bug but it may be useful to anyone. Here is the error: Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'. Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'. Solution: This happens because after updates your android studio uses API 23 by default. 1) First check that your compile SDK version must match the support library's major version. If you are using version 23 of the support library, you need to compile against version 23 of the Android SDK. Alternatively you can continue compiling against version 22 of the Android SDK by switching to the latest support library v22.   2) Go to your project structure -> Properties -> and change Build tool version to