public class Build extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Build.VERSION
Various version strings.
|
static class |
Build.VERSION_CODES
Enumeration of the currently known SDK version codes.
|
Modifier and Type | Field and Description |
---|---|
static String |
BOARD
The name of the underlying board, like "goldfish".
|
static String |
BOOTLOADER
The system bootloader version number.
|
static String |
BRAND
The consumer-visible brand with which the product/hardware will be associated, if any.
|
static String |
CPU_ABI
Deprecated.
Use
SUPPORTED_ABIS instead. |
static String |
CPU_ABI2
Deprecated.
Use
SUPPORTED_ABIS instead. |
static String |
DEVICE
The name of the industrial design.
|
static String |
DISPLAY
A build ID string meant for displaying to the user
|
static String |
FINGERPRINT
A string that uniquely identifies this build.
|
static String |
HARDWARE
The name of the hardware (from the kernel command line or /proc).
|
static String |
HOST |
static String |
ID
Either a changelist number, or a label like "M4-rc20".
|
static boolean |
IS_DEBUGGABLE
Returns true if we are running a debug build such as "user-debug" or "eng".
|
static boolean |
IS_EMULATOR
Whether this build was for an emulator device.
|
static String |
MANUFACTURER
The manufacturer of the product/hardware.
|
static String |
MODEL
The end-user-visible name for the end product.
|
static boolean |
PERMISSIONS_REVIEW_REQUIRED
Specifies whether the permissions needed by a legacy app should be
reviewed before any of its components can run.
|
static String |
PRODUCT
The name of the overall product.
|
static String |
RADIO
Deprecated.
The radio firmware version is frequently not
available when this class is initialized, leading to a blank or
"unknown" value for this string. Use
getRadioVersion() instead. |
static String |
SERIAL
A hardware serial number, if available.
|
static String[] |
SUPPORTED_32_BIT_ABIS
An ordered list of 32 bit ABIs supported by this device.
|
static String[] |
SUPPORTED_64_BIT_ABIS
An ordered list of 64 bit ABIs supported by this device.
|
static String[] |
SUPPORTED_ABIS
An ordered list of ABIs supported by this device.
|
static String |
TAGS
Comma-separated tags describing the build, like "unsigned,debug".
|
static long |
TIME |
static String |
TYPE
The type of build, like "user" or "eng".
|
static String |
UNKNOWN
Value used for when a build property is unknown.
|
static String |
USER |
Constructor and Description |
---|
Build() |
Modifier and Type | Method and Description |
---|---|
static void |
ensureFingerprintProperty()
Ensure that raw fingerprint system property is defined.
|
static String |
getRadioVersion()
Returns the version string for the radio firmware.
|
static boolean |
isBuildConsistent()
Verifies the the current flash of the device is consistent with what
was expected at build time.
1) Checks that device fingerprint is defined and that it matches across
various partitions.
2) Verifies radio and bootloader partitions are those expected in the build.
|
public static final String UNKNOWN
public static final String ID
public static final String DISPLAY
public static final String PRODUCT
public static final String DEVICE
public static final String BOARD
@Deprecated public static final String CPU_ABI
SUPPORTED_ABIS
instead.@Deprecated public static final String CPU_ABI2
SUPPORTED_ABIS
instead.public static final String MANUFACTURER
public static final String BRAND
public static final String MODEL
public static final String BOOTLOADER
@Deprecated public static final String RADIO
getRadioVersion()
instead.public static final String HARDWARE
public static final boolean IS_EMULATOR
public static final String SERIAL
public static final String[] SUPPORTED_ABIS
SUPPORTED_32_BIT_ABIS
and SUPPORTED_64_BIT_ABIS
.public static final String[] SUPPORTED_32_BIT_ABIS
SUPPORTED_ABIS
and SUPPORTED_64_BIT_ABIS
.public static final String[] SUPPORTED_64_BIT_ABIS
SUPPORTED_ABIS
and SUPPORTED_32_BIT_ABIS
.public static final String TYPE
public static final String TAGS
public static final String FINGERPRINT
public static final long TIME
public static final String USER
public static final String HOST
public static final boolean IS_DEBUGGABLE
public static final boolean PERMISSIONS_REVIEW_REQUIRED
public static void ensureFingerprintProperty()
deriveFingerprint()
this is where we push the
derived value into the property service.public static boolean isBuildConsistent()
public static String getRadioVersion()