Repository navigation
Conversation
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.
Automated implementation prepared by CoreMesh Task Forge for #2851.
Human approval was required before submission. The code, repository validation, maintainer-facing explanation, and independent review were validated before this PR was opened.
What changed
RemoteHandleImpl.ktadds opt-in v1 init/snapshot/close HTTP transport through existing Network mode, retaining the legacy snapshot endpoint for URLs without the protocol fragment.RemoteSession.ktserializes lifecycle calls, retains session identity across snapshots, validates IDs, and closes previous sessions before reinitialization.server/session_server.pyprovides a CPython reference transport with a persistent-handle backend interface, bounded session capacity, expiry, cleanup and error handling. No Android backend is included.REMOTE_DROIDGUARD_SETUP.mddescribing the protocol, runtime and integration limits.How it works
#droidguard-session-v1selects the experimental protocol. The fragment is removed and POST requests target/init,/snapshot, and/closebeneath the configured base.Verification
python3 -m unittest discover -s play-services-droidguard/server -v: five tests completed successfully. They exercise the actual HTTP handler/parser using in-memory socket streams, verifying multi-step state, binary output, metadata and Unicode form encoding, isolation, cleanup, expiry, capacity, malformed forms and backend failures.PermissionError. The explicit integration runner ispython3 play-services-droidguard/server/integration_session_server.py -v; real network operation remains unverified here../gradlew :play-services-droidguard-core:testDebugUnitTest: Gradle could not start because Java is unavailable. Kotlin tests cover same-session reuse, reinitialization, locally idempotent close, invalid IDs and failure behavior; compilation and execution remain unverified.git diff --checkcompleted without whitespace errors. No real Android devices or Play Integrity verdicts were tested.Demo evidence
Not required for this task.
Scope and risk
This is a local transport prototype, not a complete solution to issue #2851. The supported reference runtime is CPython 3.8+ with an external persistent-handle backend. A verified Android backend, stock-phone setup, passing Play Integrity verdicts, and root/bypass maintenance are not implemented. The guide explicitly states these limitations rather than claiming Termux can invoke DroidGuard automatically. The reference server binds to loopback and has no built-in authentication/TLS; deployment requires an access-controlled HTTPS proxy and a verified backend. Session mode rejects nonprimitive request fields and does not transport Parcelable/file-descriptor init replies. Primitive metadata is textual and backend adapters must restore known types. Legacy endpoint selection, Embedded mode and the existing guardWithRequest service TODO remain unchanged. Client logging of snapshot/request contents was removed and legacy HTTP connections now disconnect after use. Kotlin/Android compilation and actual network/device behavior require follow-up verification.
Task Forge validation
git diff --check && python3 /taskforge-scripts/repository_validate.py --auto— PASSBounty submission
Submitted for bounty consideration under issue #2851.
Preferred payout route
Payout route (if awarded): Base USDC →
0x9dFD2Ee86182f92464b50809C6702B999a0Cd54fIf the sponsor or bounty venue supports on-chain settlement:
8453)0x9dFD2Ee86182f92464b50809C6702B999a0Cd54fThe venue's payout, identity, tax, KYC, and eligibility rules take precedence. No payment is presumed until the sponsor explicitly awards it.