-
Notifications
You must be signed in to change notification settings - Fork 16.1k
app: support download image and patch #9382
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
base: master
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR adds support for downloading and patching images directly from URLs to Magisk, expanding installation options beyond local files. It also includes a complete rewrite of the payload processing logic using Java Channel APIs and protobuf support.
Key changes:
- New download functionality with URL-based image patching
- Complete rewrite of payload processing using protobuf
- Added Java Channel-based data source implementation for efficient file/network operations
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
app/gradle/libs.versions.toml |
Added protobuf and XZ compression dependencies |
app/core/src/main/res/values/strings.xml |
Added UI strings for download functionality |
app/core/src/main/proto/update_metadata.proto |
Added protobuf definitions for OTA payload parsing |
app/core/src/main/java/com/topjohnwu/magisk/core/utils/DataSourceChannel.java |
New efficient data source abstraction for files and HTTP |
app/core/src/main/java/com/topjohnwu/magisk/core/tasks/Payload.kt |
New payload processing implementation using protobuf |
app/core/src/main/java/com/topjohnwu/magisk/core/tasks/ExtractImage.kt |
New image extraction logic for factory images and OTA packages |
app/core/src/main/java/com/topjohnwu/magisk/core/tasks/MagiskInstaller.kt |
Updated installer with download support and simplified processing |
app/apk/src/main/java/com/topjohnwu/magisk/dialog/DownloadDialog.kt |
New dialog for URL input validation |
| UI layouts | Updated to support download option and fix console display issues |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
app/core/src/main/java/com/topjohnwu/magisk/core/utils/DataSourceChannel.java
Show resolved
Hide resolved
app/core/src/main/java/com/topjohnwu/magisk/core/tasks/MagiskInstaller.kt
Outdated
Show resolved
Hide resolved
app/core/src/main/java/com/topjohnwu/magisk/core/tasks/MagiskInstaller.kt
Outdated
Show resolved
Hide resolved
| callback(it) | ||
| } ?: run { | ||
| doNotDismiss = true | ||
| editText.error = context.getString(R.string.download_dialog_title) |
Copilot
AI
Sep 30, 2025
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.
Using the dialog title string as an error message is confusing and unhelpful. The error should use a descriptive message like 'Invalid URL format' or create a dedicated error string resource.
| editText.error = context.getString(R.string.download_dialog_title) | |
| editText.error = context.getString(R.string.download_dialog_invalid_url) |
app/core/src/main/java/com/topjohnwu/magisk/core/tasks/ExtractImage.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
No description provided.