Usage: aapt l[ist] [-v] [-a] file.{zip,jar,apk} List contents of Zip-compatible archive.
aapt d[ump] [--values] [--include-meta-data] WHAT file.{apk} [asset [asset ...]] strings Print the contents of the resource table string pool in the APK. badging Print the label and icon for the app declared in APK. permissions Print the permissions from the APK. resources Print the resource table from the APK. configurations Print the configurations in the APK. xmltree Print the compiled xmls in the given assets. xmlstrings Print the strings of the given compiled xml assets.
Package the android resources. It will read assets and resources that are supplied with the -M -A -S or raw-files-dir arguments. The -J -P -F and -R options control which files are output.
aapt c[runch] [-v] -S resource-sources ... -C output-folder ... Do PNG preprocessing on one or several resource folders and store the results in the output folder.
aapt s[ingleCrunch] [-v] -i input-file -o outputfile Do PNG preprocessing on a single file.
aapt v[ersion] Print program version.
Modifiers: -a print Android-specific data (resources, manifest) when listing -c specify which configurations to include. The default is all configurations. The value of the parameter should be a comma separated list of configuration values. Locales should be specified as either a language or language-region pair. Some examples: en port,en port,land,en_US -d one or more device assets to include, separated by commas -f force overwrite of existing files -g specify a pixel tolerance to force images to grayscale, default 0 -j specify a jar or zip file containing classes to include -k junk path of file(s) added -m make package directories under location specified by -J -u update existing packages (add new, replace older, remove deleted files) -v verbose output -x create extending (non-application) resource IDs -z require localization of resource attributes marked with localization="suggested" -A additional directory in which to find raw asset files -G A file to output proguard options into. -D A file to output proguard options for the main dex into. -F specify the apk file to output -I add an existing package to base include set -J specify where to output R.java resource constant definitions -M specify full path to AndroidManifest.xml to include in zip -P specify where to output public resource definitions -S directory in which to find resources. Multiple directories will be scanned and the first match found (left to right) will take precedence. -0 specifies an additional extension for which such files will not be stored compressed in the .apk. An empty string means to not compress any files at all. --debug-mode inserts android:debuggable="true" in to the application node of the manifest, making the application debuggable even on production devices. --include-meta-data when used with "dump badging" also includes meta-data tags. --pseudo-localize generate resources for pseudo-locales (en-XA and ar-XB). --min-sdk-version inserts android:minSdkVersion in to manifest. If the version is 7 or higher, the default encoding for resources will be in UTF-8. --target-sdk-version inserts android:targetSdkVersion in to manifest. --max-res-version ignores versioned resource directories above the given value. --values when used with "dump resources" also includes resource values. --version-code inserts android:versionCode in to manifest. --version-name inserts android:versionName in to manifest. --replace-version If --version-code and/or --version-name are specified, these values will replace any value already in the manifest. By default, nothing is changed if the manifest already defines these attributes. --custom-package generates R.java into a different package. --extra-packages generate R.java for libraries. Separate libraries with ':'. --generate-dependencies generate dependency files in the same directories for R.java and resource package --auto-add-overlay Automatically add resources that are only in overlays. --preferred-density Specifies a preference for a particular density. Resources that do not match this density and have variants that are a closer match are removed. --split Builds a separate split APK for the configurations listed. This can be loaded alongside the base APK at runtime. --feature-of Builds a split APK that is a feature of the apk specified here. Resources in the base APK can be referenced from the the feature APK. --feature-after An app can have multiple Feature Split APKs which must be totally ordered. If --feature-of is specified, this flag specifies which Feature Split APK comes before this one. The first Feature Split APK should not define anything here. --rename-manifest-package Rewrite the manifest so that its package name is the package name given here. Relative class names (for example .Foo) will be changed to absolute names with the old package so that the code does not need to change. --rename-instrumentation-target-package Rewrite the manifest so that all of its instrumentation components target the given package. Useful when used in conjunction with --rename-manifest-package to fix tests against a package that has been renamed. --product Specifies which variant to choose for strings that have product variants --utf16 changes default encoding for resources to UTF-16. Only useful when API level is set to 7 or higher where the default encoding is UTF-8. --non-constant-id Make the resources ID non constant. This is required to make an R java class that does not contain the final value but is used to make reusable compiled libraries that need to access resources. --shared-lib Make a shared library resource package that can be loaded by an application at runtime to access the libraries resources. Implies --non-constant-id. --app-as-shared-lib Make an app resource package that also can be loaded as shared library at runtime. Implies --non-constant-id. --error-on-failed-insert Forces aapt to return an error if it fails to insert values into the manifest with --debug-mode, --min-sdk-version, --target-sdk-version --version-code and --version-name. Insertion typically fails if the manifest already defines the attribute. --error-on-missing-config-entry Forces aapt to return an error if it fails to find an entry for a configuration. --output-text-symbols Generates a text file containing the resource symbols of the R class in the specified folder. --ignore-assets Assets to be ignored. Default pattern is: !.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~ --skip-symbols-without-default-localization Prevents symbols from being generated for strings that do not have a default localization --no-version-vectors Do not automatically generate versioned copies of vector XML resources. --private-symbols Java package name to use when generating R.java for private resources.
pm list packages: prints all packages, optionally only those whose package name contains the text in FILTER. Options: -f: see their associated file. -d: filter to only show disbled packages. -e: filter to only show enabled packages. -s: filter to only show system packages. -3: filter to only show third party packages. -i: see the installer for the packages. -u: also include uninstalled packages.
pm list permission-groups: prints all known permission groups.
pm list permissions: prints all known permissions, optionally only those in GROUP. Options: -g: organize by group. -f: print all information. -s: short summary. -d: only list dangerous permissions. -u: list only the permissions users will see.
pm list instrumentation: use to list all test packages; optionally supply <TARGET-PACKAGE> to list the test packages for a particular application. Options: -f: list the .apk file for the test package.
pm list features: prints all features of the system.
pm list users: prints all users on the system.
pm path: print the path to the .apk of the given PACKAGE.
pm dump: print system state associated with the given PACKAGE.
pm install: install a single legacy package pm install-create: create an install session -l: forward lock application -r: replace existing application -t: allow test packages -i: specify the installer package name -s: install application on sdcard -f: install application on internal flash -d: allow version code downgrade -p: partial application install -g: grant all runtime permissions -S: size in bytes of entire session
pm install-write: write a package into existing session; path may be '-' to read from stdin -S: size in bytes of package, required for stdin
pm uninstall: removes a package from the system. Options: -k: keep the data and cache directories around after package removal.
pm clear: deletes all data associated with a package.
pm enable, disable, disable-user, disable-until-used: these commands change the enabled state of a given package or component (written as "package/class").
pm grant, revoke: these commands either grant or revoke permissions to apps. The permissions must be declared as used in the app's manifest, be runtime permissions (protection level dangerous), and the app targeting SDK greater than Lollipop MR1.
pm reset-permissions: revert all runtime permissions to their default state.
pm get-install-location: returns the current install location. 0 [auto]: Let system decide the best location 1 [internal]: Install on internal device storage 2 [external]: Install on external media
pm set-install-location: changes the default install location. NOTE: this is only intended for debugging; using this can cause applications to break and other undersireable behavior. 0 [auto]: Let system decide the best location 1 [internal]: Install on internal device storage 2 [external]: Install on external media
pm trim-caches: trim cache files to reach the given free space.
pm create-user: create a new user with the given USER_NAME, printing the new user identifier of the user.
pm remove-user: remove the user with the given USER_IDENTIFIER, deleting all data associated with that user
Hi, everybody. This Sunday is Father’s Day, and so I wanted to take a moment to talk about the most important job many of us will ever have – and that’s being a dad.
大家好。本周日是父亲节,所以我想花点时间谈谈我们很多人一生最重要的一项工作——做一名父亲。
Today we’re blessed to live in a world where technology allows us to connect instantly with just about anyone on the planet. But no matter how advanced we get, there will never be a substitute for the love and support and, most importantly, the presence of a parent in a child’s life. And in many ways, that’s uniquely true for fathers.
I never really knew my own father. I was raised by a single mom and two wonderful grandparents who made incredible sacrifices for me. And there are single parents all across the country who do a heroic job raising terrific kids. But I still wish I had a dad who was not only around, but involved; another role model to teach me what my mom did her best to instill – values like hard work and integrity; responsibility and delayed gratification – all the things that give a child the foundation to envision a brighter future for themselves.
That’ s why I try every day to be for Michelle and my girls what my father was not for my mother and me. And I’ve met plenty of other people – dads and uncles and men without a family connection –who are trying to break the cycle and give more of our young people a strong male role model.
Being a good parent – whether you’re gay or straight; a foster parent or a grandparent – isn’t easy. It demands your constant attention, frequent sacrifice, and a healthy dose of patience. And nobody’s perfect. To this day, I’m still figuring out how to be a better husband to my wife and father to my kids.
And I want to do what I can as President to encourage marriage and strong families. We should reform our child support laws to get more men working and engaged with their children. And my Administration will continue to work with the faith and other community organizations, as well as businesses, on a campaign to encourage strong parenting and fatherhood.
Because if there’s one thing I’ve learned along the way, it’s that all our personal successes shine a little less brightly if we fail at family. That’s what matters most. When I look back on my life, I won’t be thinking about any particular legislation I passed or policy I promoted. I’ll be thinking about Michelle, and the journey we’ve been on together. I’ll be thinking about Sasha’s dance recitals and Malia’s tennis matches –about the conversations we’ve had and the quiet moments we’ve shared. I’ll be thinking about whether I did right by them, and whether they knew, every day, just how much they were loved.
That’s what I think being a father is all about. And if we can do our best to be a source of comfort and encouragement to our kids; if we can show them unconditional love and help them grow into the people they were meant to be; then we will have succeeded.