Android O how to read Widevine Client ID?

6.3k views Asked by At

With the latest Android 26 (Oreo) Google says:

"For new devices shipping with O, the Widevine Client ID returns a different value for each app package name and web origin (for web browser apps). "

Source: https://android-developers.googleblog.com/2017/04/changes-to-device-identifiers-in.html

For IMEI, MEID there are functions which can be called on the TelephonyManager Class:

String imei = c.getSystemService(TelephonyManager.class).getImei();
String meid = c.getSystemService(TelephonyManager.class).getMeid();

And the SERIAL can now be retrieved from BUILD with: BUILD.getSerial()

But I can't find a methode that reads out the Widevine Client ID. Does anyone know, how to get the Widevine Client ID?

1

There are 1 answers

0
Davis Liu On

The Widevine Client ID can be obtained below. Details can be found in https://developer.android.com/reference/android/media/MediaDrm:

public static final UUID WIDEVINE_UUID = UUID.fromString("edef8ba9-79d6-4ace-a3c8-27dcd51d21ed");
MediaDrm mediaDrm = new MediaDrm(WIDEVINE_UUID);
byte[] deviceUniqueIdArray = mediaDrm.getPropertyByteArray("deviceUniqueId");