2014年3月10日 星期一

Android useful commands

am - Activity Manager
  example:
    $ am start -n com.android.browser/com.android.browser.BrowserActivity

dumpsys - Dump interesting information about the status of system service.
  example:
    $ dumpsys | grep "mFocusedApp"

aapt - Android Asset Packaging Tool
  usage:
 aapt l[ist] [-v] [-a] file.{zip,jar,apk}
   List contents of Zip-compatible archive.

 aapt d[ump] [--values] WHAT file.{apk} [asset [asset ...]]
   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.

 aapt p[ackage] [-d][-f][-m][-u][-v][-x][-z][-M AndroidManifest.xml] \
        [-0 extension [-0 extension ...]] [-g tolerance] [-j jarfile] \
        [--min-sdk-version VAL] [--target-sdk-version VAL] \
        [--max-sdk-version VAL] [--app-version VAL] \
        [--app-version-name TEXT] [--custom-package VAL] \
        [-I base-package [-I base-package ...]] \
        [-A asset-source-dir]  [-G class-list-file] [-P public-definitions-file] \
        [-S resource-sources [-S resource-sources ...]]         [-F apk-file] [-J R-file-dir] \
        [raw-files-dir [raw-files-dir] ...]

   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 r[emove] [-v] file.{zip,jar,apk} file1 [file2 ...]
   Delete specified files from Zip-compatible archive.

 aapt a[dd] [-v] file.{zip,jar,apk} file1 [file2 ...]
   Add specified files to Zip-compatible archive.

 aapt v[ersion]
   Print program version.

沒有留言:

張貼留言