This commit is contained in:
@@ -0,0 +1,40 @@
|
|||||||
|
package app.revanced.patches.spotify.premium
|
||||||
|
|
||||||
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
|
import app.revanced.patcher.patch.resourcePatch
|
||||||
|
import app.revanced.patches.spotify.premium.Fingerprints.*
|
||||||
|
import app.revanced.util.returnEarlyBoolean
|
||||||
|
import java.io.File
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
|
val manifestPatch = resourcePatch {
|
||||||
|
compatibleWith("com.spotify.music")
|
||||||
|
execute {
|
||||||
|
val manifest = File("AndroidManifest.xml")
|
||||||
|
if (manifest.exists()) {
|
||||||
|
val content = manifest.readText()
|
||||||
|
val patched = content.replace(
|
||||||
|
"<application",
|
||||||
|
"<application android:usesCleartextTraffic=\"true\""
|
||||||
|
)
|
||||||
|
manifest.writeText(patched)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
|
val spoofPremiumPatch = bytecodePatch(
|
||||||
|
name = "Spoof Premium",
|
||||||
|
description = "Spoofs Spotify Premium subscription. Unlocks skips, removes ads, enables offline downloads.",
|
||||||
|
use = true,
|
||||||
|
) {
|
||||||
|
compatibleWith("com.spotify.music")
|
||||||
|
|
||||||
|
apply {
|
||||||
|
productStateFingerprint.method.returnEarlyBoolean(true)
|
||||||
|
subscriptionHandlerFingerprint.method.returnEarlyBoolean(true)
|
||||||
|
skipLimitFingerprint.method.returnEarlyBoolean(true)
|
||||||
|
adPlaybackFingerprint.method.returnEarlyBoolean(false)
|
||||||
|
offlineDownloadFingerprint.method.returnEarlyBoolean(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user