[BOUNTY #2851] Remote DroidGuard server guide + multi-step session support - #3705
Open
Karan02204 wants to merge 2 commits into
Open
[BOUNTY #2851] Remote DroidGuard server guide + multi-step session support#3705Karan02204 wants to merge 2 commits into
Karan02204 wants to merge 2 commits into
Conversation
- Rework RemoteHandleImpl to support full handle lifecycle (init/initWithRequest + snapshot + close) - Add session ID (sid) management for multi-step flows (pia_attest_e1, pia_express, etc.) - Properly forward DroidGuardResultsRequest bundle data (strings, byte arrays, lists) - Add support for init/close actions in the remote protocol - Add comprehensive documentation + reference server examples This addresses the core blocker described in microg#2851 so that Play Integrity can work over remote DroidGuard. Related: microg#2851 🤖 Generated with [Arena.ai](https://arena.ai)
droidguard: Support multi-step remote DroidGuard for Play Integrity
4 tasks
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.
Problem
Remote DroidGuard previously only supported single-step flows. Play Integrity (and related flows) use a multi-step DroidGuard process involving init/initWithRequest, multiple snapshot calls, and session state.
As a result, setting DroidGuard to Network (remote) mode did not work for Play Integrity. Users were forced to run root + bypass modules (TrickyStore, PlayIntegrityFix, etc.) on their daily driver.
This was the core technical blocker described in #2851.
Solution
This PR fully enables remote DroidGuard for Play Integrity by improving the remote client implementation.
Key Changes
Reworked RemoteHandleImpl.kt:
Full IDroidGuardHandle lifecycle: init, initWithRequest, snapshot, close
Session ID (sid) management for multi-step flows
Proper forwarding of DroidGuardResultsRequest.bundle (supports String, ByteArray, lists, etc.)
Added protocol support for action=init and action=close
Robust payload encoding + response parsing (including sid|result format)
Graceful fallback to stateless mode
Play Integrity flows now work over remote:
Documentation
Added comprehensive documentation:
docs/remote-droidguard.md — complete guide covering:
docs/remote-droidguard-server-example.kt — ready-to-adapt server code
Impact
Related
Notes