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

flypig's picture

This is useful info... and I guess my hypothesis was wrong then. I'll dig into the code in more detail to try to figure out what else might be happening then. Thanks for testing.

pvcn's picture

Thanks, installation works now, but it didn't fix RSSI-Problem and "scan and send active" has to be activated manually after phone reboot

flypig's picture

Thanks; I'm glad installation worked now and I'll look into the settings issue. My guess is it's symptomatic of some deeper issue (e.g. the daemon is crashing on exit for some reason), but let's see. One thing to try is to change the settings without ever activating the bluetooth scanning/sending (i.e. open app and don't enable scan; change settings; reboot phone; see if settings are the same). If the settings are the same in this case, it's likely an indication that the daemon is crashing when the scanning is being deactivated.

pvcn's picture

Hi, i just upgraded to 3.4.0, after upgeade, Contract App has disappeared from phone and i cannot reinstall it. Error says: libquazip.so.1 is missing

flypig's picture

Thanks for letting me know. I switched the versions over late last night and 0.7.4-2 should install on 3.4.0. Is it 0.7.4-2 you see as available? I got confirmation from another user that it was working on 3.4.0 now, but if that's what you see, I'll need to look into it again.

pvcn's picture

Wow, i get a lot of output running that command! The version number in the line starting with "i" is 0.7.4-1

flypig's picture

Since the rpm version is 0.7.4 but the app says you're on 0.7.2 something has gone wrong and it's likely my fault. I've updated the packages on OpenRepos, and if you could upgrade to the latest to see whether it fixes your RSSI-config problem I'd be grateful.

The latest package will only run on SailfishOS 3.4.0, so ideally you should upgrade your phone first if you haven't already.

pvcn's picture

Just tested and i am confused: App says I am on 0.7.2, Storemann says 0.7.4 and didn't offer me an update the last days, maybe because i haven't updated to sailfish 3.4 jet . After restart, part of the callibration now stayed like I set it (Signal strength -34), but the RSSI-Correction was set back from 8 to 5

flypig's picture

The OpenRepos versions are still for 3.3 so you should get the update. Before looking at the RSSI issue I'd like to get you on the correct version. It's not clear whether this is an OpenRepos glitch, or an error I've made. Would you be able to run the following at the command line and share the output? It'll make clear which versions are installed (marked with an "i") and which are available.

zypper search -v harbour-contrac
pvcn's picture

First: Thank you again for developing this App! It seems like the device callibration is set back to default (-30, 4) after every restart of the phone (Xperia X Compact, which i set to -34, 8) Best regards!

flypig's picture

Hi! Thanks for the info. Can I ask which version of the app you're using? It's possible this was fixed in the latest version 0.7.4 (only released last night).

Bramba's picture

In first, THANK YOU VERY MUCH for your incredible efforts! It is a pleasure to see that such an important tool for our healthiness is now also available for Sailfish OS!

From my point of view, I experienced some little confusion when using the app: Right now it is possible to run the app even in case of bluetooth disabled (what doesn't make sense in eyes of functionality of the app).

Would it be possible to add some alert that will warn the user in case of app is running with disabled bluetooth?

flypig's picture

Thanks for the kind words :) You're absolutely correct that the situation when bluetooth is disabled needs to be fixed. There's a bug on github about it, but I've not had the chance to sort it yet (even though I think it should be relatively straigtforward). Thanks for adding your voice, it's good to know what's most important.

philter's picture

I updated on my xperia x with sfos 3.3.0 to 0.7.2. Now everything works perfectly. I'll update my mi4 too

cquence's picture

Hello and thank you for the efforts in bringing contact tracing to SFOS. I have recently upgraded to 3.4.0.22 and it seems I cannot install the latest version of Contract. An error is displayed: Nothing provides libquazip.so.1. I guess some dependency is missing / not loaded? Can I install it manually from somewhere? thanks again for your great work!

flypig's picture

Yes you can! Please grab yourself the correct version from here: https://www.flypig.co.uk/dnload/dnload/sailfishos/contrac/0.7.2-1/

These won't get automatically updated of course, but I'll switch OpenRepos to use the 3.4.0 version as soon as it becomes the public SFOS release:

cquence's picture

Thanks, I have updated successfully using the link provided. I will switch back to Openrepos version once 3.4.x is official. Quick question with regards to server backends, if I understand correctly each country implemented their own backend/servers for contact tracing (and they are not cross-compatible). Based on these grounds, are there any NHS server addresses (for the UK) that can be used?

Some source code is available on GitHub but there's no clear server address. I went a bit through files like:

https://github.com/nhsx/covid19-app-system-public/blob/master/src/aws/su...

https://github.com/nhsx/covid19-app-system-public/blob/master/src/aws/up...

They seem to be dynamically composing an upload url based on the data type uploaded.

unmaintained's picture

I've implemented the NHS QR code scanner part of the NHS app on SFOS so it's possible to check in to venues with a native SFOS app and save time and location but, as mentioned in other comments, it's unclear at this point from what URL to get the list of venues which recorded covid cases so there is no way to warn SFOS users yet.

flypig's picture

That sounds very neat. Having the addresses for the data, and being able to explore the files available, would make things so much easier. If I find out any info about the servers in use, I'll be sure to share it.

flypig's picture

I'm glad you got things working, even if you're not in the right country to make full use of it.

Unfortunately you're right that different countries implemented their own backends (just imagine a world in which they collaborated!). Thank you for checking the NHSX code. I've not had a chance to work through it myself, but I agree it looks like they didn't include the server addresses in the source (the client config isn't helpful either). With a running copy of the app it could probably be captured from the network.

tmojo's picture

Anyway, thanks a lot for you effort to get this running. From my 'customer' point of view your development seems to be very thoughtful and professional.

flypig's picture

That's very good of you to say and also great motivation! Thank you.

tmojo's picture

Same behaviour for me, installation of the 3.4.0 22 version works on may XA2+ but downloading fails with network error.
Tried this from German DSL/Wifi and Vodafone.de 4G network

flypig's picture

The new versin 0.7.2 should hopefully fix the issue.

flypig's picture

Yes, sorry about this. I got it to download the last 15 days of keys "just in case", but of course they only go back 14 days on the server, so it's generating an error. I'll need to add an extra check, but in the meantime I suggest you try this fix as a workaround.

unmaintained's picture

Perform daily update results in a Network error on the download page.
Error downloading is also displayed on the main page.
Version: 0.7.1-1/sfos-3.4.0

flypig's picture

Thanks for letting me know. Can you please check your server values match these on the settings page:

Download: https://svc90.main.px.t-online.de
Upload: https://submission.coronawarn.app
Verification: https://verification.coronawarn.app

unmaintained's picture

Yes, they match the ones from the app.

unmaintained's picture

Can I "curl" something to test if the server is reachable?
If i try https://svc90.main.px.t-online.de/ without any parameters there seems to be no output.

flypig's picture

Yes, good idea. The following should get you a file: https://svc90.main.px.t-online.de/version/v1/configuration/country/DE/ap...

Pages