generated from ReVanced/revanced-patches-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c673c1c
commit e8413ab
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/main/kotlin/dropped/patches/spotify/premium/UnlockPremiumPatch.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |