diff --git "a/\"patches/src/main/kotlin/app/revanced/patches/spotify/premium/interceptors/ProductStateInterceptor.kt\"" "b/\"patches/src/main/kotlin/app/revanced/patches/spotify/premium/interceptors/ProductStateInterceptor.kt\"" new file mode 100644 index 000000000..f71d87230 --- /dev/null +++ "b/\"patches/src/main/kotlin/app/revanced/patches/spotify/premium/interceptors/ProductStateInterceptor.kt\"" @@ -0,0 +1,25 @@ +package app.revanced.patches.spotify.premium.interceptors + +import okhttp3.Interceptor +import okhttp3.MediaType.Companion.toMediaType +import okhttp3.Response +import okhttp3.Protocol +import okhttp3.Response +import okhttp3.ResponseBody.Companion.toResponseBody + +class ProductStateInterceptor : Interceptor { + override fun intercept(chain: Interceptor.Chain): Response { + val request = chain.request() + if (request.url.encodedPath.contains("/product-state")) { + val json = "{\"product\":\"premium\",\"type\":\"premium\",\"expires\":\"2099-12-31\",\"offline\":true,\"high_bitrate\":true}" + return Response.Builder() + .request(request) + .protocol(Protocol.HTTP_1_1) + .code(200) + .message("OK") + .body(json.toResponseBody("application/json".toMediaType())) + .build() + } + return chain.proceed(request) + } +} \ No newline at end of file diff --git a/apkks/com.google.android.youtube_21.34.248-1561293007_4arch_6dpi_24lang_0035c4403e3f0a958a836b300a9b5941_apkmirror.com.apkm b/apkks/com.google.android.youtube_21.34.248-1561293007_4arch_6dpi_24lang_0035c4403e3f0a958a836b300a9b5941_apkmirror.com.apkm new file mode 100644 index 000000000..657a212a8 Binary files /dev/null and b/apkks/com.google.android.youtube_21.34.248-1561293007_4arch_6dpi_24lang_0035c4403e3f0a958a836b300a9b5941_apkmirror.com.apkm differ diff --git a/apkks/com.spotify.music_9.1.78.2215-145505425_4arch_7dpi_25lang_646d1cb8f70f1c2bf76ee67f0f307ffc_apkmirror.com.apkm b/apkks/com.spotify.music_9.1.78.2215-145505425_4arch_7dpi_25lang_646d1cb8f70f1c2bf76ee67f0f307ffc_apkmirror.com.apkm new file mode 100644 index 000000000..848d2e525 Binary files /dev/null and b/apkks/com.spotify.music_9.1.78.2215-145505425_4arch_7dpi_25lang_646d1cb8f70f1c2bf76ee67f0f307ffc_apkmirror.com.apkm differ diff --git a/local.properties b/local.properties new file mode 100644 index 000000000..f54a1b042 --- /dev/null +++ b/local.properties @@ -0,0 +1 @@ +sdk.dir=/usr/lib/android-sdk diff --git a/patches/src/main/kotlin/app/revanced/patches/spotify/premium/SpoofPremiumPatch.kt b/patches/src/main/kotlin/app/revanced/patches/spotify/premium/SpoofPremiumPatch.kt deleted file mode 100644 index e528abbd5..000000000 --- a/patches/src/main/kotlin/app/revanced/patches/spotify/premium/SpoofPremiumPatch.kt +++ /dev/null @@ -1,40 +0,0 @@ -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( - "