Android KitKat Development Tools

Written by: on November 12, 2013

One of the best parts of working with the Android platform is the wide range of development tools available to make our everyday lives easier.

Many of us will have used ProGuard to shrink and optimize our code, or the hierarchy viewer for looking into why a few controls are not working how we expect. These development tools are essential to making our everyday lives easier and more productive. With the KitKat release, we have a few more tools added to our toolbox.


Many brave souls have ventured into the Dalvik Debug Monitor Server (DDMS) when faced with memory usage questions. Even for an experienced user, DDMS can be a little overwhelming. In KitKat, we may be able to answer some of our more general, high level, memory usage questions with the new easy to use procstats tool.

Procstats is designed to give a high level overview of memory usage and runtime for your app and other ones running on the system. It’s especially useful when your application launches background services and you want to see how long they are running, or how much memory they are using. All this information is stored by the system automatically. This makes it easy to check memory and runtime assumptions at a glance without adding additional code or hooking up a profiler. For example, after running an application with two services that run once at startup, we can get the following output:

We see here that the app has two services, ExpectedSlowService and ExpectedQuickService. These are the services that run once at app startup. However, we can also see that our knowledge of these services, our assumptions, are contrary to what procstats reports. The service we are expecting to run quickly is running 92% of the apps run time! Ok, maybe that total time is not very long. Let us have another look:

In the first few lines it is apparent our service is running for a lot longer than we expected. Also, we can see that the service is still running which leads me to believe something is hung up in the service. Just by taking a quick glance at this report, we already have a good idea of where the problem is and its severity.


If you have ever had to record a video of your device, then you know how much of a hassle it was. There are a variety of apps in the marketplace, both free and paid, and many requiring the phone to be rooted, that try to solve this problem. Often, with the apps that don’t require a rooted phone, there are issues with device support and recording. Another method is to use a video camera or webcam to record the video.  I have even seen custom stands made to hold a camera over the screen. If you are shaking your head and remember doing something similar, have no fear, support for screen recording is here!

KitKat includes a shell utility for screen recording. This utility can be accessed via the command line using ‘adb shell screenrecord,’ or if you use Android Studio there is a button for it in the Android DDMS window. The utility supports changing the video size, bit rate, and even setting a time limit for the recording.

These tools are just two of the new ones available to Android developers with the KitKat release. It is great to see these additions and the continued support to previous ones. I hope you all find them as helpful as I do.

This piece is the second of eight in our KitKat Developer’s Guide. Check back later this week for new updates or follow us on twitter.

Caleb Smith

Caleb Smith

Caleb Smith is a Software Engineer at Double Encore, specializing in Android Development.

Add your voice to the discussion: