1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-04-06 18:00:04 +01:00

Target: Added get_sdk_version method

Added the method to retrieve a devices sdk version taken from WA2.
This commit is contained in:
Marc Bonnici 2017-05-31 15:56:50 +01:00
parent c33dd65249
commit d3396f2725

View File

@ -1037,6 +1037,12 @@ class AndroidTarget(Target):
return line.split('=', 1)[1]
return None
def get_sdk_version(self):
try:
return int(self.getprop('ro.build.version.sdk'))
except (ValueError, TypeError):
return None
def install_apk(self, filepath, timeout=None, replace=False, allow_downgrade=False): # pylint: disable=W0221
ext = os.path.splitext(filepath)[1].lower()
if ext == '.apk':