本帖最后由 17382412231 于 2024-6-1 08:39 编辑
获取WidevineID的代码如下:
1-java:
public static final UUID WIDEVINE_UUID = UUID.fromString("edef8ba9-79d6-4ace-a3c8-27dcd51d21ed");
MediaDrm mediaDrm = new MediaDrm(WIDEVINE_UUID);byte[] deviceUniqueIdArray = mediaDrm.getPropertyByteArray("deviceUniqueId");
2-auto.js:
importClass(java.util.UUID);importClass(android.media.MediaDrm);var WIDEVINE_UUID = UUID.fromString("edef8ba9-79d6-4ace-a3c8-27dcd51d21ed");var mediaDrm = new MediaDrm(WIDEVINE_UUID);var deviceUniqueIdArray = mediaDrm.getPropertyByteArray("deviceUniqueId");
以上两种方法在云手机和真机获取的deviceUniqueIdArray字节数组分别为:
云手机:
[49, 100, 48, 100, 97, 52, 97, 48, 102, 101, 52, 48, 52, 100, 50, 52, 97, 99, 97, 54, 56, 97, 98, 54, 97, 52, 101, 101, 54, 54, 54, 53, 57, 97, 50, 98, 49, 48, 55, 99, 48, 53, 54, 48, 52, 99, 56, 98, 97, 102, 50, 102, 55, 49, 51, 49, 51, 48, 57, 54, 48, 100, 48, 49]
真机:
[-3, -11, -75, 127, 96, 5, -40, -86, 126, 96, 42, -40, 86, 115, -38, 88, 111, -7, 83, -34, -91, 37, 74, 14, -29, -91, -44, -29, 53, 77, 80, -77]
widevineid的标准长度是32个十六进制数字,云手机获取到的远超32个十六进制数字
|