Open dylangerdaly opened 2 years ago
Yes, I've been playing around with this a bit today.
This is the logcat I get from Android Auto
04-06 15:51:28.782 3703 3703 D PhenotypeService: onBind: Intent { act=com.google.android.gms.phenotype.service.START pkg=com.google.android.gms }
04-06 15:51:28.801 3703 11490 D PhenotypeService: bound by: GetServiceRequest{serviceId=PHENOTYPE, gmsVersion=221002000, packageName='com.google.android.projection.gearhead', extras=Bundle[{}]}
04-06 15:51:28.815 3703 4029 D PhenotypeService: getCommitedConfiguration(com.google.android.projection.gearhead)
04-06 15:51:29.425 3703 4029 D PhenotypeService: bound by: GetServiceRequest{serviceId=PHENOTYPE, gmsVersion=221002000, packageName='com.google.android.projection.gearhead', extras=Bundle[{}]}
04-06 15:51:29.461 3703 4029 D PhenotypeService: register(com.google.android.libraries.consentverifier#com.google.android.projection.gearhead, 74620964, [Ljava.lang.String;@f9345cd, null)
04-06 15:51:29.463 3703 4029 D PhenotypeService: commitToConfiguration(CURRENT::com.google.android.libraries.consentverifier#com.google.android.projection.gearhead)
04-06 15:51:29.471 3703 4029 D PhenotypeService: getConfigurationSnapshot2(com.google.android.libraries.consentverifier#com.google.android.projection.gearhead, , null)
04-06 15:51:31.050 3703 4029 D PhenotypeService: getCommitedConfiguration(com.google.android.projection.gearhead)
04-06 15:51:31.783 3703 4029 D PhenotypeService: bound by: GetServiceRequest{serviceId=PHENOTYPE, gmsVersion=221212000, packageName='com.google.android.apps.maps', extras=Bundle[{}]}
04-06 15:51:31.789 3703 3973 D PhenotypeService: weakRegister(com.google.android.apps.maps, 1066438943, [Ljava.lang.String;@9d768ee, [I@8c4618f, null)
04-06 15:51:36.203 3703 4029 D PhenotypeService: getConfigurationSnapshot2(com.google.android.libraries.performance.primes#com.google.android.projection.gearhead, , null)
04-06 15:51:39.258 3703 11490 D PhenotypeService: register(com.google.android.libraries.maps#com.google.android.projection.gearhead, 1, [Ljava.lang.String;@9354d18, null)
04-06 15:51:44.515 3703 3973 D PhenotypeService: bound by: GetServiceRequest{serviceId=PHENOTYPE, gmsVersion=221002000, packageName='com.google.android.projection.gearhead', extras=Bundle[{}]}
04-06 15:51:44.565 3703 11490 D PhenotypeService: register(com.google.android.libraries.consentverifier#com.google.android.projection.gearhead, 74620964, [Ljava.lang.String;@4dd46ab, null)
04-06 15:51:44.568 3703 3973 D PhenotypeService: commitToConfiguration(CURRENT::com.google.android.libraries.consentverifier#com.google.android.projection.gearhead)
04-06 15:51:44.571 3703 3973 D PhenotypeService: getConfigurationSnapshot2(com.google.android.libraries.consentverifier#com.google.android.projection.gearhead, , null)
04-06 15:51:46.586 3703 3973 D PhenotypeService: register(com.google.android.libraries.maps#com.google.android.projection.gearhead, 1, [Ljava.lang.String;@d56f0a1, null)
04-06 15:51:48.203 3703 3973 D PhenotypeService: bound by: GetServiceRequest{serviceId=PHENOTYPE, gmsVersion=221002000, packageName='com.google.android.projection.gearhead', extras=Bundle[{}]}
04-06 15:51:48.216 3703 3973 D PhenotypeService: getConfigurationSnapshot2(com.google.android.projection.gearhead, , null)
04-06 15:51:51.522 3703 3973 D PhenotypeService: getConfigurationSnapshot2(com.google.android.libraries.performance.primes#com.google.android.projection.gearhead, , null)
Interestingly I can't see AA, or any Google app requesting specific flags, I assume this is because either
A) The application isn't 'registering' correctly
B) getConfigurationSnapshot2
or getCommitedConfiguration
return an arrry that is the config for an app.
So the recent change has stopped the crashing, so that's good, I'm going to play with getConfigurationSnapshot2
to see if I can have it return with a flag and enable something somehow.
Any news on it? Guess that is the only way solve the AA issues without modify the apps or framework.
@mar-v-in
It is probably enough to return an empty Object instead of an empty Array here: https://github.com/microg/GmsCore/blob/HEAD/play-services-core/src/main/kotlin/org/microg/gms/phenotype/PhenotypeService.kt#L47 and here: https://github.com/microg/GmsCore/blob/HEAD/play-services-core/src/main/kotlin/org/microg/gms/phenotype/PhenotypeService.kt#L86 to avoid the crashes. (probably also in others)
@ale5000-git have you tried your mentioned changes? AA is still silently crashing.
Huh really? I didn't expect Google apps could reach into GMS data
-------- Mensagem original -------- Em 19/04/2023, 9:47 da manhã, sn-00-x escreveu:
You can place a valid phenotype.db (e.g. this one from aa4mg) in /data/data/com.google.android.gms/databases/ and Android Auto will use it.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Well, at least AA as priv-app does use this file and will finally show 3rd party apps when enabled/patched in phenotype.db and they were installed by Play Store (pm install -i "com.android.vending"
). However, it seems like for some apps that's still not enough (I don't know why, yet). Those apps can be enabled by XLauncher Unlocked (xposed framework required)
Graphene's method hooks the call within the OS, I wonder if I just pull the commit and just use
Enviado do Proton Mail móvel
-------- Mensagem original -------- Em 19/04/2023, 12:21 da tarde, sn-00-x escreveu:
Well, at least AA as priv-app does use this file and will finally show 3rd party apps when enabled/patched phenotype.db and they were installed by Play Store (pm install -i "com.android.vending"). However, it seems that for some apps that's still not enough (I don't know why, yet). Those apps can be enabled by XLauncher Unlocked (xposed framework required)
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
@mar-v-in
The errors about getConfigurationSnapshot2
are quite diffused.
I have tried to replace emptyArray() with Object() to see if there are improvements but I don't know Kotlin enough to make it compile correctly.
Some logcat:
09-14 01:36:44.760 3337 6856 D PhenotypeService: bound by: GetServiceRequest{serviceId=PHENOTYPE, gmsVersion=225212000, packageName='com.google.android.apps.googlevoice', extras=Bundle[{}]}
09-14 01:36:44.764 3337 11411 D PhenotypeService: getConfigurationSnapshot2(com.google.android.apps.voice.v2.user#com.google.android.apps.googlevoice, ***@gmail.com, null)
09-14 01:36:44.768 3337 4016 D PhenotypeService: getConfigurationSnapshot2(com.google.android.apps.voice, ***@gmail.com, null)
09-14 01:36:44.783 15269 15305 E nov : Got more than one input Future failure. Logging failures after the first
09-14 01:36:44.783 15269 15305 E nov : java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
09-14 01:36:44.783 15269 15305 E nov : at jrg.a(PG:7)
09-14 01:36:44.783 15269 15305 E nov : at gdx.run(PG:86)
09-14 01:36:44.783 15269 15305 E nov : at npt.execute(PG:1)
09-14 01:36:44.783 15269 15305 E nov : at ihp.c(PG:8)
09-14 01:36:44.783 15269 15305 E nov : at rxp.e(PG:5)
09-14 01:36:44.783 15269 15305 E nov : at iib.r(PG:3)
09-14 01:36:44.783 15269 15305 E nov : at hxf.b(PG:1)
09-14 01:36:44.783 15269 15305 E nov : at hxw.c(PG:2)
09-14 01:36:44.783 15269 15305 E nov : at iha.x(PG:47)
09-14 01:36:44.783 15269 15305 E nov : at dbl.onTransact(PG:3)
09-14 01:36:44.783 15269 15305 E nov : at android.os.Binder.execTransact(Binder.java:565)
09-14 01:36:44.802 15269 15305 E AndroidFutures: AccountEnabledInterceptor Failed
09-14 01:36:44.802 15269 15305 E AndroidFutures: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
09-14 01:36:44.802 15269 15305 E AndroidFutures: at jrg.a(PG:7)
09-14 01:36:44.802 15269 15305 E AndroidFutures: at gdx.run(PG:86)
09-14 01:36:44.802 15269 15305 E AndroidFutures: at npt.execute(PG:1)
09-14 01:36:44.802 15269 15305 E AndroidFutures: at ihp.c(PG:8)
09-14 01:36:44.802 15269 15305 E AndroidFutures: at rxp.e(PG:5)
09-14 01:36:44.802 15269 15305 E AndroidFutures: at iib.r(PG:3)
09-14 01:36:44.802 15269 15305 E AndroidFutures: at hxf.b(PG:1)
09-14 01:36:44.802 15269 15305 E AndroidFutures: at hxw.c(PG:2)
09-14 01:36:44.802 15269 15305 E AndroidFutures: at iha.x(PG:47)
09-14 01:36:44.802 15269 15305 E AndroidFutures: at dbl.onTransact(PG:3)
09-14 01:36:44.802 15269 15305 E AndroidFutures: at android.os.Binder.execTransact(Binder.java:565)
09-14 01:36:44.910 3337 4017 D PhenotypeService: getConfigurationSnapshot2(com.google.android.apps.voice, ***@gmail.com, null)
09-14 01:36:44.918 15269 15304 E MendelPackageState: Failed to fetch after encountering old config
09-14 01:36:44.918 15269 15304 E MendelPackageState: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
09-14 01:36:44.918 15269 15304 E MendelPackageState: at jrg.a(PG:7)
09-14 01:36:44.918 15269 15304 E MendelPackageState: at gdx.run(PG:86)
09-14 01:36:44.918 15269 15304 E MendelPackageState: at npt.execute(PG:1)
09-14 01:36:44.918 15269 15304 E MendelPackageState: at ihp.c(PG:8)
09-14 01:36:44.918 15269 15304 E MendelPackageState: at rxp.e(PG:5)
09-14 01:36:44.918 15269 15304 E MendelPackageState: at iib.r(PG:3)
09-14 01:36:44.918 15269 15304 E MendelPackageState: at hxf.b(PG:1)
09-14 01:36:44.918 15269 15304 E MendelPackageState: at hxw.c(PG:2)
09-14 01:36:44.918 15269 15304 E MendelPackageState: at iha.x(PG:47)
09-14 01:36:44.918 15269 15304 E MendelPackageState: at dbl.onTransact(PG:3)
09-14 01:36:44.918 15269 15304 E MendelPackageState: at android.os.Binder.execTransact(Binder.java:565)
09-14 01:36:44.956 3337 3361 D PhenotypeService: getConfigurationSnapshot2(com.google.android.apps.voice.v2.user#com.google.android.apps.googlevoice, ***@gmail.com, null)
09-14 01:36:44.961 15269 15305 E MendelPackageState: Failed to fetch after encountering old config
09-14 01:36:44.961 15269 15305 E MendelPackageState: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
09-14 01:36:44.961 15269 15305 E MendelPackageState: at jrg.a(PG:7)
09-14 01:36:44.961 15269 15305 E MendelPackageState: at gdx.run(PG:86)
09-14 01:36:44.961 15269 15305 E MendelPackageState: at npt.execute(PG:1)
09-14 01:36:44.961 15269 15305 E MendelPackageState: at ihp.c(PG:8)
09-14 01:36:44.961 15269 15305 E MendelPackageState: at rxp.e(PG:5)
09-14 01:36:44.961 15269 15305 E MendelPackageState: at iib.r(PG:3)
09-14 01:36:44.961 15269 15305 E MendelPackageState: at hxf.b(PG:1)
09-14 01:36:44.961 15269 15305 E MendelPackageState: at hxw.c(PG:2)
09-14 01:36:44.961 15269 15305 E MendelPackageState: at iha.x(PG:47)
09-14 01:36:44.961 15269 15305 E MendelPackageState: at dbl.onTransact(PG:3)
09-14 01:36:44.961 15269 15305 E MendelPackageState: at android.os.Binder.execTransact(Binder.java:565)
09-14 01:36:45.463 2365 2757 E AlarmManagerService: Unable to set alarm to 1694674800.000000000: Invalid argument
09-14 01:36:45.466 2365 2757 E AlarmManagerService: Unable to set alarm to 1694674800.000000000: Invalid argument
09-14 01:36:45.489 3337 3357 D PhenotypeService: getConfigurationSnapshot2(com.google.android.apps.voice.device, , null)
09-14 01:36:45.505 15269 15305 E MendelPackageState: Failed to fetch after encountering old config
09-14 01:36:45.505 15269 15305 E MendelPackageState: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
09-14 01:36:45.505 15269 15305 E MendelPackageState: at jrg.a(PG:7)
09-14 01:36:45.505 15269 15305 E MendelPackageState: at gdx.run(PG:86)
09-14 01:36:45.505 15269 15305 E MendelPackageState: at npt.execute(PG:1)
09-14 01:36:45.505 15269 15305 E MendelPackageState: at ihp.c(PG:8)
09-14 01:36:45.505 15269 15305 E MendelPackageState: at rxp.e(PG:5)
09-14 01:36:45.505 15269 15305 E MendelPackageState: at iib.r(PG:3)
09-14 01:36:45.505 15269 15305 E MendelPackageState: at hxf.b(PG:1)
09-14 01:36:45.505 15269 15305 E MendelPackageState: at hxw.c(PG:2)
09-14 01:36:45.505 15269 15305 E MendelPackageState: at iha.x(PG:47)
09-14 01:36:45.505 15269 15305 E MendelPackageState: at dbl.onTransact(PG:3)
09-14 01:36:45.505 15269 15305 E MendelPackageState: at android.os.Binder.execTransact(Binder.java:565)
09-10 00:16:06.796 13408 13420 D PhenotypeService: getConfigurationSnapshot2(com.google.android.libraries.internal.growth.growthkit#com.google.android.gm, , null)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: Unable to update local snapshot for com.google.android.libraries.internal.growth.growthkit#com.google.android.gm, may result in stale flags.
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: java.util.concurrent.ExecutionException: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at axxi.n(PG:21)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at axxi.get(PG:3)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at a.be(PG:2)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at ayci.J(PG:10)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at afpu.d(PG:1)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at afpw.run(PG:1527)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at aaob.run(PG:3)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at zyw.run(PG:648)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at java.lang.Thread.run(Thread.java:761)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at aaoe.run(PG:51)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at afpc.a(PG:30)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at smg.run(PG:45)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at axyn.execute(PG:1)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at tus.b(PG:100)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at bdqz.g(PG:36)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at tve.s(PG:15)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at scg.g(PG:5)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at vvs.fg(PG:7)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at tsa.g(PG:3)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at tsh.r(PG:262)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at ldz.onTransact(PG:21)
09-10 00:16:06.824 15882 15955 W MobStoreFlagStore: at android.os.Binder.execTransact(Binder.java:565)
09-14 13:31:32.537 17574 17586 D PhenotypeService: bound by: GetServiceRequest{serviceId=PHENOTYPE, gmsVersion=233204000, packageName='com.google.android.apps.fitness', extras=Bundle[{}]}
09-14 13:31:32.548 17574 17695 D PhenotypeService: getConfigurationSnapshot2(com.google.android.libraries.onegoogle#com.google.android.apps.fitness, , null)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: Unable to update local snapshot for com.google.android.libraries.onegoogle#com.google.android.apps.fitness, may result in stale flags.
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: java.util.concurrent.ExecutionException: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at osp.r(PG:4)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at osp.get(PG:3)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at a.m(PG:1)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at oma.L(PG:2)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at ley.d(PG:1)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at kqm.run(PG:12)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at iqw.run(PG:1)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at gjm.run(PG:11)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at java.lang.Thread.run(Thread.java:761)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at irh.run(PG:5)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at lee.a(PG:7)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at drf.run(PG:31)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at otw.execute(PG:1)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at ikr.c(PG:6)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at rhz.d(PG:5)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at ilc.s(PG:3)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at eqp.h(PG:1)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at iul.bQ(PG:2)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at ijz.d(PG:47)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at dci.onTransact(PG:3)
09-14 13:31:32.558 17817 18028 W MobStoreFlagStore: at android.os.Binder.execTransact(Binder.java:565)
Fix Phenotype, allowing users to manually flip on/off Phenotype Service flags.
Describe the solution you'd like The ability for users to add Phenotype Service flags per app, much like Firefox's
about:config
Doing this will allow users to flip on flags that Google usually push out to internal staff first for testing: https://www.androidpolice.com/android-autos-upcoming-ui-redesign-is-just-looking-more-and-more-like-apple-carplay/
Describe alternatives you've considered N/A
Additional context There's already a minimal stub implmented, currently it just returns an empty array https://github.com/microg/GmsCore/blob/master/play-services-core/src/main/kotlin/org/microg/gms/phenotype/PhenotypeService.kt#L42
From what I can tell, apps that support Phenotype call
getConfigurationSnapshot
and update their own local SQLite database with flags from GMS.I think we're missing a method and a field currently resulting in a silent crash (Android Auto as an example)
SafeParcel: Unknown field id 12 in com.google.android.gms.clearcut.LogEventParcelable, skipping. BinderUtils: Unknown method 5 in com.google.android.gms.phenotype.internal.IPhenotypeService, skipping