-
Notifications
You must be signed in to change notification settings - Fork 134
Enhance installation and cleanup processes(#29) #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I will begin reviewing when I finish my PhD thesis (soon), please feel free to improve current PR. |
|
For the Do you find any advantage of doing so? |
|
This can be convenient to a certain extent. If there are no changes for a long time, the user experience will be better. However, many users are now reporting that this causes the program to crash. According to the log, the crash is caused by the core not being loaded. |
|
I see, I'd prefer to see the user bug reports. We can keep it as another possible pull-request in the future. You may keep it in another branch of your repo. Let us focus on the native installation. Currently, most installed application from play store are using split APK delivery. It is recommended to use |
|
use PackageInstaller for split APKs? |
|
I meant, currently, only PackageInstaller can handle split APKs installation. |
|
I don't understand |
|
Okay, here is what I mean. Problem in you codeYou code cannot handle split APK installation, which thus fails to patch most applications installed from Google Play store, such as My suggestion to solve thisI suggest you to read the official doc of the Futher details of this APIThis API has a concept of session, by handling all split APKs during a created session, you will manage to correctly install them into the device. |
|
OK, now I understand. I will take a look at it when I have time. |
|
Is the code written by AI, and you were talking with it in Chinese? |
The annotations were written by the AI, while the overall logic was completed by myself. |
|
AI generated code are really low, you should double check. |
|
Recently, I have been in the habit of using AI to generate comments to organize the logic after writing the code. However, when submitting, I forgot to delete them. |
| val copyError = stringResource(R.string.copy_error) | ||
| var installing by remember { mutableStateOf(false) } | ||
| if (installing) InstallDialog(viewModel.patchApp) { status, message -> | ||
| var installing by remember { mutableStateOf(0) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better, if you use an enum to define installing an rename it to installation.
This pull request includes several changes to improve the functionality and stability of the
LSPatchapplication. The most important changes include modifications to the AndroidManifest.xml file, updates to theLSPApplicationandPatcherclasses, and enhancements to theNewPatchScreenandAppManagePageuser interfaces.Permissions and Providers:
REQUEST_INSTALL_PACKAGESpermission to theAndroidManifest.xmlfile.FileProviderto theAndroidManifest.xmlto support file sharing.Application and Patching Logic:
targetApkFileproperty inLSPApplicationto handle APK files.Patcherclass to copy the APK to the external cache directory and assign it totargetApkFile.User Interface Enhancements:
NewPatchScreento include a newInstallDialog2for handling APK installations with additional uninstall logic.Utils.ktto check if an APK is fixed by LSP, install APKs, and uninstall APKs by package name.Clean-Up and Utility Functions:
LSPPackageManager.file_paths.xmlto define paths for file sharing.