diff --git a/CLAUDE.md b/CLAUDE.md index 8fd0757..e75cb19 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -152,7 +152,10 @@ The Android release key: alias `meweb`, certificate SHA-256 Brotli chunks of 16,384 rows behind an index: about 32 MB, opened in a millisecond, one chunk decompressed per lookup, nothing else resident. It is not inside `MeWeb.Core`, because the APK stores every assembly once per processor type: the desktop head and the screenshot tool embed it in their entry assembly, the Android head ships it as an uncompressed asset - (`AndroidStoreUncompressedFileExtensions`) that `AndroidPlatform.OpenRegistry` reads in place through `OpenFd`. + (`AndroidStoreUncompressedFileExtensions`) that `AndroidPlatform.OpenRegistry` reads in place through `OpenFd`. The + same setting puts `**/*.bin` in the app bundle's `BundleConfig.pb`, so the split APKs Google Play builds keep it + uncompressed too (checked 22 Nov 2026 with bundletool for an arm64 phone: Stored, 4-byte aligned); `tools/release.cs` + refuses a bundle without that line, because a compressed copy would fail only on phones that installed from Play. `RegistryBuilder` reads IPv4, then IPv6, with the names in a temporary file, into lists sized up front (6.5 million IPv4 and 2 million IPv6 rows; RIPE alone has 1.48 million IPv6 blocks, and a list that outgrows its size doubles): about 276 MB peak in October 2026, under the unit's 512 MB, and some four minutes on top of the RouteViews tally. `/api/ip` still answers each caller with its own @@ -184,6 +187,11 @@ The Android release key: alias `meweb`, certificate SHA-256 `arasaka_repository_known`, or installed copies are treated as edited by hand and left alone. The package owns `/usr/share/arasaka-repository/meweb`, the marker that keeps the repository configured while any Arasaka package is installed. The portal app (`arasaka.software`, `arasaka-portal`) carries a byte-identical copy; change both. +- **Google Play takes the app bundle** (since 0.16.1): the release attaches `MeWeb--android.aab` beside the + APK, signed with the same key. Play App Signing must keep this key (exported with Google's `pepk.jar` through "Use a + key from a Java keystore"), never one Google makes, or Play installs and the F-Droid and website copies can never + update one another. The first upload is by hand. The publisher above ignores the bundle, since it takes only the + files named in `apps/meweb.yml`, and the Play listing uses the same `fastlane/metadata/android/` text and images. - **The server cannot ping**: `NoNewPrivileges` drops `ping`'s file capability and `ping_group_range` is closed, so the trace back to a caller uses `tracepath` (UDP, unprivileged) and keeps only public hops outside `Probe:Refuse`, so the box's own network never reaches an app. diff --git a/Directory.Build.props b/Directory.Build.props index c115875..bf96ad3 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - 0.16.0 + 0.16.1 me-web? Arasaka di Hvozdikov Yevheniy © 2026 Arasaka di Hvozdikov Yevheniy diff --git a/src/MeWeb.Android/MeWeb.Android.csproj b/src/MeWeb.Android/MeWeb.Android.csproj index 3a41b8f..975cb7a 100644 --- a/src/MeWeb.Android/MeWeb.Android.csproj +++ b/src/MeWeb.Android/MeWeb.Android.csproj @@ -11,7 +11,7 @@ $([System.Version]::Parse('$(Version)').Minor) $([System.Version]::Parse('$(Version)').Build) $([MSBuild]::Add($([MSBuild]::Multiply($(VersionMajor), 10000)), $([MSBuild]::Add($([MSBuild]::Multiply($(VersionMinor), 100)), $(VersionPatch))))) - apk + apk;aab false .bin false diff --git a/tools/release.cs b/tools/release.cs index 1d21940..f03ee8a 100644 --- a/tools/release.cs +++ b/tools/release.cs @@ -88,7 +88,7 @@ void WriteNotes() "", ]); lines.AddRange(File.Exists(source) ? File.ReadAllLines(source).Select(l => l.Length > 0 ? $" {l}" : "") : [" (no network data in this build)"]); - lines.AddRange(["", "SHA256SUMS.txt lists every file. The APK's signing certificate SHA-256 is 5f52cff4f52f4e0b6da6cd044bfceaf78d1d42db24f2470602db7f19cbfdf846."]); + lines.AddRange(["", "SHA256SUMS.txt lists every file. The APK and the app bundle for Google Play (.aab) are signed with the certificate whose SHA-256 is 5f52cff4f52f4e0b6da6cd044bfceaf78d1d42db24f2470602db7f19cbfdf846."]); Directory.CreateDirectory(Path.Combine(root, "artifacts")); File.WriteAllLines(Path.Combine(root, "artifacts", "release-notes.md"), lines); } @@ -297,9 +297,18 @@ string Android() "-p:AndroidKeyStore=true", $"-p:AndroidSigningKeyStore={keystore}", $"-p:AndroidSigningKeyAlias={KeyAlias}", $"-p:AndroidSigningStorePass=env:{KeystorePasswordVariable}", $"-p:AndroidSigningKeyPass=env:{KeystorePasswordVariable}", .. Stamp()]); var apk = Directory.GetFiles(stage, "*-Signed.apk").SingleOrDefault() ?? throw new InvalidOperationException("signed APK not found"); + var bundle = Directory.GetFiles(stage, "*-Signed.aab").SingleOrDefault() ?? throw new InvalidOperationException("signed app bundle not found"); + using (var archive = ZipFile.OpenRead(bundle)) + { + using var config = new StreamReader((archive.GetEntry("BundleConfig.pb") ?? throw new InvalidOperationException("BundleConfig.pb missing from the app bundle")).Open()); + if (!config.ReadToEnd().Contains("**/*.bin", StringComparison.Ordinal)) + throw new InvalidOperationException("the app bundle would let Google Play compress registry.bin, which the app reads in place"); + } var name = $"MeWeb-{version}-android.apk"; + var bundleName = $"MeWeb-{version}-android.aab"; File.Copy(apk, Path.Combine(output, name), overwrite: true); - return $"{name} ({Size(Path.Combine(output, name))})"; + File.Copy(bundle, Path.Combine(output, bundleName), overwrite: true); + return $"{name} ({Size(Path.Combine(output, name))}), {bundleName} ({Size(Path.Combine(output, bundleName))})"; } string Server()