AbiUtils
  public
  
  
  
  class
  AbiUtils
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | com.android.tradefed.util.AbiUtils | 
Utility class for handling device ABIs
Summary
| Fields | |
|---|---|
| 
    protected
    static
    final
     | ABIS_SUPPORTED_BY_COMPATIBILITYThe set of ABI names which Compatibility supports. | 
| 
    public
    static
    final
    String | ABI_ARM_64_V8A
 | 
| 
    public
    static
    final
    String | ABI_ARM_V7A
 | 
| 
    public
    static
    final
    String | ABI_MIPS
 | 
| 
    public
    static
    final
    String | ABI_MIPS64
 | 
| 
    public
    static
    final
    String | ABI_RISCV64
 | 
| 
    public
    static
    final
    String | ABI_X86
 | 
| 
    public
    static
    final
    String | ABI_X86_64
 | 
| 
    public
    static
    final
    String | ARCH_ARM64
 | 
| 
    public
    static
    final
    String | ARCH_MIPS64
 | 
| 
    public
    static
    final
    String | ARCH_RISCV64
 | 
| 
    public
    static
    final
    String | ARCH_X86_64
 | 
| 
    protected
    static
    final
     | ARM_ABISThe set of ARM ABIs. | 
| 
    public
    static
    final
    String | BASE_ARCH_ARM
 | 
| 
    public
    static
    final
    String | BASE_ARCH_MIPS
 | 
| 
    public
    static
    final
    String | BASE_ARCH_X86
 | 
| 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
        
        
         | 
      getAbisForArch(String arch)
      Returns the set of ABIs associated with the given architecture. | 
| 
        
        
        static
        
        
         | 
      getAbisSupportedByCompatibility()
      Returns the set of ABIs supported by Compatibility. | 
| 
        
        
        static
        
        
        String | 
      getArchForAbi(String abi)
      Returns the architecture matching the abi. | 
| 
        
        
        static
        
        
         | 
      getArchSupported()
      Returns the set of supported architecture representations. | 
| 
        
        
        static
        
        
        String | 
      getBaseArchForAbi(String abi)
      Returns the base architecture matching the abi. | 
| 
        
        
        static
        
        
        String | 
      getBitness(String abi)
       | 
| 
        
        
        static
        
        
         | 
      getHostAbi()
      Returns the Set of abis supported by the host machine. | 
| 
        
        
        static
        
        
        boolean | 
      isAbiSupportedByCompatibility(String abi)
       | 
| 
        
        
        static
        
        
        String | 
      parseAbi(String id)
       | 
| 
        
        
        static
        
        
         | 
      parseAbiList(String unsupportedAbiDescription)
       | 
| 
        
        
        static
        
        
         | 
      parseAbiListFromProperty(String abiListProp)
       | 
| 
        
        
        static
        
        
        String[] | 
      parseId(String id)
      Parses a unique id into the ABI and name. | 
| 
        
        
        static
        
        
        String | 
      parseTestName(String id)
       | 
Fields
ABIS_SUPPORTED_BY_COMPATIBILITY
protected static finalABIS_SUPPORTED_BY_COMPATIBILITY 
The set of ABI names which Compatibility supports.
ABI_ARM_64_V8A
public static final String ABI_ARM_64_V8A
ABI_ARM_V7A
public static final String ABI_ARM_V7A
ABI_MIPS
public static final String ABI_MIPS
ABI_MIPS64
public static final String ABI_MIPS64
ABI_RISCV64
public static final String ABI_RISCV64
ABI_X86
public static final String ABI_X86
ABI_X86_64
public static final String ABI_X86_64
ARCH_ARM64
public static final String ARCH_ARM64
ARCH_MIPS64
public static final String ARCH_MIPS64
ARCH_RISCV64
public static final String ARCH_RISCV64
ARCH_X86_64
public static final String ARCH_X86_64
ARM_ABIS
protected static finalARM_ABIS 
The set of ARM ABIs.
BASE_ARCH_ARM
public static final String BASE_ARCH_ARM
BASE_ARCH_MIPS
public static final String BASE_ARCH_MIPS
BASE_ARCH_X86
public static final String BASE_ARCH_X86
Public methods
createAbiFlag
public static 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
public static 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
public staticgetAbisForArch (String arch) 
Returns the set of ABIs associated with the given architecture.
| Parameters | |
|---|---|
| arch | String: The architecture to look up. | 
| Returns | |
|---|---|
|  | a new Set containing the ABIs. | 
getAbisSupportedByCompatibility
public staticgetAbisSupportedByCompatibility () 
Returns the set of ABIs supported by Compatibility.
| Returns | |
|---|---|
|  | a new Set containing the supported ABIs. | 
getArchForAbi
public static String getArchForAbi (String abi)
Returns the architecture matching the abi.
| Parameters | |
|---|---|
| abi | String | 
| Returns | |
|---|---|
| String | |
getArchSupported
public staticgetArchSupported () 
Returns the set of supported architecture representations.
| Returns | |
|---|---|
|  | |
getBaseArchForAbi
public static String getBaseArchForAbi (String abi)
Returns the base architecture matching the abi.
| Parameters | |
|---|---|
| abi | String | 
| Returns | |
|---|---|
| String | |
getBitness
public static String getBitness (String abi)
| Parameters | |
|---|---|
| abi | String: The name of the ABI. | 
| Returns | |
|---|---|
| String | The bitness of the ABI with the given name | 
getHostAbi
public staticgetHostAbi () 
Returns the Set of abis supported by the host machine.
| Returns | |
|---|---|
|  | |
isAbiSupportedByCompatibility
public static boolean isAbiSupportedByCompatibility (String abi)
| Parameters | |
|---|---|
| abi | String: The ABI name to test. | 
| Returns | |
|---|---|
| boolean | true if the given ABI is supported by Compatibility. | 
parseAbi
public static 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
public staticparseAbiList (String unsupportedAbiDescription) 
| Parameters | |
|---|---|
| unsupportedAbiDescription | String: A comma separated string containing abis. | 
| Returns | |
|---|---|
|  | A List of Strings containing valid ABIs. | 
parseAbiListFromProperty
public staticparseAbiListFromProperty (String abiListProp) 
| Parameters | |
|---|---|
| abiListProp | String: A comma separated list containing abis coming from the device property. | 
| Returns | |
|---|---|
|  | A List of Strings containing valid ABIs. | 
parseId
public static 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
public static 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 | 
