Skip to content

poml88/libre3-auth-android-server

Repository files navigation

Libre 3 SKB shim — Android side

Android app that exposes a native crypto library (sourced from Juggluco's public APK) over HTTP, so the paired iOS client at poml88/libre3-auth-ios-sample-app can drive the Libre 3 BLE handshake from a stock iPhone.

Project status

  • To the best of my knowledge, this was the first publicly available open-source solution for Libre 3 BLE connectivity on iOS at the time of writing.
  • It is not fully offline, because this app still performs an HTTP request to the paired Android shim during each new BLE handshake.
  • In that sense, it is more accurate to describe this approach as “99% offline” rather than 100% offline.
  • This implementation may already be superseded by newer work toward a fully offline solution, including the Swift package LibreCRkit, which is being developed by other contributors.

Disclaimer

This is a personal hobby project for research and interoperability. It is not a medical device and is not affiliated with, endorsed by, or connected to Abbott Laboratories, FreeStyle Libre, or any of their subsidiaries or partners. All trademarks are the property of their respective owners.

The code is provided "as is", without warranty of any kind, express or implied. In no event shall the authors or contributors be liable for any claim, damages, or other liability — including but not limited to incorrect glucose readings, missed alarms, sensor damage, account lockout, or any direct, indirect, incidental, or consequential loss — arising from the use of, or inability to use, this software.

Do not use the output of this software to make medical or treatment decisions. Always rely on a regulator-approved reader or the manufacturer's official application for clinical use.

Use at your own risk.

Credits

Built on two prior open-source Libre 3 projects:

  • Juggluco — the native loader in app/src/main/cpp/loader.cpp is a port of Juggluco's loadlibs.cpp. The .so libraries this app loads come from Juggluco's published APK (not redistributed here).
  • DiaBLE — BLE / NFC protocol notes used by the paired iOS client mirror DiaBLE's Libre3.swift.

Native libraries are not committed

app/src/main/jniLibs/ is listed in .gitignore. Populate it from Juggluco's public APK before building:

unzip -o Juggluco-X.Y.Z-arm64.apk \
  lib/arm64-v8a/liblibre3extension.so \
  lib/arm64-v8a/libcrl_dp.so \
  lib/arm64-v8a/libinit.so \
  -d /tmp/jug
mkdir -p app/src/main/jniLibs/arm64-v8a
cp /tmp/jug/lib/arm64-v8a/*.so app/src/main/jniLibs/arm64-v8a/

Build

./gradlew :app:assembleDebug
adb install -r app/build/outputs/apk/debug/app-debug.apk
adb shell am start -n dev.libre3shim/.MainActivity
adb forward tcp:8080 tcp:8080
curl -sS http://127.0.0.1:8080/health

Hardware

This android shim can best run on an Apple Silicon computer, for example M1 Mac Mini, in the emulator, or any non-rooted Android phone, like Pixel 6a.

More

Architecture, HTTP API, status, and engineering notes live in NOTES.md.

About

Android shim that exposes Libre 3 native crypto over HTTP for a paired iOS research client on stock iPhone.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors