1 page.title=android 2 parent.title=Tools 3 parent.link=index.html 4 @jd:body 5 6 <p>{@code android} is an important development tool that lets you:</p> 7 8 <ul> 9 <li>Create, delete, and view Android Virtual Devices (AVDs). See <a href= 10 "{@docRoot}tools/devices/managing-avds-cmdline.html">Managing AVDs from the Command 11 Line</a>.</li> 12 13 <li>Create and update Android projects. See <a href= 14 "{@docRoot}tools/projects/projects-cmdline.html">Managing Projects from 15 the Command Line</a>.</li> 16 17 <li>Update your Android SDK with new platforms, add-ons, and documentation. See <a href= 18 "{@docRoot}sdk/exploring.html">Exploring the SDK</a>.</li> 19 </ul>If you are using Eclipse, the <code>android</code> tool's features are integrated 20 into ADT, so you should not need to use this tool directly. 21 22 <p class="note"><strong>Note:</strong> The documentation of options below is not exhaustive 23 and may be out of date. For the most current list of options, execute <code>android 24 --help</code>.</p> 25 26 27 28 29 <h2>Syntax</h2> 30 <pre>android [global options] action [action options]</pre> 31 32 <h3>Global Options</h3> 33 34 <dl> 35 <dt><code>-s</code></dt> 36 37 <dd>Silent mode: only errors are printed out</dd> 38 39 <dt><code>-h</code></dt> 40 41 <dd>Usage help</dd> 42 43 <dt><code>-v</code></dt> 44 45 <dd>Verbose mode: errors, warnings and informational messages are printed.</dd> 46 </dl> 47 48 <h3>AVD actions and options</h3> 49 50 <table> 51 <tr> 52 <th width="15%">Action</th> 53 54 <th width="20%">Option</th> 55 56 <th width="30%">Description</th> 57 58 <th>Comments</th> 59 </tr> 60 61 <tr> 62 <td><code>avd</code></td> 63 64 <td>None</td> 65 66 <td>Launch the AVD Manager</td> 67 68 <td></td> 69 </tr> 70 71 <tr> 72 <td><code>sdk</code></td> 73 74 <td>None</td> 75 76 <td>Launch the Android SDK Manager</td> 77 78 <td></td> 79 </tr> 80 81 <tr> 82 <td rowspan="6"><code>create avd</code></td> 83 84 <td><code>-n <name></code></td> 85 86 <td>The name for the AVD.</td> 87 88 <td>Required</td> 89 </tr> 90 91 <tr> 92 <td><code>-t <targetID></code></td> 93 94 <td>Target ID of the system image to use with the new AVD. To obtain a list of available 95 targets, use <code>android list targets</code></td> 96 97 <td>Required</td> 98 </tr> 99 100 <tr> 101 <td><code>-c <path>|<size>[K|M]</code></td> 102 103 <td>The path to the SD card image to use with this AVD or the size of a new SD card image to 104 create for this AVD. For example, <code>-c path/to/sdcard</code> or <code>-c 105 1000M</code>.</td> 106 107 <td></td> 108 </tr> 109 110 <tr> 111 <td><code>-f</code></td> 112 113 <td>Force creation of the AVD</td> 114 115 <td></td> 116 </tr> 117 118 <tr> 119 <td><code>-p <path></code></td> 120 121 <td>Path to the location at which to create the directory for this AVD's files.</td> 122 123 <td></td> 124 </tr> 125 126 <tr> 127 <td><code>-s <name>|<width>-<height></code></td> 128 129 <td>The skin to use for this AVD, identified by name or dimensions. The <code>android</code> 130 tool scans for a matching skin by name or dimension in the <code>skins/</code> directory of 131 the target referenced in the <code>-t <targetID></code> argument. For example, <code>-s 132 HVGA-L</code></td> 133 134 <td></td> 135 </tr> 136 137 <tr> 138 <td><code>delete avd</code></td> 139 140 <td><code>-n <name></code></td> 141 142 <td>The name of the AVD to delete</td> 143 144 <td>Required</td> 145 </tr> 146 147 <tr> 148 <td rowspan="3"><code>move avd</code></td> 149 150 <td><code>-n <name></code></td> 151 152 <td>The name of the AVD to move</td> 153 154 <td>Required</td> 155 </tr> 156 157 <tr> 158 <td><code>-p <path></code></td> 159 160 <td>Path to the location at which to create the directory for this AVD's files.</td> 161 162 <td></td> 163 </tr> 164 165 <tr> 166 <td><code>-r <new-name></code></td> 167 168 <td>New name of the AVD if you want to rename it</td> 169 170 <td></td> 171 </tr> 172 173 <tr> 174 <td><code>update avd</code></td> 175 176 <td><code>-n <name></code></td> 177 178 <td>The name of the AVD to move</td> 179 180 <td>Required</td> 181 </tr> 182 </table> 183 184 <h3>Project actions and options</h3> 185 186 <table> 187 <tr> 188 <th width="15%">Action</th> 189 190 <th width="20%">Option</th> 191 192 <th width="30%">Description</th> 193 194 <th>Comments</th> 195 </tr> 196 197 <tr> 198 <td rowspan="5"><code>create project</code></td> 199 200 <td><code>-n <name></code></td> 201 202 <td>The name for the project</td> 203 204 <td>Required</td> 205 </tr> 206 207 <tr> 208 <td><code>-t <targetID></code></td> 209 210 <td>Target ID of the system image to use with the new AVD. To obtain a list of available 211 targets, use <code>android list targets</code></td> 212 213 <td>Required</td> 214 </tr> 215 216 <tr> 217 <td><code>-k <path>|<size>[K|M]</code></td> 218 219 <td>Package namespace</td> 220 221 <td>Required</td> 222 </tr> 223 224 <tr> 225 <td><code>-a</code></td> 226 227 <td>Name for the default Activity class</td> 228 229 <td>Required</td> 230 </tr> 231 232 <tr> 233 <td><code>-p <path></code></td> 234 235 <td>Location of your project directory</td> 236 237 <td>Required</td> 238 </tr> 239 240 <tr> 241 <td rowspan="5"><code>update project</code></td> 242 243 <td><code>-n <name></code></td> 244 245 <td>The name of the project to update</td> 246 247 <td></td> 248 </tr> 249 250 <tr> 251 <td><code>-p <path></code></td> 252 253 <td>Location path of the project</td> 254 255 <td>Required</td> 256 </tr> 257 258 <tr> 259 <td><code>-l <library path></code></td> 260 261 <td>Location path of an Android Library to add, relative to the main project</td> 262 263 <td></td> 264 </tr> 265 266 <tr> 267 <td><code>-s <subprojects></code></td> 268 269 <td>Update any projects in subfolders such as test projects</td> 270 271 <td></td> 272 </tr> 273 274 <tr> 275 <td><code>-t <targetID></code></td> 276 277 <td>Target id to set for the project</td> 278 279 <td></td> 280 </tr> 281 282 <tr> 283 <td rowspan="3"><code>create test-project</code></td> 284 285 <td><code>-n <name></code></td> 286 287 <td>The name of the project</td> 288 289 <td></td> 290 </tr> 291 292 <tr> 293 <td><code>-p <path></code></td> 294 295 <td>Location path of the project</td> 296 297 <td>Required</td> 298 </tr> 299 300 <tr> 301 <td><code>-m <main></code></td> 302 303 <td>The name of the project</td> 304 305 <td>Required</td> 306 </tr> 307 308 <tr> 309 <td rowspan="2"><code>update test-project</code></td> 310 311 <td><code>-p <path></code></td> 312 313 <td>Location path of the project to test, relative to the new project</td> 314 315 <td>Required</td> 316 </tr> 317 318 <tr> 319 <td><code>-m <main></code></td> 320 321 <td>The main class of the project to test</td> 322 323 <td>Required</td> 324 </tr> 325 326 <tr> 327 <td rowspan="4"><code>create lib-project</code></td> 328 329 <td><code>-k <packageName></code></td> 330 331 <td>(Required) Package name of the library project</td> 332 333 <td>Required</td> 334 </tr> 335 336 <tr> 337 <td><code>-p <path></code></td> 338 339 <td>Location path of the project</td> 340 341 <td>Required</td> 342 </tr> 343 344 <tr> 345 <td><code>-t <targetID></code></td> 346 347 <td>Target ID of the library project</td> 348 349 <td>Required</td> 350 </tr> 351 352 <tr> 353 <td><code>-n <name></code></td> 354 355 <td>The name of the project</td> 356 357 <td>Required</td> 358 </tr> 359 360 <tr> 361 <td rowspan="3"><code>update lib-project</code></td> 362 363 <td><code>-p <path></code></td> 364 365 <td>Location path of the project</td> 366 367 <td>Required</td> 368 </tr> 369 370 <tr> 371 <td><code>-l <libraryPath></code></td> 372 373 <td>Location path of an Android Library to add, relative to the main project</td> 374 375 <td></td> 376 </tr> 377 378 <tr> 379 <td><code>-t <name></code></td> 380 381 <td>Target ID of the library project</td> 382 383 <td></td> 384 </tr> 385 386 <tr> 387 <td rowspan="3"><code>create uitest-project</code></td> 388 <td><code>-n <name></code></td> 389 <td>The name of the UI test project</td> 390 <td></td> 391 </tr> 392 393 <tr> 394 <td><code>-t <name></code></td> 395 396 <td>Target ID of the UI test project</td> 397 398 <td>Required</td> 399 </tr> 400 401 <tr> 402 <td><code>-p <path></code></td> 403 404 <td>Location path of the UI test project</td> 405 406 <td>Required</td> 407 </tr> 408 409 </table> 410 411 <h3>Update actions</h3> 412 <dl> 413 <dt><code>update adb</code></dt> 414 <dd>Updates adb to support the USB devices declared in the SDK add-ons.</dd> 415 416 <dt><code>update sdk</code></dt> 417 <dd>Updates the SDK by suggesting new platforms to install if available.</dd> 418