Open stephan-strate opened 2 years ago
No, this is not possible as the database is protected and can be only accessed by the app itself.
You could switch to the CCTG app (https://f-droid.org/de/packages/de.corona.tracing/), which is a fork on the official "Corona Warn App". This fork allows you to export the internal database and to send it to the Warn App Companion. Please note that this only works for possible exposures in the future, for exposures in the past, the only way to access the information is using root privileges.
Even with a phone that is not rooted it should be possible to copy the data from the database path to some user-accessible directory. The companion could then read it from there.
I am running LineageOS (without root) and accessed the files via the TWRP recovery and adb shell
/adb pull
.
@mh- Do you think an option to manually import the DB would be feasible?
I'm trying to keep the options as simple as possible. If you use Lineage OS, why not also use the CCTG app?
I definitely realized too late that this app (CCTG) event existed. So for the past data that's unfortunately too late for me :(
Database import for RaMBLE is now implemented. Maybe this can be expanded to your request as well.
Hi everyone, I just came across this issue looking for a documentation on how to get data from CWA via adb. I think this would be a good option to add, running adb commands isn‘t that difficult and prevents the loss of old exposure records.
I don’t have deep knowledge of adb though. @LukasGibeh, could you share the command you used? Does it work while the system is running too or do you need a custom recovery to be able to obtain the needed priviligues? Thanks
Hi @tobidwest,
I didn't check whether the directory that is mentioned in the code is really containing the exposure records. I assume that they are in Google's protobuf format.
For me, it works as follows:
adb devices
should then show your phone (as "unauthorized")adb devices
will then recognize your phone properlyadb root
adb pull /data/data/com.google.android.gms/app_contact-tracing-contact-record-db/
Thank you, @LukasGibeh
As far as I know, adb root
doesn't work with a stock rom but one can add ro.debuggable=1
to the file /system/build.prop
However, this might go too far for the intended purpose
Is there any way to export or read existing data from the official "Corona Warn App" without root?