Contrac

Rating: 
5
Your rating: None Average: 5 (16 votes)

Contrac is a beta-quality Corona-Warn-App compatible exposure notification app. It uses the Google/Apple Exposure Notification protocol and Germany's Corona-Warn-App backend servers.

The app supports sending/receiving exposure notification Bluetooth beacons, downloading and checking diagnosis keys from the servers and uploading positive test results using a TeleTAN.

The implementation is fully separate from the official implementations, so I can't offer any guarantee that it will necessarily work as expected. If you enter a TeleTAN it'll be officially registered (assuming the code works) so please only use it with real test results.

The app doesn't support the automatic download of test results using a QR code and it also requires nudging daily to download the diagnosis keys from the server. Both of these are being worked on.

The earlier alpha version of the app (thanks everyone for testing it) ran against a test instance of the official cwa test server. However, in practice the test server works slightly differently to the real thing. Therefore I'm afraid I can't offer any guarantee that the app will work as expected; please bear this in mind. It's also likely to affect your phone's battery life.

You use it at your own risk I'm afraid.

Having said that, if you discover it's not working as expected, or even if it is working as expected, please let me know or file a bug report.

Because the app requires Bluetooth 4.1 or later, it's unfortunately not compatible with Jolla 1 or Jolla C devices. I've also had reports it has problems on the Xperia X, but it should work on the later X devices.

Installing the app will install a background service that will continue to scan/broadcast even if you close the app. The service is stopped and uninstalled when you remove the app.

The source is available on github. PRs are welcome!

The 0.7.10-1 version of the app in the repo is built to be compatible with Sailfish OS 4.5.

Screenshots: 
Application versions: 
AttachmentSizeDate
File harbour-contrac-0.0.1-1.armv7hl.rpm229.23 KB30/07/2020 - 22:54
File harbour-contrac-0.1.1-1.armv7hl.rpm236.98 KB09/08/2020 - 14:54
File harbour-contrac-0.2.1-1.armv7hl.rpm242.29 KB22/08/2020 - 16:52
File harbour-contrac-0.3.1-1.armv7hl.rpm244.41 KB24/08/2020 - 16:06
File harbour-contrac-0.4.1-1.armv7hl.rpm251.26 KB01/09/2020 - 18:49
File harbour-contrac-0.5.1-1.armv7hl.rpm274.71 KB07/09/2020 - 00:11
File harbour-contrac-0.6.1-1.armv7hl.rpm607.78 KB14/09/2020 - 23:10
File harbour-contrac-0.6.2-1.armv7hl.rpm607.89 KB16/09/2020 - 23:27
File harbour-contrac-0.7.1-1.armv7hl.rpm615.53 KB04/10/2020 - 18:54
File harbour-contrac-0.7.2-1.armv7hl.rpm622.56 KB05/10/2020 - 00:54
File harbour-contrac-0.7.3-1.armv7hl.rpm622.98 KB08/10/2020 - 20:30
File harbour-contrac-0.7.4-1.armv7hl.rpm622.87 KB08/10/2020 - 23:28
File harbour-contrac-0.7.4-2.armv7hl.rpm624.79 KB14/10/2020 - 00:08
File harbour-contrac-0.7.5-1.armv7hl.rpm619.87 KB02/01/2021 - 01:58
File harbour-contrac-0.7.6-1.armv7hl.rpm616.87 KB31/01/2021 - 18:45
File harbour-contrac-0.7.7-1.armv7hl.rpm619.45 KB17/02/2021 - 00:49
File harbour-contrac-0.7.10-1.armv7hl.rpm665.6 KB02/02/2023 - 22:56
File harbour-contrac-0.7.10-1.aarch64.rpm689.7 KB02/02/2023 - 22:56
File harbour-contrac-0.7.10-1.i486.rpm727.26 KB02/02/2023 - 22:56
Changelog: 

* Thu Feb 2 2023 David Llewellyn-Jones <david@flypig.co.uk> 0.7.10-1
- Change quazip-devel naming for Sailfish OS 4.5 target.
- Add make as a build requirement.

