Merge branch 'Retention' of http://47.108.156.251:3000/yjj/agent-bigo into Retention

This commit is contained in:
yjj38 2025-07-10 17:13:55 +08:00
commit 14648729aa
8 changed files with 18 additions and 11 deletions

View File

@ -24,7 +24,7 @@
</component>
<component name="DBNavigator.Project.DatabaseConsoleManager">
<connection id="9e7d43d6-9c6a-47fa-b0b1-b14b18fadac4">
<console name="Connection" type="STANDARD" schema="" session="Main" />
<console name="Connection" type="STANDARD" schema="gin_demo" session="Main" />
</connection>
</component>
<component name="DBNavigator.Project.DatabaseEditorStateManager">
@ -36,6 +36,9 @@
<component name="DBNavigator.Project.DatabaseSessionManager">
<connection id="9e7d43d6-9c6a-47fa-b0b1-b14b18fadac4" />
</component>
<component name="DBNavigator.Project.ExecutionManager">
<retain-sticky-names value="false" />
</component>
<component name="DBNavigator.Project.ObjectQuickFilterManager">
<last-used-operator value="EQUAL" />
<filters />

Binary file not shown.

View File

@ -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"
]
}
],

View File

@ -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));

View File

@ -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);
}