An Android testbed for biohackers and researchers who run and test machine-learning models on blood glucose. It reads up to four CGMs at once (AiDEX X / LinX, Anytime CT5, Libre 3) over Bluetooth LE and runs your ExecuTorch models on their live output, on the phone. Android 12+, arm64 and x86_64, sideloaded.
Caution
Research use only. It is not a medical device and not clinically validated. Its forecasts and calculators may be wrong and must not be used for medical or dosing decisions, nor to replace a real CGM, its official app, or professional care. No warranty, no liability.
tall_blood_sugar_graph_that_shows_iob_and_cob.mp4Readings, the forecast band, and carbohydrate and insulin curves on one graph. |
read_from_multiple_sensors_at_once.mp4Up to four CGMs read at once and recorded side by side. |
paint_on_the_blood_sugar_graph.mp4Freehand drawing on the graph. |
drive_on_your_blood_sugar_curve.mp4Minigames played on the glucose trace. |
autoregressive_rolling_for_long_horizon_predictions.mp4Extends the forecast past the model's horizon by feeding it back in. |
see_previous_predictions_with_hindsight_mode.mp4Scrub through past forecasts against the readings that followed. |
test_infilling_capabilities_of_prediction_models.mp4The model fills gaps in the sensor record. |
visualize_model_time_output.mp4The model's estimate of the hour of day, against the local clock. |
advanced_model_evaluation.mp4Backtests, accuracy, calibration, and Clarke and DTS error grids. |
lora_finetuning.mp4Train LoRA adapters on the phone for forecasting, infilling or backcasting. |
log_carbohydrates.mp4Meals, with a carbohydrate appearance curve you can draw. |
log_insulin.mp4Insulin doses, with an action curve you can draw. |
advanced_blood_sugar_statistics.mp4Time in range, GMI, CV, LBGI/HBGI, ADRR and MAGE. |
advanced_settings_panel.mp4Targets, alarms, dose rails, display and backups. |
- Alarms: out-of-range and loss-of-signal.
- Nightscout: uploads readings.
- Watch link: pushes readings and forecasts over encrypted BLE to T1DMKDE (desktop) and T1DMAUTO (car head unit).
- Backup: export and restore as one gzipped JSON file.
Export an ExecuTorch .pte for the XNNPACK backend and its descriptor, as T1DMAI does, and push both:
adb push my.xnnpack.pte my.descriptor.json /sdcard/Android/data/com.t1dm.app.pub/files/models/Each descriptor in that folder loads as one model. Its artifact key names the .pte; without it, <id>.xnnpack.pte.
Android SDK 36 and the NDK, JDK 21, and Rust with the aarch64-linux-android and x86_64-linux-android targets and cargo-ndk on PATH.
./gradlew :app:assemblePublicRelease- Settings → Apps → T1DMDROID: Autostart on, battery No restrictions, Pause app activity if unused off.
- System Bluetooth app: battery Unrestricted.
- Recents: lock the app's card.
- Lock-screen glucose:
adb shell settings put secure lock_screen_show_silent_notifications 1
- T1DMSIM: the simulator whose synthetic traces pretrain the model.
- T1DMAI: trains the model and exports it to ExecuTorch.
MIT. See LICENSE.