From 9ccf256ee84fb89895c46a545039ee84fb822552 Mon Sep 17 00:00:00 2001 From: Sascha Bischoff Date: Tue, 8 Dec 2015 17:49:43 +0000 Subject: [PATCH] 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. --- wlauto/common/android/device.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wlauto/common/android/device.py b/wlauto/common/android/device.py index 6e83b0bc..600c2022 100644 --- a/wlauto/common/android/device.py +++ b/wlauto/common/android/device.py @@ -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: