Personal Android app that turns photos of dated, hand-written paper notes into structured digital notes, syncing every hour to a private Git repo so the same notes appear inside Obsidian on a laptop.
Source spec: ~/ObsidianVault/01-Projects/AndroidApp-PaperNotes/spec.md.
# JDK 17 (already available at /export/apps/jdk/JDK-17_0_5-msft on this machine)
source scripts/env.sh
# Android SDK command-line tools
mkdir -p ~/Android/Sdk/cmdline-tools
cd ~/Android/Sdk/cmdline-tools
curl -L -o tools.zip 'https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip'
unzip tools.zip && mv cmdline-tools latest && rm tools.zip
yes | sdkmanager --licenses
sdkmanager "platforms;android-35" "build-tools;35.0.0" "platform-tools"cd ~/Code/PaperNotes
bash scripts/fetch-and-convert-model.sh
# Verifies app/src/main/assets/models/{encoder,decoder,tokenizer.json,preprocessor_config.json}The .onnx assets are gitignored. Anyone re-cloning the repo runs the script above to regenerate them.
source scripts/env.sh
cd ~/Code/PaperNotes
./gradlew assembleDebug
# Output: app/build/outputs/apk/debug/app-debug.apkadb over USB (recommended).
- On the phone: enable Developer Options (tap Build Number 7×) → enable USB Debugging.
- Plug phone into laptop via USB; accept the RSA fingerprint prompt on the phone.
- Verify connection:
adb devices. - Install:
adb install -r app/build/outputs/apk/debug/app-debug.apk.
- Open Settings.
- Confirm the pre-filled remote URL (
git@github-personal:UditWadhwa/cuddly-octo-train.git) and branch. - Tap Generate SSH key, then Copy public key.
- On GitHub →
cuddly-octo-train→ Settings → Deploy keys → Add → paste, Allow write access. - Tap Test connection → on success, Save.
- The hourly
SyncWorkerdoes the rest.
- Sync target (runtime, what the app pushes):
cuddly-octo-train. The app only writes undernotes/. - Source repo (this directory): hosted at
github.com/UditWadhwa/papernotes. Set up automatically by the bootstrap script. See "Pushing source" below.
See spec §5 for the full module/package tree. Top-level:
~/Code/PaperNotes/
├── app/ # the Android module
├── gradle/libs.versions.toml # version catalog
├── scripts/fetch-and-convert-model.sh
└── scripts/env.sh # source this for JAVA_HOME / ANDROID_HOME
./gradlew :app:testDebugUnitTest # DateParser, MonthFileSerializer
./gradlew :app:connectedDebugAndroidTest # Room round-trip, SyncWorker- Camera capture wiring. The
TakePicturecontract is launched but the file-URI flow is left as a follow-up. Capture-from-gallery works end-to-end and exercises the full OCR + parse + save path. - OCR speed without KV-cache. Current decoder runs greedy without a key/value cache — fine for ≤ 64-token notes; long pages will exceed the 5 s budget. Switch to a KV-cached export if it bites.
- R2 fallback for >100 MB models. If
scripts/fetch-and-convert-model.shproduces assets > 100 MB total, switch to download-on-first-launch and host them in a release of the runtime sync repo (see spec §15 R2). Document the deviation in this README.