AbiUtils

public class AbiUtils
extends Object

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


Utility class for handling device ABIs

Summary

Constants

String ABI_ARM_64_V8A

String ABI_ARM_V7A

String ABI_MIPS

String ABI_MIPS64

String ABI_X86

String ABI_X86_64

String ARCH_ARM64

String ARCH_MIPS64

String ARCH_X86_64

String BASE_ARCH_ARM

String BASE_ARCH_MIPS

String BASE_ARCH_X86

Fields

protected static final Set<String> ABIS_SUPPORTED_BY_COMPATIBILITY

The set of ABI names which Compatibility supports.

protected static final Set<String> ARM_ABIS

The set of ARM ABIs.

Public methods

static String createAbiFlag(String abi)

Creates a flag for the given ABI.

static String createId(String abi, String name)

Creates a unique id from the given ABI and name.

static Set<String> getAbisForArch(String arch)

Returns the set of ABIs associated with the given architecture.

static Set<String> getAbisSupportedByCompatibility()

Returns the set of ABIs supported by Compatibility.

static String getArchForAbi(String abi)

Returns the architecture matching the abi.

static String getBaseArchForAbi(String abi)

Returns the base architecture matching the abi.

static String getBitness(String abi)
static boolean isAbiSupportedByCompatibility(String abi)
static String parseAbi(String id)
static Set<String> parseAbiList(String unsupportedAbiDescription)
static Set<String> parseAbiListFromProperty(String abiListProp)
static String[] parseId(String id)

Parses a unique id into the ABI and name.

static String parseTestName(String id)

Constants

ABI_ARM_64_V8A

String ABI_ARM_64_V8A

Constant Value: "arm64-v8a"

ABI_ARM_V7A

String ABI_ARM_V7A

Constant Value: "armeabi-v7a"

ABI_MIPS

String ABI_MIPS

Constant Value: "mips"

ABI_MIPS64

String ABI_MIPS64

Constant Value: "mips64"

ABI_X86

String ABI_X86

Constant Value: "x86"

ABI_X86_64

String ABI_X86_64

Constant Value: "x86_64"

ARCH_ARM64

String ARCH_ARM64

Constant Value: "arm64"

ARCH_MIPS64

String ARCH_MIPS64

Constant Value: "mips64"

ARCH_X86_64

String ARCH_X86_64

Constant Value: "x86_64"

BASE_ARCH_ARM

String BASE_ARCH_ARM

Constant Value: "arm"

BASE_ARCH_MIPS

String BASE_ARCH_MIPS

Constant Value: "mips"

BASE_ARCH_X86

String BASE_ARCH_X86

Constant Value: "x86"

Fields

ABIS_SUPPORTED_BY_COMPATIBILITY

Set<String> ABIS_SUPPORTED_BY_COMPATIBILITY

The set of ABI names which Compatibility supports.

ARM_ABIS

Set<String> ARM_ABIS

The set of ARM ABIs.

Public methods

createAbiFlag

String createAbiFlag (String abi)

Creates a flag for the given ABI.

Parameters
abi String: the ABI to create the flag for.

Returns
String a string which can be add to a command sent to ADB.

createId

String createId (String abi, 
                String name)

Creates a unique id from the given ABI and name.

Parameters
abi String: The ABI to use.

name String: The name to use.

Returns
String a string which uniquely identifies a run.

getAbisForArch

Set<String> getAbisForArch (String arch)

Returns the set of ABIs associated with the given architecture.

Parameters
arch String: The architecture to look up.

Returns
Set<String> a new Set containing the ABIs.

getAbisSupportedByCompatibility

Set<String> getAbisSupportedByCompatibility ()

Returns the set of ABIs supported by Compatibility.

Returns
Set<String> a new Set containing the supported ABIs.

getArchForAbi

String getArchForAbi (String abi)

Returns the architecture matching the abi.

Parameters
abi String

Returns
String

getBaseArchForAbi

String getBaseArchForAbi (String abi)

Returns the base architecture matching the abi.

Parameters
abi String

Returns
String

getBitness

String getBitness (String abi)

Parameters
abi String: The name of the ABI.

Returns
String The bitness of the ABI with the given name

isAbiSupportedByCompatibility

boolean isAbiSupportedByCompatibility (String abi)

Parameters
abi String: The ABI name to test.

Returns
boolean true if the given ABI is supported by Compatibility.

parseAbi

String parseAbi (String id)

Parameters
id String

Returns
String the abi portion of the test id. e.g. armeabi-v7a android.mytest = armeabi-v7a

parseAbiList

Set<String> parseAbiList (String unsupportedAbiDescription)

Parameters
unsupportedAbiDescription String: A comma separated string containing abis.

Returns
Set<String> A List of Strings containing valid ABIs.

parseAbiListFromProperty

Set<String> parseAbiListFromProperty (String abiListProp)

Parameters
abiListProp String: A comma separated list containing abis coming from the device property.

Returns
Set<String> A List of Strings containing valid ABIs.

parseId

String[] parseId (String id)

Parses a unique id into the ABI and name.

Parameters
id String: The id to parse.

Returns
String[] a string array containing the ABI and name.

parseTestName

String parseTestName (String id)

Parameters
id String

Returns
String the test name portion of the test id. e.g. armeabi-v7a android.mytest = android.mytest