这是某手表上的一个密码锁,应该如何解锁?
下面我提取到了一些有用的代码,以及完整的安装包
private String generateKey() {
String[] sort;
WolfPlatformManager instance = WolfPlatformManager.getInstance(this.mContext);
String deviceKey = instance.getDeviceKey();
String deviceId = instance.getDeviceId();
String encode = MD5Utils.encode(instance.getHardCode());
if (TextUtils.isEmpty(deviceKey)) {
sort = StrUtil.sort(new String[]{instance.getIMEI(), instance.getQRCode(), encode});
} else {
sort = StrUtil.sort(new String[]{deviceKey, deviceId, encode});
}
return MD5Utils.encode(StrUtil.dumpStringArray(sort));
}
private String getCode(String str) {
str = AESUtils.encryptAESBase64(generateKey(), iv, str);
int length = str.length() / 6;
StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i < 6; i++) {
stringBuilder.append(str.charAt(i * length) % 10);
}
return stringBuilder.toString();
}
public boolean openDevelopMode(String str) {
if (TextUtils.isEmpty(this.mDevelopCode)) {
this.mDevelopCode = getDevelopModeCode();
}
boolean equals = this.mDevelopCode.equals(str);
Global.putInt(this.mContext.getContentResolver(), TYPE_DEVELOPER_MODE, equals);
return equals;
}
public boolean openFactoryMode(String str) {
if (TextUtils.isEmpty(this.mFactoryCode)) {
this.mFactoryCode = getFactoryModeCode();
}
boolean equals = this.mFactoryCode.equals(str);
Global.putInt(this.mContext.getContentResolver(), TYPE_FACTORY_MODE, equals);
return equals;
}
public DevelopModeHelper(Context context) {
this.mContext = context;
}
public static void hideDevelopMode(Context context) {
Global.putInt(context.getContentResolver(), TYPE_DEVELOPER_MODE, 0);
}
public static void hideFactoryMode(Context context) {
Global.putInt(context.getContentResolver(), TYPE_FACTORY_MODE, 0);
}
public static boolean isDevelopModeOpen(Context context) {
return 1 == Global.getInt(context.getContentResolver(), TYPE_DEVELOPER_MODE, 0);
}
public static boolean isFactoryModeOpen(Context context) {
return 1 == Global.getInt(context.getContentResolver(), TYPE_FACTORY_MODE, 0);
}
public String getDevelopModeCode() {
return getCode(TYPE_DEVELOPER_MODE);
}
public String getFactoryModeCode() {
return getCode(TYPE_FACTORY_MODE);
}