diff --git a/app/release/app-release-add.apk b/app/release/app-release-add.apk deleted file mode 100644 index 2b8813e..0000000 Binary files a/app/release/app-release-add.apk and /dev/null differ diff --git a/app/release/baselineProfiles/0/app-release.dm b/app/release/baselineProfiles/0/app-release.dm deleted file mode 100644 index 0bda1f0..0000000 Binary files a/app/release/baselineProfiles/0/app-release.dm and /dev/null differ diff --git a/app/release/baselineProfiles/1/app-release.dm b/app/release/baselineProfiles/1/app-release.dm deleted file mode 100644 index 667f9df..0000000 Binary files a/app/release/baselineProfiles/1/app-release.dm and /dev/null differ diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index fcb656f..9a9fd52 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -13,7 +13,7 @@ "attributes": [], "versionCode": 1, "versionName": "1.0", - "outputFile": "app-release.apk" + "outputFile": "app-com.example.retention-v1.0-1.apk" } ], "elementType": "File", @@ -22,14 +22,14 @@ "minApi": 28, "maxApi": 30, "baselineProfiles": [ - "baselineProfiles/1/app-release.dm" + "baselineProfiles/1/app-com.example.retention-v1.0-1.dm" ] }, { "minApi": 31, "maxApi": 2147483647, "baselineProfiles": [ - "baselineProfiles/0/app-release.dm" + "baselineProfiles/0/app-com.example.retention-v1.0-1.dm" ] } ], diff --git a/app/src/main/java/com/example/retention/utils/Utils.java b/app/src/main/java/com/example/retention/utils/Utils.java index 7cf71dc..d80cf92 100644 --- a/app/src/main/java/com/example/retention/utils/Utils.java +++ b/app/src/main/java/com/example/retention/utils/Utils.java @@ -65,7 +65,7 @@ public class Utils { return; } } - Log.d("TAG", "writePackageName: "+packageName); + LogFileUtil.logAndWrite(Log.INFO,"TAG", "writePackageName: "+packageName, null); try (BufferedOutputStream bos = new BufferedOutputStream( new FileOutputStream(file))) { bos.write(packageName.getBytes(StandardCharsets.UTF_8)); diff --git a/app/src/main/java/com/example/retention/worker/LoadDeviceWorker.java b/app/src/main/java/com/example/retention/worker/LoadDeviceWorker.java index f239eb0..cf835e9 100644 --- a/app/src/main/java/com/example/retention/worker/LoadDeviceWorker.java +++ b/app/src/main/java/com/example/retention/worker/LoadDeviceWorker.java @@ -42,25 +42,29 @@ public class LoadDeviceWorker extends CoroutineWorker { boolean result = ChangeDeviceInfoUtil.getDeviceInfoSync(taskId, androidId); String packageName = ChangeDeviceInfoUtil.packageName; String zipName = ChangeDeviceInfoUtil.zipName; - Log.d("TAG", "doWork: " + result + " " + packageName + " " + zipName); + LogFileUtil.logAndWrite(Log.INFO, "TAG","doWork: " + result + " " + packageName + " " + zipName, null); if (result && !TextUtils.isEmpty(packageName) && !TextUtils.isEmpty(zipName)) { boolean isSuccess = ChangeDeviceInfoUtil.processPackageInfoWithDeviceInfo(packageName, zipName, getApplicationContext(), androidId, taskId); if (isSuccess) { - executeSingleLogic(context); + executeSingleLogic(context, packageName); } } else { - Log.d("TAG", "doWork: get Device info false"); + LogFileUtil.logAndWrite(Log.INFO, "TAG", "doWork: get Device info false", null); } return Result.success(); } - public void executeSingleLogic(Context context) { + public void executeSingleLogic(Context context, String packageName) { + if (packageName == null || packageName.isEmpty()){ + LogFileUtil.logAndWrite(Log.INFO, "MainActivity", "executeSingleLogic: Package name is empty", null); + return; + } LogFileUtil.logAndWrite(Log.INFO, "MainActivity", "executeSingleLogic: Proxy not active, starting VPN", null); startProxyVpn(context); LogFileUtil.logAndWrite(Log.INFO, "MainActivity", "executeSingleLogic: Changing device info", null); - ChangeDeviceInfoUtil.changeDeviceInfo(context.getPackageName(), context, MainActivity.armClient); + ChangeDeviceInfoUtil.changeDeviceInfo(packageName, context, MainActivity.armClient); LogFileUtil.logAndWrite(Log.INFO, "MainActivity", "executeSingleLogic: Running AutoJs script", null); - Utils.writePackageName(ChangeDeviceInfoUtil.packageName); + Utils.writePackageName(packageName); AutoJsUtil.runAutojsScript(context); } diff --git a/app/src/main/jniLibs/arm64-v8a/libnative.so b/app/src/main/jniLibs/arm64-v8a/libnative.so index 967a418..290c546 100644 Binary files a/app/src/main/jniLibs/arm64-v8a/libnative.so and b/app/src/main/jniLibs/arm64-v8a/libnative.so differ