Skip to content

Commit

Permalink
feat(MicroG Support): Switch to GMSCore
Browse files Browse the repository at this point in the history
  • Loading branch information
anddea committed Mar 26, 2024
1 parent f0a2e69 commit f1f522f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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"
)

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/youtube/settings/xml/revanced_prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@

<!-- PREFERENCE: MICROG_SETTINGS
<Preference android:title="@string/microg_settings_title" android:summary="@string/microg_settings_summary">
<intent android:targetPackage="com.mgoogle.android.gms" android:targetClass="org.microg.gms.ui.SettingsActivity" />
<intent android:targetPackage="app.revanced.android.gms" android:targetClass="org.microg.gms.ui.SettingsActivity" />
</Preference> PREFERENCE: MICROG_SETTINGS -->

<!-- SETTINGS: SANITIZE_SHARING_LINKS
Expand Down

3 comments on commit f1f522f

@xzitthamerr
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't add an account. Add a Huawei sign-in option while adding account like earlier.

@anddea
Copy link
Owner Author

@anddea anddea commented on f1f522f Mar 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't add an account. Add a Huawei sign-in option while adding account like earlier.

You can use stable release for now, it works with old MicroG. But because of playback issues that are coming soon (probably for everyone), it's better to use new GmsCore.

Check this link.
ReVanced/GmsCore#6

@xzitthamerr
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works now. Thanks

Please sign in to comment.