-
-
Notifications
You must be signed in to change notification settings - Fork 478
fix(Spoof app signature): Resolve errors when patching without CLI tools #5353
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: dev
Are you sure you want to change the base?
Conversation
Spoof app signature
patch (#5158)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 updates the Revanced patches plugin version and adjusts how the apksig library is included so that patching succeeds without CLI tools.
- Bump
app.revanced.patches
plugin from 1.0.0-dev.7 to 1.0.0-dev.9 - Change
libs.apksig
dependency fromimplementation
to a shaded configuration
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
settings.gradle.kts | Updated plugin version to 1.0.0-dev.9 |
patches/build.gradle.kts | Switched apksig from implementation to shade for bundling |
Comments suppressed due to low confidence (3)
patches/build.gradle.kts:19
- [nitpick] Add a brief comment explaining why
shade
is used for the apksig library (e.g., to embed its classes into the final artifact and avoid runtime ClassNotFoundExceptions).
"shade"(libs.apksig)
patches/build.gradle.kts:19
- Ensure that the
shade
configuration is defined (e.g., via the Shadow plugin or the Gradle plugin) so this dependency can actually be shaded; otherwise the build will fail with an unknown configuration error.
"shade"(libs.apksig)
settings.gradle.kts:19
- Verify that version 1.0.0-dev.9 of the
app.revanced.patches
plugin is published to the configured plugin repository so downstream builds do not break.
id("app.revanced.patches") version "1.0.0-dev.9"
@@ -16,7 +16,7 @@ dependencies { | |||
// Required due to smali, or build fails. Can be removed once smali is bumped. | |||
implementation(libs.guava) | |||
|
|||
implementation(libs.apksig) | |||
"shade"(libs.apksig) |
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.
is this an API from the Gradle plugin? I haven't checked yet
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.
Well yes, I added the "shade" configuration in the gradle plugin pr.
Shadow uses the runtimeClasspath by default, but currently there is the revanced-patcher, guava and smali inside the runtimeClasspath (via implementation), and we don't want that to be shaded in. So I added the "shade" configuration.
This fixes apksig not being present in the revanced manager, resulting in an ClassNotFoundException.
For context, read the comments here: #5158
Depends on ReVanced/revanced-patches-gradle-plugin#6