| Robert Ly | fa1dbfc | 2010-12-29 16:25:23 -0800 | [diff] [blame] | 1 | page.title=Tools |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2 | @jd:body |
| 3 | |
| 4 | <img src="{@docRoot}assets/images/android_wrench.png" alt="" align="right"> |
| 5 | |
| Bill Gruber | 604917b | 2011-04-04 12:11:49 -0700 | [diff] [blame] | 6 | <p>The Android SDK includes a variety of tools that help you develop mobile |
| 7 | applications for the Android platform. The tools are classified into two groups: SDK tools |
| 8 | and platform tools. SDK tools are platform independent and are required no matter which |
| 9 | Android platform you are developing on. Platform tools are customized to support the features of the |
| 10 | latest Android platform.</p> |
| Joe Malin | a7fda21 | 2010-10-18 17:07:45 -0700 | [diff] [blame] | 11 | |
| Bill Gruber | 604917b | 2011-04-04 12:11:49 -0700 | [diff] [blame] | 12 | <h2 id="tools-sdk">SDK Tools</h2> |
| 13 | <p>The SDK tools are installed with the SDK starter package and are periodically updated. |
| 14 | The SDK tools are required if you are developing Android applications. The most important SDK tools |
| 15 | include the Android SDK and AVD Manager (<code>android</code>), the emulator |
| 16 | (<code>emulator</code>), and the Dalvik Debug Monitor Server |
| 17 | (<code>ddms</code>). A short summary of some frequently-used SDK tools is provided below.</p> |
| Robert Ly | 67c2d97 | 2011-01-05 00:54:41 -0800 | [diff] [blame] | 18 | |
| Bill Gruber | 604917b | 2011-04-04 12:11:49 -0700 | [diff] [blame] | 19 | <dl> |
| 20 | <dt><a href="android.html">android</a></dt> |
| 21 | <dd>Lets you manage AVDs, projects, and the installed components of the SDK.</dd> |
| 22 | <dt><a href="{@docRoot}guide/developing/debugging/ddms.html">Dalvik Debug Monitor |
| 23 | Server (ddms)</a></dt> |
| 24 | <dd>Lets you debug Android applications.</dd> |
| Robert Ly | 67c2d97 | 2011-01-05 00:54:41 -0800 | [diff] [blame] | 25 | <dt><a href="dmtracedump.html">dmtracedump</a></dt> |
| Bill Gruber | 604917b | 2011-04-04 12:11:49 -0700 | [diff] [blame] | 26 | <dd>Generates graphical call-stack diagrams from trace log files. The tool uses the |
| 27 | Graphviz Dot utility to create the graphical output, so you need to install Graphviz before |
| 28 | running <code>dmtracedump</code>. For more information on using <code>dmtracedump</code>, see <a |
| 29 | href="{@docRoot}guide/developing/debugging/debugging-tracing.html#dmtracedump">Profiling |
| 30 | with Traceview and dmtracedump</a></dd> |
| 31 | <dt><a href="draw9patch.html">Draw 9-patch</a></dt> |
| 32 | <dd>Allows you to easily create a {@link android.graphics.NinePatch} graphic using a |
| 33 | WYSIWYG editor. It also previews stretched versions of the image, and highlights the area in which |
| 34 | content is allowed.</dd> |
| 35 | <dt><a href="emulator.html">Android Emulator (emulator)</a></dt> |
| 36 | <dd>A QEMU-based device-emulation tool that you can use to design, debug, and test |
| 37 | your applications in an actual Android run-time environment.</dd> |
| 38 | <dt><a href="hierarchy-viewer.html">Hierarchy Viewer (hierarchyviewer)</a></dt> |
| 39 | <dd>Lets you debug and optimize an Android application's user interface.</dd> |
| Robert Ly | 67c2d97 | 2011-01-05 00:54:41 -0800 | [diff] [blame] | 40 | <dt><a href="hprof-conv.html">hprof-conv</a></dt> |
| Bill Gruber | 604917b | 2011-04-04 12:11:49 -0700 | [diff] [blame] | 41 | <dd>Converts the HPROF file that is generated by the Android SDK tools to a standard format so |
| 42 | you can view the file in a profiling tool of your choice.</dd> |
| Robert Ly | 67c2d97 | 2011-01-05 00:54:41 -0800 | [diff] [blame] | 43 | <dt><a href="layoutopt.html">layoutopt</a></dt> |
| Bill Gruber | 604917b | 2011-04-04 12:11:49 -0700 | [diff] [blame] | 44 | <dd>Lets you quickly analyze your application's layouts in order to optimize them for |
| 45 | efficiency.</dd> |
| Robert Ly | 6ffacae | 2010-12-16 17:50:43 -0800 | [diff] [blame] | 46 | <dt><a href="mksdcard.html">mksdcard</a></dt> |
| Bill Gruber | 604917b | 2011-04-04 12:11:49 -0700 | [diff] [blame] | 47 | <dd>Helps you create a disk image that you can use with the emulator, to simulate the presence |
| 48 | of an external storage card (such as an SD card).</dd> |
| Robert Ly | 67c2d97 | 2011-01-05 00:54:41 -0800 | [diff] [blame] | 49 | <dt><a href="monkey.html">Monkey</a></dt> |
| Bill Gruber | 604917b | 2011-04-04 12:11:49 -0700 | [diff] [blame] | 50 | <dd>Runs on your emulator or device and generates pseudo-random streams of user events such |
| 51 | as clicks, touches, or gestures, as well as a number of system-level events. You can use the Monkey |
| 52 | to stress-test applications that you are developing, in a random yet repeatable manner.</dd> |
| Robert Ly | 67c2d97 | 2011-01-05 00:54:41 -0800 | [diff] [blame] | 53 | <dt><a href="monkeyrunner_concepts.html">monkeyrunner</a></dt> |
| Bill Gruber | 604917b | 2011-04-04 12:11:49 -0700 | [diff] [blame] | 54 | <dd>Provides an API for writing programs that control an Android device or emulator from |
| 55 | outside of Android code.</dd> |
| Robert Ly | 67c2d97 | 2011-01-05 00:54:41 -0800 | [diff] [blame] | 56 | <dt><a href="proguard.html">ProGuard</a></dt> |
| Bill Gruber | 604917b | 2011-04-04 12:11:49 -0700 | [diff] [blame] | 57 | <dd>Shrinks, optimizes, and obfuscates your code by removing unused code and renaming |
| 58 | classes, fields, and methods with semantically obscure names.</dd> |
| Robert Ly | 67c2d97 | 2011-01-05 00:54:41 -0800 | [diff] [blame] | 59 | <dt><a href="sqlite3.html">sqlite3</a></dt> |
| Bill Gruber | 604917b | 2011-04-04 12:11:49 -0700 | [diff] [blame] | 60 | <dd>Lets you access the SQLite data files created and used by Android applications.</dd> |
| 61 | <dt><a href="traceview.html">traceview</a></dt> |
| 62 | <dd>Provides a graphical viewer for execution logs saved by your application.</dd> |
| Robert Ly | 67c2d97 | 2011-01-05 00:54:41 -0800 | [diff] [blame] | 63 | <dt><a href="zipalign.html">zipalign</a></dt> |
| Bill Gruber | 604917b | 2011-04-04 12:11:49 -0700 | [diff] [blame] | 64 | <dd>Optimizes <code>.apk</code> files by ensuring that all uncompressed data starts with a |
| 65 | particular alignment relative to the start of the file. This should always be used to align .apk |
| 66 | files after they have been signed.</dd> |
| 67 | </dl> |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 68 | |
| Bill Gruber | 604917b | 2011-04-04 12:11:49 -0700 | [diff] [blame] | 69 | <h2 id="tools-platform">Platform Tools</h2> |
| 70 | |
| 71 | <p>The platform tools are typically updated every time you install a new SDK platform. Each update |
| 72 | of the platform tools is backward compatible with older platforms. Usually, you directly use only |
| 73 | one of the platform tools—the <a href="adb.html">Android Debug Bridge (<code>adb</code>)</a>. |
| 74 | Android Debug Bridge is a versatile tool that lets you manage the state of an emulator instance or |
| 75 | Android-powered device. You can also use it to install an Android application (.apk) file on a |
| 76 | device.</p> |
| 77 | |
| 78 | <p>The other platform tools, such as <a href="{@docRoot}guide/developing/tools/aidl.html">aidl</a>, |
| 79 | <code>aapt</code>, <code>dexdump</code>, and <code>dx</code>, are typically called by the Android |
| 80 | build tools or Android Development Tools (ADT), so you rarely need to invoke these tools directly. |
| 81 | As a general rule, you should rely on the build tools or the ADT plugin to call them as needed.</p> |
| 82 | |
| 83 | <p class="note"><strong>Note:</strong> The Android SDK provides additional shell tools that can |
| 84 | be accessed through <code>adb</code>, such as <a href="bmgr.html">bmgr</a> and |
| 85 | <a href="logcat.html">logcat</a>.</p> |