Skip to content

Commit

Permalink
feat(spotify): add unlck premium
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX authored and indrastorms committed Apr 23, 2024
1 parent c673c1c commit e8413ab
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
5 changes: 5 additions & 0 deletions api/dropped-patches.api
Original file line number Diff line number Diff line change
Expand Up @@ -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 <init> ()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;
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit e8413ab

Please sign in to comment.