New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 836136 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Jan 15
Cc:
EstimatedDays: ----
NextAction: 2019-07-09
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 659808



Sign in to add a comment

apkanalyzer non-functional in //third_party/android_sdk

Project Member Reported by agrieve@chromium.org, Apr 24 2018

Issue description

Nothing broken from this atm, since we haven't switched things over to the new path yet, but it looks like there are some files missing from //third_party/android_sdk:



$ third_party/android_sdk/public/tools/bin/apkanalyzer
Exception in thread "main" java.lang.IllegalStateException: Cannot locate latest build tools
	at com.android.tools.apk.analyzer.AaptInvoker.getPathToAapt(AaptInvoker.java:99)
	at com.android.tools.apk.analyzer.AaptInvoker.<init>(AaptInvoker.java:41)
	at com.android.tools.apk.analyzer.ApkAnalyzerCli.getAaptInvokerFromSdk(ApkAnalyzerCli.java:278)
	at com.android.tools.apk.analyzer.ApkAnalyzerCli.main(ApkAnalyzerCli.java:129)

Versus:

$ third_party/android_tools/sdk/tools/bin/apkanalyzer
Subject must be one of: apk, files, manifest, dex, resources

apk summary              Prints the application Id, version code and version name.
apk file-size            Prints the file size of the APK.
apk download-size        Prints an estimate of the download size of the APK.
apk features             Prints features used by the APK.
apk compare              Compares the sizes of two APKs.
files list               Lists all files in the zip.
files cat                Prints the given file contents to stdout
manifest print           Prints the manifest in XML format
manifest application-id  Prints the application id.
manifest version-name    Prints the version name.
manifest version-code    Prints the version code.
manifest min-sdk         Prints the minimum sdk.
manifest target-sdk      Prints the target sdk
manifest permissions     Prints a list of used permissions
manifest debuggable      Prints if the app is debuggable
dex list                 Prints a list of dex files in the APK
dex references           Prints number of references in dex files
dex packages             Prints the class tree from DEX.
                         P,C,M,F: indicates packages, classes methods, fields
                         x,k,r,d: indicates removed, kept, referenced and defined
                           nodes
dex code                 Prints the bytecode of a class or method in smali format
resources packages       Prints a list of packages in resources table
resources configs        Prints a list of configurations for a type
resources value          Prints the given resource's value
resources names          Prints a list of resource names for a type
resources xml            Prints the human readable form of a binary XML

Usage:
apkanalyzer [global options] <subject> <verb> [options] <apk> [<apk2>]

Option            Description
------            -----------
--human-readable  Print sizes in human readable format
 

Comment 1 by wnwen@chromium.org, Apr 25 2018

Blocking: 659808
Labels: -Pri-3 Pri-2
Status: Assigned (was: Untriaged)
We do need this to be functional before switching over to //third_party/android_sdk. 
Owner: ----
Status: Available (was: Assigned)
Labels: Pri-3
NextAction: 2019-07-09
Downgrading P2s that haven't been modified in more than 6 months, which have no component or owner.
Status: Untriaged (was: Available)
Available, but no owner or component? Please find a component, as no one will ever find this without one.
Status: Fixed (was: Untriaged)

Sign in to add a comment