diff --git a/src/main/kotlin/app/revanced/patches/music/misc/gms/GmsCoreSupportPatch.kt b/src/main/kotlin/app/revanced/patches/music/misc/gms/GmsCoreSupportPatch.kt
index 060d3447c..3c99992fc 100644
--- a/src/main/kotlin/app/revanced/patches/music/misc/gms/GmsCoreSupportPatch.kt
+++ b/src/main/kotlin/app/revanced/patches/music/misc/gms/GmsCoreSupportPatch.kt
@@ -5,7 +5,6 @@ import app.revanced.patches.music.misc.gms.Constants.REVANCED_MUSIC_PACKAGE_NAME
import app.revanced.patches.music.misc.gms.GmsCoreSupportResourcePatch.gmsCoreVendorGroupIdOption
import app.revanced.patches.music.misc.gms.fingerprints.*
import app.revanced.patches.music.misc.integrations.IntegrationsPatch
-import app.revanced.patches.music.misc.integrations.fingerprints.ApplicationInitFingerprint
import app.revanced.patches.shared.fingerprints.CastContextFetchFingerprint
import app.revanced.patches.shared.misc.gms.BaseGmsCoreSupportPatch
@@ -21,7 +20,7 @@ object GmsCoreSupportPatch : BaseGmsCoreSupportPatch(
CastDynamiteModuleV2Fingerprint,
CastContextFetchFingerprint,
),
- mainActivityOnCreateFingerprint = ApplicationInitFingerprint,
+ mainActivityOnCreateFingerprint = MusicActivityOnCreateFingerprint,
integrationsPatchDependency = IntegrationsPatch::class,
gmsCoreSupportResourcePatch = GmsCoreSupportResourcePatch,
compatiblePackages = setOf(CompatiblePackage("com.google.android.apps.youtube.music")),
diff --git a/src/main/kotlin/app/revanced/patches/music/misc/gms/fingerprints/MusicActivityOnCreateFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/misc/gms/fingerprints/MusicActivityOnCreateFingerprint.kt
new file mode 100644
index 000000000..2e46df2d9
--- /dev/null
+++ b/src/main/kotlin/app/revanced/patches/music/misc/gms/fingerprints/MusicActivityOnCreateFingerprint.kt
@@ -0,0 +1,11 @@
+package app.revanced.patches.music.misc.gms.fingerprints
+
+import app.revanced.patcher.fingerprint.MethodFingerprint
+
+internal object MusicActivityOnCreateFingerprint : MethodFingerprint(
+ returnType = "V",
+ parameters = listOf("Landroid/os/Bundle;"),
+ customFingerprint = { methodDef, classDef ->
+ methodDef.name == "onCreate" && classDef.type.endsWith("/MusicActivity;")
+ }
+)
\ No newline at end of file
diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/gms/BaseGmsCoreSupportPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/gms/BaseGmsCoreSupportPatch.kt
index 9d2544b7e..dd3fa0b59 100644
--- a/src/main/kotlin/app/revanced/patches/shared/misc/gms/BaseGmsCoreSupportPatch.kt
+++ b/src/main/kotlin/app/revanced/patches/shared/misc/gms/BaseGmsCoreSupportPatch.kt
@@ -98,9 +98,9 @@ abstract class BaseGmsCoreSupportPatch(
// Verify GmsCore is installed and whitelisted for power optimizations and background usage.
mainActivityOnCreateFingerprint.result?.mutableMethod?.addInstructions(
- 1, // Hack to not disturb other patches (such as the YTMusic integrations patch).
+ 0,
"invoke-static/range { p0 .. p0 }, Lapp/revanced/integrations/shared/GmsCoreSupport;->" +
- "checkGmsCore(Landroid/content/Context;)V",
+ "checkGmsCore(Landroid/app/Activity;)V",
) ?: throw mainActivityOnCreateFingerprint.exception
// Change the vendor of GmsCore in ReVanced Integrations.
diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml
index a96bf59e6..0cf574e57 100644
--- a/src/main/resources/addresources/values/strings.xml
+++ b/src/main/resources/addresources/values/strings.xml
@@ -42,13 +42,12 @@
- GmsCore is not installed. Install it.
-
- Follow the \"Don\'t kill my app\" guide for GmsCore.
+ MicroG GmsCore is not installed. Install it.
Action needed
- GmsCore is not whitelisted from battery optimization.\n\nFollow the \"Don\'t kill my app\" guide for GmsCore.
- GmsCore does not have permission to run in the background.\n\nFollow the \"Don\'t kill my app\" guide for GmsCore.
- Open website
+ MicroG GmsCore does not have permission to run in the background.\n\nFollow the \"Don\'t kill my app\" guide for your phone, and apply the instructions to your MicroG installation.\n\nThis is required for the app to work.
+ Open website
+ MicroG GmsCore battery optimizations must be disabled to prevent issues.\n\nTap on the continue button and disable battery optimizations.
+ Continue
@@ -573,7 +572,7 @@
Hide subscribe button when paused
Subscribe button is hidden
Subscribe button is shown
-
Hide thanks button
Thanks button is hidden