From f1f522f6f9c0da44ec92bce3d7fdd4fbe74c248f Mon Sep 17 00:00:00 2001 From: Aaron Veil <70171475+anddea@users.noreply.github.com> Date: Tue, 26 Mar 2024 17:44:17 +0300 Subject: [PATCH] feat(MicroG Support): Switch to GMSCore --- .../patches/shared/patch/microg/Constants.kt | 40 +++++++------------ .../utils/microg/MicroGBytecodePatch.kt | 4 +- .../youtube/settings/xml/revanced_prefs.xml | 2 +- 3 files changed, 17 insertions(+), 29 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/shared/patch/microg/Constants.kt b/src/main/kotlin/app/revanced/patches/shared/patch/microg/Constants.kt index 8a54ab4d9..1065d8721 100644 --- a/src/main/kotlin/app/revanced/patches/shared/patch/microg/Constants.kt +++ b/src/main/kotlin/app/revanced/patches/shared/patch/microg/Constants.kt @@ -8,7 +8,7 @@ object Constants { * microG vendor name * aka. package prefix / package base */ - const val MICROG_VENDOR = "com.mgoogle" + const val MICROG_VENDOR = "app.revanced" /** * microG package name @@ -52,13 +52,6 @@ object Constants { * a list of all (intent) actions in microG */ val ACTIONS = listOf( - // location - "com.google.android.gms.location.places.ui.PICK_PLACE", - "com.google.android.gms.location.places.GeoDataApi", - "com.google.android.gms.location.places.PlacesApi", - "com.google.android.gms.location.places.PlaceDetectionApi", - "com.google.android.gms.wearable.MESSAGE_RECEIVED", - // C2DM / GCM "com.google.android.c2dm.intent.REGISTER", "com.google.android.c2dm.intent.REGISTRATION", @@ -67,15 +60,6 @@ object Constants { "com.google.iid.TOKEN_REQUEST", "com.google.android.gcm.intent.SEND", - // car - "com.google.android.gms.car.service.START", - - // people - "com.google.android.gms.people.service.START", - - // wearable - "com.google.android.gms.wearable.BIND", - // auth "com.google.android.gsf.login", "com.google.android.gsf.action.GET_GLS", @@ -90,9 +74,8 @@ object Constants { // fido "com.google.android.gms.fido.fido2.privileged.START", - // games - "com.google.android.gms.games.service.START", - "com.google.android.gms.games.PLAY_GAMES_UPGRADE", + // gass + "com.google.android.gms.gass.START", // chimera "com.google.android.gms.chimera", @@ -103,14 +86,21 @@ object Constants { // phenotype "com.google.android.gms.phenotype.service.START", - // location - "com.google.android.gms.location.reporting.service.START", - // misc "com.google.android.gms.gmscompliance.service.START", "com.google.android.gms.oss.licenses.service.START", - "com.google.android.gms.safetynet.service.START", - "com.google.android.gms.tapandpay.service.BIND" + "com.google.android.gms.tapandpay.service.BIND", + "com.google.android.gms.measurement.START", + "com.google.android.gms.languageprofile.service.START", + "com.google.android.gms.clearcut.service.START", + "com.google.android.gms.icing.LIGHTWEIGHT_INDEX_SERVICE", + + // potoken + "com.google.android.gms.potokens.service.START", + + // droidguard/ safetynet + "com.google.android.gms.droidguard.service.START", + "com.google.android.gms.safetynet.service.START" ) /** diff --git a/src/main/kotlin/app/revanced/patches/youtube/utils/microg/MicroGBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/utils/microg/MicroGBytecodePatch.kt index ed12980f1..9497f6aad 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/utils/microg/MicroGBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/utils/microg/MicroGBytecodePatch.kt @@ -7,7 +7,6 @@ import app.revanced.patcher.patch.annotation.Patch import app.revanced.patches.shared.patch.microg.MicroGBytecodeHelper import app.revanced.patches.shared.patch.packagename.PackageNamePatch import app.revanced.patches.youtube.utils.fix.clientspoof.ClientSpoofPatch -import app.revanced.patches.youtube.utils.fix.parameter.SpoofPlayerParameterPatch import app.revanced.patches.youtube.utils.mainactivity.MainActivityResolvePatch import app.revanced.patches.youtube.utils.mainactivity.MainActivityResolvePatch.injectInit import app.revanced.patches.youtube.utils.microg.Constants.PACKAGE_NAME @@ -22,8 +21,7 @@ import app.revanced.patches.youtube.utils.microg.fingerprints.ServiceCheckFinger dependencies = [ ClientSpoofPatch::class, MainActivityResolvePatch::class, - PackageNamePatch::class, - SpoofPlayerParameterPatch::class + PackageNamePatch::class ] ) object MicroGBytecodePatch : BytecodePatch( diff --git a/src/main/resources/youtube/settings/xml/revanced_prefs.xml b/src/main/resources/youtube/settings/xml/revanced_prefs.xml index aa9619a05..fbc3e8f8e 100644 --- a/src/main/resources/youtube/settings/xml/revanced_prefs.xml +++ b/src/main/resources/youtube/settings/xml/revanced_prefs.xml @@ -614,7 +614,7 @@