Implement Constellation and Asterism + DroidGuard fixes for RCS support - #3784
Implement Constellation and Asterism + DroidGuard fixes for RCS support#3784naormeit wants to merge 65 commits into
Conversation
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.
A regenerated EC key was allowed to inherit the previous key's server acknowledgement. Validate stored key material before reading that state, and reset it atomically whenever key material is generated. Add instrumentation coverage for corrupt and valid stored key pairs.
Align DG cache naming and VM keys with stock GMS, preserve partial init replies, and fall back to phone number hints during Constellation provisioning.
Introduce shared phone-number and VM cache utilities, wire them into Constellation and DroidGuard, and add offline JUnit coverage for provisioning and tachyon-related logic.
…ctory hasAccount in NetworkHandleProxyFactory.createRequest() was hardcoded to false. This reads the value dynamically from AccountManager for 'com.google' accounts, incorporating a SecurityException fallback to false.
|
This addresses the My branch is built directly on #3784's head: naormeit/GmsCore@rcs-bounty-2994...juliushill42:GmsCore:rcs-2994-spatula-fix What the delta does:
Focused tests, lint, and No hardware install has been performed yet; Binder permission/lifecycle and end-to-end RCS provisioning still need device validation. This is intentionally scoped as a narrow contribution on top of #3784, not a new Constellation/Asterism implementation. |
|
There is now a direct empirical link for the small consent-semantics follow-up in naormeit#3. Earlier in #2994, @unpluggederan tested the real SetConsent endpoint and reported that a request with #3784's existing Asterism SetConsent path already uses those version/trigger semantics, but the separate automatic-consent fallback in The two KeelTrace commits in naormeit#3 only align that fallback with the known-working/request-accepted semantics and add regression coverage:
Verification is green for focused JUnit, changed-module lint, and an independent This is a narrow correctness contribution on top of #3784, not a separate #2994 implementation or full-bounty claim. |
…nsent request semantics Incorporates two commits from keeltrace that fix the automatic-consent fallback in VerifyPhoneNumber.kt: - fix(constellation): align automatic RCS consent request - test(constellation): cover automatic RCS consent semantics Co-Authored-By: keeltrace <keeltrace@users.noreply.github.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This PR implements the GMS services required for RCS provisioning, addressing issue #2994 where Google Messages displays "RCS chats aren't available for this device" or hangs on "Setting up...". Previously, Constellation (GmsService 155, phone number verification) and Asterism (GmsService 199, RCS ToS/consent) were bound to DummyService. This also resolves DroidGuard tachyon_registration token rejections caused by cache path discrepancies visible to DG via /proc/self/maps.
Fixes #2994.
Contributors & Changes:
@opstic: Implemented Constellation and Asterism from scratch (Implement
play-services-constellation#3359, Implementplay-services-asterism#3360), including AIDL interfaces, proto definitions, gRPC clients, all verification paths (UPI/OTP, MO-SMS, MT-SMS, TS.43 EAP-AKA), and Phenotype flags for Messages/IMS.@br413: Provided DroidGuard tachyon parity fixes (RCS: DroidGuard tachyon fixes, phone-number fallback, and unit tests (#2994) #3644):
getDir("cache_dg")toapp_dg_cache/(wasapp_cache_dg/).DroidGuardInitReply.createFromParcel()null handling to preserveDroidGuardResultsRequestwhen PFD is null.@camilo-12ch: Fixed the IID empty token issue. getIidToken() no longer returns "" on failure, preventing empty credentials from reaching Google's GPNV endpoint.
@paulcakeface: Fixed the public-key ack ordering bug. The EC key is now validated/regenerated before isPublicKeyAcked() is read, preventing a corrupt stored key from producing a ClientAuth header for an unacknowledged key. Includes regression test.
@nwinkelman2: Integrated and repaired the branches. Fixed all 11 Android lint errors, fixed the instrumentation manifest, removed the unsubstantiated custom DG classloader experiment, and fixed a false JVM Parcel round-trip assertion in tests, achieving a CI-green branch for Debug and Release.
Author (This PR): Implemented hasAccount correctness fix in NetworkHandleProxyFactory.createRequest(). Replaced hardcoded hasAccount = false with dynamic reading from AccountManager for com.google accounts (with SecurityException fallback to false). This prevents incorrect DroidGuard VM execution flows on devices with registered Google accounts.
Out of Scope / Not Claimed:
Locked-bootloader E2E hardware test (requires a microG ROM and real SIM).
TS.43 carrier testing (no SIM available).
X-Goog-Spatula header on Constellation gRPC (architecturally blocked; play-services-constellation-core cannot depend on play-services-core without creating a circular dependency).
Testing:
Lint (all three modules): 0 errors — BUILD SUCCESSFUL locally.
Unit tests: Gradle 8.13/AGP configuration incompatibility locally; CI green on base branch (nwinkelman2/integration/rcs-current-upstream).
Hardware E2E: Pending (no microG ROM available).