[Android Software Development] Powerhouse:
DDMS

​

The Dalvik Debug Monitor Service (DDMS) as it is known is one of the application debugging tools that must be a part of every ANDROID app developers's toolkit..This is very very useful to the app developers.Its is a very powerful debugging tool environment and offers various unparalleled debugging features like heap information , logcat monitoring , file manager.It is available by default in ECLIPSE IDE environment or even in the ANDROID SDK.It works on top of ADB for device communication..

DDMS can be stated as a standalone application as part of ANDROID DEVICE MONITOR.The Android Device Monitor is a standalone which can be used in case you do not use the eclipse development environment , though the integration with Eclipse is something that other IDE'S could be envious of.​

HOW TO USE DDMS ??

1)AS EXPLAINED IN THE ABOVE POST , INSTALL ANDROID SDK....AFTER YOU HAVE INSTALLED PLATFORM-TOOLS & SDK TOOLS..NOW GO TO ANDROID FOLDER AND OPEN TOOLS

2)NOW RUN MONITOR.bat AS ADMINISTRATOR

3)NOW ANDROID DEBUG MONITOR WILL APPEAR ..

​

Now let's learn about its components and it's use's

DDMS VIEW COMPONENT'S :-​

DDMS offers a set of view components , each of which show relevant information related to the connected Emulator.

DEVICES :-

The device panel shows the details of each process that are running in the connected device.There are various operations that can be performed from this panel.

Each of the icons present in this panel performs the functions as follow's :

Debug Process Icon :- It show's the state of connection of the debugger.

Update Heap :-Clicking on this enables Heap information for the process so that we do not have to do memory deallocation manually.

Dump HPROF :- Generates a Heap Dump , useful for tracing memory leaks in your app.

Cause GC :-Invokes the Garbage collector to collect heap data.

Update thread :-Show's the information about the running thread in the thread tad for selected process

Start Method Profiling :- Tracks the metric's related a method. It collects information like the amount of time taken to execute a method,number of calls.

Stop Process :-Stops the currently selected process.

Screen Capture :- Takes a screenshot of whatever is displayed on the screen.

Reset ADB :- Ast he name suggets,it resets ADB.

​

THREAD'S :-​

The thread tab on the right of devices view shows informatiom related to the thread for each process selected in the devices view.The information shown can described as follows.

ID :- A unique ID assigned to each thread dby Dalvik V,, which are only odd numbers that start from 3 .

Tid :-The linux thread associated with each thread , ehich matches the process ID for each main thread in a process.

Status :- Status of the thread in VM , out of daemons are marked with an asterix.other values can be among running?sleeping/init/starting.

HEAP​

:-

the heap view show a information and statistics about memory heap .To view heap usage,follow these below steps

From the devices view,select the process for heap usage which has to be examined.

click on update heap

From heap Tab , select Cause GC to enable collecting heap data

Everytime you need to update your heap statistics.This will show you the amount of memory allocated to each

​

ALLOCATION TRACKER​

The allocation Tracker show a real time information about allocation happening in the application over a certain period of time.To enable allocation Tracking.

[*]select the process to be tracked from device panel

[*]click on start tracking from allocation tracker tab.

[*]perform any actions on the devices or emulator that you want to be tracked.

[*]click on Get Allocations objects, since tracking was enabled .

​

NETWORK STATISTICS​

;-

The network tab allows you to track and optimize the amount of network data your app is using.It even allows you to tag network sockets so that you can differentiate between types of data .It will indicate the speed and amount of data received /transmitted ..

EMULATOR CONTROL :-​

One problem with testing Android devices using an emulator or developer device is the fact that it is unable to examine the performance of the app in the reak world conditions . like call or SMS is received/sent or when a particular location is reached.To be specific the emulator Tab allows you to to emulate the following real world conditions :

Telephony Status :- the following options are available to set the status of phones network.

Voice :- unregistered,home,roaming,searching,denied.

Data :- unregistered,home,roaming,searching,denied.

Speed :- Full,GSM,HSCSD,GPRS,EDGE,UMTS,HSDPA.

Latency :- GPRS,UMTS

Telephony Actions :- Telephony actions allow you to spoof the network.

Location Settings ;- Emulator control allows you to sppof the location

​

FILE EXPLORER :-​

As the name says it lets you view the directory and file structure if the device and lso easily copy files to and from the emulator so as to enable easy data transfer in a manner similiar to ADB or ADB pull command.

​

SYSTEM INFORMATION :-​

As the name says , it give's us the particular information about the GPU load , CPU load....

​

DDMS HAS ALSO AN INBUILT LOGCAT VIEWER :-​

​

​

Happy Developing and learning :)​

CREDITS ;-

Google inc.

[MENTION=4782403]iamareebjamal[/MENTION]

[MENTION=5095029]Nabs Zains[/MENTION]

[MENTION=4976737]amogh420[/MENTION]

[MENTION=5003551]srt99[/MENTION]

[MENTION=5065427]Maxx247[/MENTION]

[MENTION=4782403]iamareebjamal[/MENTION]

[MENTION=5005308]El_Dark[/MENTION]

[MENTION=4923920]doctor_droid[/MENTION]

[MENTION=4561499]CharsiBabu[/MENTION]

[MENTION=4621609]lokeshsaini94[/MENTION]

[MENTION=1330239]hellraiser[/MENTION]

[MENTION=5121618]Zeuscluts[/MENTION]

[MENTION=2229371]Parti[/MENTION]mus.prime

[MENTION=4962179]Lifehacker7[/MENTION]

if i forgot you , just PM me .. i will be very glad to add it ..