Document how to drive the app on a device without popups - #710
Merged
Conversation
Agent sessions kept burning turns tapping through onboarding, the VPN consent dialog and permission prompts — and re-entering onboarding after overwriting the preferences file, which drops onboarding_version. All of it can be pre-satisfied from adb, with no code changes and nothing debug-only to maintain: `install -g` for runtime permissions, `appops set ACTIVATE_VPN allow` so VpnService.prepare() returns null (which skips the system dialog and our own explainer before it), and a seeded onboarding_version, which run-as can write before the first launch. Also records the traps behind the churn: force-stop before editing preferences or the running process overwrites them, merge rather than replace so onboarding_version survives, and uninstall/pm clear wipe the seeded state along with the appop and the grants. Two notes for someone else's device: VpnService.prepare() revokes whatever VPN app currently holds consent, and the github debug package is also what a maintainer's own dev build installs as, so seeding preferences into it overwrites their real configuration. Verified end to end on a Pixel 8 (Android 17). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…troying state github debug installs as net.kollnig.missioncontrol.test, which is also what a maintainer's own day-to-day dev build installs as. Following the previous advice meant testing on top of their real configuration, and enabling its VPN takes the consent slot from whatever they were running. The flavours differ only in the update-check API, so fdroid debug costs nothing and installs alongside. Also states the rule the previous wording only implied: uninstall, pm clear, overwriting preferences and revoking permissions are irreversible, so ask first and name what will be lost — including when the target looks like a throwaway you installed yourself, since that is one mistaken package name away from the real install. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Independent of the #704 stack — docs only, no code.
Why
Agent sessions kept burning turns tapping through onboarding, the VPN consent dialog and the runtime permission prompts, then landing back in onboarding after overwriting the preferences file (which drops
onboarding_version). None of that is necessary.What
A new subsection under §3's Connected-device testing, covering the adb-only setup:
adb install -r -gfor runtime permissions — with the caveat that-ggrants the permission you are testing too, so revoke it explicitly orcheckSelfPermissionwill lie.adb shell appops set <pkg> ACTIVATE_VPN allow, which makesVpnService.prepare()return null. That skips both the systemConfirmDialogand TrackerControl's own explainer in front of it.onboarding_version, whichrun-ascan write before the first launch.Plus the traps behind most of the churn:
onboarding_versionsurvives;adb uninstall/pm clearwipe the seeded prefs, the appop and the grants together.And two things that matter on someone's personal device:
VpnService.prepare()revokes whatever VPN app currently holds consent — the maintainer's own build, or their real VPN. Worth saying out loud before enabling a tunnel.dumpsys notification --noredactrather than screenshotting the shade, which captures the user's private notifications.Two standing rules changed
Connected-device testing now defaults to fdroid debug. github debug installs as
net.kollnig.missioncontrol.test— the same package as a maintainer's day-to-day dev build. The old advice meant testing on top of their real configuration, and enabling that build's VPN takes the consent slot from whatever they were running. The flavours differ only in the update-check API, sonet.kollnig.missioncontrol.fdroid.testcosts nothing and installs alongside. github remains the flavour for building and compile checks; only device work moves.Destroying state now requires asking. The previous wording said not to uninstall or
pm clear"unless the user explicitly requests a clean install"; it now states the rule directly and extends it to overwriting preferences and revoking permissions, and to targets that look like a throwaway you installed yourself — that case is one mistaken package name away from the real install.Both changes come from a live session where I got this wrong: I uninstalled a debug build repeatedly for cleanup without asking, and revoked the maintainer's VPN consent without warning first.
Testing
Verified verbatim on a Pixel 8 (Android 17), from a clean install of the fdroid debug build: the app lands directly on
ActivityMain, the VPN switch brings the tunnel up with no dialogs at all, and the permission under test stays denied.