diff --git a/api/dropped-patches.api b/api/dropped-patches.api index 16e671d..092eac8 100644 --- a/api/dropped-patches.api +++ b/api/dropped-patches.api @@ -18,6 +18,11 @@ public final class app/revanced/patches/nova/prime/patch/UnlockPrimePatch : app/ public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V } +public final class app/revanced/patches/spotify/premium/UnlockPremiumPatch : app/revanced/patches/shared/misc/hex/BaseHexPatch { + public fun ()V + public fun getReplacements ()Ljava/util/List; +} + public final class app/revanced/patches/tasker/trial/unlock/fingerprints/CheckLicenseFingerprint : app/revanced/patcher/fingerprint/MethodFingerprint { public static final field INSTANCE Lapp/revanced/patches/tasker/trial/unlock/fingerprints/CheckLicenseFingerprint; } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e75f332..1b7e407 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] revanced-patcher = "19.3.1" -revanced-patches = "4.3.0" +revanced-patches = "4.8.0-dev.3" smali = "3.0.5" binary-compatibility-validator = "0.14.0" kotlin = "1.9.22" diff --git a/src/main/kotlin/dropped/patches/spotify/premium/UnlockPremiumPatch.kt b/src/main/kotlin/dropped/patches/spotify/premium/UnlockPremiumPatch.kt new file mode 100644 index 0000000..1d6dc32 --- /dev/null +++ b/src/main/kotlin/dropped/patches/spotify/premium/UnlockPremiumPatch.kt @@ -0,0 +1,42 @@ +package app.revanced.patches.spotify.premium + +import app.revanced.patcher.patch.annotation.CompatiblePackage +import app.revanced.patcher.patch.annotation.Patch +import app.revanced.patches.shared.misc.hex.BaseHexPatch + +@Patch( + name = "Unlock Spotify Premium", + description = "Unlock Spotify Premium features for ARM64 devices. " + + "Server-sided features like downloading songs are still locked. ", + compatiblePackages = [ + CompatiblePackage( + "com.spotify.music", + [ + "8.9.8.545", + ], + ), + ], +) +@Suppress("unused") +class UnlockPremiumPatch : BaseHexPatch() { + private val arm64Replacements = listOf( + Replacement( + "01 0a 2a 89 00 00 34", + "01 0a 2a 1f 20 03 d5", + "lib/arm64-v8a/liborbit-jni-spotify.so", + ), + Replacement( + "94 1f 31 00 71 81 00 00 54", + "94 1f 31 00 71 04 00 00 14", + "lib/arm64-v8a/liborbit-jni-spotify.so", + ), + Replacement( + "e1 01 00 54 20", + "0f 00 00 14 20", + "lib/arm64-v8a/liborbit-jni-spotify.so", + ), + ) + + // To support other architectures, add replacements for them. + override val replacements = arm64Replacements +}