Contrac

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

This is a very-much-alpha version of a contact tracing app compatible with the Google/Apple Exposure Notification protocol.

The app is being developed to be compatible with Germany's Corona Warn App servers. It's now possible to upload and download diagnosis keys. It's set to interact only with a test server right now, which is a deployment of the official cwa-server that doesn't perform any real contact tracing.

Feel free to upload/download as much as you want. The server will be shut down at some point in the future.

The app is still in development, and I don't recommend its use. It will likely affect your battery life and shouldn't currently be used as an alternative to the official app. However if you're brave and interested to test it, please let me know how you get on.

Because the app requires Bluetooth 4.1 or later, it unfortunaetly isn't 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!

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
Changelog: 

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

* 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.

* 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.

* 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.

* 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.

* 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.

* 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.

* 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.

 

Comments

tmojo's picture

Since upgrade to SFOS 3.4 Contrac fails to install due to missing libprotobuf-lite.so.21

flypig's picture

Thanks for flagging this up; it's useful to know. I have an updated version which I've been testing on the early access release and which I'll roll out very soon (i.e. the plan is before the end of the weekend). I'll message you again here when it's up and would be grateful if you could try it.

pvcn's picture

Download latest keys doesn't work for me, always shows "Network Error" Both with WLan an Mobile Data (Device: Sony Xperia X Compact)

flypig's picture

Could you please let me know what the servers are set to on the Settings page please?

pvcn's picture

Download Server 127.0.0.1:8003 Upload: 127.0.0.1:8000 Verification: 127.0.0.1:8004

flypig's picture

Thanks, that's useful. Could you please update them to the following and try again? The values you have were carried over from an earlier install, but they've changed since (I should have fixed this in the code, but it didn't occur to me):

  1. Download server: 34.245.121.186:8003
  2. Upload server: 34.245.121.186:8000
  3. Verification server: 34.245.121.186:8004
pvcn's picture

Thank you very much, it works!

Firefox84's picture

How is it possible that the app is still active if Bluetooth is deactivated? This shouldn't be no? If there is no Bluetooth no contacts can be scanned. Great Work Flypig! Keep on! :)

flypig's picture

You're right, it's not possible. This is just bad error reporting: the scanning/sending process fails, but this doesn't get fed back properly to the UI. There's an issue about it on github here, so eventually I'll get to fixing it. Thanks for the motivating words :)

miqu's picture

Finnish government open sourced the apps for Android and Iphone and their server. They use the google-apple APIs and I suppose the server addresses could be asked from them for Finnish users. So if that option to change server address does come we could use it.

flypig's picture

Yes, it's worth trying. As I mentioned in reply to @Juanro49, the option to change servers is on the Settings page, but I've not had a chance to test against the Finnish servers either. There's also some discussion about this on FSO that would be worth following: https://forum.sailfishos.org/t/porting-the-new-koronavilkku-application-...

Juanro49's picture

It's possible to add option to change server? (for example spanish servers of radar covid) Thanks!!

flypig's picture

You can configure the servers from the Settings page (from the pulley menu), but the bigger question is whether the Spanish servers are compatible with the German servers. I'm afraid I've not had time to check (but if you have the opportunity and could post your results here or to github, this would be great to know).

rigo's picture

Do you have contact to the development team of the covid app?

flypig's picture

I've been speaking with @werkwolf since he's involved with the CWA development and who has been very helpful, but if you have suggestions I'm always open to ideas.

woidboy's picture

Are the preset servers still test servers? If yes, what are the IP addresses of the official servers? BTW, great app!

flypig's picture

Thanks for the encouragement! It's still the test servers I'm afraid. As soon as I know the official servers to use, I'll update the app to use them (I don't have the addresses myself I'm afraid).

mak_rev's picture

I have installed it on my Xx. It seems to work fine. 

Thank you for making it possible! 

flypig's picture

Thanks for letting me know. That's interesting as the Bluetooth part isn't working for everyone on the Xperia X (see the discussion here https://github.com/llewelld/harbour-contrac/issues/28 ), so there must be differences between devices. I'm glad it's working for you.

Klaas's picture

I wonder what data go to Google. Metadata?

flypig's picture

There's no data (or metadata) that goes to Google at all. If you enter a TeleTAN from a positive test result, your keys will be uploaded to the servers run by Deutsche Telekom/SAP for the German governmment, but the keys are essentially random numbers as far as the government is concerned. The protocol's designed to be privacy-preserving. It's not perfect, but my personal view is that it's pretty good.

michl's picture

Tested on Fxtec Pro1 and it's working! :-)

Immediatelly after activating it, it sended one message an received 2 messages from the 2 pebble watches. After a stroll through the town, that lasted about half an hour, it received over 300 messages.

Thank you for that work!

 

 

flypig's picture

It's great to hear it's working on the f(x)tec; full credit to the porters for their amazing bluetooth work.

pvcn's picture

Diagnosis Key upload and download seem to work (Xperia X Compact), but show wrong date: I uploaded/downloaded today (August 10th), App shows "up to date" and August 9th as date.

flypig's picture

Thanks for testing this, and for the info about the wrong date. Is it the upload or download that states the wrong date (or both)? Could it be to do with your timezone depending on what time you were checking (e.g. if your date was different to UTC)?

pvcn's picture

It was both upload and download that showed wrong day. As i didn't up-/download at midnight, it should have nothing to do with the timezone. Since latest updates, the Button "Download latest keys" results "Network error" (I have no WLAN for a few days and use Mobile Data),

melvin's picture

Is it possible to use the official cwa servers with the new update? If yes, what are their IP addresses?

flypig's picture

Not yet I'm afraid. There are a couple more pieces of implementation needed, plus I don't yet have the official servers' addresses. It's slower than I'd like too, but there are many pieces that need to fit together and I'll continue releasing versions as it progresses. In the meantime, if you notice any issues with the test servers, that would be really useful to know about.

tmojo's picture

Have your app running now for several days and the counters for sent and receiced keys increased over the time, even when app UI was closed. So this seems to be working alright.
Today I had to restart my phone, due to AlienDalvik issues. After the restart the xounter says 1 beacon sent, 0 received. Does that mean the app looses all its beacon on reboot?

flypig's picture

Yeah, the counters are reset when you restart the device, but the captured keys are still stored. If you look in ~/.config/contracd/contacts you should find a bunch of files (two per day) storing the beacons you've received. It's roughly 20 bytes per beacon in the .dat files, so you can get an idea how many have been captured overall from the filesize.

I'm glad to hear it's running alright for you. Which device are you using?

Pages