Repository navigation
Conversation
|
It will take a while for this to be reviewed, but I'm happy to finally see someone actually tackling the issue instead of having an LLM generate bullshit. 👏 |
|
@opstic |
|
@opstic We generally try to sort things into two modules:
The error @ale5000-git mentioned is probably due to having safe parcelable classes in Kotlin (which was never supported or tested), meaning they have automatically generated annotations that shouldn't be there. The Kotlin code also somewhat looks like it was automatically converted from Java (which is not always 100% safe, as seen here). For this API specifically, because it is an internal API of Google, you can also just add it to the |
|
@mar-v-in The @JvmField were workarounds to avoid safe-parcel-processor using reflection to access the fields, I'll be converting these into Java then. Also I'll restructure a bit to fit the sorting better. |
|
@opstic The issue is that it sees the type as |
|
@mar-v-in |
|
Okay, after some more testing I've determined it's a Java version issue. The annotations aren't passed in with Java 21 so it builds successfully. I'm still really hoping to keep the parcelables in kotlin as it would be easier for me and the ergonomics feel better but if it's necessary to be in Java and/or updating CI Java to 21 isn't acceptable I'm happy to move it over as well. I'll push the |
I hope this will never happen since it will break compatibility with old Android versions. |
|
@opstic IMPORTANT: Do not use gradle, but gradlew; since using gradle won't use the intended gradle version and maybe it will hide possible errors. NOTE: The full PS: Thanks for the good works on the PR :-) |
|
Small problem, I am cleaning up by looking at the lint results and I am pretty sure Google Messages is the oldest thing that calls this service, which only goes back to as far as Nougat for meaningful versions. Any standard method to exclude this module entirely for SDKs under Nougat? I am not a fan of putting Also I've debugged for RCS in Nougat Google Messages, it would first compare if the mnc_mcc of the phenotypes match what's in the phone, then do standard self-contained OTP provisioning (instead of UPI) while only needing to call But much of the code uses |
|
I don't see us bumping the minimum API level to 26 any time soon. Google's Play Services has minimum API level of 21. We're currently at 19 and I plan to bump to 21 soonish to be able to make wider use of Compose. Have you considered applying the annotation to the whole file (via |
|
Alright, that's much better than applying to each function at least. Thanks for the quick response! |
|
Hi @opstic I prepared a focused compatibility follow-up on top of your It fixes the current Constellation lint/API compatibility blockers:
Commit: The branch is one commit ahead and zero behind |
|
Hi @opstic, As part of my ongoing investigation into #2994, I reproduced a specific failure in the Constellation IID path in the current #3359 implementation. An exception from I prepared a focused commit for the #3359 architecture: The change:
Validation:
PR #3388 contains semantically related IID error handling in a different Constellation architecture. This commit specifically adds the guards and regression coverage needed by the implementation in #3359. If this fits your branch, please feel free to review or cherry-pick it. I’m continuing to investigate the remaining #2994 provisioning path and would be happy to follow up on any issues you spot. |
|
Hi @opstic, I found one narrow Constellation state bug while testing your current branch. If stored EC key material is missing or corrupt, AuthManager regenerates it. The old Focused fix and regression test: Branch: The branch is exactly two commits ahead of your Evidence:
I have not tested end to end RCS registration on a locked bootloader, and I am not claiming that validation. If this fits your branch, please feel free to review or cherry-pick it. |
InstanceID failures could be suppressed into an empty string. The empty credential was then exposed as a successful getIidToken response, signed, and included in a GetVerifiedPhoneNumbers request. Propagate InstanceID failures to the existing error handlers and reject empty credentials before reading the FID, signing, building IIDTokenAuth, or executing GPNV. Regression tests cover exceptions, empty credentials, and the valid request path. PR microg#3388 handles IID failures in a different Constellation implementation. This change applies equivalent error semantics plus explicit empty-token and GPNV guards to the microg#3359 architecture.
Extract the existing Gaia-only consent mapping into a behavior-neutral helper, wire the Asterism JVM test source set, and add the focused resolver matrix. The baseline keeps matching-Gaia behavior, but fails the two cases where the server returns a valid RCS-specific consent without a matching Gaia entry. Provenance: - Original Constellation/Asterism implementation: @opstic (microg#3359/microg#3360) - Focused fallback tests/fix proposal: @keeltrace, naormeit#1 and #6 - Parallel follow-up: @Anusha0501, naormeit#4 - Foundragon delta: freeze only the minimal missing-field fallback; do not invent a new Gaia-vs-RCS precedence rule Expected BEFORE failures: - rcsConsentIsUsedWhenMatchingGaiaConsentIsAbsent - unrelatedGaiaConsentDoesNotMaskRcsConsent Physical RCS E2E remains NOT YET PHYSICALLY VERIFIED.
|
Hi @opstic. I prepared a tested follow-up to your exact Constellation head Functional fix: Challenge validation: the original parser stopped after RAND/AUTN and did not verify the request AT_MAC. The patch parses the complete EAP-framed challenge, checks mandatory attributes and SIM-result lengths, and verifies HMAC-SHA1-128 before emitting a successful response. The synchronization-failure/AUTS path is retained. The PRF implementation is unchanged. Actual verification: the included JVM harness compiles your actual service and PRF source with small synthetic Android dependency adapters. The same 16 scenarios yield 5 pass / 11 fail before, 16 pass / 0 fail after. Positive controls cover valid request and response MACs, custom realm, alternative attribute order, skippable attributes, link padding, and synchronization failure. Reproduce with the compiler artifacts documented in the committed README: The initial evidence was JVM-level only. The full Debug and Release build/lint result is recorded in the hosted-build update below; device instrumentation and carrier/RCS send/receive remain unverified. It is a focused, AI-assisted contribution from @BillTheHuman, not a claim to the existing RCS implementation or the full bounty. I attempted a PR against Hosted-build compatibility follow-upThe original submitted head It narrows API-26 annotations to the timestamp-using state methods; initializes preferences through the public lifecycle method; explicitly declares the already Google-caller-checked service export; and corrects the layout's API/resource and accessibility findings. No blanket lint baseline is introduced. The workflow retains lint reports and lets Debug/Release finish independently. The existing 16 service-level regression scenarios still pass locally. Full hosted validation for this revised head has completed successfully. Both Debug and Release assembly and lint passed, with build/lint reports retained as workflow artifacts: https://github.com/BillTheHuman/GmsCore/actions/runs/35208388516 This update adds build integration work to the existing focused patch. It does not establish SIM/carrier interoperability or locked-bootloader RCS send/receive. Verified September 17 at 2026-09-17T10:52:56.119615+00:00. This successful CI result closes the compile/lint blocker, not the remaining actual-device interoperability test. |
) Replace DummyService API_DISABLED stub with a real play-services-constellation implementation: AIDL API surface, ConstellationApiService binder, gRPC/Wire client, TS.43/MO/MT SMS verifiers, IID token signing, and settings-backed PNV state. Adapted from high-signal open work toward microg#2994 (notably @opstic microg#3359 and hardening consolidated in microg#3808/microg#3784). Not a claim of end-to-end RCS on device.
This is PR 1 of 2 towards RCS support.
Related PR: #3360
Related issue: #2994
Collectively these changes enable Google Messages to verify the phone number via UPI and retrieve the provisioning document.
Testing from people with environments that pass DroidGuard/Play Integrity would be appreciated, especially with logs/network captures if possible. Many thanks!
Description
This PR implements the Constellation service, including:
verifyPhoneNumberV1verifyPhoneNumberSingleUseverifyPhoneNumbergetIidTokengetPnvCapabilitiesgetIidTokenandverifyPhoneNumberappear to be the main APIs Google Messages would call.Most of the verification paths are hopefully implemented correctly, only the TS.43 path was tested.
Flashcall is excluded for now as it's implementation in GMS requires a hidden API in Android SDK.
The gRPC proto definitions and client implementation are also used by
play-services-asterism(PR #3360)Screenshots