0xdeadf1sh/T1DMDROID

A personal Android app for Type 1 Diabetes.

Kotlin

15

521 commits

updated Oct 4, 2026

See the code

See what people are saying

SourceMessageScoreDate

I have trained a model to predict my blood sugar (Part 2) [P] (r/MachineLearning)

This is related to my [previous post](https://www.reddit.com/r/MachineLearning/comments/1vc1txc/i_have_trained_a_model_to_predict_my_blood_sugar_p/) where I shared an [encoder-only transformer model](https://github.com/0xdeadf1sh/T1DMAI) trained on ohiot1dm + shanghait1dm + azt1d datasets. This…

0

Oct 5, 2026

README

T1DMDROID

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.


Readings, the forecast band, and carbohydrate and insulin curves on one graph.

Up to four CGMs read at once and recorded side by side.

Freehand drawing on the graph.

Minigames played on the glucose trace.

Extends the forecast past the model's horizon by feeding it back in.

Scrub through past forecasts against the readings that followed.

The model fills gaps in the sensor record.

The model's estimate of the hour of day, against the local clock.

Backtests, accuracy, calibration, and Clarke and DTS error grids.

Train LoRA adapters on the phone for forecasting, infilling or backcasting.

Meals, with a carbohydrate appearance curve you can draw.

Insulin doses, with an action curve you can draw.

Time in range, GMI, CV, LBGI/HBGI, ADRR and MAGE.

Targets, alarms, dose rails, display and backups.

More

  • 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.

Your own model

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.

Building

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

Running on Xiaomi HyperOS / MIUI

  • 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.

License

MIT. See LICENSE.

android
android-app
android-application
cgm
cgm-remote-monitor
diabetes
t1dm
type-1-diabetes
type-1-diabetes-mellitus
written-by-llm

0xdeadf1sh/T1DMDROID

A personal Android app for Type 1 Diabetes.

Kotlin

15

521 commits

updated Oct 4, 2026

See the code

See what people are saying

SourceMessageScoreDate

I have trained a model to predict my blood sugar (Part 2) [P] (r/MachineLearning)

This is related to my [previous post](https://www.reddit.com/r/MachineLearning/comments/1vc1txc/i_have_trained_a_model_to_predict_my_blood_sugar_p/) where I shared an [encoder-only transformer model](https://github.com/0xdeadf1sh/T1DMAI) trained on ohiot1dm + shanghait1dm + azt1d datasets. This…

0

Oct 5, 2026

README

T1DMDROID

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.


Readings, the forecast band, and carbohydrate and insulin curves on one graph.

Up to four CGMs read at once and recorded side by side.

Freehand drawing on the graph.

Minigames played on the glucose trace.

Extends the forecast past the model's horizon by feeding it back in.

Scrub through past forecasts against the readings that followed.

The model fills gaps in the sensor record.

The model's estimate of the hour of day, against the local clock.

Backtests, accuracy, calibration, and Clarke and DTS error grids.

Train LoRA adapters on the phone for forecasting, infilling or backcasting.

Meals, with a carbohydrate appearance curve you can draw.

Insulin doses, with an action curve you can draw.

Time in range, GMI, CV, LBGI/HBGI, ADRR and MAGE.

Targets, alarms, dose rails, display and backups.

More

  • 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.

Your own model

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.

Building

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

Running on Xiaomi HyperOS / MIUI

  • 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.

License

MIT. See LICENSE.

android
android-app
android-application
cgm
cgm-remote-monitor
diabetes
t1dm
type-1-diabetes
type-1-diabetes-mellitus
written-by-llm