Fix Google Messages RCS setup support#3497
Conversation
# Conflicts: # play-services-core/src/main/kotlin/org/microg/gms/phenotype/PhenotypeService.kt
|
Follow-up update:
No runtime behavior beyond the phenotype flag merge was intentionally changed in the conflict resolution. |
|
I reviewed the Constellation request handling in this PR and found a small correctness issue worth folding in before more device testing.
// field 1: policyId - UPI policy string (e.g., "upi-carrier-id-mt-priority"), NOT phone number
// field 5: imsiRequests - List of IMSI/MSISDN pairs per SIM
// msisdn: MSISDN/phone number (E.164 string)The current
Patch summary: + static String extractMsisdnFromRequest(VerifyPhoneNumberRequest request) {
+ if (request == null) return null;
+ if (request.imsiRequests != null) {
+ for (ImsiRequest imsiRequest : request.imsiRequests) {
+ if (imsiRequest != null && isE164PhoneNumber(imsiRequest.msisdn)) {
+ return imsiRequest.msisdn;
+ }
+ }
+ }
+ // Legacy bundle callers are adapted through policyId in verifyPhoneNumberV1().
+ return isE164PhoneNumber(request.policyId) ? request.policyId : null;
+ }
+
+ private static boolean isE164PhoneNumber(String value) {
+ return value != null && value.startsWith("+") && value.length() > 1;
+ }and: - String phoneNumber = request != null ? request.policyId : null;
+ String phoneNumber = extractMsisdnFromRequest(request);Local validation note: but the Windows sandbox fails before reaching I isolated that as an environment issue: Java |
Fixes #2994.
This PR improves microG compatibility with Google Messages RCS setup by implementing the missing service/permission/config behavior needed for RCS initialization without requiring root, Magisk, or bootloader unlock.
Summary:
Attribution:
This branch is based on the active Constellation/Asterism RCS implementation line in #3388, plus the caller/capability hardening from #3495, with the unrelated CI artifact workflow tweak intentionally omitted.
Testing:
./gradlew.bat --no-daemon :play-services-core:testVtmDefaultDebugUnitTest --tests org.microg.gms.constellation.ConstellationServiceImplTest --tests org.microg.gms.rcs.RcsCallerPolicyTest --tests org.microg.gms.constellation.Ts43ClientTest./gradlew.bat --no-daemon :play-services-core:assembleVtmDefaultDebugBoth commands passed locally using Java 17 and Android SDK platform 35/build-tools 34.0.0.
Device/emulator testing was not performed in this environment. No Google Messages version was tested locally. Maintainer/device validation is still needed across locked-bootloader devices, carriers, and recent Google Messages builds.