* Sat May 14 2022 Oskar Roesler <oskar@oskar-roesler.de> 0.7.9-1
- Require Qt Linguist pkg for tranlations. (#115) This package is preinstalled on the SDK, but not on OBS.
- Add chum information to rpm spec file

* Mon May 09 2022 Oskar Roesler <oskar@oskar-roesler.de> 0.7.8-2
- Add LICENSE as stated in README.md

* Sat May 07 2022 Oskar Roesler <oskar@oskar-roesler.de> 0.7.8-1
- Remove the YAML spectacle file #96
- Set OpenSSL 1.1.1 as the default build option #97
- Add notifications for important events #98
- Scan the QR-code containing the GUID. #105
- F performance improvements #107
- Code refactoring DayStorage::findDtkMatches #108
- Build against 4.4.0.58 #109
- Disable sailjail sandboxing #110

* Sun Feb 14 2021 David Llewellyn-Jones <david@flypig.co.uk> 0.7.7-1
- Store settings periodically to avoid data loss on unclean exit
- Code formatting tidied up with clang-format
- Improve start up failure handling
- Fix erroneous desktop-file-uninstall from uninstall process
- Tidy up build configuration
- Support automatic daily download of diagnosis keys
- Added Oskar Roesler (bionade24) as a contributor

* Sun Feb 16 2021 David Llewellyn-Jones <david@flypig.co.uk> 0.7.7-1
- Store settings periodically to avoid data loss on unclean exit
- Code formatting tidied up with clang-format
- Improve start up failure handling
- Fix erroneous desktop-file-uninstall from uninstall process
- Tidy up build configuration
- Support automatic daily download of diagnosis keys
- Added Oskar Roesler (bionade24) as a contributor

* Sun Jan 31 2021 David Llewellyn-Jones <david@flypig.co.uk> 0.7.6-1
- Download daily, rather than hourly, diagnosis key archives.
- Allow selection of key region for downloads (DE or EUR).
- Improve download progress precision.

* Fri Jan 1 2021 David Llewellyn-Jones <david@flypig.co.uk> 0.7.5-1
- Move risk calculation to a separate thread.
- Fix calculation to improve accuracy.
- Decouple calculation update from user interface app.
- Note the calculation now takes considerably longer.

* Thu Oct 8 2020 David Llewellyn-Jones <david@flypig.co.uk> 0.7.4-1
- Fix BLE state machine to allow graceful restart when filtering isn't supported.

* Thu Oct 8 2020 David Llewellyn-Jones <david@flypig.co.uk> 0.7.3-1
- Fix BLE state machine to allow graceful shutdown when filtering isn't supported.

* Sun Oct 4 2020 David Llewellyn-Jones <david@flypig.co.uk> 0.7.2-1
- Attempt to download data only from last 14 days (to avoid an error from day 15).

* Sun Oct 4 2020 David Llewellyn-Jones <david@flypig.co.uk> 0.7.1-1
- Updates the Chinese translations, thanks to dashinfantry.
- Updates the German translations, thanks to spodermenpls.
- Switches to using the official Corona-Warn-App servers.
- Uses the server REST API rather than the S3 protocol for diagnosis key downloads.
- Allows network errors to be cleared by clicking on the label.
- Adds an info banner to the main app, warning that functionality isn't guaranteed.
- Old diagnosis key downloads are cleaned up if they're over 15 days old.
- Calculates the need for fresh downloads at startup based on cached folders.
- Performs the Corona-Warn-App specific "combined risk score" calculation.
- Uses the low/high risk threshold configuration downloaded from the server.

* Wed Sep 16 2020 David Llewellyn-Jones <david@flypig.co.uk> 0.6.2-1
- Updates the Chinese translations.
- Fixes a timing bug so that an update can now be performed every day.

* Mon Sep 14 2020 David Llewellyn-Jones <david@flypig.co.uk> 0.6.1-1
- Adds new Chinese translations.
- Adds an improved cover page with status and actions.
- Improves the About page, which now includes contributors.
- Adds support for configuring the device attenuation values.
- The risk configuration is downloaded from the Corona Warn App servers.

* Sun Sep 6 2020 David Llewellyn-Jones <david@flypig.co.uk> 0.5.1-1
- Diagnosis key files are now tested directly after download.
- The risk status is shown in the UI, along with other useful info.

* Tue Sep 1 2020 David Llewellyn-Jones <david@flypig.co.uk> 0.4.1-1
- Adds encrypted beacon metadata send/receive.
- Refines the data aggregation algorithm to give improved results.
- Adds unit tests for metadata, metadata validity and data aggregation.
- Improves the beacon matching unit tests.

* Mon Aug 24 2020 David Llewellyn-Jones <david@flypig.co.uk> 0.3.1-1
- Adds persistent state to contracd.
- Send/received counts are now persistent.
- The enabled state of scanning/advertising is now persistent.
- The SIGINT signal is now handled by contracd.
- Diagnosis keys are now available for upload without needing to enable scan/receive.

* Sat Aug 22 2020 David Llewellyn-Jones <david@flypig.co.uk> 0.2.1-1
- Adds TeleTAN submission by the user.
- Adds separate pages to show upload and download progress.
- Improves error reporting for uploads and downloads.
- Streamlines the main page to remove progress indicators and add a status line.

* Sun Aug 9 2020 David Llewellyn-Jones <david@flypig.co.uk> 0.1.1-1
- Supports diagnosis key downloads from the test server.
- Supports diagnosis key upload to the test server.
- Adds a setting page for configurating the sever to use.

* Tue Jul 7 2020 David Llewellyn-Jones <david@flypig.co.uk> 0.0.1-1
- Initial alpha release.
- Supports beacon scan and send.

Comments

phonzon's picture

Hey, it needs 'libprotobuf-lite.so.25' can you help?

philter's picture

I compiled Contrac for aarch64.

The RPM can be found here

cnlpete's picture

@flypig, i did find the main culprit for the bad update times a while back, did you manage to have a look at my pull request at github?

tmojo's picture

On GitHub there's plenty of activity in the Contrac repo, mainly by @bionade24. Will those changes eventually be reflected in a new release of Contrac. The current version has been released almost 10 months ago and I assume we're missing many enhancements merged by @bionade24 and others.

Caluna's picture

Hi flypig,

do you work on an aarch4 version or is development stopped?

cy8aer's picture

Hm, tried it on a new installation XA2 4.1.0.24: Cannot find libquazip5.so.1

flypig's picture

Do you have any success if you try to install one of these ones directly?

 

John's picture

Getting same behavior as nobodyinperson on my XA2 running SFOS 4.0.1.48 Koli.
Thx for the app btw!

nobodyinperson's picture

Hi, is it normal that after refreshing the daily keys it takes ages in the "update" stage? Just keeps spinning on the main page. At some point (hours?) later, it sometimes finishes. Xperia X. Thanks for the app!!

eisbaerle's picture

The time needed for the refresh is getting unbearable. It is in fact at least 72 hrs per refresh. Additionally the app tends to crash occasionally during that time. In that case or in case of an unexpected power down apparently the refresh needs to start from scratch. Right now I am stuck with last update on 20-Jan. The app is hugely appreciated. But it sadly has become virtually unusable. Contrac 0.7.7, Sony XA2, 4.3.0.12 Suomenlinna

illyrion's picture

Same here, XA2 Ultra Dual Sim with latest SFOS

defactofactotum's picture

Hi David, do I understand correctly that this app only works in Germany? Or is there a way to configure it for other countries? I tried using the Italian app Immuni via AD on my phone and it didn't work. As vaccination rolls out it may be even more useful than before to be able to trace outbreaks.

dalas_revo's picture

I'm a new user and like to thank you very much for this app. I have two problems : I am running it on a Sony Xperia XA2 Ultra.

1st problem: the calculation does not come to an end. I have chosen only DE, but after 2.5h I still see "Aktualisiere" in the main page. I guess 2.5h is longer than expected?

2nd problem : Übertragungsstärke and RSSI always revert to zero, I can't set the correct values for my device.

Best regards
Daniel

dalas_revo's picture

Additional information : I am running 0.7.7 on 4.0.1.48

flypig's picture

Thanks for the feedback dalas_revo. For the first problem, it may seem a bit absurd, but sometimes it will take a very long time. I mean really long (like 12 hours or more), depending on a variety of factors, such as whether your phone goes into deep sleep mode. Please leave it running for 24 hours and if it doesn't complete file a bug on github. It'll run in the background if you close the app, but will have to be restarted if you reboot. For the second problem, when you say "revert to zero" can you elaborate on when this happens (e.g. on restarting the app, restarting the phone, etc.). Again, it would help if you could file a bug on github so we can investigate further.

dalas_revo's picture

Thanks for your quick reply! The two problems seem to have solved. I let it run overnight and it finally completed. For the second problem : a restart of the phone was necessary, but then it worked again. What I meant was: when thebapp was installed freshly, I had the values -30/5 which should be correct for the XA2 ultra. But when I re-opened the settings, they were changed to 0/0. I tried to set them correctly, but every time I opened the settings they were reverted to 0/0. Now, after the restart, they stay correct. So I guess ut was a temporary problem and no bug filing should be necessary, right?
By the way: is there any reason that the calculation takes so incredibly long? With the Android app it seems to be completed in seconds.

flypig's picture

Thanks for getting back about this. The calibration settings are stored by the background service, so it sounds to me that there may have been a glitch in communication between the UI and the service. It's definitely a bug and so it'd still be good to have a bug report, but entirely at your discretion. We do have a task to optimise the algorithm, but Contrac is a clean room implementation of the spec, so any reason I could give for differences with Android would be speculation on my part, I'm afraid!

dalas_revo's picture

Can't you borrow code or the algorithm from the Corona Warn App Companion?
https://github.com/mh-/corona-warn-companion-android

dalas_revo's picture

Unfortunately I had to change my device, as the other one broke, so I can't gather any logs and I didn't manage to reproduce the issue on my new device. Would you like me to file a report anyway?

flypig's picture

Thanks for trying with the new device (sorry to hear about your device though). It wouldn't harm to file a bug report even if it's a bit vague (but maybe make clear that it's not possible for you to collect further info). Maybe it was a one-off, but it always helps to have it recorded in case others experience the same.

flypig's picture

The latest version in the repo (0.7.7) is now built for Sailfish OS 4.0.1. If you're running an older version of the OS there's a link in the description for alternative RPMs for you to use.

wosrediinanatour's picture

Id it possible to solve this by dependencies in RPM spec files...? So you could have several versions in one repo...?

flypig's picture

Thanks for the suggestion; I'm keen to make this process as easy as possible for users. I'm not aware of a way though, apart from giving the packages different names (which would have its own problems), but if someone has a solution I'd be pleased to know the details.

Uninstalling and reinstalling the app won't wipe your config or saved data, and I do my best to release compatible versions the same day as the OS upgrades to try to minimise the hassle.

tmojo's picture

Today I upragded Sailfish to 4.0.1. Before upgrade it asked me to uninstall Contrac, which I did. Now I tried to install again and get the message tjat it requires libprotobuf-lite.so.23. I guess it's the same issue as the previous update to SFOS 3.4.

flypig's picture

Yes, thanks for highlighting this. You'll need a different version if you're running the Sailfish OS 4.0.1 Early Access release. There's a link at the end of the description text you can use to grab yourself a copy.

I'll switch the default standard repository to a 4.0.1-compatible version of the app as soon as 4.0.1 moves out of Early Access.

tmojo's picture

That was quick!
Thanks a lot, mate!

WhereIsMyN9's picture

First things first: Thanks for this Corona-Warn-App compatible app. I'm using/testing ist since the early alpha versions.

The daily update does not work for me anymore. I get "Network error" and "Error downloading" when I try to perform the daily update. Error occurs with mobile data and WLAN connection.

flypig's picture

With the 0.7.6 release the daily update should now work again, but if you have any trouble with it please let me know.

flypig's picture

Thanks for letting me know, and for your continued support. It seems the hourly updates are no longer provided, but the daily updates are, so I need to change the code to use them instead. I'll update the app over the weekend.

WhereIsMyN9's picture

Thanks for this fast reply and your plan to update. Good to know that there might be some changes on server-side. I thought there could be a problem with my phone, because nobody else reported a problem with the updates.

I'm just using your app (what meant testing in the beginning). I don’t have the skills to really support. I really appreciate your work.

Pages