Skip to content

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
microg:masterfrom
sachinjat2802:master
Open

feat(rcs): implement full RCS support including Asterism, Constellation, and TS.43 EAP-AKA carrier entitlement#3508
sachinjat2802 wants to merge 1 commit into
microg:masterfrom
sachinjat2802:master

Conversation

@sachinjat2802
Copy link
Copy Markdown

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 IAsterismApiService AIDL and binder implementation

  • Support for:

    • GetAsterismConsent

    • SetAsterismConsent

  • Background-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_signals

  • Retrying verification without DroidGuard-backed attestation

Spatula Authentication Resiliency

If proprietary hardware-backed devicekey retrieval 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 getIccAuthentication

  • RES, 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 SUCCESSFUL

Added Tests

Ts43ClientTest.java

Validates:

  • EAP-AKA payload handling

  • Vector derivation logic

ConstellationServiceImplTest.java

Validates:

  • Verification IPC flows

  • Async request handling

RcsCallerPolicyTest.java

Validates:

  • Caller package restrictions

  • Service access policies


Project Changes

play-services-api

Added:

  • AIDL interfaces under:

    • com.google.android.gms.asterism

    • com.google.android.gms.constellation

  • SafeParcelable models:

    • GetAsterismConsentRequest

    • VerifyPhoneNumberResponse

    • Additional related parcelables


play-services-core

Added:

  • AsterismService

  • ConstellationService

  • Ts43Client

  • Wire protobuf definitions:

    • google/internal/communications/phonedeviceverification/v1/constellation.proto

  • Background verification handlers

  • Phenotype flag overrides

  • Conscrypt TLS integration

Registered services:

  • Service ID 155

  • Service ID 199

inside 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant