Instructions to migrate your patches codebase from ReVanced to Morphe:
Required project changes:
Rebase your patches off the morphe-patches-template repo (if you forked it), or manually apply the following changes to your repo:
libs.versions.toml
morphe-patcher = "1.3.2"
smali = "b6365a84f4"
settings.gradle.kts
pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
google()
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/MorpheApp/registry")
credentials {
username = providers.gradleProperty("gpr.user").getOrElse(System.getenv("GITHUB_ACTOR"))
password = providers.gradleProperty("gpr.key").getOrElse(System.getenv("GITHUB_TOKEN"))
}
}
maven { url = uri("https://jitpack.io") }
}
}
plugins {
id("app.morphe.patches") version "1.2.0"
}
Required patch code changes
- Change all patcher class imports from
app.revanced.* to app.morphe.*
- Change iterating using
ProxyClassList.forEach{} to classDefForEach()
- Change class lookup using
ProxyClassList.find{} to classDefBy(classDef) or mutableClassDefBy(classDef)
- Change
proxy(classDef).mutableClass to mutableClassDefBy(classDef)
- Fuzzy pattern scan is no longer supported. Either change to instruction filters or update the opcode pattern one last time and remove fuzzy.
- Replace
patternMatch.firstIndex -> instructionMatches.first().index and patternMatch.lastIndex -> instructionMatches.last().index
- Update extension hook if needed.
Optional patch code changes
- Change from DSL fingerprints to object fingerprints so exception stack traces show fingerprint class names (recommended but not required). Migrate DSL fingerprint
opcodes { Opcode... } to class parameter filters = OpcodesFilter.opcodesToFilters(Opcode...)
- Read the patcher guide on how to start using instruction filters.
Other changes
Update/rename the repo patch name to use a supplemental description of "Compatible with Morphe" or "XYZ patches for Morphe". See template repo for exact details.
Getting your patches into Morphe Manager
The template repo is setup to automatically create patches-bundle.json when creating releases. See other notes and setup steps in the patches template repo: https://github.com/morpheapp/morphe-patches-template
Motivation
Because developers want the best!
Instructions to migrate your patches codebase from ReVanced to Morphe:
Required project changes:
Rebase your patches off the morphe-patches-template repo (if you forked it), or manually apply the following changes to your repo:
libs.versions.toml
settings.gradle.kts
Required patch code changes
app.revanced.*toapp.morphe.*ProxyClassList.forEach{}toclassDefForEach()ProxyClassList.find{}toclassDefBy(classDef)ormutableClassDefBy(classDef)proxy(classDef).mutableClasstomutableClassDefBy(classDef)patternMatch.firstIndex->instructionMatches.first().indexandpatternMatch.lastIndex->instructionMatches.last().indexOptional patch code changes
opcodes { Opcode... }to class parameterfilters = OpcodesFilter.opcodesToFilters(Opcode...)Other changes
Update/rename the repo patch name to use a supplemental description of "Compatible with Morphe" or "XYZ patches for Morphe". See template repo for exact details.
Getting your patches into Morphe Manager
The template repo is setup to automatically create
patches-bundle.jsonwhen creating releases. See other notes and setup steps in the patches template repo: https://github.com/morpheapp/morphe-patches-templateMotivation
Because developers want the best!