这是一个使用标准 Android Gradle Plugin 和现代 libxposed API 102 构建的精简 Java 模块。模块仅加载到 com.miui.securitycore,并在 XSpaceService.onCreate() 执行前,将 Google Play 商店(com.android.vending)添加到 miui.securityspace.XSpaceConstant.REQUIRED_APPS。
- 适用问题:系统功能组件未将 Google Play 商店视为必需应用,导致手机重启后 XSpace 的 Google Play 商店被删除。
- 适用机型:开启应用双开的小米设备。
- 已测试机型:小米 17 Pro Max。
- 已测试系统:Xiaomi HyperOS 4.0。其他机型和系统版本尚未验证,不保证兼容。
- 从 Releases 下载并安装 APK。
- 在 LSPosed 中启用本模块。
- 确认作用域为 SecurityCore(
com.miui.securitycore)。 - 重启手机。
APK 已将 SecurityCore 声明为推荐的 LSPosed 作用域,且不申请任何 Android 权限。模块能否正常工作,取决于目标 ROM 是否仍保留上述内部类名和字段名。
可以使用以下命令检查日志:
su -c "logcat -d | grep -F XSpacePlayStoreFix"构建需要 JDK 17 和 Android SDK Platform 36。Gradle Wrapper 会解析 Android Gradle Plugin 8.11.0 和 io.github.libxposed:api:102.0.0。
./gradlew test lintRelease assembleReleaseWindows:
.\gradlew.bat test lintRelease assembleRelease现代模块元数据位于 app/src/main/resources/META-INF/xposed/。项目不包含旧式 assets/xposed_init、Xposed Manifest 元数据、smali 源码或模板 APK 依赖。
Minimal Java module built with the standard Android Gradle Plugin and modern
libxposed API 102. It loads only for com.miui.securitycore and adds
com.android.vending to
miui.securityspace.XSpaceConstant.REQUIRED_APPS immediately before
XSpaceService.onCreate().
- Applicable issue: SecurityCore does not treat Google Play Store as a required app, causing it to be removed from XSpace after the device restarts.
- Applicable devices: Xiaomi devices with Dual apps enabled.
- Tested device: Xiaomi 17 Pro Max.
- Tested system: Xiaomi HyperOS 4.0. Other devices and system versions have not been verified and are not guaranteed to work.
- Download and install the APK from Releases.
- Enable the module in LSPosed.
- Confirm that its scope is SecurityCore (
com.miui.securitycore). - Reboot the phone.
The APK declares SecurityCore as its recommended LSPosed scope. No Android permissions are requested. Whether the hook works depends on the target ROM retaining the internal class and field names above.
Useful log check:
su -c "logcat -d | grep -F XSpacePlayStoreFix"Requirements: JDK 17 and Android SDK Platform 36. The Gradle Wrapper resolves
Android Gradle Plugin 8.11.0 and io.github.libxposed:api:102.0.0.
./gradlew test lintRelease assembleReleaseOn Windows:
.\gradlew.bat test lintRelease assembleReleaseModern module metadata lives in app/src/main/resources/META-INF/xposed/.
There is no legacy assets/xposed_init, Xposed manifest metadata, smali source,
or template APK dependency.