Android Studio's batch inspections reported about 800 problems besides spelling, which the project profile now leaves off (it mostly flagged the translations). Real bugs among them: the desktop's strings files had empty strings where Android has translations (German, Spanish, Brazilian Portuguese, Chinese), showing blank text; and IS_FDROID_BUILD, which the F-Droid workflow flips with sed, was read as a constant the IDE wanted to simplify away, so it is now read through BuildFlavorChecker.isFdroidBuild(). Account loads in coroutines (relay, intent and UI paths) and logout no longer block a thread with runBlocking; the blocking ContentProvider path and the desktop lock say why they do. Also remove what was dead (the drawable IconRow overload, PermissionCard, ConfirmationToastMsg, the desktop OkHttpWebSocket.Builder and DeleteAfterType.screenCode, the QR drawer's zero corner radius math and the strings only they used), move to the Duration overloads, give subject-less when blocks their subject, drop redundant opt-ins, suspend modifiers, qualifiers and SAM constructors, fix broken KDoc links, take the ktlint and KSP plugin versions from the catalog, strip editor metadata from the SVGs, align the Markdown tables and fix real grammar and spelling in comments, docs and three English strings.
9.7 KiB
Amber: Nostr event signer for Android
Amber is a nostr event signer for Android. It allows users to keep their nsec segregated in a single, dedicated app. The goal of Amber is to have your smartphone act as a NIP-46 signing device without any need for servers or additional hardware. "Private keys should be exposed to as few systems as possible as each system adds to the attack surface," as the rationale of said NIP states. In addition to native apps, Amber aims to support all current nostr web applications without requiring any extensions or web servers.
Desktop
Amber also runs on Windows, macOS and Linux as a NIP-46 signer built with Compose for Desktop. It supports the same accounts, permissions and bunker connections as the Android app (minus NIP-55, which is Android-only IPC). See desktop/README.md for build and usage instructions.
Current Features
- Offline
- Use nip-46 or make an addendum in nip-46
- Improve the UI (currently it's showing a text with the raw JSON of the event)
- Check if we can use Amber to sign the events of web applications
- Change the sign button to just copy the signature of the event
- Use content provider to sign events in background when you checked the remember my choice option on android
- Support for multiple accounts
Download and Install
Contributing
Please read CONTRIBUTING.md before opening a pull request. If an AI coding assistant wrote a large part of your change, also read CONTRIBUTING-WITH-AI.md.
Issues can be logged on: https://gitworkshop.dev/greenart7c3@greenart7c3.com/Amber
GitHub issues and pull requests here are also welcome. Translations can be provided by editing the strings.xml files under app/src/main/res/values-<locale>/ and opening a pull request.
You can also send patches through Nostr using GitStr to this nostr address
By contributing to this repository, you agree to license your work under the MIT license. Any work contributed where you are not the original author must contain its license header with the original author(s) and source.
Development with Codex Web
This repository includes reusable Codex Web environment scripts so cloud tasks can bootstrap the Android build without manual setup. In the Codex Web environment settings, use:
bash .codex/setup.sh
as the setup script, and optionally use:
bash .codex/maintenance.sh
as the maintenance script for cached containers. The setup script installs or verifies Java 21, bootstraps the Android command-line SDK, installs Android API 36/build-tools 36.0.0, accepts SDK licenses, and warms Gradle dependencies for the default free debug unit-test sources.
Security and Verification
🔐 All releases are cryptographically signed with GPG for your security.
Before installing any APK from our releases, we strongly recommend verifying its authenticity to ensure it hasn't been tampered with.
📋 View Release Verification Guide
The verification process involves:
- Importing our GPG public key
- Verifying the release manifest signature
- Checking file integrity with SHA256 hashes
GPG Key Details:
- Key ID:
44F0AAEB77F373747E3D5444885822EED3A26A6D - Fingerprint:
44F0 AAEB 77F3 7374 7E3D 5444 8858 22EE D3A2 6A6D - User ID:
greenart7c3 <greenart7c3@proton.me>
Quick verification:
# Import the signing key
gpg --keyserver hkps://keys.openpgp.org --recv-keys 44F0AAEB77F373747E3D5444885822EED3A26A6D
# Verify a release (example for v1.0.0)
gpg --verify manifest-v1.0.0.txt.sig manifest-v1.0.0.txt
⚠️ Security Notice: Only download releases from this official GitHub repository. If GPG verification fails, do not install the APK and report it as a security issue.
Verifying Reproducibility of Amber
To confirm that the Amber build is reproducible, follow these steps:
- Run the following command to build the image with no cache and specified version:
docker build -t amber-repro --progress=plain --no-cache --build-arg VERSION=v4.0.2 --build-arg APK_TYPE=free-arm64-v8a .
- After the image is built, run the container:
docker run --rm amber-repro
- You should see the following message indicating success:
APKs match!
Verifying Reproducibility of Amber Desktop
Every desktop download can be rebuilt from its tag and compared with the published file using desktopdiff.py. It compares what is inside: every path, file, symlink and executable bit must match, along with the installer's own scripts and tables (.deb maintainer scripts, .rpm scriptlets and dependencies, MSI custom actions, registry keys and shortcuts). Timestamps, owners and the installers' build dates are not compared, since they depend on when and where the files were packed. Packages are unpacked, never installed or run.
The app ships the Java runtime of the JDK it was built with, so a rebuild must use the same Temurin release. Print it from the download you are checking (--jdk takes any of the files below):
python3 desktopdiff.py --jdk Amber-X.Y.Z-linux-x86_64.tar.xz
21.0.12.1+1-LTS means Temurin jdk-21.0.12.1+1. Use the .tar.gz / .zip archive of that release, not its installer, which is packaged differently.
Linux (.tar.xz, AppImage, .deb, .rpm)
- Build the image with no cache, the release tag and that JDK as a Docker tag (drop
-LTS,+becomes_). If it is wrong, the build stops and names the right one:
docker build -f Dockerfile.desktop -t amber-desktop-repro --progress=plain --no-cache --build-arg VERSION=vX.Y.Z --build-arg JDK=21.0.12.1_1 .
- Run the container:
docker run --rm amber-desktop-repro
- You should see
Builds match!four times: for the tarball, the AppImage, the.deband the.rpm. ANote:about the.deb'sDependsor the.rpm'sRequiresdoesn't fail the check: jpackage lists the distro packages that provide the app's libraries on the build machine, which change with the distro's updates.
Windows (.msi, .exe)
jpackage only builds for the OS it runs on, so rebuild on Windows x64:
- Unzip the Temurin
.zipand pointJAVA_HOMEat it. - Build the release:
git clone https://github.com/greenart7c3/Amber.git
cd Amber
git checkout vX.Y.Z
New-Item keystore.properties
.\gradlew.bat :desktop:packageMsi :desktop:packageExe
- Compare in WSL or on any Linux machine with
msitoolsinstalled (apt install msitools).desktopdiff.pyreads the MSI with msitools rather thanmsiexec, which would run the package's own actions:
python3 desktopdiff.py Amber-X.Y.Z-windows-x64.msi desktop/build/compose/binaries/main/msi/Amber-X.Y.Z.msi
python3 desktopdiff.py Amber-X.Y.Z-windows-x64.exe desktop/build/compose/binaries/main/exe/Amber-X.Y.Z.exe
macOS (.dmg)
Rebuild on a Mac of the same architecture as the download (arm64 for Apple silicon, x64 for Intel):
- Unpack the Temurin
.tar.gzandexport JAVA_HOME=<unpacked folder>/Contents/Home. - Build and compare:
git clone https://github.com/greenart7c3/Amber.git
cd Amber
git checkout vX.Y.Z
touch keystore.properties
./gradlew :desktop:packageDmg
python3 desktopdiff.py ~/Downloads/Amber-X.Y.Z-macos-arm64.dmg desktop/build/compose/binaries/main/dmg/Amber-X.Y.Z.dmg
Certificate fingerprint for AppVerifier
com.greenart7c3.nostrsigner
E8:AB:8C:69:33:3B:68:63:6D:D4:6C:E2:42:40:8C:79:55:3A:7F:D9:05:5D:05:4D:61:DA:AB:AB:AD:A5:3B:BF
fdroid
com.greenart7c3.nostrsigner
56:DC:63:19:96:A5:5C:22:84:79:04:48:C7:DC:9F:1D:D0:5D:F5:96:B2:CE:48:82:31:36:33:F5:60:2E:5F:E4
Usage
Check NIP 55 and NIP 46 for more information.


