Make the Android app build, and fix what compiling it exposed
Why: the module was written but never compiled, so nothing about it was proved. Building it found a name clash and a theme that would have crashed every device below Android 10. What: - KeepOrgProvider.requireContext -> ctx(): ContentProvider gained requireContext() in API 30, and Kotlin refused the silent hiding. - The application theme was @android:style/Theme.DeviceDefault.DayNight, which is API 29 while minSdk is 26. Replaced with @style/AppTheme, plain DeviceDefault in values/ and DayNight in values-v29/. - Backup exclusions: data_extraction_rules.xml and backup_rules.xml exclude every domain for both cloud backup and device transfer. The session token authenticates as the user and the mirrored files are the organization's password databases; neither belongs in a backup. - User-facing strings moved from code into strings.xml, so the app is translatable. Layouts stay in code, as before. - mipmap-anydpi-v26 -> mipmap-anydpi (the qualifier is redundant at minSdk 26), and the redundant activity label is gone. - Lint is configured to write a text report, and `make android-lint` runs it; `make android` now fails with a clear message when ANDROID_HOME has no SDK. Proved: the unsigned release APK builds (656 KB), lint reports "No issues found", and the packaged DEX contains all 16 classes including every manifest component. Toolchain used: JDK 21, Gradle 8.10.2, SDK platform 35 and build-tools 35.0.0; on this arm64 host Google's x86-64 aapt2 runs under qemu-user-static with amd64 multiarch libraries, which android/README.md now documents. The app has still not run on a device: there is none here.
This commit is contained in:
+11
-4
@@ -272,6 +272,7 @@ manual, never automatic:
|
||||
|
||||
```sh
|
||||
make android # unsigned APK, named cc.tiredsysadmin.android.keeporg_<code>.apk
|
||||
make android-lint # kept at zero findings
|
||||
make android-publish # scp to the private F-Droid unsigned and metadata directories
|
||||
```
|
||||
|
||||
@@ -298,16 +299,22 @@ What the suite actually covers:
|
||||
server-wins, client-wins, manual, read-only restore, server-side rename,
|
||||
and an update arriving over the event stream.
|
||||
|
||||
The Android module is checked by `make android-lint`, which is kept at zero
|
||||
findings, and `make android` builds the unsigned release APK. See
|
||||
[../android/README.md](../android/README.md) for its requirements, including
|
||||
what an arm64 Linux build host needs.
|
||||
|
||||
## Known limits and the next things to do
|
||||
|
||||
- **One server node.** The JSON store is single-writer by design. Horizontal
|
||||
scale means replacing `internal/store`.
|
||||
- **No entry-level merge.** See the strategies section. The pluggable place
|
||||
is the client, which holds the key.
|
||||
- **The Android module has not been compiled in this environment** (no JDK or
|
||||
Android SDK was available). The Gradle wrapper is deliberately not
|
||||
committed; run `gradle wrapper --gradle-version 8.9` once, then
|
||||
`make android`. Expect to fix small things on the first build.
|
||||
- **The Android app has never run on a device.** It compiles clean, lint
|
||||
reports no issues and the DEX carries every class the manifest names, but
|
||||
no emulator or phone was available here. The first real run is where to
|
||||
confirm the file-picker integration, the save-triggered sync and the
|
||||
foreground notification.
|
||||
- **No key-file or Yubikey handling**, and none needed: those live in the
|
||||
KeePass application.
|
||||
- **Sessions are not listable or revocable individually** beyond
|
||||
|
||||
Reference in New Issue
Block a user