Open rugk opened 4 years ago
@rugk do you have any details on the export format? Does it actually contain the history of collected ids or just the history of risk calculations? From the description it sounds like the latter.
do you have any details on the export format?
No, because as said I could not even find the file/where it exports those. :see_no_evil: (Any help appreciated… :see_no_evil: )
BTW of course a silly, but technically possible solution to this problem is also: Have another phone with you with Google Play Services for >= 14days (or it may be possible to only do that at the end of the 14 days) and then upgrade your main phone to microG. Afterwards, keep your other phone for 14 days too and then you can also upgrade the other phone to microG. If the other phone did not get any notification in these 14 days then it's fine, hehe…
Of course, this is a little weird and not everyone has two phones at their disposal, so this is only a workaround,
Sorry to say that, but it’s only a report, not the actual RPI data. To get the actual RPI (and your own TEK) data, you need to have access to the GMS files on your device, i.e. root access. They are stored in LevelDBs, see e.g. here for sample code: https://github.com/mh-/corona-warn-companion-android/blob/8e2dc84998a73440eccbc6028e0cc9d02fc2a2ad/corona-warn-companion/src/main/java/org/tosl/coronawarncompanion/gmsreadout/ContactDbOnDisk.java#L52
Sorry to say that, but it’s only a report, not the actual RPI data.
Ok, anyway, and how can one get this report? I.e. where is it saved? Also note you can click on the time it shows you in the second screen and then it shows you some hash and stuff, I had guessed this is all you need.
The purpose of the report is: you can check what your government’s app is doing. If they e.g. sent different DK files to you than to other people, you could see different hashes, and you could notice that they give you a special treatment...
On my device (Android 9), the report itself seems to be available for any type of export I want. E.g.: send by e-mail
The name of the report is “all-exposure-checks.json”.
On my device (Android 9), the report itself seems to be available for any type of export I want. E.g.: send by e-mail
Ah, so it should open the "share menu" of Android? Hmm… does not seem to happen/work in my case. :thinking:
Feature request on Mastodon for this. Seedvault unfortunately does not include microG data in the backup…
I have just filed a pull request which allows you to export the database from microg (#1291). You could then check the keys with the corona companion app, once corona-warn-companion#97 is implemented. This is not exactly the same as a re-import, but should give similar (in my opinion even better) results.
b7717e5 adds support for backups using adb backup/restore or seedvault. Backups will also cover exposure.db.
Use case
I have used Google Play Services before. Now I want to switch to microG. Because of the Corona/COVID-19-situation I do not want to loose my data of encounters in the last 14 days.
How to
What I can currently do: Go to the COVID screen:
Export the data:
Problem: After you press that menu entry, you get literally no feedback. I have no idea where that data is saved. (checking the usual internal storage I could not find anything.)
Intended solution
Anyway, what we need in microG's implementation is just an import feature for those. For whatever reason, Google Play Services do not offer any import feature though – maybe so one cannot abuse it and generate fake results. (though AFAIK this is already cryptographically assured, as you cannot easily generate those hashes or respectively only random ones hmm) Anyway, would be great if we could switch to microG but keeping the 14days history, so one does not loose data that could result in a missed COVID notification.
For completeness you may of course also implement an export feature – I guess if you have an import feature that will be easy. So you'd have feature parity with Google's implementation in this regard then.