处理混淆

This commit is contained in:
Administrator 2025-07-10 14:02:56 +08:00
parent 4e090aca7e
commit 8848423192
5 changed files with 62 additions and 7 deletions

View File

@ -35,6 +35,7 @@
# 保留所有模型类(根据你的包结构调整)
-keep class com.example.studyapp.pad.** { *; }
-keep class com.example.studyapp.task.** { *; }
-keep class com.example.studyapp.update.ApiResponse{ *; }
-keep class com.example.studyapp.update.ApiResponseList{ *; }

View File

@ -16,4 +16,8 @@ public class AfInfo {
public String langCode;
public String cpuAbi;
public long yDp;
public String toString() {
return "advertiserId=" + advertiserId + ", model=" + model + ", brand=" + brand + ", androidId=" + androidId + ", xPixels=" + xPixels + ", yPixels=" + yPixels + ", densityDpi=" + densityDpi + ", country=" + country + ", batteryLevel=" + batteryLevel + ", stackInfo=" + stackInfo + ", product=" + product + ", network=" + network + ", langCode=" + langCode + ", cpuAbi=" + cpuAbi + ", yDp=" + yDp;
}
}

View File

@ -1,5 +1,7 @@
package com.example.studyapp.task;
import androidx.annotation.NonNull;
// 使用 JSON 库动态生成 JSON 请求体 (使用 Gson 示例)
public class BigoInfo {
public String cpuClockSpeed;
@ -19,4 +21,28 @@ public class BigoInfo {
public long romFreeExt;
public String dpiF;
public long cpuCoreNum;
@NonNull
@Override
public String toString() {
return "BigoInfo{" +
"cpuClockSpeed='" + cpuClockSpeed + '\'' +
", gaid='" + gaid + '\'' +
", userAgent='" + userAgent + '\'' +
", osLang='" + osLang + '\'' +
", osVer='" + osVer + '\'' +
", tz='" + tz + '\'' +
", systemCountry='" + systemCountry + '\'' +
", simCountry='" + simCountry + '\'' +
", romFreeIn=" + romFreeIn +
", resolution='" + resolution + '\'' +
", vendor='" + vendor + '\'' +
", batteryScale=" + batteryScale +
", net='" + net + '\'' +
", dpi=" + dpi +
", romFreeExt=" + romFreeExt +
", dpiF='" + dpiF + '\'' +
", cpuCoreNum=" + cpuCoreNum +
'}';
}
}

View File

@ -1,5 +1,7 @@
package com.example.studyapp.task;
import androidx.annotation.NonNull;
public class DeviceInfo {
public String lang;
@ -23,4 +25,32 @@ public class DeviceInfo {
public String persistSysCloudGpuGlVersion;
public String persistSysCloudGpuEglVendor;
public String persistSysCloudGpuEglVersion;
@NonNull
@Override
public String toString() {
return "DeviceInfo{" +
"lang='" + lang + '\'' +
", roProductBrand='" + roProductBrand + '\'' +
", roProductModel='" + roProductModel + '\'' +
", roProductManufacturer='" + roProductManufacturer + '\'' +
", roProductDevice='" + roProductDevice + '\'' +
", roProductName='" + roProductName + '\'' +
", roBuildVersionIncremental='" + roBuildVersionIncremental + '\'' +
", roBuildFingerprint='" + roBuildFingerprint + '\'' +
", roOdmBuildFingerprint='" + roOdmBuildFingerprint + '\'' +
", roProductBuildFingerprint='" + roProductBuildFingerprint + '\'' +
", roSystemBuildFingerprint='" + roSystemBuildFingerprint + '\'' +
", roSystemExtBuildFingerprint='" + roSystemExtBuildFingerprint + '\'' +
", roVendorBuildFingerprint='" + roVendorBuildFingerprint + '\'' +
", roBuildPlatform='" + roBuildPlatform + '\'' +
", persistSysCloudDrmId='" + persistSysCloudDrmId + '\'' +
", persistSysCloudBatteryCapacity=" + persistSysCloudBatteryCapacity +
", persistSysCloudGpuGlVendor='" + persistSysCloudGpuGlVendor + '\'' +
", persistSysCloudGpuGlRenderer='" + persistSysCloudGpuGlRenderer + '\'' +
", persistSysCloudGpuGlVersion='" + persistSysCloudGpuGlVersion + '\'' +
", persistSysCloudGpuEglVendor='" + persistSysCloudGpuEglVendor + '\'' +
", persistSysCloudGpuEglVersion='" + persistSysCloudGpuEglVersion + '\'' +
'}';
}
}

View File

@ -63,17 +63,11 @@ public class TaskUtil {
throw new IllegalStateException("HttpClient is not initialized");
}
if (BASE_URL == null || BASE_URL.isEmpty()) {
LogFileUtil.logAndWrite(android.util.Log.ERROR, "TaskUtil", "BASE_URL is not initialized", null);
throw new IllegalStateException("BASE_URL is not initialized");
}
Log.d("TaskUtil", "Creating payload for the request...");
Payload payload = new Payload();
payload.bigoDeviceObject = bigoDevice;
payload.afDeviceObject = afDevice;
payload.other = deviceInfo;
Gson gson = new GsonBuilder().serializeNulls().create();
String jsonRequestBody = gson.toJson(payload);