Prepare Android release artifacts and listing (#112)
Add Rust distribution auditing, pinned post-build AAB signing, complete offline third-party notices, an Android privacy policy and reviewable Play listing assets. Preserve the application ID and audit both ARM ABIs, native symbols, baseline profiles and R8 mapping. Fix dialog focus ownership, navigation-triggered cleanup loops and stale authentication errors after first-run setup, with native and real-activity regressions. Google Play publication is deferred by the user. Issue #112 remains open for production signing, Console declarations and actual Play install/update verification.
No files matched your search
@@ -17,6 +17,7 @@ import xml.etree.ElementTree as ET
|
||||
import subprocess
|
||||
import tempfile
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
ABIS = ("arm64-v8a", "armeabi-v7a")
|
||||
@@ -139,6 +140,55 @@ def checksum_artifacts(output):
|
||||
(output / "sha256.json").write_text(json.dumps(checksums, indent=2) + "\n")
|
||||
|
||||
|
||||
def upload_signing():
|
||||
names = ("STORE_FILE", "STORE_PASSWORD", "KEY_ALIAS", "KEY_PASSWORD", "CERT_SHA256")
|
||||
signing = {name: os.environ.get("IRONSTORAGE_UPLOAD_" + name, "") for name in names}
|
||||
if not all(signing.values()) or not re.fullmatch(r"[0-9a-fA-F]{64}", signing["CERT_SHA256"]):
|
||||
raise RuntimeError("Distribution requires all five IRONSTORAGE_UPLOAD variables and a pinned SHA-256 certificate")
|
||||
store = Path(signing["STORE_FILE"]).resolve(strict=True)
|
||||
if store.is_relative_to(ROOT) or not store.is_file():
|
||||
raise RuntimeError("Upload keystore must be a file outside the repository")
|
||||
certificate = subprocess.run(["keytool", "-exportcert", "-keystore", str(store),
|
||||
"-alias", signing["KEY_ALIAS"], "-storepass:env", "IRONSTORAGE_UPLOAD_STORE_PASSWORD"],
|
||||
check=True, stdout=subprocess.PIPE).stdout
|
||||
if hashlib.sha256(certificate).hexdigest() != signing["CERT_SHA256"].lower():
|
||||
raise RuntimeError("Upload certificate differs from the independently pinned certificate")
|
||||
return signing, store
|
||||
|
||||
|
||||
def distribution():
|
||||
"""Build/sign/audit locally or on a trusted runner; never publishes to Play."""
|
||||
signing, store = upload_signing()
|
||||
public_env = {key: value for key, value in os.environ.items() if not key.startswith("IRONSTORAGE_UPLOAD_")}
|
||||
run("python3", ROOT / ".gitea/scripts/android_ci.py", "build", env=public_env)
|
||||
source = ROOT / "android/build/ci-artifacts"
|
||||
# Only distribution artifacts go to the release archive, never debug/test APKs.
|
||||
output = ROOT / "android/build/distribution"
|
||||
output.mkdir(parents=True, exist_ok=False)
|
||||
try:
|
||||
for name in ("mapping.txt", "native-debug-symbols.zip", "sbom.cdx.json", "third-party-notices.txt"):
|
||||
shutil.copy2(source / name, output / name)
|
||||
bundle = output / "app-release.aab"
|
||||
run("jarsigner", "-keystore", store, "-storepass:env", "IRONSTORAGE_UPLOAD_STORE_PASSWORD",
|
||||
"-keypass:env", "IRONSTORAGE_UPLOAD_KEY_PASSWORD", "-digestalg", "SHA-256",
|
||||
"-signedjar", bundle, source / "app-release.aab", signing["KEY_ALIAS"])
|
||||
run("jarsigner", "-verify", "-strict", "-keystore", store,
|
||||
"-storepass:env", "IRONSTORAGE_UPLOAD_STORE_PASSWORD", bundle, signing["KEY_ALIAS"])
|
||||
jar = ROOT / "android/build/bundletool.jar"
|
||||
download(json.loads((ROOT / "android/bundletool.json").read_text()), jar)
|
||||
run("java", "-jar", jar, "validate", "--bundle=" + str(bundle), env=public_env)
|
||||
manifest = output / "bundle-manifest.xml"
|
||||
manifest.write_text(run("java", "-jar", jar, "dump", "manifest", "--bundle=" + str(bundle), capture=True, env=public_env).stdout)
|
||||
run(CARGO, "+1.97.1", "run", "--locked", "-p", "ironstorage-android-build", "--", "audit-distribution",
|
||||
ROOT / "android", manifest, bundle, output / "mapping.txt",
|
||||
output / "native-debug-symbols.zip", output / "third-party-notices.txt", output / "distribution.json", env=public_env)
|
||||
(output / "upload-certificate-sha256.txt").write_text(signing["CERT_SHA256"].lower() + "\n")
|
||||
checksum_artifacts(output)
|
||||
except BaseException:
|
||||
shutil.rmtree(output)
|
||||
raise
|
||||
|
||||
|
||||
def backup_references(manifest, resource_table):
|
||||
application = ET.fromstring(manifest).find("application")
|
||||
if application is None:
|
||||
@@ -242,7 +292,8 @@ def build():
|
||||
tool("safe-reports", reports, output / (module + "-unit-tests.json"))
|
||||
files = [ROOT / "android/app/build/outputs/apk/debug/app-debug.apk", apk,
|
||||
ROOT / "android/app/build/outputs/bundle/release/app-release.aab",
|
||||
ROOT / "android/app/build/outputs/mapping/release/mapping.txt"]
|
||||
ROOT / "android/app/build/outputs/mapping/release/mapping.txt",
|
||||
ROOT / "android/app/build/generated/notices/assets/third-party-notices.txt"]
|
||||
for path in files:
|
||||
shutil.copy2(path, output / path.name)
|
||||
checksum_artifacts(output)
|
||||
@@ -450,6 +501,55 @@ def performance(serial, profiles=False):
|
||||
|
||||
|
||||
class SelfTest(unittest.TestCase):
|
||||
def test_distribution_does_not_pass_upload_secrets_to_the_build(self):
|
||||
with patch.dict(os.environ, {"IRONSTORAGE_UPLOAD_STORE_PASSWORD": "public-fixture-password"}), \
|
||||
patch(__name__ + ".upload_signing", return_value=({}, Path("/tmp/fixture.p12"))), \
|
||||
patch(__name__ + ".run", side_effect=RuntimeError("stop before build")) as build:
|
||||
with self.assertRaisesRegex(RuntimeError, "stop before build"):
|
||||
distribution()
|
||||
build.assert_called_once()
|
||||
self.assertFalse(any(key.startswith("IRONSTORAGE_UPLOAD_") for key in build.call_args.kwargs["env"]))
|
||||
self.assertIn("PATH", build.call_args.kwargs["env"])
|
||||
|
||||
def test_notices_reject_uncovered_rust_crates_and_unreviewed_android_terms(self):
|
||||
from android_notices import android_notices, rust_notices
|
||||
data = {"licenses": [{"name": "MIT", "text": "public license fixture", "used_by": [
|
||||
{"crate": {"name": "fixture", "version": "1", "authors": ["Public Author"], "repository": "https://example.test/source"}}
|
||||
]}]}
|
||||
text = rust_notices(data, {("fixture", "1")})
|
||||
self.assertIn("Public Author", text)
|
||||
self.assertIn("https://crates.io/crates/fixture/1", text)
|
||||
self.assertNotIn("source_path", text)
|
||||
with self.assertRaisesRegex(RuntimeError, "missing a license notice"):
|
||||
rust_notices(data, {("other", "1")})
|
||||
data["licenses"][0]["text"] = ""
|
||||
with self.assertRaisesRegex(RuntimeError, "Empty Rust license"):
|
||||
rust_notices(data, set())
|
||||
for policy in ({}, {"fixture:library:1": "MIT"}):
|
||||
with self.assertRaisesRegex(RuntimeError, "needs review"):
|
||||
android_notices([{"component": "fixture:library:1", "path": "must-not-be-read"}], policy)
|
||||
|
||||
def test_distribution_refuses_missing_credentials_and_unpinned_signers(self):
|
||||
with patch.dict(os.environ, {}, clear=True):
|
||||
with self.assertRaisesRegex(RuntimeError, "all five"):
|
||||
upload_signing()
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
store = Path(directory) / "upload.p12"
|
||||
store.write_bytes(b"public fixture")
|
||||
signing = {"IRONSTORAGE_UPLOAD_" + key: value for key, value in {
|
||||
"STORE_FILE": str(store), "STORE_PASSWORD": "public", "KEY_ALIAS": "fixture",
|
||||
"KEY_PASSWORD": "public", "CERT_SHA256": "0" * 64,
|
||||
}.items()}
|
||||
with patch.dict(os.environ, signing, clear=True), patch.object(subprocess, "run") as keytool:
|
||||
keytool.return_value.stdout = b"public fixture certificate"
|
||||
with self.assertRaisesRegex(RuntimeError, "independently pinned"):
|
||||
upload_signing()
|
||||
keytool.assert_called_once()
|
||||
signing["IRONSTORAGE_UPLOAD_STORE_FILE"] = str(Path(__file__).resolve())
|
||||
with patch.dict(os.environ, signing, clear=True):
|
||||
with self.assertRaisesRegex(RuntimeError, "outside the repository"):
|
||||
upload_signing()
|
||||
|
||||
def test_instrumentation_stops_harness_and_target_on_failure(self):
|
||||
calls = []
|
||||
def command(*args):
|
||||
@@ -607,7 +707,7 @@ class SelfTest(unittest.TestCase):
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("command", choices=["prepare-linux", "build", "emulator", "performance", "profiles", "test", "clean-ci"])
|
||||
parser.add_argument("command", choices=["prepare-linux", "build", "distribution", "emulator", "performance", "profiles", "test", "clean-ci"])
|
||||
parser.add_argument("serial", nargs="?")
|
||||
args = parser.parse_args()
|
||||
if args.command not in ("test", "clean-ci") and not (os.environ.get("ANDROID_HOME") or os.environ.get("ANDROID_SDK_ROOT")):
|
||||
@@ -620,6 +720,8 @@ if __name__ == "__main__":
|
||||
prepare_linux()
|
||||
elif args.command == "build":
|
||||
build()
|
||||
elif args.command == "distribution":
|
||||
distribution()
|
||||
elif args.serial:
|
||||
if args.command in ("performance", "profiles"):
|
||||
performance(args.serial, profiles=args.command == "profiles")
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Build-time license text; never reads app data or a password-store repository."""
|
||||
import json
|
||||
from pathlib import Path
|
||||
import platform
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import tarfile
|
||||
import zipfile
|
||||
|
||||
from android_ci import ROOT, CARGO, download
|
||||
|
||||
|
||||
def rust_notices(data, expected):
|
||||
covered = set()
|
||||
sections = []
|
||||
for license in data["licenses"]:
|
||||
if not license["text"].strip():
|
||||
raise RuntimeError("Empty Rust license text")
|
||||
users = []
|
||||
for used in license["used_by"]:
|
||||
crate = used["crate"]
|
||||
key = (crate["name"], crate["version"])
|
||||
covered.add(key)
|
||||
users.append(f"{key[0]} {key[1]} — {', '.join(crate['authors'])}\n"
|
||||
f"https://crates.io/crates/{key[0]}/{key[1]} (source archive)\n"
|
||||
f"{crate.get('repository') or ''}")
|
||||
sections.append(license["name"] + "\n" + "\n".join(sorted(users)) + "\n\n" + license["text"])
|
||||
if expected - covered:
|
||||
raise RuntimeError("Rust normal dependency is missing a license notice: " + repr(sorted(expected - covered)))
|
||||
return "\n\n".join(sorted(set(sections)))
|
||||
|
||||
|
||||
def android_notices(rows, policy):
|
||||
common = (ROOT / "android/licenses/Apache-2.0.txt").read_text()
|
||||
extras = {
|
||||
"androidx.camera:camera-core:1.6.2": ("Apache-2.0 AND BSD-3-Clause", ["libyuv-LICENSE.txt", "libyuv-PATENTS.txt"]),
|
||||
"net.java.dev.jna:jna:5.19.1": ("Apache-2.0 OR LGPL-2.1-or-later", ["jna-LICENSE.txt", "libffi.txt"]),
|
||||
"org.checkerframework:checker-qual:3.43.0": ("MIT", ["checker-qual.txt"]),
|
||||
"rustls:rustls-platform-verifier:0.1.1": ("MIT OR Apache-2.0", []),
|
||||
}
|
||||
sections = ["Apache License 2.0 (selected where a dual license permits it)\n\n" + common]
|
||||
for row in sorted(rows, key=lambda r: r["component"]):
|
||||
component = row["component"]
|
||||
license = policy.get(component)
|
||||
if license is None or (license != "Apache-2.0" and extras.get(component, (None,))[0] != license):
|
||||
raise RuntimeError("Android notice needs review: " + component)
|
||||
notices = []
|
||||
with zipfile.ZipFile(row["path"]) as archive:
|
||||
for name in sorted(archive.namelist()):
|
||||
if re.search(r"(?i)(?:^|/)(?:licen[cs]e|notice|copying|copyright|al2\.0)(?:[._-].*)?$", name):
|
||||
entry = archive.getinfo(name)
|
||||
if entry.is_dir() or entry.file_size > 1024 * 1024:
|
||||
raise RuntimeError("Unexpected Android notice archive entry")
|
||||
notices.append(archive.read(name).decode("utf-8"))
|
||||
for name in extras.get(component, (None, []))[1]:
|
||||
notices.append((ROOT / "android/licenses" / name).read_text())
|
||||
sections.append(component + "\nLicense: " + license + "\n\n" + "\n\n".join(sorted(set(notices))))
|
||||
return "\n\n".join(dict.fromkeys(sections))
|
||||
|
||||
|
||||
def generate(inventory, output):
|
||||
if platform.machine() not in ("arm64", "aarch64"):
|
||||
raise RuntimeError("License tools require the supported native ARM build host")
|
||||
scratch = ROOT / "android/build/license-tools"
|
||||
scratch.mkdir(parents=True, exist_ok=True)
|
||||
archive_path = scratch / "cargo-about.tar.gz"
|
||||
spec = json.loads((ROOT / "android/license-tool.json").read_text())[platform.system()]
|
||||
download(spec, archive_path)
|
||||
with tarfile.open(archive_path) as archive:
|
||||
members = [m for m in archive.getmembers() if Path(m.name).name == "cargo-about" and m.isfile()]
|
||||
if len(members) != 1 or members[0].size > 100 * 1024 * 1024:
|
||||
raise RuntimeError("Unexpected cargo-about package")
|
||||
binary = scratch / "cargo-about"
|
||||
binary.write_bytes(archive.extractfile(members[0]).read())
|
||||
binary.chmod(0o755)
|
||||
data = json.loads(subprocess.check_output([str(binary), "generate", "--locked", "--fail", "--manifest-path",
|
||||
str(ROOT / "crates/android/Cargo.toml"), "--config",
|
||||
str(ROOT / "android/about.toml"), "--format", "json"]))
|
||||
expected = set()
|
||||
workspace = json.loads(subprocess.check_output([CARGO, "metadata", "--locked", "--no-deps", "--format-version", "1"]))
|
||||
local_names = {package["name"] for package in workspace["packages"] if package["source"] is None}
|
||||
for triple in ("aarch64-linux-android", "armv7-linux-androideabi"):
|
||||
tree = subprocess.check_output([CARGO, "tree", "--locked", "-p", "ironstorage-android", "--target", triple,
|
||||
"--edges", "normal", "--prefix", "none", "--format", "{p}"], text=True)
|
||||
for line in tree.splitlines():
|
||||
match = re.match(r"([^ ]+) v([^ ]+)", line)
|
||||
if match and match[1] not in local_names:
|
||||
expected.add((match[1], match[2]))
|
||||
rows = json.loads(inventory.read_text())
|
||||
if not rows:
|
||||
raise RuntimeError("Android release notice inventory is empty")
|
||||
text = "IronStorage — Third-party notices\n\nAndroid release libraries\n\n"
|
||||
text += android_notices(rows, json.loads((ROOT / "android/dependency-policy.json").read_text())["android"])
|
||||
text += "\n\nRust ARM libraries\n\n" + rust_notices(data, expected)
|
||||
output.parent.mkdir(parents=True, exist_ok=True)
|
||||
output.write_text(text, encoding="utf-8")
|
||||
print(f"Packaged full notices for {len({r['component'] for r in rows})} Android and {len(expected)} Rust components")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
generate(Path(sys.argv[1]), Path(sys.argv[2]))
|
||||
@@ -11,3 +11,4 @@
|
||||
/android/.idea/
|
||||
*.jks
|
||||
*.keystore
|
||||
/.gitea/scripts/__pycache__/
|
||||
@@ -70,17 +70,21 @@ only the facade, including typed native recovery states.
|
||||
## Identity, signing and update
|
||||
|
||||
All app build types keep de.rfc1437.ironstorage; test IDs are derived by AGP.
|
||||
Version code 1 and name 1.0.1 are deterministic initial metadata. Debug signing
|
||||
uses the standard local debug key. Release has no configured signing key and
|
||||
produces an unsigned APK; #112 configures protected upload signing. Do not add
|
||||
`release.properties` supplies Android version code 2 and name 1.0.1. Debug signing
|
||||
uses the standard local debug key. Ordinary release verification produces an
|
||||
unsigned APK/AAB. The separate [distribution command](../docs/android/distribution.md)
|
||||
signs the audited AAB with an external, certificate-pinned upload key after the
|
||||
build; signing passwords are excluded from Gradle and Cargo child processes. Do not add
|
||||
signing secrets or store passwords to the repository. Native symbol level FULL
|
||||
and the selected two ARM ABIs are packaged. Native runtime packaging is described
|
||||
below; no development network endpoint is included.
|
||||
|
||||
The manifest exports the launcher and the reviewed AndroidX profile receiver
|
||||
protected by the privileged DUMP permission. Backup/cloud/device-transfer
|
||||
The manifest exports the launcher, the system-permission-protected Autofill and
|
||||
Credential Manager services, and the reviewed AndroidX profile receiver
|
||||
protected by the privileged DUMP permission. The credential picker is private.
|
||||
Backup/cloud/device-transfer
|
||||
exclusions and cleartext denial are explicit. Feature-specific services/permissions
|
||||
are added with their owning issues. Resources use values directories for future
|
||||
are audited by the artifact gates. Resources use values directories for future
|
||||
localization; vector/adaptive/monochrome icons and R8 consumer rules are present.
|
||||
The launcher uses an unchanged copy of the iPhone vault artwork from
|
||||
apple/Assets.xcassets/AppIcon.appiconset/AppIcon.png, inset for Android's adaptive
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
accepted = ["Apache-2.0", "MIT", "ISC", "BSD-3-Clause", "BSD-2-Clause", "MPL-2.0", "Unicode-3.0", "Zlib", "CC0-1.0", "Unlicense", "MIT-0", "CDLA-Permissive-2.0"]
|
||||
targets = ["aarch64-linux-android", "armv7-linux-androideabi"]
|
||||
ignore-build-dependencies = true
|
||||
ignore-dev-dependencies = true
|
||||
workarounds = ["ring", "rustls"]
|
||||
@@ -1,3 +1,6 @@
|
||||
import groovy.json.JsonOutput
|
||||
import java.util.Properties
|
||||
import org.gradle.api.artifacts.component.ModuleComponentIdentifier
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
@@ -7,6 +10,40 @@ plugins {
|
||||
alias(libs.plugins.ksp)
|
||||
}
|
||||
|
||||
val releaseVersion = Properties().apply {
|
||||
rootProject.file("release.properties").inputStream().use(::load)
|
||||
}
|
||||
|
||||
val generateThirdPartyNotices = tasks.register<Exec>("generateThirdPartyNotices") {
|
||||
val inventory = layout.buildDirectory.file("reports/license-artifacts.json")
|
||||
val output = layout.buildDirectory.file("generated/notices/assets/third-party-notices.txt")
|
||||
outputs.file(output)
|
||||
outputs.upToDateWhen { false }
|
||||
workingDir = rootProject.projectDir.parentFile
|
||||
doFirst {
|
||||
val rows = configurations.getByName("releaseRuntimeClasspath").incoming.artifactView {
|
||||
componentFilter { it is ModuleComponentIdentifier }
|
||||
}.artifacts.artifacts.map { artifact ->
|
||||
val id = artifact.id.componentIdentifier as ModuleComponentIdentifier
|
||||
mapOf(
|
||||
"component" to "${id.group}:${id.module}:${id.version}",
|
||||
"path" to artifact.file.absolutePath
|
||||
)
|
||||
}
|
||||
inventory.get().asFile.apply {
|
||||
parentFile.mkdirs()
|
||||
writeText(JsonOutput.toJson(rows))
|
||||
}
|
||||
commandLine(
|
||||
"python3",
|
||||
".gitea/scripts/android_notices.py",
|
||||
inventory.get().asFile,
|
||||
output.get().asFile
|
||||
)
|
||||
}
|
||||
notCompatibleWithConfigurationCache("Resolves release license files under the project lock")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "de.rfc1437.ironstorage"
|
||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||
@@ -15,8 +52,8 @@ android {
|
||||
minSdk = libs.versions.minSdk.get().toInt()
|
||||
applicationId = "de.rfc1437.ironstorage"
|
||||
targetSdk = libs.versions.compileSdk.get().toInt()
|
||||
versionCode = 1
|
||||
versionName = "1.0.1"
|
||||
versionCode = releaseVersion.getProperty("versionCode").toInt()
|
||||
versionName = releaseVersion.getProperty("versionName")
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
ndk { abiFilters += listOf("arm64-v8a", "armeabi-v7a") }
|
||||
}
|
||||
@@ -25,6 +62,9 @@ android {
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
buildFeatures { compose = true }
|
||||
sourceSets.getByName(
|
||||
"main"
|
||||
).assets.srcDir(layout.buildDirectory.dir("generated/notices/assets").get().asFile)
|
||||
buildTypes {
|
||||
debug { isDebuggable = true }
|
||||
release {
|
||||
@@ -61,6 +101,8 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("preBuild") { dependsOn(generateThirdPartyNotices) }
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(25)
|
||||
compilerOptions {
|
||||
|
||||
@@ -73,8 +73,8 @@ class AuthenticationLeaseTest {
|
||||
}
|
||||
val scope = CoroutineScope(SupervisorJob() + Dispatchers.Main.immediate)
|
||||
val shell = NativeFixtureShellRepository(session, scope)
|
||||
val setup = NativeOnboardingRepository(session, scope, shell)
|
||||
val authentication = NativeAuthenticationRepository(session, scope, Dispatchers.IO)
|
||||
val setup = NativeOnboardingRepository(session, scope, shell, authentication)
|
||||
val password = "public-test-passphrase"
|
||||
suspend fun settled() = withTimeout(180000) {
|
||||
authentication.state.first { !it.busy }
|
||||
|
||||
@@ -22,12 +22,16 @@ import androidx.compose.ui.test.assertIsDisplayed
|
||||
import androidx.compose.ui.test.hasSetTextAction
|
||||
import androidx.compose.ui.test.junit4.accessibility.enableAccessibilityChecks
|
||||
import androidx.compose.ui.test.junit4.v2.createAndroidComposeRule
|
||||
import androidx.compose.ui.test.onNodeWithTag
|
||||
import androidx.compose.ui.test.onNodeWithText
|
||||
import androidx.compose.ui.test.performClick
|
||||
import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import de.rfc1437.ironstorage.core.ShellState
|
||||
import de.rfc1437.ironstorage.features.ProtectedContent
|
||||
import de.rfc1437.ironstorage.features.SetupFormViewModel
|
||||
import de.rfc1437.ironstorage.features.ShellViewModel
|
||||
import de.rfc1437.ironstorage.platform.AndroidSecretClipboard
|
||||
import java.util.concurrent.CountDownLatch
|
||||
import java.util.concurrent.TimeUnit
|
||||
@@ -50,6 +54,69 @@ class PresentationSecurityTest {
|
||||
compose.enableAccessibilityChecks()
|
||||
}
|
||||
|
||||
@Test fun leavingProtectedDestinationsRevealsTheCleanForeground() {
|
||||
val viewModel = ViewModelProvider(compose.activity)[ShellViewModel::class.java]
|
||||
compose.waitUntil(10000) {
|
||||
!viewModel.onboarding.setup.value.busy &&
|
||||
viewModel.snapshot.value.state != ShellState.Loading
|
||||
}
|
||||
assumeTrue(
|
||||
"Requires a store created through the retained emulator's normal setup UI",
|
||||
viewModel.onboarding.setup.value.configured ||
|
||||
viewModel.snapshot.value.state in listOf(ShellState.Ready, ShellState.Locked)
|
||||
)
|
||||
for (tab in listOf("Home", "Passwords", "Totp", "Home", "Passwords", "Preferences")) {
|
||||
compose.onNodeWithTag("shell-tab-$tab").performClick()
|
||||
if (tab == "Passwords") compose.onNodeWithText("New entry").assertIsDisplayed()
|
||||
compose.waitForIdle()
|
||||
compose.runOnIdle {
|
||||
assertTrue(compose.activity.window.decorView.hasWindowFocus())
|
||||
assertFalse(
|
||||
"$tab must not remain behind the protective cover",
|
||||
compose.activity.window.decorView.importantForAccessibility ==
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun stoppedProtectedDestinationsStayCoveredUntilResumed() {
|
||||
val viewModel = ViewModelProvider(compose.activity)[ShellViewModel::class.java]
|
||||
compose.waitUntil(10000) {
|
||||
!viewModel.onboarding.setup.value.busy &&
|
||||
viewModel.snapshot.value.state != ShellState.Loading
|
||||
}
|
||||
assumeTrue(
|
||||
"Requires a store created through the retained emulator's normal setup UI",
|
||||
viewModel.onboarding.setup.value.configured ||
|
||||
viewModel.snapshot.value.state in listOf(ShellState.Ready, ShellState.Locked)
|
||||
)
|
||||
for (tab in listOf("Passwords", "Totp")) {
|
||||
compose.onNodeWithTag("shell-tab-$tab").performClick()
|
||||
if (tab == "Passwords") compose.onNodeWithText("New entry").assertIsDisplayed()
|
||||
val presentation = compose.activity.authentication.presentation
|
||||
val generation = presentation.generation.value
|
||||
compose.activityRule.scenario.moveToState(Lifecycle.State.CREATED)
|
||||
compose.activityRule.scenario.onActivity {
|
||||
assertTrue(presentation.generation.value > generation)
|
||||
assertEquals(
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS,
|
||||
it.window.decorView.importantForAccessibility
|
||||
)
|
||||
}
|
||||
compose.activityRule.scenario.moveToState(Lifecycle.State.RESUMED)
|
||||
compose.waitForIdle()
|
||||
compose.runOnIdle {
|
||||
assertTrue(compose.activity.window.decorView.hasWindowFocus())
|
||||
assertFalse(
|
||||
"$tab must reveal its cleaned surface after resume",
|
||||
compose.activity.window.decorView.importantForAccessibility ==
|
||||
View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun foregroundCleanupUnmasksOnlyAfterTheCleanGenerationIsComposed() {
|
||||
val presentation = de.rfc1437.ironstorage.core.ProtectedPresentation()
|
||||
val dirty = mutableStateOf(true)
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.os.Bundle
|
||||
import android.os.Parcel
|
||||
import androidx.compose.runtime.CompositionLocalProvider
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
import androidx.compose.ui.test.assert
|
||||
import androidx.compose.ui.test.assertHeightIsAtLeast
|
||||
import androidx.compose.ui.test.assertIsDisplayed
|
||||
import androidx.compose.ui.test.assertIsEnabled
|
||||
@@ -22,6 +23,7 @@ import androidx.compose.ui.test.performScrollToNode
|
||||
import androidx.compose.ui.test.performTextReplacement
|
||||
import androidx.compose.ui.unit.Density
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import de.rfc1437.ironstorage.core.AuthenticationRepository
|
||||
@@ -55,6 +57,44 @@ class SettingsScreenTest {
|
||||
compose.enableAccessibilityChecks()
|
||||
}
|
||||
|
||||
@Test fun publicDocumentsRetainTheRealActivityFocusOwnership() {
|
||||
val authentication = ViewModelProvider(
|
||||
compose.activity
|
||||
)[ShellViewModel::class.java].authentication
|
||||
compose.onNodeWithTag("shell-tab-Preferences").performClick()
|
||||
compose.onNodeWithTag("settings-search").performTextReplacement("privacy")
|
||||
for ((button, content) in listOf(
|
||||
"Privacy policy" to "IronStorage for Android",
|
||||
"Third-party notices" to "IronStorage — Third-party notices"
|
||||
)) {
|
||||
val generation = authentication.presentation.generation.value
|
||||
compose.onNodeWithTag("settings-list").performScrollToNode(hasText(button))
|
||||
compose.onNodeWithText(button).performClick()
|
||||
compose.waitUntil(5000) {
|
||||
compose.onAllNodes(
|
||||
hasText(content, substring = true)
|
||||
).fetchSemanticsNodes().isNotEmpty()
|
||||
}
|
||||
compose.runOnIdle {
|
||||
assertTrue(authentication.presentation.hasOwnedWindow)
|
||||
assertEquals(generation, authentication.presentation.generation.value)
|
||||
}
|
||||
compose.onNodeWithText("Done").performClick()
|
||||
compose.runOnIdle { assertFalse(authentication.presentation.hasOwnedWindow) }
|
||||
compose.onNodeWithTag("settings-search").assertTextContains("privacy")
|
||||
}
|
||||
compose.onNodeWithTag("settings-list").performScrollToNode(hasText("Privacy policy"))
|
||||
compose.onNodeWithText("Privacy policy").performClick()
|
||||
val generation = authentication.presentation.generation.value
|
||||
compose.activityRule.scenario.moveToState(Lifecycle.State.STARTED)
|
||||
compose.activityRule.scenario.moveToState(Lifecycle.State.RESUMED)
|
||||
compose.runOnIdle {
|
||||
assertTrue(authentication.presentation.generation.value > generation)
|
||||
assertFalse(authentication.presentation.hasOwnedWindow)
|
||||
}
|
||||
compose.onNodeWithTag("settings-search").assert(hasText("privacy").not())
|
||||
}
|
||||
|
||||
@Test fun searchableSettingsKeepEditsAndUseExplicitSecretAndProviderActionsAtLargeFont() {
|
||||
val original = ViewModelProvider(compose.activity)[ShellViewModel::class.java]
|
||||
val setup = ViewModelProvider(compose.activity)[SetupFormViewModel::class.java]
|
||||
@@ -125,8 +165,28 @@ class SettingsScreenTest {
|
||||
)[0].assertIsDisplayed()
|
||||
assertFalse(repository.state.value.page!!.autofill.enabled)
|
||||
search("privacy")
|
||||
button("Privacy policy")
|
||||
compose.waitUntil(5000) {
|
||||
compose.onAllNodes(
|
||||
hasText("IronStorage for Android", substring = true)
|
||||
).fetchSemanticsNodes().isNotEmpty()
|
||||
}
|
||||
compose.onNodeWithText("IronStorage for Android", substring = true)
|
||||
.assertTextContains(
|
||||
"Android cloud backup and device-transfer backup are disabled",
|
||||
substring = true
|
||||
)
|
||||
compose.onNodeWithText("Done").performClick()
|
||||
button("MIT license")
|
||||
compose.onNodeWithText("Done").assertIsDisplayed().performClick()
|
||||
button("Third-party notices")
|
||||
compose.waitUntil(5000) {
|
||||
compose.onAllNodes(
|
||||
hasText("IronStorage — Third-party notices")
|
||||
).fetchSemanticsNodes().isNotEmpty()
|
||||
}
|
||||
compose.onNodeWithText("Android release libraries").assertIsDisplayed()
|
||||
compose.onNodeWithText("Done").performClick()
|
||||
assertTrue(repository.reloads > 0)
|
||||
search("GPG")
|
||||
button("Import or export GPG QR codes")
|
||||
|
||||
@@ -161,11 +161,13 @@ object ShellModule {
|
||||
@Singleton
|
||||
fun onboardingRepository(
|
||||
session: NativePrivateSession,
|
||||
shell: ShellRepository
|
||||
shell: ShellRepository,
|
||||
authentication: AuthenticationRepository
|
||||
): OnboardingRepository = NativeOnboardingRepository(
|
||||
session,
|
||||
CoroutineScope(SupervisorJob() + Dispatchers.Main.immediate),
|
||||
shell
|
||||
shell,
|
||||
authentication
|
||||
)
|
||||
|
||||
@Provides
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"url": "https://github.com/google/bundletool/releases/download/1.18.3/bundletool-all-1.18.3.jar",
|
||||
"sha256": "a099cfa1543f55593bc2ed16a70a7c67fe54b1747bb7301f37fdfd6d91028e29"
|
||||
}
|
||||
@@ -63,11 +63,33 @@ class NativeEntryViewerTest {
|
||||
assertNotNull(page.sections)
|
||||
}
|
||||
try {
|
||||
withContext(Dispatchers.IO) {
|
||||
val setup = session.storage().androidOnboarding(session.backend())
|
||||
val key = setup.generate("Viewer fixture", password).selectedKey
|
||||
setup.setupLocal(requireNotNull(key), password)
|
||||
withContext(Dispatchers.Main.immediate) { authentication.reload() }
|
||||
withTimeout(30000) {
|
||||
authentication.state.first {
|
||||
!it.busy && it.failure?.kind == AuthenticationFailureKind.Configuration
|
||||
}
|
||||
}
|
||||
val setup = NativeOnboardingRepository(
|
||||
session,
|
||||
scope,
|
||||
NativeFixtureShellRepository(session, scope),
|
||||
authentication
|
||||
)
|
||||
withTimeout(30000) { setup.setup.first { !it.busy } }
|
||||
withContext(Dispatchers.Main.immediate) {
|
||||
setup.generate("Viewer fixture", password)
|
||||
}
|
||||
val generated = withTimeout(30000) {
|
||||
setup.setup.first { !it.busy && it.keys.isNotEmpty() }
|
||||
}
|
||||
withContext(Dispatchers.Main.immediate) {
|
||||
setup.createLocal(generated.selectedKey, password)
|
||||
}
|
||||
withTimeout(30000) { setup.setup.first { !it.busy && it.configured } }
|
||||
withTimeout(30000) {
|
||||
authentication.state.first { !it.busy && it.failure == null }
|
||||
}
|
||||
assertFalse(authentication.state.value.unlocked)
|
||||
repeat(12) {
|
||||
coroutineScope {
|
||||
val onboarding = async(Dispatchers.IO) {
|
||||
|
||||
@@ -14,6 +14,7 @@ import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.first
|
||||
import kotlinx.coroutines.flow.update
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
@@ -21,7 +22,8 @@ import kotlinx.coroutines.withContext
|
||||
class NativeOnboardingRepository(
|
||||
private val session: NativePrivateSession,
|
||||
private val scope: CoroutineScope,
|
||||
private val shell: ShellRepository
|
||||
private val shell: ShellRepository,
|
||||
private val authentication: AuthenticationRepository
|
||||
) : OnboardingRepository {
|
||||
private val mutableSetup = MutableStateFlow(SetupStatus())
|
||||
override val setup: StateFlow<SetupStatus> = mutableSetup
|
||||
@@ -152,6 +154,10 @@ class NativeOnboardingRepository(
|
||||
}
|
||||
remote?.close()
|
||||
remote = null
|
||||
scope.launch {
|
||||
authentication.state.first { !it.busy }
|
||||
authentication.reload()
|
||||
}
|
||||
shell.refresh()
|
||||
}
|
||||
private fun updateStatus(status: MobileAndroidSetupStatus) {
|
||||
|
||||
@@ -54,6 +54,7 @@ import androidx.compose.ui.semantics.stateDescription
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.compose.LifecycleEventEffect
|
||||
import androidx.lifecycle.compose.LocalLifecycleOwner
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import de.rfc1437.ironstorage.core.AuthenticationFailureKind
|
||||
import de.rfc1437.ironstorage.core.AuthenticationRepository
|
||||
@@ -101,7 +102,11 @@ fun PasswordScreen(
|
||||
entry?.id
|
||||
)
|
||||
}
|
||||
LifecycleEventEffect(Lifecycle.Event.ON_STOP) {
|
||||
// Navigation disposal must not revoke again while cleanup rebuilds the protected root.
|
||||
LifecycleEventEffect(
|
||||
Lifecycle.Event.ON_STOP,
|
||||
lifecycleOwner = LocalProtectedLifecycleOwner.current ?: LocalLifecycleOwner.current
|
||||
) {
|
||||
manual = false
|
||||
requested = false
|
||||
repository.leave()
|
||||
|
||||
@@ -22,11 +22,13 @@ import androidx.compose.ui.platform.InterceptPlatformTextInput
|
||||
import androidx.compose.ui.platform.LocalView
|
||||
import androidx.compose.ui.platform.PlatformTextInputMethodRequest
|
||||
import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.compose.LocalLifecycleOwner
|
||||
import de.rfc1437.ironstorage.core.ProtectedPresentation
|
||||
|
||||
private val LocalProtectedPresentation = staticCompositionLocalOf<ProtectedPresentation?> { null }
|
||||
private val LocalProtectedRoot = staticCompositionLocalOf<View?> { null }
|
||||
internal val LocalProtectedLifecycleOwner = staticCompositionLocalOf<LifecycleOwner?> { null }
|
||||
|
||||
/** Register before showing a dialog/popup so its focus transfer does not lock the activity. */
|
||||
@Composable
|
||||
@@ -46,7 +48,8 @@ fun ProtectedContent(presentation: ProtectedPresentation, content: @Composable (
|
||||
val focused = remember(view) { mutableStateOf(view.hasWindowFocus()) }
|
||||
// Read here so cleanup also reruns the parent surface's reveal effect.
|
||||
val generation = presentation.generation.collectAsState().value
|
||||
val lifecycle by LocalLifecycleOwner.current.lifecycle.currentStateFlow.collectAsState()
|
||||
val lifecycleOwner = LocalLifecycleOwner.current
|
||||
val lifecycle by lifecycleOwner.lifecycle.currentStateFlow.collectAsState()
|
||||
DisposableEffect(presentation, view) {
|
||||
val registration = presentation.register(surface::cover)
|
||||
val focus = ViewTreeObserver.OnWindowFocusChangeListener { focused.value = it }
|
||||
@@ -71,7 +74,8 @@ fun ProtectedContent(presentation: ProtectedPresentation, content: @Composable (
|
||||
}) {
|
||||
CompositionLocalProvider(
|
||||
LocalProtectedPresentation provides presentation,
|
||||
LocalProtectedRoot provides view
|
||||
LocalProtectedRoot provides view,
|
||||
LocalProtectedLifecycleOwner provides lifecycleOwner
|
||||
) {
|
||||
key(generation) { content() }
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.heightIn
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.items
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.selection.selectable
|
||||
import androidx.compose.foundation.selection.toggleable
|
||||
@@ -35,6 +36,7 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.geometry.Offset
|
||||
import androidx.compose.ui.geometry.Size
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.LocalResources
|
||||
import androidx.compose.ui.platform.LocalUriHandler
|
||||
import androidx.compose.ui.platform.testTag
|
||||
@@ -81,7 +83,8 @@ fun SettingsScreen(
|
||||
var query by remember { mutableStateOf("") }
|
||||
var edit by remember { mutableStateOf<String?>(null) }
|
||||
var showSetup by remember { mutableStateOf(false) }
|
||||
var licenses by remember { mutableStateOf(false) }
|
||||
var document by remember { mutableStateOf<Int?>(null) }
|
||||
var showNotices by remember { mutableStateOf(false) }
|
||||
val uri = LocalUriHandler.current
|
||||
val setupState by onboarding.setup.collectAsStateWithLifecycle()
|
||||
LaunchedEffect(setupState.busy, setupState.connected, setupState.selectedKey) {
|
||||
@@ -261,16 +264,16 @@ fun SettingsScreen(
|
||||
}
|
||||
Text(stringResource(R.string.settings_privacy))
|
||||
TextButton(onClick = {
|
||||
licenses = true
|
||||
document = R.raw.privacy
|
||||
}) { Text(stringResource(R.string.settings_privacy_policy)) }
|
||||
TextButton(onClick = {
|
||||
document = R.raw.license
|
||||
}) { Text(stringResource(R.string.settings_licenses)) }
|
||||
TextButton(onClick = {
|
||||
uri.openUri("https://git.rfc1437.de/hugo/IronStorage/issues")
|
||||
}) { Text(stringResource(R.string.settings_support)) }
|
||||
TextButton(onClick = {
|
||||
uri.openUri(
|
||||
"https://git.rfc1437.de/hugo/IronStorage/" +
|
||||
"src/branch/main/android/dependency-policy.json"
|
||||
)
|
||||
showNotices = true
|
||||
}) {
|
||||
Text(stringResource(R.string.settings_dependency_licenses))
|
||||
}
|
||||
@@ -300,23 +303,69 @@ fun SettingsScreen(
|
||||
}
|
||||
}
|
||||
if (state.transfer.open && !showSetup) KeyTransferDialog(repository, authentication)
|
||||
if (licenses) {
|
||||
if (showNotices) {
|
||||
ProtectedWindow()
|
||||
val context = LocalContext.current
|
||||
val loading = stringResource(R.string.settings_license_loading)
|
||||
val paragraphs by produceState(listOf(loading), context) {
|
||||
value = withContext(Dispatchers.IO) {
|
||||
context.assets.open("third-party-notices.txt").bufferedReader().use {
|
||||
it.readText().split("\n\n")
|
||||
}
|
||||
}
|
||||
}
|
||||
HingeSafeAlertDialog(
|
||||
onDismissRequest = { showNotices = false },
|
||||
title = { Text(stringResource(R.string.settings_dependency_licenses)) },
|
||||
text = {
|
||||
ProtectedInputSurface(authentication.presentation)
|
||||
LazyColumn(
|
||||
Modifier.fillMaxWidth().heightIn(max = 360.dp),
|
||||
verticalArrangement = Arrangement.spacedBy(8.dp)
|
||||
) {
|
||||
items(paragraphs) { Text(it) }
|
||||
}
|
||||
},
|
||||
confirmButton = {
|
||||
TextButton(onClick = {
|
||||
showNotices = false
|
||||
}) { Text(stringResource(R.string.settings_done)) }
|
||||
}
|
||||
)
|
||||
}
|
||||
document?.let { resource ->
|
||||
ProtectedWindow()
|
||||
val resources = LocalResources.current
|
||||
val loading = stringResource(R.string.settings_license_loading)
|
||||
val text by produceState(loading, resources) {
|
||||
val text by produceState(loading, resources, resource) {
|
||||
value = withContext(Dispatchers.IO) {
|
||||
resources.openRawResource(R.raw.license).bufferedReader().use { it.readText() }
|
||||
resources.openRawResource(resource).bufferedReader().use { it.readText() }
|
||||
}
|
||||
}
|
||||
HingeSafeAlertDialog(
|
||||
onDismissRequest = {
|
||||
licenses = false
|
||||
document = null
|
||||
},
|
||||
title = {
|
||||
Text(
|
||||
stringResource(
|
||||
if (resource ==
|
||||
R.raw.privacy
|
||||
) {
|
||||
R.string.settings_privacy_policy
|
||||
} else {
|
||||
R.string.settings_licenses
|
||||
}
|
||||
)
|
||||
)
|
||||
},
|
||||
text = {
|
||||
ProtectedInputSurface(authentication.presentation)
|
||||
Text(text, modifier = Modifier.verticalScroll(rememberScrollState()))
|
||||
},
|
||||
title = { Text(stringResource(R.string.settings_licenses)) },
|
||||
text = { Text(text, modifier = Modifier.verticalScroll(rememberScrollState())) },
|
||||
confirmButton = {
|
||||
TextButton(onClick = {
|
||||
licenses = false
|
||||
document = null
|
||||
}) { Text(stringResource(R.string.settings_done)) }
|
||||
}
|
||||
)
|
||||
|
||||
@@ -35,6 +35,7 @@ import androidx.compose.ui.semantics.semantics
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.compose.LifecycleEventEffect
|
||||
import androidx.lifecycle.compose.LocalLifecycleOwner
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import de.rfc1437.ironstorage.core.AuthenticationFailureKind
|
||||
import de.rfc1437.ironstorage.core.AuthenticationRepository
|
||||
@@ -50,7 +51,10 @@ fun TotpScreen(repository: TotpRepository, authentication: AuthenticationReposit
|
||||
var manual by remember { mutableStateOf(false) }
|
||||
var discovery by remember { mutableStateOf(false) }
|
||||
var requested by remember { mutableStateOf(false) }
|
||||
LifecycleEventEffect(Lifecycle.Event.ON_STOP) { repository.leave() }
|
||||
LifecycleEventEffect(
|
||||
Lifecycle.Event.ON_STOP,
|
||||
lifecycleOwner = LocalProtectedLifecycleOwner.current ?: LocalLifecycleOwner.current
|
||||
) { repository.leave() }
|
||||
BackHandler(state.detail) { repository.back() }
|
||||
androidx.compose.runtime.LaunchedEffect(lease.failure, state.loading, entry.loading) {
|
||||
if (requested && !state.loading && !entry.loading && !lease.busy) {
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
IronStorage for Android — Privacy policy
|
||||
Updated 15 October 2026
|
||||
|
||||
IronStorage does not operate a password-storage service. The developer receives no passwords, keys, analytics, advertising identifiers, app inventory or crash reports from the app. There are no advertising or analytics SDKs.
|
||||
|
||||
On your device
|
||||
Your password-store repository, settings, imported/generated GPG key material and the TOTP discovery cache remain in the app's private, backup-excluded storage. Password entries use the upstream pass GPG format. The discovery cache records entry paths and ciphertext fingerprints so that unchanged entries can be found while locked; it does not store passwords or OTP seeds in plaintext. Passphrase-protected private GPG keys require their passphrase. Optional saved passphrases and HTTPS credentials are encrypted using Android Keystore keys. Biometric templates remain with Android; IronStorage receives only the authentication result and authorized cryptographic operation.
|
||||
|
||||
Optional network access
|
||||
Local-first use needs no server or IronStorage account. When you configure HTTPS Git synchronization, IronStorage contacts your selected Git server. The server receives the encrypted Git repository plus its unencrypted Git metadata (including entry paths and configured commit name/email), network address and the authentication credentials needed by that server. The server administrator controls retention and access. The developer receives none of this traffic unless you independently choose a server operated by the developer. TLS protects the connection; GPG protects entry contents for their configured recipients. Git metadata and HTTPS authentication are not end-to-end encrypted by GPG.
|
||||
|
||||
Camera and QR transfer
|
||||
Camera permission is requested only when you choose Scan QR. Frames are processed on the device and are not retained or uploaded. QR export can contain private keys when you explicitly select that option and confirm the warning. Anyone who photographs the displayed code may obtain its contents. Import/export does not send QR payloads to the developer.
|
||||
|
||||
Autofill, Credential Manager and clipboard
|
||||
Provider use is optional and must be enabled in Android settings. IronStorage verifies the requesting app's package identity and signing certificate locally. Broad package visibility supports this verification; it is not used to inventory apps, advertise or track you. Selected credentials are returned only through the Android provider request after the app's confirmation/authentication flow. Copy actions place the chosen value on the system clipboard; other apps or keyboards may have access under Android's rules. IronStorage marks sensitive clipboard content and schedules clearing it.
|
||||
|
||||
Deletion, uninstall and backup
|
||||
Android cloud backup and device-transfer backup are disabled for IronStorage. Uninstalling or clearing app storage removes the local repository, keys, settings and cache and makes the app's Keystore-protected records unavailable. Reinstalling does not restore them. Preserve an independent compatible password-store repository and the GPG private keys/passphrases you need before uninstalling. Data already pushed to a Git server remains there until removed under that server's policy. Removing a local entry does not rewrite older Git history. No developer-side account or deletion request is needed because IronStorage creates no such account or database.
|
||||
|
||||
Support
|
||||
https://git.rfc1437.de/hugo/IronStorage/issues
|
||||
Support submissions are voluntary and public. Do not include passwords, tokens, private keys, private repository URLs or identifying diagnostics. Linked websites and your configured Git host have their own privacy policies.
|
||||
@@ -183,8 +183,9 @@
|
||||
<string name="settings_version">IronStorage %1$s</string>
|
||||
<string name="settings_privacy">Passwords and private keys stay in protected app storage. No analytics or advertising are included. HTTPS synchronization connects only to the configured server. Secrets are hidden from screenshots, saved form state, logs and personalized keyboard learning.</string>
|
||||
<string name="settings_licenses">MIT license</string>
|
||||
<string name="settings_privacy_policy">Privacy policy</string>
|
||||
<string name="settings_support">Support and issue tracker</string>
|
||||
<string name="settings_dependency_licenses">Dependency license inventory</string>
|
||||
<string name="settings_dependency_licenses">Third-party notices</string>
|
||||
<string name="settings_done">Done</string>
|
||||
<string name="settings_provider_unsupported">Not supported on this Android version or device</string>
|
||||
<string name="settings_provider_not_installed">The IronStorage provider service is not included in this build</string>
|
||||
@@ -223,7 +224,7 @@
|
||||
<item quantity="one">%1$d result</item>
|
||||
<item quantity="other">%1$d results</item>
|
||||
</plurals>
|
||||
<string name="settings_license_loading">Loading license…</string>
|
||||
<string name="settings_license_loading">Loading document…</string>
|
||||
<string name="qr_scan">Scan GPG QR codes</string>
|
||||
<string name="qr_pause">Pause camera</string>
|
||||
<string name="qr_resume">Resume camera</string>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"Darwin": {
|
||||
"url": "https://github.com/EmbarkStudios/cargo-about/releases/download/0.9.2/cargo-about-0.9.2-aarch64-apple-darwin.tar.gz",
|
||||
"sha256": "ae72f0df0c399a1e96336f696fa55b1b28679fd725632eba8cf8e4568467cc3e"
|
||||
},
|
||||
"Linux": {
|
||||
"url": "https://github.com/EmbarkStudios/cargo-about/releases/download/0.9.2/cargo-about-0.9.2-aarch64-unknown-linux-musl.tar.gz",
|
||||
"sha256": "af5169282fb6f84e13471493f405437e43ac517744c9ae12fbe2cdf0a6f0e5a8"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,35 @@
|
||||
# Android supplemental license notices
|
||||
|
||||
The build extracts notices already present in resolved release AAR/JARs and
|
||||
uses `cargo-about` 0.9.2 for complete Rust license text and attribution. That
|
||||
build-only tool is pinned by official release SHA-256 for native macOS/Linux
|
||||
ARM64 hosts in `license-tool.json`. The ordinary dependency-policy/SBOM gate
|
||||
still requires review of exact dependency versions and license expressions.
|
||||
The generator checks notice coverage against both ARM normal Cargo graphs.
|
||||
It renders names, versions, public authors, source-archive URLs and license
|
||||
text, excluding Cargo metadata paths and private checkout locations.
|
||||
|
||||
These additional files cover license material not fully included in the
|
||||
published Android binary artifacts. `android_notices.py` binds the exceptions
|
||||
to exact component versions/expressions; a changed exception needs review.
|
||||
|
||||
- `Apache-2.0.txt`: https://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
- `checker-qual.txt`: Checker Framework 3.43.0,
|
||||
https://github.com/typetools/checker-framework/blob/checker-framework-3.43.0/checker-qual/LICENSE.txt
|
||||
(release ref `842c4d0080063ff37dc622398e8740731d96e801`).
|
||||
- `jna-LICENSE.txt`: JNA 5.19.1,
|
||||
https://github.com/java-native-access/jna/blob/5.19.1/LICENSE.
|
||||
This distribution selects Apache-2.0 from JNA's offered dual license.
|
||||
- `libffi.txt`: native libffi bundled by JNA 5.19.1,
|
||||
https://github.com/java-native-access/jna/blob/5.19.1/native/libffi/LICENSE.
|
||||
- `libyuv-LICENSE.txt` and `libyuv-PATENTS.txt`: libyuv used by CameraX native
|
||||
image processing. Official Android 17 source notices:
|
||||
https://android.googlesource.com/platform/external/libyuv/+/refs/tags/android-17.0.0_r1/LICENSE
|
||||
and the sibling `PATENTS` file. CameraX's native build consumes the Android
|
||||
external libyuv project; the published CameraX AAR supplies its Apache notice.
|
||||
|
||||
The generated text is packaged as `assets/third-party-notices.txt` in every app
|
||||
variant. Preferences displays it offline as lazily laid-out paragraphs, keeping
|
||||
the 1.3 MiB notice document off the main thread during loading. This includes
|
||||
public source-archive links for MPL-covered Rust dependencies. Retain the same
|
||||
notice document with each release's mapping, native symbols and SBOM.
|
||||
@@ -0,0 +1,22 @@
|
||||
Checker Framework qualifiers
|
||||
Copyright 2004-present by the Checker Framework developers
|
||||
|
||||
MIT License:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -0,0 +1,26 @@
|
||||
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
|
||||
|
||||
Java Native Access (JNA) is licensed under the LGPL, version 2.1
|
||||
or later, or (from version 4.0 onward) the Apache License,
|
||||
version 2.0.
|
||||
|
||||
You can freely decide which license you want to apply to the project.
|
||||
|
||||
You may obtain a copy of the LGPL License at:
|
||||
|
||||
http://www.gnu.org/licenses/licenses.html
|
||||
|
||||
A copy is also included in the downloadable source code package
|
||||
containing JNA, in file "LGPL2.1", under the same directory
|
||||
as this file.
|
||||
|
||||
You may obtain a copy of the Apache License at:
|
||||
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
A copy is also included in the downloadable source code package
|
||||
containing JNA, in file "AL2.0", under the same directory
|
||||
as this file.
|
||||
|
||||
Commercial support may be available, please e-mail
|
||||
twall[at]users[dot]sf[dot]net.
|
||||
@@ -0,0 +1,21 @@
|
||||
libffi - Copyright (c) 1996-2022 Anthony Green, Red Hat, Inc and others.
|
||||
See source files for details.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
``Software''), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,29 @@
|
||||
Copyright 2011 The LibYuv Project Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
* Neither the name of Google nor the names of its contributors may
|
||||
be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,24 @@
|
||||
Additional IP Rights Grant (Patents)
|
||||
|
||||
"This implementation" means the copyrightable works distributed by
|
||||
Google as part of the LibYuv code package.
|
||||
|
||||
Google hereby grants to you a perpetual, worldwide, non-exclusive,
|
||||
no-charge, irrevocable (except as stated in this section) patent
|
||||
license to make, have made, use, offer to sell, sell, import,
|
||||
transfer, and otherwise run, modify and propagate the contents of this
|
||||
implementation of the LibYuv code package, where such license applies
|
||||
only to those patent claims, both currently owned by Google and
|
||||
acquired in the future, licensable by Google that are necessarily
|
||||
infringed by this implementation of the LibYuv code package. This
|
||||
grant does not include claims that would be infringed only as a
|
||||
consequence of further modification of this implementation. If you or
|
||||
your agent or exclusive licensee institute or order or agree to the
|
||||
institution of patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that this
|
||||
implementation of the LibYuv code package or any code incorporated
|
||||
within this implementation of the LibYuv code package constitutes
|
||||
direct or contributory patent infringement, or inducement of patent
|
||||
infringement, then any patent rights granted to you under this License
|
||||
for this implementation of the LibYuv code package shall terminate as
|
||||
of the date such litigation is filed.
|
||||
@@ -0,0 +1,42 @@
|
||||
# Google Play listing draft
|
||||
|
||||
`listing.toml` is the English text for publisher review. Nothing in this directory
|
||||
has been uploaded to Google Play. Account enrollment, legal declarations,
|
||||
production signing, the rating questionnaire and publication are still pending.
|
||||
See `docs/android/distribution.md` for the release gate and remaining evidence.
|
||||
|
||||
## Graphics
|
||||
|
||||
- `graphics/icon.png`: 512×512, 32-bit PNG, using the existing vault artwork.
|
||||
- `graphics/feature-graphic.png`: 1024×500, opaque 24-bit PNG. Its editable SVG
|
||||
combines that same artwork with the app name and GPG/Git/TOTP description.
|
||||
|
||||
The source SVGs reference the existing Android vault image. Exports use the
|
||||
system Arial font. No store badges, ratings or unsupported security claims are
|
||||
included.
|
||||
|
||||
## Phone screenshots
|
||||
|
||||
The four numbered PNGs under `screenshots/` are opaque 24-bit, 1080×1920 images
|
||||
captured from the actual optimized Android app on the retained ARM64 API 37
|
||||
emulator on 15 October 2026. They contain only agent-managed demonstration data:
|
||||
|
||||
1. Home: a local Git branch, three commits and a clean working tree.
|
||||
2. Passwords: a demonstration folder and a locked password entry.
|
||||
3. TOTP: cached-entry search and the genuine empty-catalog state; no invented OTP.
|
||||
4. Privacy: the offline Android privacy policy with its normal scrollable dialog.
|
||||
|
||||
These descriptions can also be used as screenshot alt text. No password,
|
||||
passphrase, key, token, repository location or diagnostic transcript is shown.
|
||||
|
||||
Android Studio's native capture includes the physical 1080×2400 display. The
|
||||
temporary logical display was 1080×1920, letterboxed with 240 pixels above and
|
||||
below. Unmodified captures are retained in `screenshots/source/`; each SVG
|
||||
exports exactly that logical viewport, without scaling or changing app pixels.
|
||||
The emulator's original display size and Android Studio screenshot destination
|
||||
were restored afterward. These are phone assets; tablet screenshots have not
|
||||
been captured or submitted.
|
||||
|
||||
The exported PNG dimensions, bit depth, color type and file-size limits were
|
||||
checked, and the visible captures were reviewed for blank/transient frames and
|
||||
secrets. Recheck current Play requirements and the final app before submission.
|
||||
|
After Width: | Height: | Size: 429 KiB |
@@ -0,0 +1,10 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1024" height="500" viewBox="0 0 1024 500">
|
||||
<title>IronStorage — local-first passwords with GPG, Git and TOTP</title>
|
||||
<rect width="1024" height="500" fill="#191d26"/>
|
||||
<image xlink:href="../../app/src/main/res/drawable-nodpi/ic_vault.png" width="500" height="500"/>
|
||||
<rect x="500" width="1" height="500" fill="#444955"/>
|
||||
<rect x="548" y="134" width="48" height="4" rx="2" fill="#d5c0f2"/>
|
||||
<text x="545" y="216" fill="#faf8ff" font-family="Arial, sans-serif" font-size="54" font-weight="700">IronStorage</text>
|
||||
<text x="548" y="272" fill="#d8dce5" font-family="Arial, sans-serif" font-size="27">Local-first passwords</text>
|
||||
<text x="548" y="319" fill="#b3bac8" font-family="Arial, sans-serif" font-size="24">GPG · Git · TOTP</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 845 B |
|
After Width: | Height: | Size: 470 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512" viewBox="0 0 512 512">
|
||||
<title>IronStorage vault icon</title>
|
||||
<image xlink:href="../../app/src/main/res/drawable-nodpi/ic_vault.png" width="512" height="512"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 278 B |
@@ -0,0 +1,37 @@
|
||||
# Draft listing; publication and the IARC questionnaire are still pending.
|
||||
locale = "en-US"
|
||||
title = "IronStorage"
|
||||
short_description = "Local-first pass-compatible passwords, TOTP, Autofill and HTTPS Git sync."
|
||||
category = "PRODUCTIVITY"
|
||||
contains_ads = false
|
||||
support_url = "https://git.rfc1437.de/hugo/IronStorage/issues"
|
||||
privacy_url = "https://git.rfc1437.de/hugo/IronStorage/src/branch/main/android/features/src/main/res/raw/privacy.txt"
|
||||
full_description = """
|
||||
Keep control of your password store. IronStorage works locally with the standard
|
||||
pass repository format: GPG-encrypted entries in a Git repository.
|
||||
|
||||
Create a local store or connect your own HTTPS Git server. Browse folders, search
|
||||
entries, generate passwords, edit credentials and synchronize changes. Configure
|
||||
your own GPG recipients and Git identity. IronStorage does not require an
|
||||
IronStorage account or operate a password-storage service.
|
||||
|
||||
Use time-based one-time passwords, including cached discovery and search while
|
||||
the store is locked. Optional Android biometric unlock protects saved
|
||||
passphrases with Android Keystore. Enable Autofill in Android settings or, on
|
||||
Android 14 and later, select IronStorage as a Credential Manager provider.
|
||||
Credential selection remains under your control.
|
||||
|
||||
Transfer compatible GPG key material through QR codes. Camera frames are
|
||||
processed on your device. Review the warning before exporting private keys.
|
||||
|
||||
No advertising or analytics. Your optional HTTPS Git host receives your encrypted
|
||||
repository and unencrypted Git metadata; its administrator controls retention.
|
||||
Android cloud backup and device transfer are disabled. Uninstalling removes the
|
||||
local store and protected records: keep independent copies of the repository,
|
||||
GPG private keys and passphrases you need. Synchronization is not a substitute
|
||||
for a recovery plan.
|
||||
|
||||
Requires Android 8.0 or later on ARM. Autofill and biometric availability depend
|
||||
on Android and device configuration. Credential Manager requires Android 14 or
|
||||
later. HTTPS Git is supported; SSH is not enabled in this Android release.
|
||||
"""
|
||||
|
After Width: | Height: | Size: 300 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1080" height="1920" viewBox="0 240 1080 1920"><image width="1080" height="2400" xlink:href="source/01-home.png"/></svg>
|
||||
|
After Width: | Height: | Size: 210 B |
|
After Width: | Height: | Size: 190 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1080" height="1920" viewBox="0 240 1080 1920"><image width="1080" height="2400" xlink:href="source/02-passwords.png"/></svg>
|
||||
|
After Width: | Height: | Size: 215 B |
|
After Width: | Height: | Size: 165 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1080" height="1920" viewBox="0 240 1080 1920"><image width="1080" height="2400" xlink:href="source/03-totp.png"/></svg>
|
||||
|
After Width: | Height: | Size: 210 B |
|
After Width: | Height: | Size: 648 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1080" height="1920" viewBox="0 240 1080 1920"><image width="1080" height="2400" xlink:href="source/04-privacy.png"/></svg>
|
||||
|
After Width: | Height: | Size: 213 B |
|
After Width: | Height: | Size: 140 KiB |
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 230 KiB |
@@ -0,0 +1,2 @@
|
||||
versionCode=2
|
||||
versionName=1.0.1
|
||||
@@ -0,0 +1,243 @@
|
||||
# Android Play distribution — issue #112
|
||||
|
||||
Status: local release preparation. The user explicitly deferred Google Play
|
||||
publication on 15 October 2026. #111 was audited and delivered in `b54636b`.
|
||||
No Play release, accepted AAB, production signing lineage, or production install
|
||||
has been established. Keep #112 open until its acceptance criteria are evidenced.
|
||||
|
||||
## Release identity and artifact gate
|
||||
|
||||
The application ID remains `de.rfc1437.ironstorage`. `android/release.properties`
|
||||
is the single Android version source. Code 2 updates earlier code-1 builds when
|
||||
signed with the same certificate; changing signing certificates cannot be fixed
|
||||
by uninstalling a retained test app. The name remains 1.0.1. Before publishing,
|
||||
check the highest code already allocated in Play and advance it if necessary.
|
||||
The SDK catalog retains min 26 and target/compile 37. The only release ABIs are
|
||||
`arm64-v8a` and `armeabi-v7a`.
|
||||
|
||||
The Rust `audit-distribution` command checks the decoded bundle manifest against
|
||||
that version source and the SDK catalog. It rejects debug/test/profile flags,
|
||||
audits every selected native ELF for 16 KB alignment, compares retained FULL
|
||||
symbols with the bundle's native build IDs, requires both baseline-profile
|
||||
files, and compares the retained R8 mapping with the bundled mapping byte for
|
||||
byte. It writes deterministic SHA-256 provenance for the audited artifacts.
|
||||
The existing APK manifest gate separately audits permissions, exported
|
||||
components and all backup/transfer exclusions. These are artifact checks;
|
||||
Google Play processing and installed signing identity require separate evidence.
|
||||
|
||||
## Signing and trust boundary
|
||||
|
||||
Upload signing and Play app signing are different keys. The upload certificate
|
||||
only authorizes submission. Google Play signs delivered APKs with the app-signing
|
||||
key selected in Play Console. Preserve that lineage for all production updates.
|
||||
Never replace the retained emulator's debug-signed app with a differently signed
|
||||
upload or Play APK by uninstalling it. Use a separate named AVD for Play installs.
|
||||
|
||||
The distribution command requires an external keystore and these process
|
||||
variables: `IRONSTORAGE_UPLOAD_STORE_FILE`, `IRONSTORAGE_UPLOAD_STORE_PASSWORD`,
|
||||
`IRONSTORAGE_UPLOAD_KEY_ALIAS`, `IRONSTORAGE_UPLOAD_KEY_PASSWORD`, and
|
||||
`IRONSTORAGE_UPLOAD_CERT_SHA256` (64 hexadecimal digits, independently pinned).
|
||||
Do not put passwords in shell arguments, command history, Gradle properties,
|
||||
repository files, CI output, or artifacts. Disable shell tracing. Retain a secure
|
||||
offline upload-key backup. The repository ignores `.jks` and `.keystore`; that is
|
||||
not permission to place other private-key formats in the checkout.
|
||||
|
||||
Use the pinned JDK, SDK, Cargo and NDK from `android/README.md`. Run
|
||||
`python3 .gitea/scripts/android_ci.py distribution`. It builds all ordinary
|
||||
Android verification gates without signing variables in the build processes,
|
||||
verifies the upload certificate, signs and validates
|
||||
the AAB, and writes only release artifacts to `android/build/distribution`:
|
||||
AAB, R8 mapping, selected native symbols, CycloneDX inventory, decoded manifest,
|
||||
third-party notices, certificate fingerprint and checksummed provenance. Retained
|
||||
notices must match the bundle asset byte for byte. It refuses to overwrite an
|
||||
existing distribution directory. Archive each successful directory by commit
|
||||
and version in access-controlled release storage before cleanup.
|
||||
|
||||
This checkout has no protected main-branch rule (read-only Gitea check on
|
||||
2026-10-15). No production signing key, Play service account or signing secret
|
||||
has been installed. Do not mistake a Gitea `environment` field or a branch
|
||||
condition in an editable workflow for an approval boundary. Enable production
|
||||
signing only on a trusted release runner after repository/runner access and
|
||||
approval rules are configured. Keep signing credentials away from pull-request
|
||||
jobs and untrusted workflow revisions. Keep any Play publisher credential scoped
|
||||
to this app and the required testing/release track. Signing can be prepared
|
||||
without granting the build system permission to publish.
|
||||
|
||||
## Console, policy and listing
|
||||
|
||||
Read-only browser checks on 2026-10-15 reached developer-account registration for
|
||||
the two available consumer Google accounts. The project-domain Workspace account
|
||||
cannot use Play Console under its current admin policy. No account was created,
|
||||
terms accepted, identity information submitted, payment made or bundle uploaded.
|
||||
An enrolled developer account with access to this app is required to continue
|
||||
actual Play processing.
|
||||
|
||||
Current primary-source review (recheck when the release is submitted):
|
||||
|
||||
- [Target API policy](https://support.google.com/googleplay/android-developer/answer/11926878):
|
||||
new phone apps and updates require API 36+ from 31 August 2026; target 37 meets
|
||||
that numeric requirement, subject to Console accepting the installed SDK.
|
||||
- [Play Console registration](https://support.google.com/googleplay/android-developer/answer/6112435/):
|
||||
account enrollment includes a distribution agreement, registration payment and
|
||||
identity verification. New personal accounts also have testing and device
|
||||
verification requirements. Those account requirements are distinct from this
|
||||
milestone's emulator-only product testing; do not claim an emulator satisfies
|
||||
Google's account verification requirements.
|
||||
- [App signing](https://developer.android.com/studio/publish/app-signing):
|
||||
enroll in Play App Signing and record both app-signing and upload certificate
|
||||
fingerprints before testing updates. No production key has been selected yet.
|
||||
- [Developer verification](https://developer.android.com/developer-verification):
|
||||
verify the publisher identity/package registration for applicable distribution
|
||||
regions. Do not invent an organization, legal identity or verified status.
|
||||
- [Data safety](https://support.google.com/googleplay/android-developer/answer/10787469):
|
||||
off-device transmission is collection even when sent to a user-selected server;
|
||||
locally processed data and qualifying end-to-end encrypted payloads have
|
||||
exemptions. Do not declare all Git traffic end-to-end encrypted: commit
|
||||
identity, paths and HTTPS authentication are visible to the selected server.
|
||||
- [Broad package visibility](https://support.google.com/googleplay/android-developer/answer/10158779):
|
||||
`QUERY_ALL_PACKAGES` requires a permitted-use declaration/review. It verifies
|
||||
OS-mediated Autofill/Credential Manager caller certificates, including clients
|
||||
without discoverable intent filters. It does not enumerate an installed-app
|
||||
inventory or transmit one. See `credentials.md` for the security rationale.
|
||||
Approval is pending; no policy exemption is assumed.
|
||||
|
||||
`android/play/listing.toml` contains the reviewable English listing draft.
|
||||
The existing adaptive and monochrome launcher icons remain. `android/play/`
|
||||
also contains a 512px Play icon, a 1024×500 feature graphic and four genuine
|
||||
1080×1920 phone screenshots, with editable SVGs and unmodified capture sources.
|
||||
Their PNG formats, dimensions, sizes and listing text limits were checked.
|
||||
Tablet screenshots, the IARC-generated rating, final publisher contact details
|
||||
and Console form submissions remain pending. Use actual app
|
||||
screenshots with public demonstration data; never publish fixture private keys,
|
||||
passphrases, tokens, repository locations, or a support diagnostic transcript.
|
||||
The in-app offline privacy policy is the canonical Android policy and includes
|
||||
support, third-party server traffic, local storage, camera, provider access,
|
||||
clipboard and uninstall/backup behavior. Its source URL becomes public only
|
||||
when the corresponding commit is pushed. Verify anonymous access before using
|
||||
it in Console. The old Apple-only website policy must not be represented as an
|
||||
Android policy. The dependency inventory is supplemented by packaged third-party
|
||||
copyright and license notices, displayed offline in Preferences. The build checks
|
||||
Rust notice coverage against both ARM normal dependency graphs and fails for
|
||||
unreviewed Android license exceptions; see `android/licenses/README.md`.
|
||||
|
||||
Draft declarations for review against the final Console questionnaire:
|
||||
|
||||
- No ads, analytics, developer-side app account, tracking or crash collection.
|
||||
- Optional HTTPS sends user-provided Git name/email, authentication identity and
|
||||
unencrypted repository metadata to the configured host. Declare the applicable
|
||||
optional personal-information/user-content categories; collection serves app
|
||||
functionality. The encrypted GPG entry payload is unreadable to intermediaries
|
||||
without recipient keys. Do not apply that exemption to plaintext Git metadata.
|
||||
- Camera frames, biometric results and requesting-app certificates stay local.
|
||||
User-confirmed provider/clipboard/QR actions transfer the selected content as
|
||||
the user requests; review the user-initiated sharing exception accurately.
|
||||
- HTTPS uses TLS and rejects cleartext/unsupported remotes. No developer data
|
||||
deletion endpoint is needed for a nonexistent developer account/database;
|
||||
local and server-side deletion limits are stated in the privacy policy.
|
||||
- The app contains OpenPGP encryption and TLS. Complete the actual encryption/
|
||||
export questionnaire using the publisher's jurisdiction and applicable
|
||||
classification. No exemption or export classification has been filed.
|
||||
|
||||
## Install, update and failure evidence still required
|
||||
|
||||
Start on the internal track. Record Play processing/version, signing
|
||||
fingerprints, ABI/SDK/permission inspection and pre-launch reports. Complete the
|
||||
closed-testing requirements that the enrolled account actually imposes. A
|
||||
production rollout must follow successful testing and the publisher's chosen
|
||||
release regions; do not substitute a locally signed APK for Play acceptance.
|
||||
|
||||
On a dedicated ARM64 Play-capable emulator, install from Play into a new app
|
||||
container through the normal setup UI. Create/import keys and a compatible
|
||||
local store through supported flows, then exercise optional HTTPS clone/sync,
|
||||
browsing/editing, TOTP, QR permission/transfer, biometrics and enabled Android
|
||||
credential providers. Keep review secrets out of public listing material.
|
||||
|
||||
For update validation, retain that same AVD, package and signing lineage.
|
||||
Record repository commits and entry counts, configuration, a usable protected
|
||||
record and a populated TOTP cache before installing the next higher Play code.
|
||||
Update through Play without clearing data. Verify each retained item and an
|
||||
actual authorized decrypt/provider operation after update. Repeat on available
|
||||
ARM64 API/page-size classes; ARMv7 gets package/native audit coverage, not an
|
||||
invented runtime result. Physical devices and x86 are outside this milestone.
|
||||
|
||||
The app's existing Rust gates cover atomic private-storage writes, cancelled
|
||||
operations, recovery of corrupt metadata without discarding repository data,
|
||||
and current-enrollment Keystore invalidation. A failed install must leave the
|
||||
old package/state usable; a failed operation must retain a recoverable prior
|
||||
state and display its typed error. APK downgrade is not a recovery mechanism:
|
||||
ship a corrected build with a higher code and a schema-compatible recovery path.
|
||||
Do not use `adb install -d`, erase a container, restore opaque app-data packages,
|
||||
or weaken authentication to force a test through. Uninstall is destructive and
|
||||
not a migration test. State on the user's configured Git server is not removed
|
||||
by uninstalling; ordinary entry deletion also leaves Git history.
|
||||
|
||||
## Validation record
|
||||
|
||||
Local preparation was validated on 15 October 2026. The implementation commit
|
||||
is recorded on #112. These checks do not establish a delivered Play release.
|
||||
|
||||
- Required workspace formatting, warnings-as-errors check, Clippy and tests
|
||||
passed: 526 Rust tests, 0 failures, 0 ignored across 41 suites. No Apple app or
|
||||
project source changed; no iPhone simulator update was required.
|
||||
- CI orchestration self-checks passed (14 tests). Android verification completed
|
||||
with 838 actionable tasks, including unit tests, lint, KtLint, architecture,
|
||||
instrumentation compilation, release R8/baseline packaging and native gates.
|
||||
- The post-build signing command passed using an external **disposable validation
|
||||
key**. Strict JAR verification against the pinned upload certificate,
|
||||
bundletool 1.18.3 validation, decoded bundle identity/SDK/permission checks,
|
||||
both ARM ABI/16 KiB audits, matching FULL symbols/R8 mapping/baseline profiles
|
||||
and exact retained notice bytes all passed. This is not the production key
|
||||
and was not uploaded. The generated notice asset covers 114 Android release
|
||||
components and 423 Rust normal dependencies. AAR-embedded JAR notices were
|
||||
inspected; JNA's embedded notices are covered by its retained release notice
|
||||
and the complete Apache text, with its bundled libffi notice also retained.
|
||||
- `SettingsScreenTest` passed all three methods on each ARM64 image: API 26 /
|
||||
4 KiB, API 37 / 4 KiB, API 37 / strict 16 KiB. A real-activity regression first
|
||||
reproduced document dialogs being dismissed by the background-lock cleanup.
|
||||
Owned-window registration and protected dialog surfaces fixed the problem.
|
||||
Tests verify normal dismissal preserves search and real pause/resume clears
|
||||
the presentation. The earlier fixture-only settings test did not cover the
|
||||
activity's real presentation object; it is supplemented, not counted as proof
|
||||
of this path.
|
||||
- Release QA also reproduced an endless protected-presentation rebuild when
|
||||
navigating from Passwords to TOTP. Navigation-entry stop events were revoking
|
||||
the root while that root was being rebuilt. Passwords and TOTP now observe the
|
||||
protected activity's lifecycle for background cleanup. The navigation test
|
||||
first failed with a recomposition timeout, then passed with the correction.
|
||||
It requires a normally configured store and asserts actual Passwords content;
|
||||
a separate test checks immediate masking on stop and clean reveal on resume.
|
||||
- A normal first-run setup on the API 26 optimized app found a stale
|
||||
authentication configuration error after successful store creation. Setup
|
||||
completion now refreshes Rust-provided authentication state after an existing
|
||||
request settles. The isolated native entry integration test first failed
|
||||
without the refresh, then passed with it, including encrypted entry operations
|
||||
and confirmation that setup does not grant an unlock lease. The API 26 demo
|
||||
store was created through the app's normal key-generation/setup UI.
|
||||
- The final focused UI checks passed on configured ARM64 stores at API 26 /
|
||||
4 KiB, API 37 / 4 KiB and API 37 / strict 16 KiB: 14 executed tests per image,
|
||||
with two opt-in interactive inspection fixtures excluded per image. On the
|
||||
main image, the two real-store regressions were explicitly rerun with zero
|
||||
skips after correcting their precondition to accept Rust's ready/locked shell
|
||||
state as well as completed onboarding state. The final native setup/entry
|
||||
regression also passed. Actual optimized-app computer use verified
|
||||
Passwords-to-TOTP navigation on the main and older images and the strict
|
||||
16 KiB image, retaining the existing stores and cached TOTP navigation.
|
||||
- Negative checks against the real candidate reject mismatched retained notices
|
||||
and R8 mapping, and emit no successful provenance for either mismatch.
|
||||
- The optimized APK generated from the final AAB passed APK alignment/strip/
|
||||
matching-symbol audits and installed with `adb install -r` using the retained
|
||||
emulator's existing debug signing certificate. Computer use confirmed the
|
||||
unchanged three-commit, clean local repository, version 1.0.1, loaded privacy
|
||||
policy including deletion/backup text, and responsive offline notices. Both
|
||||
documents remained open and closed normally. Cold launch also succeeded.
|
||||
This is a local release-equivalent update, not a Play install or production
|
||||
signing-lineage test.
|
||||
- No app uninstall, container/key reset, opaque app-data restore or ordinary
|
||||
biometric re-enrollment was used. The three unused AVDs were shut down
|
||||
gracefully after validation; the visible retained API 37 AVD remains running.
|
||||
|
||||
The actual Play acceptance, enrolled developer identity, production signing
|
||||
configuration/automation, live listing/assets/forms and clean/update smoke tests
|
||||
from Play remain outstanding. #112 cannot be closed on local packaging or
|
||||
emulator checks alone. Keep the working changes for this issue's eventual single
|
||||
commit; do not present the disposable-key candidate as a production release.
|
||||
@@ -57,7 +57,7 @@ fn release_manifest_text(source: &str) -> Result<(), Box<dyn Error>> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn manifest_text(source: &str) -> Result<(), Box<dyn Error>> {
|
||||
pub(super) fn manifest_text(source: &str) -> Result<(), Box<dyn Error>> {
|
||||
let document = Document::parse(source)?;
|
||||
let root = document.root_element();
|
||||
if root.tag_name().name() != "manifest"
|
||||
@@ -111,7 +111,7 @@ fn manifest_text(source: &str) -> Result<(), Box<dyn Error>> {
|
||||
&& (node.attribute((ANDROID, "name")) != Some(allowed[2])
|
||||
|| !matches!(
|
||||
node.attribute((ANDROID, "protectionLevel")),
|
||||
Some("signature" | "0x2")
|
||||
Some("signature" | "0x2" | "0x00000002")
|
||||
))
|
||||
{
|
||||
return Err("unreviewed custom permission".into());
|
||||
@@ -550,6 +550,21 @@ mod tests {
|
||||
r#"<manifest xmlns:android="{ANDROID}" package="de.rfc1437.ironstorage"><application android:allowBackup="false" android:usesCleartextTraffic="false" android:fullBackupContent="@xml/backup_rules" android:dataExtractionRules="@xml/data_extraction_rules"><activity android:name="de.rfc1437.ironstorage.MainActivity" android:exported="true"><intent-filter><action android:name="android.intent.action.MAIN"/><category android:name="android.intent.category.LAUNCHER"/></intent-filter></activity><provider android:name="fixture" android:exported="false"/></application></manifest>"#
|
||||
);
|
||||
assert!(manifest_text(&source).is_ok());
|
||||
for (level, valid) in [
|
||||
("signature", true),
|
||||
("0x2", true),
|
||||
("0x00000002", true),
|
||||
("normal", false),
|
||||
("0x00000012", false),
|
||||
] {
|
||||
let permission = format!(
|
||||
r#"<permission android:name="de.rfc1437.ironstorage.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION" android:protectionLevel="{level}"/><application"#
|
||||
);
|
||||
assert_eq!(
|
||||
manifest_text(&source.replace("<application", &permission)).is_ok(),
|
||||
valid
|
||||
);
|
||||
}
|
||||
assert!(manifest_text(&source.replace(
|
||||
"<application",
|
||||
"<uses-permission android:name=\"android.permission.QUERY_ALL_PACKAGES\"/><application",
|
||||
|
||||
@@ -7,6 +7,7 @@ mod bindings;
|
||||
mod contract;
|
||||
mod gates;
|
||||
mod native;
|
||||
mod release;
|
||||
mod toolchain;
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
@@ -65,6 +66,27 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
[_, command, package, symbols] if command == "audit-release" => {
|
||||
native::audit_release(Path::new(package), Path::new(symbols))?;
|
||||
}
|
||||
[
|
||||
_,
|
||||
command,
|
||||
android,
|
||||
manifest,
|
||||
bundle,
|
||||
mapping,
|
||||
symbols,
|
||||
notices,
|
||||
output,
|
||||
] if command == "audit-distribution" => {
|
||||
release::audit(
|
||||
Path::new(android),
|
||||
Path::new(manifest),
|
||||
Path::new(bundle),
|
||||
Path::new(mapping),
|
||||
Path::new(symbols),
|
||||
Path::new(notices),
|
||||
Path::new(output),
|
||||
)?;
|
||||
}
|
||||
[_, command, input, output] if command == "safe-reports" => {
|
||||
gates::reports(Path::new(input), Path::new(output))?;
|
||||
}
|
||||
@@ -88,7 +110,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
}
|
||||
_ => {
|
||||
return Err(
|
||||
"usage: ironstorage-android-build <fixtures output.kt | check android-dir | prepare-bindings input output | package-native input output | audit-elf path abi | audit-native jniLibs | audit-apk-split apk abi | audit-package apk-or-aab | audit-release apk symbols | audit-release-manifest manifest.xml | audit-manifest manifest.xml backup.xml extraction.xml | sbom android.json rust.txt Cargo.lock policy.json output.json | safe-reports input-dir output.json | check-toolchain cargo rust ndk ndk-version cargo-ndk-version>".into(),
|
||||
"usage: ironstorage-android-build <fixtures output.kt | check android-dir | prepare-bindings input output | package-native input output | audit-elf path abi | audit-native jniLibs | audit-apk-split apk abi | audit-package apk-or-aab | audit-release apk-or-aab symbols | audit-distribution android-dir manifest.xml app.aab mapping.txt symbols.zip notices.txt output.json | audit-release-manifest manifest.xml | audit-manifest manifest.xml backup.xml extraction.xml | sbom android.json rust.txt Cargo.lock policy.json output.json | safe-reports input-dir output.json | check-toolchain cargo rust ndk ndk-version cargo-ndk-version>".into(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,13 +112,18 @@ pub fn audit_split(path: &Path, abi: &str) -> Result<(), Box<dyn Error>> {
|
||||
|
||||
pub fn audit_release(package: &Path, symbols: &Path) -> Result<(), Box<dyn Error>> {
|
||||
audit_package(package)?;
|
||||
let prefix = if package.extension().is_some_and(|ext| ext == "aab") {
|
||||
"base/lib"
|
||||
} else {
|
||||
"lib"
|
||||
};
|
||||
let mut package = zip::ZipArchive::new(File::open(package)?)?;
|
||||
let mut symbols = zip::ZipArchive::new(File::open(symbols)?)?;
|
||||
for abi in ABIS {
|
||||
for library in ["libironstorage_android.so", "libjnidispatch.so"] {
|
||||
let mut bytes = Vec::new();
|
||||
package
|
||||
.by_name(&format!("lib/{abi}/{library}"))?
|
||||
.by_name(&format!("{prefix}/{abi}/{library}"))?
|
||||
.read_to_end(&mut bytes)?;
|
||||
let mut debug = Vec::new();
|
||||
let mut entry = symbols.by_name(&format!("{abi}/{library}.dbg"))?;
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
//! Distribution provenance supplements the existing manifest and native gates.
|
||||
use std::{collections::BTreeMap, error::Error, fs, io::Read, path::Path};
|
||||
|
||||
use roxmltree::Document;
|
||||
use sha2::{Digest, Sha256};
|
||||
|
||||
const ANDROID: &str = "http://schemas.android.com/apk/res/android";
|
||||
|
||||
pub fn audit(
|
||||
android: &Path,
|
||||
manifest: &Path,
|
||||
bundle: &Path,
|
||||
mapping: &Path,
|
||||
symbols: &Path,
|
||||
notices: &Path,
|
||||
output: &Path,
|
||||
) -> Result<(), Box<dyn Error>> {
|
||||
super::gates::release_manifest(manifest)?;
|
||||
let version_source = fs::read_to_string(android.join("release.properties"))?;
|
||||
let version = version(&version_source)?;
|
||||
let catalog: toml::Value = toml::from_str(&fs::read_to_string(
|
||||
android.join("gradle/libs.versions.toml"),
|
||||
)?)?;
|
||||
let manifest_source = fs::read_to_string(manifest)?;
|
||||
super::gates::manifest_text(&manifest_source)?;
|
||||
identity(&manifest_source, &version, &catalog)?;
|
||||
super::native::audit_release(bundle, symbols)?;
|
||||
let mut archive = zip::ZipArchive::new(fs::File::open(bundle)?)?;
|
||||
let mut names = std::collections::BTreeSet::new();
|
||||
for index in 0..archive.len() {
|
||||
let entry = archive.by_index(index)?;
|
||||
let name = entry.name();
|
||||
if entry.enclosed_name().is_none()
|
||||
|| !names.insert(name.to_owned())
|
||||
|| (name.contains("/lib/") && !name.starts_with("base/lib/"))
|
||||
{
|
||||
return Err("unreviewed or duplicate bundle path".into());
|
||||
}
|
||||
}
|
||||
for name in [
|
||||
"BUNDLE-METADATA/com.android.tools.build.profiles/baseline.prof",
|
||||
"BUNDLE-METADATA/com.android.tools.build.profiles/baseline.profm",
|
||||
] {
|
||||
if archive.by_name(name)?.size() == 0 {
|
||||
return Err("release baseline profile is empty".into());
|
||||
}
|
||||
}
|
||||
let mut bundled_notices = Vec::new();
|
||||
let mut entry = archive.by_name("base/assets/third-party-notices.txt")?;
|
||||
if entry.size() == 0 || entry.size() > 16 * 1024 * 1024 {
|
||||
return Err("release third-party notices missing or oversized".into());
|
||||
}
|
||||
entry.read_to_end(&mut bundled_notices)?;
|
||||
drop(entry);
|
||||
if bundled_notices != fs::read(notices)? {
|
||||
return Err("retained third-party notices do not match the bundle".into());
|
||||
}
|
||||
let mut bundled_mapping = Vec::new();
|
||||
let mut entry =
|
||||
archive.by_name("BUNDLE-METADATA/com.android.tools.build.obfuscation/proguard.map")?;
|
||||
// Compose and generated UniFFI/JNA mappings currently occupy about 54 MiB.
|
||||
if entry.size() > 128 * 1024 * 1024 {
|
||||
return Err("R8 mapping exceeds the audit bound".into());
|
||||
}
|
||||
entry.read_to_end(&mut bundled_mapping)?;
|
||||
if bundled_mapping.is_empty() || bundled_mapping != fs::read(mapping)? {
|
||||
return Err("retained R8 mapping does not match the bundle".into());
|
||||
}
|
||||
let artifacts: BTreeMap<_, _> = [manifest, bundle, mapping, symbols, notices]
|
||||
.into_iter()
|
||||
.map(|path| {
|
||||
Ok((
|
||||
path.file_name()
|
||||
.and_then(|name| name.to_str())
|
||||
.ok_or("artifact name missing")?
|
||||
.to_owned(),
|
||||
format!("{:x}", Sha256::digest(fs::read(path)?)),
|
||||
))
|
||||
})
|
||||
.collect::<Result<_, Box<dyn Error>>>()?;
|
||||
if artifacts.len() != 5 {
|
||||
return Err("distribution artifact names must be distinct".into());
|
||||
}
|
||||
fs::write(
|
||||
output,
|
||||
serde_json::to_vec_pretty(&serde_json::json!({
|
||||
"applicationId": "de.rfc1437.ironstorage", "version": version,
|
||||
"abis": ["arm64-v8a", "armeabi-v7a"], "sha256": artifacts,
|
||||
"playAcceptance": "pending: upload and installed signing lineage require Play Console"
|
||||
}))?,
|
||||
)?;
|
||||
println!("Distribution identity, SDK, native symbols, baseline profile and R8 mapping passed");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn version(source: &str) -> Result<BTreeMap<&str, &str>, Box<dyn Error>> {
|
||||
let mut result = BTreeMap::new();
|
||||
for line in source.lines() {
|
||||
let (key, value) = line
|
||||
.split_once('=')
|
||||
.ok_or("invalid release version property")?;
|
||||
if !["versionCode", "versionName"].contains(&key) || result.insert(key, value).is_some() {
|
||||
return Err("unreviewed or duplicate release version property".into());
|
||||
}
|
||||
}
|
||||
let code: u32 = result
|
||||
.get("versionCode")
|
||||
.ok_or("versionCode missing")?
|
||||
.parse()?;
|
||||
let name = result.get("versionName").ok_or("versionName missing")?;
|
||||
if code == 0
|
||||
|| code > 2_100_000_000
|
||||
|| name.is_empty()
|
||||
|| name.len() > 50
|
||||
|| !name
|
||||
.bytes()
|
||||
.all(|b| b.is_ascii_alphanumeric() || b".-+".contains(&b))
|
||||
{
|
||||
return Err("invalid Play release version".into());
|
||||
}
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
fn identity(
|
||||
source: &str,
|
||||
version: &BTreeMap<&str, &str>,
|
||||
catalog: &toml::Value,
|
||||
) -> Result<(), Box<dyn Error>> {
|
||||
let document = Document::parse(source)?;
|
||||
let root = document.root_element();
|
||||
if !root.has_tag_name("manifest") || root.attribute("package") != Some("de.rfc1437.ironstorage")
|
||||
{
|
||||
return Err("unexpected distribution application ID".into());
|
||||
}
|
||||
for (name, expected) in version {
|
||||
if root.attribute((ANDROID, *name)) != Some(*expected) {
|
||||
return Err(format!("distribution {name} differs from release.properties").into());
|
||||
}
|
||||
}
|
||||
let sdk = root
|
||||
.children()
|
||||
.find(|node| node.has_tag_name("uses-sdk"))
|
||||
.ok_or("uses-sdk missing")?;
|
||||
for (attribute, key) in [
|
||||
("minSdkVersion", "minSdk"),
|
||||
("targetSdkVersion", "compileSdk"),
|
||||
] {
|
||||
let expected = catalog
|
||||
.get("versions")
|
||||
.and_then(|v| v.get(key))
|
||||
.and_then(toml::Value::as_str)
|
||||
.ok_or("SDK catalog version missing")?;
|
||||
if sdk.attribute((ANDROID, attribute)) != Some(expected) {
|
||||
return Err(format!("distribution {attribute} differs from the pinned SDK").into());
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn rejects_ambiguous_invalid_or_exhausted_play_versions() {
|
||||
for source in [
|
||||
"versionCode=0\nversionName=1",
|
||||
"versionCode=2100000001\nversionName=1",
|
||||
"versionCode=1\nversionCode=2\nversionName=1",
|
||||
"versionCode=1",
|
||||
"versionCode=1\nversionName=",
|
||||
"versionCode=1\nversionName=1\nother=value",
|
||||
] {
|
||||
assert!(version(source).is_err(), "accepted {source}");
|
||||
}
|
||||
assert!(version("versionCode=2\nversionName=1.0.1\n").is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rejects_wrong_package_version_or_sdk_in_the_actual_manifest() {
|
||||
let versions = version("versionCode=2\nversionName=1.0.1").unwrap();
|
||||
let catalog = toml::from_str("[versions]\nminSdk='26'\ncompileSdk='37'\n").unwrap();
|
||||
let manifest = r#"<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="de.rfc1437.ironstorage" android:versionCode="2" android:versionName="1.0.1"><uses-sdk android:minSdkVersion="26" android:targetSdkVersion="37"/></manifest>"#;
|
||||
assert!(identity(manifest, &versions, &catalog).is_ok());
|
||||
for (from, to) in [
|
||||
("ironstorage", "fixture"),
|
||||
("Code=\"2\"", "Code=\"1\""),
|
||||
("Name=\"1.0.1\"", "Name=\"0.1\""),
|
||||
("Version=\"26\"", "Version=\"25\""),
|
||||
("Version=\"37\"", "Version=\"35\""),
|
||||
] {
|
||||
assert!(identity(&manifest.replace(from, to), &versions, &catalog).is_err());
|
||||
}
|
||||
}
|
||||
}
|
||||