Title: Theory / Unimportant / CS / Development / Android / apkanalyzer
On every note of this deck, unless a note says otherwise:
Page: https://developer.android.com/studio/command-line/apkanalyzer

Instruction: apkanalyzer [global-options] subject verb [options] apk-file [apk-file2]
Page: https://developer.android.com/studio/command-line
Effect: return information about subject of apk-file, according to verb and its options
Context: android

Name: Subject
Definition: what you want to query
Page: https://developer.android.com/studio/command-line/apkanalyzer
Context: apkanalyzer
Extra: the entire APK or a part of the APK

Name: verb
Definition: what you want to know about the subject.
Page: https://developer.android.com/studio/command-line/apkanalyzer
Context: apkanalyzer

Fla: --human-readable
Effect: Prints sizes in human-readable format.
Prefix: apkanalyzer

Fla: apk summary apk-file
Prefix: apkanalyzer
Print: the application ID, version code, and version name.

Fla: apk file-size apk-file
Prefix: apkanalyzer
Print: total size

Fla: apk download-size apk-file
Prefix: apkanalyzer
Print: an estimate of the download size of the APK.

Fla: apk features apk-file
Prefix: apkanalyzer
Print: features used by the APK that trigger Play Store filtering

Fla: apk features --not-required apk-file
Prefix: apkanalyzer
Print: features used by the APK that trigger Play Store filtering, even the non-required one

Fla: apk compare apk-file apk-file2
Prefix: apkanalyzer
Print: for each file in a APK, a size in each of the apk, to compare them

Fla: --different-only
Prefix: apkanalyzer apk compare apk-file apk-file2
Print: Print directories and files with differences.

Fla: --files-only
Prefix: apkanalyzer apk compare apk-file apk-file2
Print: do not print directory entries

Fla: --patch-size
Prefix: apkanalyzer apk compare apk-file apk-file2
Print: Show an estimate of the file-by-file patch instead of a raw difference.

Fla: files list apk-file
Prefix: apkanalyze
Print: Lists all files in the APK.

Fla: files cat --file path apk-file
Prefix: apkanalyze
Print: the file contents of path in apk-file

Fla: manifest print apk-file
Prefix: apkanalyze
Print: the APK manifest in XML format.

Fla: manifest application-id apk-file
Prefix: apkanalyze
Print: the application ID value

Fla: manifest version-name apk-file
Prefix: apkanalyze
Print: the version name value

Fla: manifest version-code apk-file
Prefix: apkanalyze
Print: the version code value

Fla: manifest min-sdk apk-file
Prefix: apkanalyze
Print: the minimum SDK version

Fla: manifest target-sdk apk-file
Prefix: apkanalyze
Print: the target SDK version

Fla: manifest permissions apk-file
Prefix: apkanalyze
Print: the list of permissions

Fla: manifest debuggable apk-file
Prefix: apkanalyze
Print: whether the app is debuggable

Fla: dex list
Prefix: apkanalyze
Print: a list of the DEX files in the APK

Fla: dex references apk-file
Prefix: apkanalyze
Print: the number of method references in all dex files

Fla: --files path1 ... --files path n
Prefix: apkanalyze dex references apk-file
Print: the number of method references in DEX files at path_1, ... and path_n

Fla: dex packages apk-file
Prefix: apkanalyze
Print: the class tree from DEX.
Extra: todo details

Fla: --method method
Prefix: apkanalyze dex code --class class
Print: restrict the decompiled bytecode to method

Fla: resources packages
Prefix: apkanalyze
Print: a list of the packages that are defined in the resources table.

Fla: resources configs --type type apk-file
Prefix: apkanalyze
Print: a list of configurations for the specified type

Fla: resources value --config config --name name --type type
Prefix: apkanalyze
Print: the value of the resource specified by config, name, and type. The type option is the type of the resource, such as string.

Fla: --package package
Effect: specify the resource table package name, otherwise the first defined package will be used.
Prefix: apkanalyze resources|names
Default: the first defined package will be used.

Fla: resources names --config config --type type apk-file
Prefix: apkanalyze
Print: a list of resource names for a configuration and type.

Fla: resources xml --file path apk-file
Prefix: apkanalyze
Print: the human-readable form of a binary XML file. Include the file option to specify the path to the file.