Skip to content

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

MarkusTieger
Copy link
Contributor

@MarkusTieger MarkusTieger commented Jul 5, 2025

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

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title fixup! feat: Add Spoof app signature patch (#5158) fix(Spoof app signature): Resolve errors when patching without CLI tools Jul 5, 2025
@LisoUseInAIKyrios LisoUseInAIKyrios changed the base branch from main to dev July 5, 2025 17:26
@LisoUseInAIKyrios LisoUseInAIKyrios marked this pull request as ready for review July 5, 2025 18:29
Copy link

@Copilot Copilot AI left a 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 from implementation 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)
Copy link
Member

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

Copy link
Contributor Author

@MarkusTieger MarkusTieger Jul 6, 2025

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.

See https://github.com/ReVanced/revanced-patches-gradle-plugin/blob/ea5affec560f504491f106de01e1a15edcf7c3ac/src/main/kotlin/app/revanced/patches/gradle/PatchesPlugin.kt#L266-L268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants