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

public String getLabel ()

Returns
String

getNativeCode

public List<String> getNativeCode ()

Returns
List<String>

getPackageName

public String getPackageName ()

Returns
String

getSdkVersion

public int getSdkVersion ()

Returns
int

getVersionCode

public String getVersionCode ()

Returns
String

getVersionName

public String getVersionName ()

Returns
String

parse

public static 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