You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request introduces significant improvements to the patch installation flow in the Android app, mainly by adding support for installing split APKs and handling installation results more robustly. It also refactors the installation UI to allow users to choose between system and Shizuku installation methods, and introduces new utility functions for APK management. Additionally, necessary AndroidManifest updates are made to support these new features.
Split APK installation and result handling:
Added a new InstallDialog2 composable and supporting logic to handle split APK installation, including uninstalling the previous app version if needed and listening for installation results via a broadcast receiver. (manager/src/main/java/org/lsposed/lspatch/ui/page/NewPatchScreen.kt, manager/src/main/java/org/lsposed/lspatch/ui/page/NewPatchScreen.ktR588-R700)
Introduced InstallResultReceiver class to handle installation status broadcasts and pending intents, enabling robust feedback on installation outcomes. (manager/src/main/java/org/lsposed/lspatch/ui/util/Utils.kt, manager/src/main/java/org/lsposed/lspatch/ui/util/Utils.ktR29-R159)
Added new utility functions: installApk, installApks, uninstallApkByPackageName, and checkIsApkFixedByLSP for streamlined APK management and installation logic. (manager/src/main/java/org/lsposed/lspatch/ui/util/Utils.kt, manager/src/main/java/org/lsposed/lspatch/ui/util/Utils.ktR29-R159)
UI and installation method selection improvements:
Refactored the patch installation UI to allow users to select between system and Shizuku installation methods, and improved the feedback and flow for both paths. (manager/src/main/java/org/lsposed/lspatch/ui/page/NewPatchScreen.kt, [1][2][3]
Added new permissions (REQUEST_INSTALL_PACKAGES) and registered the InstallResultReceiver and a FileProvider to support split APK installation and secure file access. (manager/src/main/AndroidManifest.xml, [1][2][3]
Updated patcher logic to track and save target APK files for installation, supporting split APK scenarios. (manager/src/main/java/org/lsposed/lspatch/Patcher.kt, [1][2]
These changes collectively enable the app to handle more complex patching scenarios, improve user experience during installation, and ensure compatibility with modern Android requirements.
To keep LSPatch working properly with reoptimize function (see #72), Shizuku is now indispensible.
It is thus not a good idea to replace Shizuku with unstable manual installation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to the patch installation flow in the Android app, mainly by adding support for installing split APKs and handling installation results more robustly. It also refactors the installation UI to allow users to choose between system and Shizuku installation methods, and introduces new utility functions for APK management. Additionally, necessary AndroidManifest updates are made to support these new features.
Split APK installation and result handling:
InstallDialog2composable and supporting logic to handle split APK installation, including uninstalling the previous app version if needed and listening for installation results via a broadcast receiver. (manager/src/main/java/org/lsposed/lspatch/ui/page/NewPatchScreen.kt, manager/src/main/java/org/lsposed/lspatch/ui/page/NewPatchScreen.ktR588-R700)InstallResultReceiverclass to handle installation status broadcasts and pending intents, enabling robust feedback on installation outcomes. (manager/src/main/java/org/lsposed/lspatch/ui/util/Utils.kt, manager/src/main/java/org/lsposed/lspatch/ui/util/Utils.ktR29-R159)installApk,installApks,uninstallApkByPackageName, andcheckIsApkFixedByLSPfor streamlined APK management and installation logic. (manager/src/main/java/org/lsposed/lspatch/ui/util/Utils.kt, manager/src/main/java/org/lsposed/lspatch/ui/util/Utils.ktR29-R159)UI and installation method selection improvements:
manager/src/main/java/org/lsposed/lspatch/ui/page/NewPatchScreen.kt, [1] [2] [3]InstallMethodenum toNewPatchViewModelto track the chosen installation method. (manager/src/main/java/org/lsposed/lspatch/ui/viewmodel/NewPatchViewModel.kt, manager/src/main/java/org/lsposed/lspatch/ui/viewmodel/NewPatchViewModel.ktR27-R30)AndroidManifest and file handling updates:
REQUEST_INSTALL_PACKAGES) and registered theInstallResultReceiverand aFileProviderto support split APK installation and secure file access. (manager/src/main/AndroidManifest.xml, [1] [2] [3]manager/src/main/java/org/lsposed/lspatch/Patcher.kt, [1] [2]These changes collectively enable the app to handle more complex patching scenarios, improve user experience during installation, and ensure compatibility with modern Android requirements.