1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-18 20:11:20 +00:00

AndroidDevice: Use content instead of settings to get ANDROID_ID

We move from using settings to using content to get the ANDROID_ID as
this works across a wider range of Android versions.
This commit is contained in:
Sascha Bischoff 2015-12-08 17:49:43 +00:00
parent cc9b00673e
commit 9ccf256ee8

View File

@ -236,7 +236,8 @@ class AndroidDevice(BaseLinuxDevice): # pylint: disable=W0223
.. note:: This will get reset on userdata erasure.
"""
return self.execute('settings get secure android_id').strip()
output = self.execute('content query --uri content://settings/secure --projection value --where "name=\'android_id\'"').strip()
return output.split('value=')[-1]
def get_sdk_version(self):
try: