DiaKEM / dexcom-g7-apk-patcher

Dexcom G7 .apk patcher | ✅ AAPS Broadcasting ✅ Disable compatibility checks ✅ Enable Screenshots ✅ Decrease required android version
91 stars 31 forks source link

Broadcast like G6 BYODA #1

Closed Kitekater closed 2 years ago

Kitekater commented 2 years ago

Great work. Works fine on my Samsung Galaxy S21 Ultra.

Best would be, if the G7 App could broadcast the data to other apps, like the BYOD-G6-Builder, to use it for Loop

khskekec commented 2 years ago

Hey,

Nice to hear that it works. My son will receive his G7 sensors tomorrow so that I will be able to test it also.

To be honest I am not that familiar with Android's capabilities to do that and the details about the implementation for G6 app.

Do you have some links i could check out. Would be interesting to at least now the required format and necessary data.

Kitekater commented 2 years ago

Im sorry, im mostly a user, but trying very much in DIY. Here is a link to AAPS in german, but you can change the language if necessary The DIY Loop

https://androidaps.readthedocs.io/de/latest/index.html

and here the BYOD G6 App Builder https://docs.google.com/forms/d/e/1FAIpQLScD76G0Y-BlL4tZljaFkjlwuqhT83QlFM5v6ZEfO7gCU98iJQ/viewform

khskekec commented 2 years ago

Hey,

I will check this and also try to contact the G6 Dev(s).

Unfortunately I am pretty sure that I will not be able to provide a solution for this that fast. Sounds like it is bigger then just removing the compatibility check 😔.

But i will check it.

Best regards

Selçuk

Kitekater commented 2 years ago

Thank you very much. I am So happy to have the patched App. Now i use the way over xdrip to send it to my loop.

If there is ån update of the orginal G7 app, will you check it out here or Do i have to learn in Linux an apk shreddering :-D

khskekec commented 2 years ago

Hey,

Could you explain the data sharing from the Dexcom G7 app to AAPS. Is there nightscout and xdrip in between?

Regarding updates:

I will definetly provide pre-built apks here as soon as I know about new version. So no need to learn something really boring 😉.

Nevertheless you can just open a new ticket for this purpose. This will make it also transparent for others and prevent some delays. Unfortunately there is no notification system for this to feed me with updates, as far as I know.

Best regards

Selçuk

Kitekater commented 2 years ago

Hi. In AAPS you can select several Sources for Getting Glucose data. One of IT is BYOD for the Dexcom App. With G6 there is nó App between. My Test-G7 sends Data to your patched App. Xdrip collects this data by getting it from the Dexcom widget. AAPS can get data from xdrip, so that closes the circle. Witch Format the G7 App needs for local Broadcast to AAPS, i dont know. You can look into the Facebook Group "looped-de" . There are the developer from AAPS also active

Thanks å lot for your Work.

Greetings Marc

khskekec commented 2 years ago

Hey,

Thank you for clarification.

I think that this might be worth to get it place in the README.

I would like to prevent something confusion out there.

I will prepare the content. Can I kindly ask you to audit it afterwards because I am not familiar with the AAPS world?

Kind regards

Selçuk

Kitekater commented 2 years ago

Hey,

Thank you for clarification.

I think that this might be worth to get it place in the README.

I would like to prevent something confusion out there.

I will prepare the content. Can I kindly ask you to audit it afterwards because I am not familiar with the AAPS world?

Kind regards

Selçuk

I can try, but i only have a G7 Sensor until next Tuesday. Then the 10 days of testing the sensor are over. Next sensors would be in Dezember

mxsrm commented 2 years ago

The BYODA for G6 does this by inserting a hook, but the original author said that it is much work to do this again, since the G7 app is a complete re-write.

Dexcom G7 widget -> xDrip Companion Mode -> AAPS works fine for now.

khskekec commented 2 years ago

Hey @mxsrm and @Kitekater,

can someone provide me a link which describes exactly this procedure? I was not able to find something explicitely. I would like to add it to the readme.

And would you be so kind and just add your devices as discussion topic here: https://github.com/DiaKEM/dexcom-g7-apk-patcher/discussions/new?category=supported-tested-devices.

You don't have to write anything if it works for you without doing anything. Manufacturer and Model are enough.

Kind regards

Selcuk

blaqone commented 2 years ago

This is how AAPS receives Bg values via intents:

https://github.com/nightscout/AndroidAPS/blob/f8acbad759ccdc4dcdc58a7d150103dfe757ff94/app/src/main/java/info/nightscout/androidaps/receivers/Intents.kt

blaqone commented 2 years ago

https://github.com/nightscout/AndroidAPS/tree/f8acbad759ccdc4dcdc58a7d150103dfe757ff94/app/src/main/java/info/nightscout/androidaps/receivers

khskekec commented 2 years ago

Hi,

checked that out already and trying to get the right environment to be able to test and debug the changes in the app.

Unfortunately I was not able to get some information from the BYODA-DEV which would be great.

Because we also plan to use AAPS for my son it is getting more interesting now also for us.

Best regards

Selçuk

blaqone commented 2 years ago

Let me know - I can hopefully help.

khskekec commented 2 years ago

Hey,

some short update:

I just rooted my phone with lineage and magisk and put a sensor on my arm...

Actually i have everything i need to debug. Whether i will be able to test, i do not know. But good news:

I just found the place which creates the new reading in the local database of the app. Seems that this is a good starting point to add modification and use it to fire the Broadcast-Intent.

Bildschirmfoto 2022-10-22 um 04 50 15
khskekec commented 2 years ago

Short Update:

Today I tried to understand how the data dispatched by the Provider should look like to be interpretable by AAPS.

Therefore I built a small app like this:

Screenshot_20221025-034143_Diakem AAPS Dexcom G7.png

This small helper was able to prepare the data and. Broadcast it to AAPS. There is a small issue with the timestamp but overall it work:

Screenshot_20221025-034334_AndroidAPS.png

Next steps will be to try a static dispatching inside the Dexcom app.

khskekec commented 2 years ago

Short Update:

The first broadcast version is ready and built based on the most recent version of Dexcom App.

@blaqone will test it now in production.

khskekec commented 2 years ago

Tests were successful. The patch is available now and issue can be closed.