Commit Graph

65 Commits

Author SHA1 Message Date
Administrator f6b4de5838 代理切换 2025-07-09 14:58:30 +08:00
Administrator b2162a97ca Merge remote-tracking branch 'origin/Added' into Added 2025-07-09 14:00:50 +08:00
Administrator 33259cf04e 代理切换 2025-07-09 14:00:40 +08:00
yjj38 a9b5ae4831 chore: 删除 ArmCloudApiClient 类并添加代码检查配置
- 删除了 app/src/main/java/com/example/studyapp/device/ArmCloudApiClient.java 文件
- 在项目根目录下添加了 .idea/inspectionProfiles/Project_Default.xml 文件,配置代码检查规则
2025-07-09 13:19:34 +08:00
Administrator b8acabc545 代理切换 2025-07-09 11:39:18 +08:00
Administrator 2ddd9a5f80 接口改机 2025-07-08 22:01:28 +08:00
yjj38 c63f13e54b feat(device): 新增 ArmCloudApiClient 用于与 ARM 云平台交互
- 实现了 `calculateSignature` 方法用于生成 API 请求签名。
- 新增 `updateAndroidModProperties` 方法,用于修改实例的安卓改机属性(需要重启生效)。
- 新增 `updateInstanceProperties` 方法,用于动态修改实例的属性信息(即时生效)。
- 定义了内部类 `PropertyItem` 用于封装属性名和属性值。
- 使用 OkHttp 进行网络请求,并集成了日志记录功能。
2025-07-08 20:01:14 +08:00
yjj38 db423f125c refactor(MainActivity): 优化国家切换逻辑并统一代码
- 将 switchCountry 方法改为返回当前国家代码
- 在切换代理组时直接使用 switchCountry 方法获取最新国家代码
- 统一国家代码获取方式,提高代码可维护性
2025-07-07 18:53:31 +08:00
yjj38 b003864b97 refactor(app): 优化设备信息上传逻辑
- 重构了 TaskUtil 类中的设备信息上传方法- 使用 Builder 模式构建 HttpUrl,提高了代码的可读性和可维护性
- 增加了对 packageName 参数的空值检查,避免不必要的查询参数
- 移除了冗余的异常抛出,改为直接返回,简化了错误处理逻辑
2025-07-07 18:30:32 +08:00
yjj38 530e2d6af2 refactor(MainActivity): 移除重复变量声明
- 删除 `scriptResult` 变量
- 调整了 `REQUEST_CODE_PERMISSIONS`, `TAG`, `PACKAGE_SCHEME`, `DEVICE_TYPE`, `CountryCode`, 和 `currentCountry` 变量的声明位置,以避免重复声明。
2025-07-07 16:09:10 +08:00
yjj38 069348cb43 refactor(main): 重构MainActivity并引入国家代码切换功能
- 重构了 MainActivity 的 onCreate 方法,将初始化逻辑拆分为多个独立方法,包括组件初始化、权限检查、网络检查和 WorkManager 设置。
- 引入了国家代码切换功能,允许在 "us" 和 "ru" 之间切换,并在启动 VPN 和获取设备信息时使用当前选择的国家代码。
- 优化了按钮初始化逻辑,使用 `setupButton` 方法统一处理按钮的查找和点击事件设置。
- 将部分硬编码字符串提取到 `strings.xml` 中。
- 移除了 ChangeDeviceInfoUtil 中的 `initialize` 方法,其功能已整合到 `getAddDeviceInfo` 中。
- 在执行主要任务逻辑 `executeLogic` 中,根据当前选择的国家代码来获取设备信息。
- 调整了部分日志记录的 TAG。
- 移除了 `getInstance` 方法,不再提供 MainActivity 的静态实例获取。
2025-07-07 16:02:17 +08:00
yjj38 f41f54c572 refactor(proxy): 移除代理检查国家功能并优化 VPN 启动逻辑
- 删除了 ClashUtil 类中的 checkCountryIsUS 方法,移除了检查国家是否为美国的功能
- 修改了 LoadDeviceWorker 类中的 startProxyVpn 方法,去除了返回值,简化了逻辑- 优化了 executeSingleLogic 方法的流程,移除了与代理检查国家相关的代码
2025-07-04 10:59:56 +08:00
yjj38 645c4b076a refactor(proxy): 重构代理工具类并添加地理位置信息获取功能- 移除了 ClashUtil 中的 checkCountryIsUS 方法
- 在 IpUtil 中添加了 fetchGeoInfo 方法,用于获取地理位置信息
- 更新了 MainActivity 中的代理启动逻辑
- 修改了 TaskUtil 中的设备信息上传逻辑,增加了 IP信息参数
2025-07-03 17:06:17 +08:00
yjj38 11ae6347cd refactor(main): 重构主函数并添加日志记录功能
- 新增 log 和 error 函数用于日志记录
- 重新封装 HTTP 请求和 API 处理逻辑
- 主函数增加错误处理和任务完成检查
- 添加定时器实现循环执行
2025-07-03 16:31:58 +08:00
yjj38 5ac9d2555f JDK升级到21,优化ClashUtil的代理切换和网络检查逻辑
- 项目的JDK版本从17升级到21。
- ClashUtil的`switchProxyGroup`方法改为同步执行,并增加了对HTTP响应状态码的检查。
- 新增`checkCountryIsUS`方法,用于通过ipinfo.io判断当前IP是否在美国,并在VPN启动后调用此方法进行验证。
- `LoadDeviceWorker`中的`startProxyVpn`方法现在会根据`checkCountryIsUS`的结果来决定是否继续执行后续操作。
- AutoJs脚本 (`main.js`) 更新,使用Promise和async/await来处理并行的HTTP请求,并分别调用ipv4.geojs.io的接口获取国家代码和详细地理位置信息。
2025-07-03 14:41:49 +08:00
yjj38 91a60683c5 refactor(proxy): 重构代理工具并添加地理位置检查功能
-重写 ClashUtil 类中的 switchProxyGroup 方法,使用同步调用替代异步回调
- 新增 checkCountryIsUS 方法,用于检查当前设备是否位于美国
- 修改 MainActivity 中的 startProxyVpn 方法,集成新的地理位置检查逻辑
-优化任务执行流程,确保仅在代理 VPN 启动成功且设备位于美国时执行后续操作
- 修复了一些潜在的资源泄露问题,提高了代码的健壮性
2025-07-03 14:12:02 +08:00
yjj38 fec032e52b 升级 JDK 版本到 21 2025-07-03 11:32:13 +08:00
Administrator c4f4b654f8 取消takeId 2025-06-28 15:15:08 +08:00
Administrator f6d15ec13b 打包配置 2025-06-28 14:38:05 +08:00
Administrator f51780943f device_info_upload增加takeId 2025-06-28 14:29:29 +08:00
Administrator e650ec29c6 优化异常处理 2025-06-28 11:27:26 +08:00
Administrator 87b70e2197 移除无用代码 2025-06-26 14:34:58 +08:00
Administrator 6d084c92e4 处理上传异常,压缩后卸载原apk 2025-06-26 14:08:01 +08:00
Administrator 827aaa21f8 2025-06-25 21:20:03 +08:00
Administrator be997233bd 打包所有apk文件 2025-06-25 21:18:15 +08:00
Administrator 3b83c6fc0b 2025-06-25 18:13:35 +08:00
Administrator 8de7349601 空包名不上传 2025-06-25 18:11:23 +08:00
Administrator 433419d1f3 . 2025-06-25 15:30:59 +08:00
Administrator 6f1bad5176 . 2025-06-25 15:29:08 +08:00
Administrator 17da31df13 . 2025-06-25 14:59:49 +08:00
Administrator 8f371c1a01 . 2025-06-25 11:40:18 +08:00
Administrator 33c53e8239 . 2025-06-25 10:57:15 +08:00
Administrator 1652482e79 refactor(ChangeDeviceInfoUtil, MainActivity): enhance package processing null-check, cleanup unused variables
- Introduced null-checks for `packageInfo` in `ChangeDeviceInfoUtil` package processing to improve error handling.
- Removed redundant `scriptResult` assignment in `MainActivity` for cleaner execution logic.
- Updated APK and baseline profile files for release configuration.
2025-06-25 10:56:53 +08:00
yjj38 cd09538426 refactor(ChangeDeviceInfoUtil, MainActivity): enhance package processing null-check, cleanup unused variables
- Introduced null-checks for `packageInfo` in `ChangeDeviceInfoUtil` package processing to improve error handling.
- Removed redundant `scriptResult` assignment in `MainActivity` for cleaner execution logic.
- Updated APK and baseline profile files for release configuration.
2025-06-21 16:13:55 +08:00
yjj38 ee67543b0a `refactor(TaskUtil): add taskId support, improved file/directory handling, and introduce compression/unzip utilities` 2025-06-21 14:39:57 +08:00
yjj38 7ce7a3d72e refactor(ShellUtils, TaskUtil): enhance shell execution and streamline file management
- Improved `ShellUtils` with enhanced logging, thread-management, and safety checks for shell command execution.
- Streamlined `TaskUtil`'s file operations with safer and more robust shell commands for deletion, copying, and compression.
- Replaced Java I/O-based file management in `TaskUtil` with shell-based operations for better performance and security.
- Added new helper methods like `delFileSh`, `copyFolderSh`, and `clearUpFileInDst` in `TaskUtil`.
2025-06-20 16:37:36 +08:00
yjj38 30985a0fa0 refactor(app): 重构应用主界面和功能代码
- 更新 activity_main.xml 布局,优化界面结构
- 重构 AutoJsUtil 类,提高代码可读性和维护性
- 改进 ChangeDeviceInfoUtil 类,增强设备信息修改功能
- 更新 build.gradle 配置,提升项目构建兼容性
2025-06-19 22:12:21 +08:00
yjj38 222a2002f9 Add `TaskUtil` for device and file operations; update `MainActivity` for Android ID handling and permissions
Introduced new `TaskUtil` utility class for device info upload, file compression, and remote operations. Updated `MainActivity` to dynamically fetch and utilize Android ID, added Android 13+ permission handling for `FOREGROUND_SERVICE`. Included Mockito dependencies for unit testing, implemented `TaskUtilTest` for API interaction validation. Adjusted `ChangeDeviceInfoUtil` initialization and fetched properties dynamically. Updated `minSdk` and network security configuration.
2025-06-18 14:31:11 +08:00
yjj38 984328b7eb Add release key, metadata, AF parameters, and APK for release configuration
Integrated the release keystore file, generated necessary metadata (`output-metadata.json`), and included detailed AF parameter configurations (`AF设备参数.txt`). Added the release APK and baseline profile files for optimized app deployment.
2025-06-16 16:38:13 +08:00
yjj38 2c9ca8ec44 Refactor `AutoJsUtil` and `MainActivity` to improve script execution and synchronization
Enhanced script execution flow with dedicated `broadcastLock` and `taskLock` for better synchronization. Improved logging, broadcast receiver management, and error handling in `AutoJsUtil`. Removed unused methods and redundant synchronization. Added counter for script runs and optimized lifecycle management for stability.
2025-06-13 19:02:53 +08:00
yjj38 c8650a2fac Enhance `ChangeDeviceInfoUtil` with `TextUtils` for null/empty checks and update deployment target configuration 2025-06-13 14:26:30 +08:00
yjj38 dc2fdd615e Refactor `AutoJsUtil` and `MainActivity` for enhanced script handling and synchronization
Introduced synchronized locking for script execution flow in `MainActivity` and added a robust broadcast receiver registration process in `AutoJsUtil`. Enhanced logging, error handling, and script management utilities. Updated `AutoJsUtil` with better file validation and context-aware lifecycle methods for improved stability and clarity.
2025-06-12 22:55:55 +08:00
yjj38 b6e312cf9e Enhance `ChangeDeviceInfoUtil` and `HttpUtil` for dynamic property updates and robust utilities
Refactored `ChangeDeviceInfoUtil` to dynamically fetch and apply device properties from JSON inputs. Added flexible handling of runtime values, improved error handling, and introduced `HttpUtil` methods for URL placeholders and retrieving the local IP address. Updated `MainActivity` and scripts for streamlined execution flow and better integration.
2025-06-12 11:31:46 +08:00
yjj38 657bb2c2c1 Dynamically fetch and apply device properties from API responses
Implemented dynamic retrieval of device properties from external APIs, parsing JSON responses, and replacing statically hardcoded values. Enhanced flexibility for device information management. Added error handling for JSON parsing and root access validation.
2025-06-10 19:54:32 +08:00
yjj38 c746633baf Dynamically fetch and apply device properties from API responses
Implemented dynamic retrieval of device properties from external APIs, parsing JSON responses, and replacing statically hardcoded values. Enhanced flexibility for device information management. Added error handling for JSON parsing and root access validation.
2025-06-10 11:45:44 +08:00
yjj38 d2661f8fdb Enhance `ChangeDeviceInfoUtil` to collect extensive device and environment data
Added detailed data collection including network type, language, country, advertiser ID, AppsFlyer parameters, device information, sensor data, battery status, and timestamps. Improved network type detection with `NetworkCapabilities` for accuracy. Integrated mock values for testing.
2025-06-09 22:05:48 +08:00
yjj38 6b4e8e4f9e Enhance `ChangeDeviceInfoUtil` to collect extensive device and environment data
Added detailed data collection including network type, language, country, advertiser ID, AppsFlyer parameters, device information, sensor data, battery status, and timestamps. Improved network type detection with `NetworkCapabilities` for accuracy. Integrated mock values for testing.
2025-06-09 21:37:39 +08:00
yjj38 74e77acdd0 Add input handling and execution flow for proxy automation
Introduced input field and button in `MainActivity` and updated layout to enable dynamic iteration of proxy operations based on user input. Implemented logic to handle input validation and sequential proxy processing using predefined proxy names.
2025-06-09 21:08:51 +08:00
yjj38 c27ca64a8d Collect detailed device and environment info for VCloud
Added system-level data collection for properties like User-Agent, OS version, language, DPI, time zone, network type, ISP, country, and Google Advertising ID (GAID). Integrated `play-services-ads-identifier` dependency for retrieving GAID. Updated `build.gradle` and `libs.versions.toml` accordingly.
2025-06-09 16:50:33 +08:00
yjj38 23e9b730bf Collect detailed device and environment info for VCloud
Added system-level data collection for properties like User-Agent, OS version, language, DPI, time zone, network type, ISP, country, and Google Advertising ID (GAID). Integrated `play-services-ads-identifier` dependency for retrieving GAID. Updated `build.gradle` and `libs.versions.toml` accordingly.
2025-06-09 16:45:29 +08:00