feat(rcs): implement full RCS support including Asterism, Constellation, and TS.43 EAP-AKA carrier entitlement#3508
Open
sachinjat2802 wants to merge 1 commit into
Open
feat(rcs): implement full RCS support including Asterism, Constellation, and TS.43 EAP-AKA carrier entitlement#3508sachinjat2802 wants to merge 1 commit into
sachinjat2802 wants to merge 1 commit into
Conversation
…on, and TS.43 EAP-AKA carrier entitlement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Native RCS Support for microG
Overview
This PR introduces comprehensive native support for Rich Communication Services (RCS) in microG, enabling full compatibility with Google Messages RCS registration, authentication, and provisioning flows.
Until now, GmsCore lacked support for several proprietary Google APIs and carrier entitlement mechanisms required by Google Messages, resulting in persistent activation failures such as:
"Setting up..."hanging indefinitely"RCS chats aren't available for this device"This implementation adds support for the required Asterism and Constellation APIs alongside GSMA TS.43 carrier entitlement handling, allowing successful phone number verification and RCS provisioning.
The implementation is designed to work across:
Locked bootloader devices
Custom ROMs
Non-rooted environments
It also includes resilient fallback pipelines for environments where proprietary Play Integrity or DroidGuard attestations are unavailable.
Features
Asterism API (Service ID: 199)
Implemented native support for Google's internal Asterism API used by Google Messages for consent and Terms of Service management.
Included Functionality
Full
IAsterismApiServiceAIDL and binder implementationSupport for:
GetAsterismConsentSetAsterismConsentBackground-thread persistence and retrieval of SafeParcelable consent states
Proper IPC handling without blocking the main thread
Constellation API (Service ID: 155)
Implemented the proprietary Constellation API used during Google Messages RCS phone verification.
Included Functionality
Silent SMS verification flows
GCM/FCM push-token verification
GPNV (Google Phone Number Verification) handling
Asynchronous verification pipeline coordination
Integrity & Attestation Fallbacks
When standard DroidGuard/Play Integrity attestation fails with
PERMISSION_DENIED, the implementation automatically falls back to a reduced verification path by:Stripping
device_signalsRetrying verification without DroidGuard-backed attestation
Spatula Authentication Resiliency
If proprietary hardware-backed
devicekeyretrieval fails:Fallback Spatula headers are generated dynamically
Stable local Android IDs are used to maintain compatibility
GSMA TS.43 EAP-AKA Client
Implemented a native TS.43 carrier entitlement client with full EAP-AKA authentication support.
Included Functionality
3-way EAP-AKA challenge-response handling
SIM/USIM integration through
getIccAuthenticationRES, CK, and IK vector derivation
Provisioning token acquisition support
Security & Privacy
Automatic IMSI redaction in logs
Sensitive authentication data sanitization
Phenotype Overrides & TLS Compatibility
Phenotype Flag Injection
RCS-related phenotype flags are overridden within microG's Phenotype service so Google Messages immediately detects RCS capability without requiring additional patching.
Conscrypt TLS Fallback
Added Conscrypt fallback support to improve TLS compatibility with entitlement and provisioning servers on older Android versions.
Testing & Verification
Build Verification
Successfully compiled on both build variants:
Variant | Status -- | -- Debug | ✅ BUILD SUCCESSFUL Release | ✅ BUILD SUCCESSFULAdded Tests
Ts43ClientTest.javaValidates:
EAP-AKA payload handling
Vector derivation logic
ConstellationServiceImplTest.javaValidates:
Verification IPC flows
Async request handling
RcsCallerPolicyTest.javaValidates:
Caller package restrictions
Service access policies
Project Changes
play-services-apiAdded:
AIDL interfaces under:
com.google.android.gms.asterismcom.google.android.gms.constellationSafeParcelable models:
GetAsterismConsentRequestVerifyPhoneNumberResponseAdditional related parcelables
play-services-coreAdded:
AsterismServiceConstellationServiceTs43ClientWire protobuf definitions:
google/internal/communications/phonedeviceverification/v1/constellation.protoBackground verification handlers
Phenotype flag overrides
Conscrypt TLS integration
Registered services:
Service ID
155Service ID
199inside
AndroidManifest.xml.Result
Google Messages can now:
Successfully register for RCS
Complete phone number verification
Authenticate against Google's provisioning services
Operate on unsupported/non-certified environments with automatic fallback handling
This significantly improves real-world compatibility between microG and modern Google Messages RCS infrastructure.