粉丝: 4
关注: 1
积分: 535
精华: 0
金币: 187
经验: 466
最后登录 2021-10-3
|
建议您可以看看以下链接:
https://ask.csdn.net/questions/7514257?weChatOA=
我也正在破解调试模式的密码,有点恼火
- 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);
- }
-
复制代码
但愿有人能将其解密出来 |
|
评论
直达楼层