mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-04 07:51:21 +00:00 
			
		
		
		
	AndroidTarget: Added android_id property
Get the device's ANDROID_ID. Which is "A 64-bit number (as a hex string) that is randomly generated when the user first sets up the device and should remain constant for the lifetime of the user's device."
This commit is contained in:
		@@ -643,6 +643,21 @@ class AndroidTarget(Target):
 | 
			
		||||
    def adb_name(self):
 | 
			
		||||
        return self.conn.device
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    def android_id(self):
 | 
			
		||||
        """
 | 
			
		||||
        Get the device's ANDROID_ID. Which is
 | 
			
		||||
 | 
			
		||||
            "A 64-bit number (as a hex string) that is randomly generated when the user
 | 
			
		||||
            first sets up the device and should remain constant for the lifetime of the
 | 
			
		||||
            user's device."
 | 
			
		||||
 | 
			
		||||
        .. note:: This will get reset on userdata erasure.
 | 
			
		||||
 | 
			
		||||
        """
 | 
			
		||||
        output = self.execute('content query --uri content://settings/secure --projection value --where "name=\'android_id\'"').strip()
 | 
			
		||||
        return output.split('value=')[-1]
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    @memoized
 | 
			
		||||
    def screen_resolution(self):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user