AaptParser

public class AaptParser
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.AaptParser


Class that extracts info from apk by parsing output of 'aapt dump badging'.

aapt must be on PATH

Summary

Public methods

String getLabel()
List<String> getNativeCode()
String getPackageName()
int getSdkVersion()
String getVersionCode()
String getVersionName()
static AaptParser parse(File apkFile)

Parse info from the apk.

Public methods

getLabel

String getLabel ()

Returns
String

getNativeCode

List<String> getNativeCode ()

Returns
List<String>

getPackageName

String getPackageName ()

Returns
String

getSdkVersion

int getSdkVersion ()

Returns
int

getVersionCode

String getVersionCode ()

Returns
String

getVersionName

String getVersionName ()

Returns
String

parse

AaptParser parse (File apkFile)

Parse info from the apk.

Parameters
apkFile File: the apk file
Returns
AaptParser the AaptParser or null if failed to extract the information