I built an Android paperwork and password vault with one rule I would not break: the app itself should not have the INTERNET permission.
That sounds like a small manifest tweak until you start adding the things a store app is often expected to have. A company login. Crash reporting. Analytics. "Forgot password." Cloud sync. A check-in with a server to see if a purchase is still valid. Most of those want a network. I left them out.
This is a write-up of how that constraint shaped the architecture, how Google Play Billing still works without giving the app its own internet permission, and what I would repeat.
What the constraint actually means
"No INTERNET permission" is not a slogan in the listing. It is a property of the installed package, and anyone can check it after install: Android Settings → Apps → the app → Permissions. The merged manifest must not request android.permission.INTERNET.
A library can still try to add it. Play services helpers, scanners, and billing clients are common sources. So the app does three things, not one:
- The manifest explicitly strips network permissions if a dependency declares them:
<uses-permission android:name="android.permission.INTERNET" tools:node="remove" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" tools:node="remove" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" tools:node="remove" /> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" tools:node="remove" /> A permission allow-list and a forbidden list live in one Kotlin object. The same lists are used by the app, the unit tests, and a Gradle check on the merged manifest. If
INTERNET,ACCESS_NETWORK_STATE, or any permission that is not on the allow-list shows up as a real request, the release build fails. Atools:node="remove"line is allowed; a leftover request is not.There is a second wall in
network_security_config. Cleartext traffic is forbidden, and the base config trusts no system certificate authorities. Even if a library somehow tried to open a socket, TLS would have nothing to trust.android:usesCleartextTrafficis also set tofalse.
The Google Play build also has no location permission. Camera, microphone, and calendar are declared, and they are asked for only when the person uses the tool that needs them. Pictures taken with the in-vault camera go into the encrypted vault on the phone, not the gallery. Voice commands use the phone's own on-device speech recognizer; the sound is not saved and is not sent anywhere.
None of that required giving the vault app a network.
The difference between "no INTERNET" and "the phone cannot use the network"
This distinction took some care, because it is easy to over-claim.
The app has no company server and no company account. It does not upload vault contents, and it does not talk to a backend of mine. Android's automatic cloud backup and device-to-device transfer are turned off (allowBackup="false", plus data-extraction rules that exclude files, shared preferences, and the rest). Backups are opt-in encrypted files the person keeps somewhere they trust.
The person can still use other apps. "Add file" goes through the system file picker. Sharing, printing, and handing a PDF to a fax app go through Android's share sheet or print system. A "suggest a fix" button opens the person's own email app with a draft; the vault app does not send the mail. Optional document scanning, live QR reading, and text recognition run inside Google Play services on the device. The first use of a Play services module may download that module through Google Play itself, which already has network access. That is not the same as granting INTERNET to the vault app.
If you prefer not to use those Play services tools, the vault still works without them. Play services may send Google its own basic diagnostic information under Google's policy. That does not include the person's documents, and it is not a report to me.
How Play Billing still works
Purchases are one-time in-app products, not subscriptions: a Basic unlock, an Everything unlock, and an upgrade from Basic to Everything. Google Play handles payment. The vault app never sees card details.
The Play Billing Library does not need INTERNET on the buying app. It binds to the Play Store app already on the phone and talks to it over IPC. The permission it adds is com.android.vending.BILLING, a normal install-time permission. Google Play's own app does the online part and shows the purchase UI.
The implementation is a BillingClient with pending one-time purchases enabled, ProductType.INAPP queries, and the usual flow: queryProductDetails, launchBillingFlow, then onPurchasesUpdated. Restore is queryPurchasesAsync again. Prices on the unlocks screen are the text Play returns for the person's local currency.
That still leaves a design problem unique to an offline app: what happens when the Play Store app cannot answer?
I did not want paid features to vanish the first time a phone was in airplane mode. I also did not want a local prefs file to be enough to fake a purchase, and I did not want a failed license check to lock or wipe the vault.
The policy is:
- A successful Play query is the source of truth. If Play says the purchase is gone, paid features revert. Vault data stays readable, and the free tools still work.
- If Play cannot be reached, the last confirmed paid plan stays in effect for 14 days. After that, paid features pause until Play confirms again. The cached confirmation is kept so a later successful query can restore it. Vault data is never locked or deleted because of this.
- That cache is not a bare preference. The payload is HMAC'd with a key held in Android Keystore, so editing the file is not enough to unlock a plan.
- Every finished purchase is acknowledged. Play refunds unacknowledged purchases after three days, so a failed acknowledge is retried on the next refresh.
- Pending payments unlock nothing until Play reports them as paid.
- Purchase signatures are checked on the phone against the Play license key from Play Console. A release build without that key is rejected at package time, and verification fails closed if the key is missing.
The grace window is a tradeoff. A refund takes effect the next time Play can be queried, not instantly while the phone is offline. In exchange, a legitimate buyer can keep using paid tools through a stretch with no Play connection, and their files are never held hostage to a license server I run.
How the vault is locked
I want to stay with what I can say plainly, and not dress it up.
Files live in the app's private storage. The app makes one random 256-bit vault key (a data-encryption key, or DEK). That DEK never changes, so changing a password does not mean re-encrypting every file.
New file saves use stacked encryption. A fresh 256-bit AES key and a fresh 256-bit XChaCha20 key are made for that save only. The file bytes are locked with AES-256-GCM, then that blob is locked again with XChaCha20-Poly1305. Those two file keys are wrapped and stored at the front of the blob, so the master key does not encrypt the file bytes directly. Older files that used AES-256-GCM with the master key still open, and they are rewritten on the next save.
The wrap around those file keys is a hybrid of the master key and ML-KEM-768 (FIPS 203), combined with HKDF-SHA256. The ML-KEM key pair is derived from the master key, so there is no extra secret to store or lose, and a fresh encapsulation is made on every save. AES-256-GCM was already a strong choice; the ML-KEM layer is a second, independent kind of lock on new saves.
The DEK itself is only stored locked. On the phone it is wrapped with the vault password, and that blob is wrapped again with an Android Keystore key that requires the phone's fingerprint or screen lock. Opening needs both. A copy of the app's files, taken off the device, cannot be used to guess the password offline, because the password layer sits inside the Keystore layer.
New vaults derive the password key with Argon2id (RFC 9106). The default work factor is 19 MiB of memory and at least two passes, with the pass count calibrated on that phone to about 0.8 seconds (up to twelve passes). A tighter setting uses 32 MiB and at least three passes, calibrated toward about 1.5 seconds. Vaults made with the older PBKDF2-HMAC-SHA256 path still open and are upgraded to Argon2id on unlock. The slot file records the method and settings, so the KDF can change without breaking existing vaults.
While the vault is open, the DEK stays in memory only and is forgotten on lock. The default auto-lock is five minutes of idle time or time in the background; the person can choose 30 seconds, one minute, or two minutes instead. The vault also locks when the screen turns off. Screenshots of the open vault are blocked with FLAG_SECURE, and that flag is checked and put back if something clears it.
There is no email password reset. I cannot open a customer's vault. A wrong password never wipes data. After five failed tries, a wait starts at 30 seconds and doubles, capped at 15 minutes. That wait is stored on disk (try counts and timers only, no secrets) so force-stopping the app does not reset it. After a phone reboot, the wait falls back to a wall-clock end time, capped so a wrong clock cannot lock someone out for long.
If the person uninstalls the app or resets the phone, Android removes the vault on that device. The app never wipes the vault on its own. That is why an encrypted backup file, kept somewhere the person trusts, matters.
The app is not open source. If you only use audited open-source tools, I understand that.
Design tradeoffs I accepted
No company "forgot password" flow. That feature almost always means a server that can reach the account, which I did not want. The cost is real: if someone loses access and has no backup, I cannot help them get the files back. I would rather say that plainly than pretend a reset email is compatible with "I cannot open your vault."
No cloud sync in the app. A Drive or other cloud backup of already-encrypted files was designed early on, and it would have been the moment INTERNET came back. I did not take that path. Sharing stays something the person does, with a file they picked, through an app they chose. Dead Drops are the same idea for handing a note or file to someone else: the payload is sealed on the phone with its own passphrase and handed over as a locked file or a QR code, for example tax papers to an accountant. Everything buyers can also require your own hardware key. NFC is used only while that key window is open; a key on USB uses Android's own "allow this app" prompt. Neither is required to install or use the rest of the app.
No crash reporter and no analytics to me. I learn less about what fails in the field. I also do not get a pipeline of usage data that would tempt a later "just add a small telemetry endpoint."
Play services for a few optional tools, not for the vault. Scanning and on-device text reading are convenient, and they can download code through Google Play. The vault, the keys, and the billing entitlement cache do not depend on a network call I control.
An offline entitlement grace period, not a license server. Fourteen days of cached paid access after the last Play confirmation is more generous than a strict online check and stricter than "unlock forever once the phone has seen a purchase." Vault access does not depend on it.
Hardware that some phones do not have. Fingerprint or screen lock is required to open the vault on that device. Hardware keys for some sealed drops are optional. minSdk is 29 (Android 10), compile and target SDK 36. The stack is Kotlin (2.0.21) and Jetpack Compose.
Intents instead of in-app browsers and in-app uploads. It is a slightly less "smooth" product. It keeps network use in apps the person already has, where they can see it.
Lessons I would repeat
Strip permissions in the manifest, but do not stop there. tools:node="remove" is how you cancel a dependency's request. An allow-list on the merged manifest is how you notice the next library that tries. I also check the manifest-merger report so camera and QR libraries are not asking for the network in the first place. I do not want to "fix" that only by stripping it.
Treat "the app has no INTERNET permission" as a product constraint, not just a security checkbox. Once that is true, a lot of tempting features cannot sneak in later. That was the point.
Do not confuse that constraint with "nothing on the device may use the network." Play Billing, Play services module delivery, and Android intents are all ways a user can still buy, scan, or share without the vault app holding INTERNET. Be precise in what you claim, because people will open the permission screen and also notice that a purchase UI came from Play.
If you sell unlocks this way, plan the offline case before you ship. Cache the last confirmation, bind it to something an attacker cannot edit in a text file, acknowledge purchases, ignore pending payments, and decide what happens to paid features after the grace window. Decide, separately, that vault data is never the lever you pull.
Keep cryptographic choices boring where they can be, and recorded in the slot or file format so you can upgrade. Argon2id replaced PBKDF2 without abandoning old vaults. Stacked file encryption and the ML-KEM wrap upgraded on the next save, with a check that the new file opens before the old one is replaced.
Test the policy, not only the happy path. The current release unit-test run for version 0.9.78 (2,291 tests, 16 skipped, no failures, December 1, 2026, America/New_York) includes the permission lists, billing entitlement rules, and the crypto helpers. That number will change. The useful part is that the "must not have INTERNET" rule is enforced by the same code the tests and the build see.
If you want to look at the app
I shipped this as Keybound, from G&R Mad Lab 42 LLC. It is free to download, and the free version stays free. Extra tools are one-time unlocks, not a subscription. Nobody is forced to upgrade.
The package name is com.gnrmadlabs.keybound. After you install it, you can open Android Settings → Apps → Keybound and check the permission list yourself.
The desktop (PC) version has been submitted and is waiting for review. It is included free for Everything buyers. Mac and iPhone versions are launching soon.
If you want to look at it, it is on Google Play:
https://play.google.com/store/apps/details?id=com.gnrmadlabs.keybound
I'll answer technical questions in the comments.
Russell Mohney
G&R Mad Lab 42 LLC

