| Joe Fernandez | e4ba91d | 2012-10-24 15:36:10 -0700 | [diff] [blame] | 1 | page.title=JOBB |
| 2 | @jd:body |
| 3 | |
| 4 | |
| 5 | <p>The {@code jobb} tool allows you to build encrypted and unencrypted APK expansion files in |
| 6 | Opaque Binary Blob (OBB) format. You can download and mount these expansion files in your |
| 7 | application using {@link android.os.storage.StorageManager} on devices with Android 2.3 (API |
| 8 | Level 9) or higher. OBB files are used to provide additional file assets for Android applications |
| 9 | (such as graphics, sounds and video), separate from an application's APK file. For more |
| 10 | information on using expansion files, see |
| Dirk Dougherty | 2b286bb | 2012-11-29 17:25:09 -0800 | [diff] [blame] | 11 | <a href="{@docRoot}google/play/expansion-files.html">APK Expansion Files</a>.</p> |
| Joe Fernandez | e4ba91d | 2012-10-24 15:36:10 -0700 | [diff] [blame] | 12 | |
| 13 | |
| 14 | <h2 id="usage">Usage</h2> |
| 15 | |
| 16 | <p>The syntax for running {@code jobb} is as follows:</p> |
| 17 | |
| 18 | <pre> |
| 19 | jobb [-d <directory>][-o <filename>][-pn <package>][-pv <version>] \ |
| 20 | [-k <key>][-ov][-dump <filename>][-v][-about] |
| 21 | </pre> |
| 22 | |
| 23 | <p>You can use the {@code jobb} tool to create an OBB file or extract the contents of an |
| 24 | existing OBB. The following example command creates an OBB file from source files.</p> |
| 25 | |
| 26 | <pre> |
| 27 | $ jobb -d /temp/assets/ -o my-app-assets.obb -k secret-key -pn com.my.app.package -pv 11 |
| 28 | </pre> |
| 29 | |
| 30 | <p>This example shows how to dump (extract) the contents of an existing OBB file:</p> |
| 31 | |
| 32 | <pre> |
| 33 | $ jobb -d /temp/obb-output/ -o my-app-assets.obb -k secret-key |
| 34 | </pre> |
| 35 | |
| 36 | |
| 37 | <h2 id="options">Options</h2> |
| 38 | |
| 39 | <p>The table below lists the command line options for the {@code jobb} tool.</p> |
| 40 | |
| 41 | <table> |
| 42 | <tr> |
| 43 | <th>Option</th> |
| 44 | <th>Description</th> |
| 45 | </tr> |
| 46 | <tr> |
| 47 | <td>{@code -d <directory>}</td> |
| 48 | <td>Set the input directory for creating an OBB file, or the output directory when extracting |
| 49 | ({@code -dump}) an existing file. When creating an OBB file, the contents of the specified |
| 50 | directory and all its sub-directories are included in the OBB file system. |
| 51 | </td> |
| 52 | </tr> |
| 53 | <tr> |
| 54 | <td>{@code -o <filename>}</td> |
| 55 | <td>Specify the filename for the OBB file. This parameter is required when |
| 56 | creating an OBB and extracting (dumping) its contents.</td> |
| 57 | </tr> |
| 58 | <tr> |
| 59 | <td>{@code -pn <package>}</td> |
| 60 | <td>Specify the package name for the application that mounts the OBB file, which corresponds |
| 61 | to the {@code package} value specified in your application's manifest. This parameter is |
| 62 | required when creating an OBB file.</td> |
| 63 | </tr> |
| 64 | <tr> |
| 65 | <td>{@code -pv <version>}</td> |
| 66 | <td>Set the minimum version for the application that can mount the OBB file, which corresponds |
| 67 | to the {@code android:versionCode} value in your application's manifest. This parameter is |
| 68 | required when creating an OBB file.</td> |
| 69 | </tr> |
| 70 | <tr> |
| 71 | <td>{@code -k <key>}</td> |
| 72 | <td>Specify a password for encrypting a new OBB file or decrypting an existing, encypted |
| 73 | OBB file.</td> |
| 74 | </tr> |
| 75 | <tr> |
| 76 | <td>{@code -ov}</td> |
| 77 | <td>Create OBB file that is an overlay of an existing OBB file structure. This option allows |
| 78 | the new package contents to be mounted into the same location as a previous package and is |
| 79 | intended for creating patch versions of previously generated OBB files. Files within an |
| 80 | overlay OBB file replace files that have the same path.</td> |
| 81 | </tr> |
| 82 | <tr> |
| 83 | <td style="white-space: nowrap">{@code -dump <filename>}</td> |
| 84 | <td><p>Extract the contents of the specified OBB file. When using this option, you must also |
| 85 | specify the output directory for the contents using the {@code -d <directory>} |
| 86 | parameter.</p> |
| 87 | |
| 88 | <p class="note"><strong>Note:</strong> When dumping an existing OBB file, you can omit the |
| 89 | {@code -d <directory>} parameter to get a listing of the directories inside the file, |
| 90 | without extracting the contents.</p> |
| 91 | </td> |
| 92 | </tr> |
| 93 | <tr> |
| 94 | <td>{@code -v}</td> |
| 95 | <td>Set verbose output for the tool.</td> |
| 96 | </tr> |
| 97 | <tr> |
| 98 | <td>{@code -about}</td> |
| 99 | <td>Display version and help information for the {@code jobb} tool.</td> |
| 100 | </tr> |
| 101 | |
| 102 | </table> |