Debian Codegraph @

debian/aapt.1

raw
1 .\" Hey, EMACS: -*- nroff -*-
2 .TH aapt 1 "October 15, 2014"
3 .\" Please adjust this date whenever revising the manpage.
4 .\"
5 .\" Some roff macros, for reference:
6 .\" .nh disable hyphenation
7 .\" .hy enable hyphenation
8 .\" .ad l left justify
9 .\" .ad b justify to both left and right margins
10 .\" .nf disable filling
11 .\" .fi enable filling
12 .\" .br insert line break
13 .\" .sp <n> insert n+1 empty lines
14 .\" for manpage-specific macros, see man(7)
15 .SH NAME
16 aapt \- Android Asset Packaging Tool
17 .SH SYNOPSIS
18 .B aapt
19 .RI command\ [\ options\ ]\ files\ ...
20 .br
21 .PP
22 .B aapt
23 .RI l[ist]\ [\-v]\ [\-a]\ file.{zip,jar,apk}
24 .br
25 List contents of Zip-compatible archive.
26 .PP
27
28 .B aapt
29 .RI d[ump]\ [\-\-values]\ WHAT\ file.{apk}\ [asset\ [asset\ ...]]
30
31 strings Print the contents of the resource table string pool in the APK.
32 badging Print the label and icon for the app declared in APK.
33 permissions Print the permissions from the APK.
34 resources Print the resource table from the APK.
35 configurations Print the configurations in the APK.
36 xmltree Print the compiled xmls in the given assets.
37 xmlstrings Print the strings of the given compiled xml assets.
38
39 .B aapt
40 .RI p[ackage]\ [\-d]\ [\-f]\ [\-m]\ [\-u]\ [\-v]\ [\-x]\ [\-z]\ [\-M\ AndroidManifest.xml]
41
42 [\-0 extension [\-0 extension ...]] [\-g tolerance] [\-j jarfile]
43 [\-\-debug-mode] [\-\-min-sdk-version VAL] [\-\-target-sdk-version VAL]
44 [\-\-app-version VAL] [\-\-app-version-name TEXT] [\-\-custom-package VAL]
45 [\-\-rename-manifest-package PACKAGE]
46 [\-\-rename-instrumentation-target-package PACKAGE]
47 [\-\-utf16] [\-\-auto-add-overlay]
48 [\-\-max-res-version VAL]
49 [\-I base-package [\-I base-package ...]]
50 [\-A asset-source-dir] [\-G class-list-file] [\-P public-definitions-file]
51 [\-S resource-sources [\-S resource-sources ...]]
52 [\-F apk-file] [\-J R-file-dir]
53 [\-\-product product1,product2,...]
54 [\-c CONFIGS] [\-\-preferred-configurations CONFIGS]
55 [raw-files-dir [raw-files-dir] ...]
56 [\-\-output-text-symbols DIR]
57
58 Package the android resources. It will read assets and resources that are
59 supplied with the \-M \-A \-S or raw-files-dir arguments. The \-J \-P \-F and \-R
60 options control which files are output.
61
62 .B aapt
63 .RI r[emove]\ [\-v]\ file.{zip,jar,apk}\ file1\ [file2\ ...]
64 Delete specified files from Zip-compatible archive.
65
66 .B aapt
67 .RI a[dd]\ [\-v]\ file.{zip,jar,apk}\ file1\ [file2\ ...]
68 Add specified files to Zip-compatible archive.
69
70 .B aapt
71 .RI c[runch]\ [\-v]\ \-S\ resource-sources\ ...\ \-C\ output-folder\ ...
72 Do PNG preprocessing on one or several resource folders
73 and store the results in the output folder.
74
75 .B aapt
76 .RI s[ingleCrunch]\ [\-v]\ \-i\ input-file\ \-o\ outputfile
77 Do PNG preprocessing on a single file.
78
79 .B aapt
80 .RI v[ersion]
81 Print program version.
82
83 .SH DESCRIPTION
84 The Android Asset Packaging Tool (aapt) takes your application resource files,
85 such as the AndroidManifest.xml file and the XML files for your Activities,
86 and compiles them. An R.java is also produced so you can reference your
87 resources from your Java code.
88 .PP
89
90 .SH OPTIONS
91 A summary of options is included below.
92 .TP
93 .B \-a
94 print Android-specific data (resources, manifest) when listing
95 .TP
96 .B \-c
97 specify which configurations to include. The default is all
98 configurations. The value of the parameter should be a comma
99 separated list of configuration values. Locales should be specified
100 as either a language or language-region pair. Some examples:
101 en
102 port,en
103 port,land,en_US
104
105 If you put the special locale, zz_ZZ on the list, it will perform
106 pseudolocalization on the default locale, modifying all of the
107 strings so you can look for strings that missed the
108 internationalization process. For example:
109 port,land,zz_ZZ
110 .TP
111 .B \-d
112 one or more device assets to include, separated by commas
113 .TP
114 .B \-f
115 force overwrite of existing files
116 .TP
117 .B \-g
118 specify a pixel tolerance to force images to grayscale, default 0
119 .TP
120 .B \-j
121 specify a jar or zip file containing classes to include
122 .TP
123 .B \-k
124 junk path of file(s) added
125 .TP
126 .B \-m
127 make package directories under location specified by \-J
128 .TP
129 .B \-u
130 update existing packages (add new, replace older, remove deleted files)
131 .TP
132 .B \-v
133 verbose output
134 .TP
135 .B \-x
136 create extending (non-application) resource IDs
137 .TP
138 .B \-z
139 require localization of resource attributes marked with
140 localization="suggested"
141 .TP
142 .B \-A
143 additional directory in which to find raw asset files
144 .TP
145 .B \-G
146 A file to output proguard options into.
147 .TP
148 .B \-F
149 specify the apk file to output
150 .TP
151 .B \-I
152 add an existing package to base include set
153 .TP
154 .B \-J
155 specify where to output R.java resource constant definitions
156 .TP
157 .B \-M
158 specify full path to AndroidManifest.xml to include in zip
159 .TP
160 .B \-P
161 specify where to output public resource definitions
162 .TP
163 .B \-S
164 directory in which to find resources. Multiple directories will be scanned
165 and the first match found (left to right) will take precedence.
166 .TP
167 .B \-0
168 specifies an additional extension for which such files will not
169 be stored compressed in the .apk. An empty string means to not
170 compress any files at all.
171 .TP
172 .B \-\-debug-mode
173 inserts android:debuggable="true" in to the application node of the
174 manifest, making the application debuggable even on production devices.
175 .TP
176 .B \-\-min-sdk-version
177 inserts android:minSdkVersion in to manifest. If the version is 7 or
178 higher, the default encoding for resources will be in UTF-8.
179 .TP
180 .B \-\-target-sdk-version
181 inserts android:targetSdkVersion in to manifest.
182 .TP
183 .B \-\-max-res-version
184 ignores versioned resource directories above the given value.
185 .TP
186 .B \-\-values
187 when used with "dump resources" also includes resource values.
188 .TP
189 .B \-\-version-code
190 inserts android:versionCode in to manifest.
191 .TP
192 .B \-\-version-name
193 inserts android:versionName in to manifest.
194 .TP
195 .B \-\-custom-package
196 generates R.java into a different package.
197 .TP
198 .B \-\-extra-packages
199 generate R.java for libraries. Separate libraries with ':'.
200 .TP
201 .B \-\-generate-dependencies
202 generate dependency files in the same directories for R.java and resource package
203 .TP
204 .B \-\-auto-add-overlay
205 Automatically add resources that are only in overlays.
206 .TP
207 .B \-\-preferred-configurations
208 Like the \-c option for filtering out unneeded configurations, but
209 only expresses a preference. If there is no resource available with
210 the preferred configuration then it will not be stripped.
211 .TP
212 .B \-\-rename-manifest-package
213 Rewrite the manifest so that its package name is the package name
214 given here. Relative class names (for example .Foo) will be
215 changed to absolute names with the old package so that the code
216 does not need to change.
217 .TP
218 .B \-\-rename-instrumentation-target-package
219 Rewrite the manifest so that all of its instrumentation
220 components target the given package. Useful when used in
221 conjunction with \-\-rename-manifest-package to fix tests against
222 a package that has been renamed.
223 .TP
224 .B \-\-product
225 Specifies which variant to choose for strings that have
226 product variants
227 .TP
228 .B \-\-utf16
229 changes default encoding for resources to UTF-16. Only useful when API
230 level is set to 7 or higher where the default encoding is UTF-8.
231 .TP
232 .B \-\-non-constant-id
233 Make the resources ID non constant. This is required to make an R java class
234 that does not contain the final value but is used to make reusable compiled
235 libraries that need to access resources.
236 .TP
237 .B \-\-error-on-failed-insert
238 Forces aapt to return an error if it fails to insert values into the manifest
239 with \-\-debug-mode, \-\-min-sdk-version, \-\-target-sdk-version \-\-version-code
240 and \-\-version-name.
241 Insertion typically fails if the manifest already defines the attribute.
242 .TP
243 .B \-\-output-text-symbols
244 Generates a text file containing the resource symbols of the R class in the
245 specified folder.
246 .TP
247 .B \-\-ignore-assets
248 Assets to be ignored.
249 .SH AUTHOR
250 aapt was written by The Android Open Source Project.
251 .PP