| Index: build/android/pylib/device/device_utils.py
|
| diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py
|
| index 553e9602ffc0a9ebfba319bea746fc460e86b605..766ef68a62c65b86c8294d931c1b7faffe9dd7b0 100644
|
| --- a/build/android/pylib/device/device_utils.py
|
| +++ b/build/android/pylib/device/device_utils.py
|
| @@ -994,11 +994,75 @@ class DeviceUtils(object):
|
| """
|
| return self.old_interface.SetJavaAssertsEnabled(enabled)
|
|
|
| +
|
| + @property
|
| + def build_description(self):
|
| + """Returns the build description of the system.
|
| +
|
| + For example:
|
| + nakasi-user 4.4.4 KTU84P 1227136 release-keys
|
| + """
|
| + return self.GetProp('ro.build.description', cache=True)
|
| +
|
| + @property
|
| + def build_fingerprint(self):
|
| + """Returns the build fingerprint of the system.
|
| +
|
| + For example:
|
| + google/nakasi/grouper:4.4.4/KTU84P/1227136:user/release-keys
|
| + """
|
| + return self.GetProp('ro.build.fingerprint', cache=True)
|
| +
|
| + @property
|
| + def build_id(self):
|
| + """Returns the build ID of the system (e.g. 'KTU84P')."""
|
| + return self.GetProp('ro.build.id', cache=True)
|
| +
|
| + @property
|
| + def build_product(self):
|
| + """Returns the build product of the system (e.g. 'grouper')."""
|
| + return self.GetProp('ro.build.product', cache=True)
|
| +
|
| @property
|
| def build_type(self):
|
| - """Returns the build type of the system (e.g. userdebug)."""
|
| + """Returns the build type of the system (e.g. 'user')."""
|
| return self.GetProp('ro.build.type', cache=True)
|
|
|
| + @property
|
| + def build_version_sdk(self):
|
| + """Returns the build version sdk of the system as a number (e.g. 19).
|
| +
|
| + For version code numbers see:
|
| + http://developer.android.com/reference/android/os/Build.VERSION_CODES.html
|
| +
|
| + For named constants see:
|
| + pylib.constants.ANDROID_SDK_VERSION_CODES
|
| +
|
| + Raises:
|
| + CommandFailedError if the build version sdk is not a number.
|
| + """
|
| + value = self.GetProp('ro.build.version.sdk', cache=True)
|
| + try:
|
| + return int(value)
|
| + except ValueError:
|
| + raise device_errors.CommandFailedError(
|
| + 'Invalid build version sdk: %r' % value)
|
| +
|
| + @property
|
| + def product_cpu_abi(self):
|
| + """Returns the product cpu abi of the device (e.g. 'armeabi-v7a')."""
|
| + return self.GetProp('ro.product.cpu.abi', cache=True)
|
| +
|
| + @property
|
| + def product_model(self):
|
| + """Returns the name of the product model (e.g. 'Nexus 7')."""
|
| + return self.GetProp('ro.product.model', cache=True)
|
| +
|
| + @property
|
| + def product_name(self):
|
| + """Returns the product name of the device (e.g. 'nakasi')."""
|
| + return self.GetProp('ro.product.name', cache=True)
|
| +
|
| def GetProp(self, property_name, cache=False, timeout=None, retries=None):
|
| """Gets a property from the device.
|
|
|
|
|