Home · Install Android WebNFC via Mac USB Link
Build and install the Android app onto your phone from macOS · pgp.webnfc.pages.dev
Web NFC Bridge wraps the PGP Web NFC site in a WebView and adds native NFC read/write, plus a Format tag button for low-level Type 4 tag formatting. You develop and install from your Mac; the app runs on an Android phone with NFC (API 26+).
Recommended — build from source or push a downloaded APK to a connected Android phone.
Copy the whole block below and paste it into Terminal once — each line runs in order. First-time setup can take several minutes (Homebrew downloads).
brew install openjdk@17 brew install --cask android-commandlinetools export JAVA_HOME="/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home" export ANDROID_HOME="/opt/homebrew/share/android-commandlinetools" export ANDROID_SDK_ROOT="$ANDROID_HOME" export PATH="$JAVA_HOME/bin:$ANDROID_HOME/platform-tools:$PATH" yes | sdkmanager --licenses sdkmanager "platform-tools" "platforms;android-35" "build-tools;35.0.0"
The export lines only apply to that Terminal window. Add them to ~/.zshrc if you want
adb and sdkmanager available in every new session. Steps 2–4 below are separate (phone setup, then install).
adb devices
You should see your device listed as device (not unauthorized).
Pick one of the options below — you do not run all of them.
A — Download and install in one go (downloads the APK from this site, then installs via USB):
B — Download the APK, then install via USB
Save the file to ~/Downloads, then run the install commands.
adb install -r ~/Downloads/webnfc-bridge.apk adb shell am start -n dev.webnfc.bridge/.MainActivity
C — Build and install (you have the full webnfc-bridge project folder in ~/Downloads):
cd ~/Downloads/webnfc-bridge/android ./build-apk.sh
Adjust the path if you unpacked webnfc-bridge somewhere else. No git required.
Skip this step if you installed the downloaded APK with adb install or on the phone directly.
Only run it when ./build-apk.sh errors because ~/.android/debug.keystore is missing.
mkdir -p ~/.android keytool -genkeypair -v \ -keystore ~/.android/debug.keystore \ -alias androiddebugkey \ -keyalg RSA -keysize 2048 -validity 10000 \ -storepass android -keypass android \ -dname "CN=Android Debug,O=Android,C=US"
Download the APK on your phone, then open it to install.
Download webnfc-bridge.apk