diff options
Diffstat (limited to 'AGENTS.md')
| -rw-r--r-- | AGENTS.md | 48 |
1 files changed, 31 insertions, 17 deletions
@@ -25,6 +25,9 @@ Debug"), so it installs next to upstream's `app.passwordstore` and never updates Kotlin package stays `app.passwordstore`; renaming it is churn with no user-visible effect. Keep "GrapheneOS" out of the app name: it is that project's trademark. +minSdk is 31: GrapheneOS runs current Android only, and Android 12 has +`UiModeManager.setApplicationNightMode`. + ## Repository layout and remotes - `master` is the only branch. Upstream's `develop` was renamed; do not recreate it. @@ -32,7 +35,6 @@ Keep "GrapheneOS" out of the app name: it is that project's trademark. and to the GitHub fork (`danixland/HardenedPass`) in one `git push`. GitHub is a push mirror: never create commits on GitHub (bots, web edits), they would diverge from the main repository. -- `upstream` is fetch-only (push URL disabled). - Work directly on `master`, no PRs. ## Build and test @@ -80,15 +82,17 @@ names (`e2e_pass`, not `pass`, which is the real `pass` and reaches a real store `adb shell input`, `uiautomator dump` and `screencap`; Compose nodes carry `text` and `content-desc` in the dump, no resource ids, so match on those. FABs ("Import PGP key", "New entry") carry only `content-desc`, and the list's search bar is itself an `EditText`. The entry -view, the editor and its generator sheet, the proxy screen, the passphrase dialogs and the -autofill decryption and save windows set `FLAG_SECURE`, so screenshots of them are black; read +view, the editor and its generator sheet, the proxy screen, the passphrase dialogs, the git +credential dialog and the autofill decryption and save windows set `FLAG_SECURE`, so screenshots of them are black; read them from the `uiautomator` dump. After boot, wait until the keyguard is dismissed and user storage is unlocked before `adb uninstall` or `push-keys`: earlier, uninstall fails with `DELETE_FAILED_INTERNAL_ERROR` and `/sdcard/Download` does not exist yet. In a Compose text field, wait about a second after the tap before clearing it (Ctrl+A, DEL), or the clear misses. `adb shell run-as <pkg> sh -c '...'` needs the whole command quoted as one `adb` argument (`adb shell "run-as <pkg> sh -c '...'"`), or the device shell splits it. -Fingerprint: `adb emu finger touch 1` after enrolling one in Settings (needs a lock PIN: +The `aps-test` AVD has lock PIN 1234: until it is entered at the keyguard, user storage stays +locked. On the host, `ssh` to the e2e server needs `-F none -o IdentityAgent=none`, or +`AddKeysToAgent` makes gpg-agent ask for a passphrase for the throwaway key. Fingerprint: `adb emu finger touch 1` after enrolling one in Settings (needs a lock PIN: `adb shell locksettings set-pin 1234` on the emulator only). Disable animations (`settings put global animator_duration_scale 0`, same for `transition_` and `window_`) or `uiautomator dump` waits for an idle state that never comes. The OTP screen never goes idle @@ -123,10 +127,13 @@ instead: Firefox with `null root node`, so drive by `screencap` and tap coordinates; secure windows need the owner. The system file picker can show real files: the owner picks the keys there. -Last full emulator run (2026-11-04, Compose UI): clone over SSH, PGP import, decrypt, TOTP, -create and push, conflict recovery (abort rebase, push a new branch), hard reset and -fingerprint unlock passed. Last Firefox autofill runs, both 2026-11-05: tablet (fill, save, stale -cached passphrase) and Pixel 6 Pro on Android 17 (fill, save), all passed. +Last full emulator run (2026-11-05, Android 15, minSdk 31 build): clone over SSH with a +passphrase key (wrong, cancel, remembered, kept through a recreation), missing SSH key dialog, git +error dialog, snackbars, conflict recovery (abort rebase, push a new branch), overwrite confirmation +on move, light, dark and system themes with bar colors, QR scanner opens, decrypt, TOTP and +fingerprint unlock passed. Last Firefox autofill run (2026-11-05): Pixel 6 Pro on Android 17 with the +signed minSdk 31 release build (fill, save, sync, abort rebase, hard reset), all passed. The tablet +(fill, save, stale cached passphrase) was last run before that build. ## Verified facts and gotchas @@ -144,13 +151,13 @@ cached passphrase) and Pixel 6 Pro on Android 17 (fill, save), all passed. - `LaunchActivity` is exported and forwards `FILE_PATH` to `MainActivity` (not exported) only after `isFileInRepo` checks it canonically resolves inside the store; `MainActivity` opens it as `EntryRoute`, whose destination checks it again before decrypting. -- Material Components (Views) stays after the Compose overhaul: the window themes derive from - `Theme.Material3.DayNight` (the AppCompat activities need it), and the git operations' View - dialogs (`BaseGitActivity`, `GitOperation`, `CredentialFinder` with - `git_credential_layout.xml`, `BreakOutOfDetached`, `StoreActions`), `DynamicColors` and the - `snackbar` helper use it. `oreo_autofill_dataset.xml` stays a layout: fill suggestions are - `RemoteViews` drawn by the system. `fragment-ktx` is declared only to pin `androidx.fragment` - (appcompat alone resolves an older one). +- Window themes derive from the platform `android:Theme.Material.*.NoActionBar`, activities from + `FragmentActivity` (`BiometricPrompt` needs it). Git operations and store actions show dialogs and + snackbars through the activity-scoped `Prompts` ViewModel (`activity.prompts`), drawn by + `PromptHost`, which only `MainActivity` and `AutofillSaveActivity` host. AppCompat stays in the + APK through zxing (`CaptureManager`, `zxing_CaptureTheme`) and `androidx.biometric`; + `oreo_autofill_dataset.xml` stays a layout: fill suggestions are `RemoteViews` drawn by the + system. - sshj gets Ed25519 keys from Bouncy Castle: `SshjConfig.kt` pins `KeyFactory.Ed25519` to it at provider position 1. Conscrypt from Android 14 mainline updates serves that factory with keys sshj maps to `KeyType.UNKNOWN` ("Don't know how to encode key"), breaking every Ed25519 host @@ -172,6 +179,10 @@ cached passphrase) and Pixel 6 Pro on Android 17 (fill, save), all passed. Android only partly desugars; moving to it is a large, separate job. Window cache JMX is off in `Application` and GC runs without JGit's PID lock, because Android has no JMX. +- The about screen's `LICENSES` list (`AboutScreen.kt`) is kept by hand: update it when a + dependency that ships in the APK comes or goes. Its Ko-fi logo must stay unchanged, per Ko-fi's + guidance, on the white button that keeps its dark outline visible. + ## Open work `TODO.md` lists open features and fixes. Remove an item in the commit that finishes it. @@ -193,7 +204,7 @@ manual because bot commits on the GitHub mirror would diverge from the main repo ./gradlew :autofill-parser:test -PslimTests git commit -am "autofill-parser: update public suffix list" && git push -Last run: 2026-11-04. +Last run: 2026-11-18. ## Releases @@ -208,5 +219,8 @@ be updated again. `openssl enc -aes-256-cbc -md sha256 -pbkdf2`; the key is the `ENCRYPT_KEY` repository secret. `scripts/signing-setup.sh` decrypts them, `signing-cleanup.sh` deletes them. - Pushing a `vX.Y.Z` tag runs `deploy_github_releases.yml`: it builds the signed APK and creates - a draft GitHub Release with `HardenedPass_vX.Y.Z.apk` and its `.sha256`. + a draft GitHub Release with `HardenedPass_vX.Y.Z.apk` and its `.sha256`. The notes are that + version's `CHANGELOG.md` section in full, so the release fails without one. +- After publishing, rebuild the website with a push to its `production` branch: its landing page + reads the latest version from GitHub at build time. - Never print, log or commit the keystore password or `ENCRYPT_KEY`. |
