align account_state HTTP protobuf fields with stock GMS#3663
Open
zappybiby wants to merge 1 commit into
Open
Conversation
zappybiby
marked this pull request as ready for review
July 22, 2026 04:42
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.
Summary
This PR corrects the protobuf field numbers used by microG's HTTP
account_staterequest.The request schema added by #3420 currently encodes:
Stock Google Play services encodes the same HTTP request as:
Stock HTTP schema
The stock HTTP layout is:
Google Play versions checked:
26.26.62 (100400-945452815)26.14.34 (040400-899752054)25.08.34 (260800-739221510)All tested versions send:
The completed nested message is then placed in outer field 1 before the HTTP POST is created.
Field 1 appears to be a legacy AccountManager-stored account credential field. I found it in decompiles of old versions like 20.15.15 and 20.12.16.
evidence
A public dataset contains three decoded stock requests with:
24.47.38Source repository: https://github.com/doug-leith/cookies-etc-stored-by-google-android
All three request bodies decode identically:
The stock AANG application header uses:
The stock HTTP client-information message:
Runtime test
The HTTP request was tested on Android API 36 with an instrumented GmsCore build.
The request used:
https://android.googleapis.com/auth/lookup/account_state?rt=bpr_fields_1_2stock_fields_2_3header_emptybogus_stock_fieldsbody_absentIOExceptionEvery successful request returned identical data.
effect
The field-number mismatch did not change the response in the auth flow.
This explains why the current implementation works despite not matching the stock format.