<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[G&R Mad Lab 42]]></title><description><![CDATA[G&R Mad Lab 42]]></description><link>https://gnrmadlab42.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 04 Dec 2026 20:49:42 GMT</lastBuildDate><atom:link href="https://gnrmadlab42.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Building an Android vault with no INTERNET permission]]></title><description><![CDATA[I built an Android vault for passwords and paperwork with one rule I would not break: the app itself should not have the INTERNET permission. The app…]]></description><link>https://gnrmadlab42.hashnode.dev/building-an-android-vault-with-no-internet-permission</link><guid isPermaLink="true">https://gnrmadlab42.hashnode.dev/building-an-android-vault-with-no-internet-permission</guid><category><![CDATA[Android]]></category><category><![CDATA[Kotlin]]></category><category><![CDATA[privacy]]></category><category><![CDATA[Security]]></category><category><![CDATA[mobile]]></category><dc:creator><![CDATA[G&R Mad Lab 42]]></dc:creator><pubDate>Thu, 03 Dec 2026 04:42:06 GMT</pubDate><content:encoded><![CDATA[<p>I built an Android vault for passwords and paperwork with one rule I would not break: the app itself should not have the <code>INTERNET</code> permission.</p>
<p>The app, Keybound, is free to download, and the free version stays free. Extra tools are optional one-time unlocks, not a subscription. That is background, not the point of this article. The point is how that permission constraint shaped the architecture.</p>
<p>A missing <code>INTERNET</code> line is easy to say in a store listing. It is harder to keep once you add the things a published app is often expected to have: a company login, crash reporting, analytics, “forgot password,” cloud sync, or a server check that a purchase is still valid. Most of those want a network. I left them out.</p>
<p>Anyone can verify the claim after install: Android Settings → Apps → Keybound → Permissions. The merged manifest must not request <code>android.permission.INTERNET</code>. A library can still try to add it, so the app does three things:</p>
<ol>
<li>The manifest explicitly strips <code>INTERNET</code> and neighboring network permissions if a dependency declares them (<code>tools:node="remove"</code>).</li>
<li>A permission allow-list and a forbidden list live in one Kotlin object. The app, the unit tests, and a Gradle check on the merged manifest all use the same lists. If <code>INTERNET</code> shows up as a real request, the release build fails.</li>
<li><code>network_security_config</code> forbids cleartext and trusts no system certificate authorities in the base config. Even if a library tried to open a socket, TLS would have nothing to trust.</li>
</ol>
<p>The app has no company server and no company account. Vault contents are not uploaded. Android auto-backup and device-to-device transfer are off (<code>allowBackup="false"</code>). Backups are opt-in encrypted files the person keeps somewhere they trust.</p>
<p>That is not the same as “the phone cannot use the network.” The system file picker, the share sheet, and the person’s own email app handle share-or-contact flows. Optional scanning and on-device text recognition can use Play services modules; the first use of a module may download through Google Play itself, which already has network access. That is not the same as granting <code>INTERNET</code> to the vault app.</p>
<p>Play Billing was the interesting case. Purchases are one-time in-app products, not subscriptions. The Billing Library binds to the Play Store app already on the phone and talks to it over IPC. The permission it adds is <code>com.android.vending.BILLING</code>. Play shows the purchase UI. The vault app never sees card details, and it does not need <code>INTERNET</code> for this.</p>
<p>The remaining design problem is what happens when Play cannot answer. I did not want paid features to vanish in airplane mode, I did not want a prefs file to be enough to fake a purchase, and I did not want a failed license check to lock or wipe the vault. A successful Play query is the source of truth. If Play cannot be reached, the last confirmed plan stays in effect for 14 days, with the cached confirmation HMAC’d using a key in Android Keystore. After that window, paid features pause until Play confirms again. Vault data is never locked or deleted because of this.</p>
<p>The vault itself uses a random 256-bit data-encryption key that does not change when the password changes. New file saves are stacked: AES-256-GCM, then XChaCha20-Poly1305, with a hybrid wrap that includes ML-KEM-768. Password derivation for new vaults is Argon2id. On the phone, the wrapped DEK sits inside an Android Keystore key that needs the phone’s fingerprint or screen lock, so a copy of the files taken off the device is not enough for an offline password guess. There is no email password reset. I cannot open a customer’s vault.</p>
<p>If someone wants a sealed hand-off, they can also require their own hardware key. That is optional, and it is not required to install or use the rest of the app. I mean the person’s own hardware key, not a particular brand.</p>
<p>Stack: Kotlin 2.0.21, Jetpack Compose, minSdk 29, target SDK 36. The current release unit-test run for version 0.9.78 was 2,291 tests, 16 skipped, no failures (December 1, 2026, America/New_York), including the permission lists, billing entitlement rules, and crypto helpers. That number will change. The useful part is that “must not have <code>INTERNET</code>” is enforced by the same lists the tests and the build see.</p>
<p>Trade-offs I accepted: no company “forgot password” flow, no in-app cloud sync, no crash reporter or analytics back to me, and a slightly less smooth product because sharing and mail go through system intents instead of an in-app uploader.</p>
<p>The desktop (PC) version has been submitted and is waiting for review. Mac and iPhone versions are launching soon.</p>
<p>Package name: <code>com.gnrmadlabs.keybound</code>. The Play listing, if you want to inspect the package or the permission list, is:</p>
<p><a href="https://play.google.com/store/apps/details?id=com.gnrmadlabs.keybound">https://play.google.com/store/apps/details?id=com.gnrmadlabs.keybound</a></p>
<p>If you have questions about the permission allow-list, the offline entitlement policy, or the crypto choices, I would be glad to discuss them.</p>
<p>Russell Mohney<br />G&amp;R Mad Lab 42 LLC</p>
]]></content:encoded></item></channel></rss>