Cwa-wishlist: [DISCUSSION] LineageOS and CWA: how to use?

Created on 23 Jun 2020  ·  32Comments  ·  Source: corona-warn-app/cwa-wishlist

How can I use the corona-warn-app with LineageOS? Ideas? Setting improvements?

I tried following setting:

  • flash fresh build of LineageOS 7.1.2 an a Galaxy S3 (i9300)
  • flash suaddon
  • flash gapps pico
  • install afwall+
  • disconnect the play services and playstore from internet with afwall+
  • do not activate a google account (perhaps freeze play store with titaniumbackup?)
  • install corona-warn-app without using the playstore of this device (maybe the plays store of another device)
  • connect the corona-warn-app to internet with afwall+

It works. I use this device as my coronofon with nothing else than the corona-warn-app. Unfortunately I have to take a second device with me.

Does this settings makes sense? I hope, that the play service can't send any data to google, because it's blocked by afwall+. But I'm not very familar with the gapps.
Any Ideas to improve the setting?


Internal Tracking ID: EXPOSUREAPP-2956

enhancement mirrored-to-jira

Most helpful comment

@no-go Thanks for your constructive replies, they are very valuable to this discussion.
There are two kinds of people: Those who come up with ideas like @ethpi and new projects like @theScrabi, and others who only complain and demand (@no-go).

All 32 comments

We keep this issue open as reference for interested users who want to make the app work on LineageOS or simply discuss alternatives. However, we will move it to the cwa-app-android repository.

Mit freundlichen Grüßen/Best regards,
SW
Corona Warn-App Open Source Team

Hm. That is not a option for me:

  • I do not want (or I am not able) to root my phone to install a firewall app
  • I do not want to install any kind of gapps

So, this workaround looks a bit strange to me, but, ok. I hope, that CoraLibre creates a Privacy-Preserving Contact Tracing Protokoll workaround in "some weeks".

@no-go You don't have to do anything. These instructions are for users who run LineageOS. I'm also excited about CoraLibre, but we have to understand that it is a community project which doesn't have a million Euro budget like CWA. Last thing I heard is that they need someone proficient with the Blueetooth stack, so I hope more people will join the project and make some real progress.
@ethpi: Thanks for the instructions!! I was looking into a way to make CWA work on LineageOS (without having to send data to Google), let's see if this works!

hahaha, the CWA using google closed source Tracking API and APK download discussions are really trash bags.

I am running LinageOS - so why I do not to have to do anything, if I want a really open Corona Warning App? Additionally installing and running LinageOS is possible without rooting the phone. @cypheron Setzen, sechs!

@no-go Thanks for your constructive replies, they are very valuable to this discussion.
There are two kinds of people: Those who come up with ideas like @ethpi and new projects like @theScrabi, and others who only complain and demand (@no-go).

I didn't mean to sound so negative. The workaround is probably an interesting solution for some people who want to use gapps with LineageOS (for CWA they have to) and still want to make their system more safe. One must not overlook at this point that @ethpi additionally uses a 2nd mobile phone despite all these measures. The next comments should therefore rather come from people who have tested it too and take away his worries or give him tips about afwall+ from @ukanth

  • I do not want (or I am not able) to root my phone to install a firewall app
  • I do not want to install any kind of gapps

For Everyone's Information: relevant issue for this is corona-warn-app/cwa-app-android#75 .

This discussion here is obviously only about a LineageOS+gapps solution.

I am surprised the S3 supports BLE. It's not listed in the specs.

I am surprised the S3 supports BLE. It's not listed in the specs.

Oh, sounds bad. The CWA doesn't reports any error on my S3. I thought, CWA works correctly, because the status of "Risiko-Errmittlung" is:
internet connected / active BT : "Aktiv"
internet disconnected, active BT: "Eingeschränkt"
internet disconnected, deactivated BT: "Eingeschränkt"

How can I test, if the S3 works properly? Is there any suitable logcat command?

I am surprised the S3 supports BLE. It's not listed in the specs.

Oh, sounds bad. The CWA doesn't reports any error on my S3. I thought, CWA works correctly, because the status of "Risiko-Errmittlung" is:
internet connected / active BT : "Aktiv"
internet disconnected, active BT: "Eingeschränkt"
internet disconnected, deactivated BT: "Eingeschränkt"

How can I test, if the S3 works properly? Is there any suitable logcat command?

see corona-warn-app/cwa-app-android#668 for a method to test. Active beacon transmission is probably not working (according to this list: https://altbeacon.github.io/android-beacon-library/beacon-transmitter-devices.html see "i9300").

edit:
official samsung website: "NOTE: The Samsung devices which are compatible with Bluetooth Low Energy technology are Samsung Galaxy S4 (GT-I9500) , Samsung Galaxy S III (GT-I9300) and Samsung Galaxy Note II (GT-N7100). "
source: https://www.samsung.com/in/support/mobile-devices/what-is-bluetooth-low-energy-ble-technology/

It seems i9300 (like Galaxy S4 i9500) supports BLE, but no active beacon transmission.

I guess full BLE & active beacon transmission support starts with Galaxy S5 (SM-G900, 2015) and up.

True. Beacon transmission is one thing, but I am surprised the device supports BLE even for receiving. Seems like most BT 4.0 chips come with BLE, it's just often disabled in firmware.

I tried a similar but simpler setup with an i9305 (Galaxy SIII LTE) which don't work right now, although it looked very promising the first days:

  • pico Gapps
  • "plain" Lineage v14.1 (Android v7.1)
  • Internet access only from time to time (via wifi)
  • No firewall, no privacy rules.

I don't know if there are any issues with bluetooth etc, but it seems even "Exposure checks" (Settings | Google | COVID-19 Exposure Notifications | Exposure checks) are not working like expected: All entries show Number of keys = 0 and Number of matches = 0.

Does anybody using Gapps see here "sane" numbers?

On my i9300 it's the same. Every check shows zero "number of keys" an zero "number of matches". I checked this numbers on the phone of my son. He uses a "normal" stock ROM with the full Googleworld. I can find only the same zeros. So I hope the CWA works correctly on my i9300, because it shows the same manner as on a stock ROM.

Same behaviour here on a Lineage 17.1 phone with gapps pico.

But the same also applies to a "normal" Trekstor Android 7.0 tablet.

So I hope the CWA works correctly on my i9300, because it shows the same manner as on a stock ROM.
[...]
But the same also applies to a "normal" Trekstor Android 7.0 tablet.

Thanks for you feedback.
Confusing. Is there any other way to find out if it works reliable?

That seems also to be one the most mentioned issues by comments in Google Play Store. Just relying on a green box saying "everything is working" seems to be too less for people with some technical background and not-off-the-shelf SW.
Usual systems are quite too complex to just trust a flag without a way to make it plausible. This also holds here.
Having said this, I think the developers made a good job in showing only relevant information and making the UI as simple as possible in general.

Searching the FAQ, I have found this which seems to indicate its just a display error ...

Confusing. Is there any other way to find out if it works reliable?

You can try https://github.com/marq24/UUID0xFD6FTracer/ - it tracks the amount of nearby devices sending out appropriate tokens.

Usual systems are quite too complex to just trust a flag without a way to make it plausible. This also holds here.

I agree.

You can try https://github.com/marq24/UUID0xFD6FTracer/ - it tracks the amount of nearby devices sending out appropriate tokens.

I have tried and it works, needed some minutes to find a beacon (another test device). (To be honest, I even don't know how often these are sended ;)

Approx. every 250 ms iirc.

I have tried and it works, needed some minutes to find a beacon (another test device).

Not sure, but it seems I must take that back. It also finds some device even if Exposure API is turned off in Google settings :(
[EDIT: ... and I am pretty sure there is no other device.]

I second the reading (and statements of @MilesTeg97 and @treysis), that the i9305 does not support beacon advertising. I tried several BLE scanning apps without success. The most reasonable were nRF Connect and Locate Beacon, but I also tried UUID 0xFD6F Tracer and GPS logger II and some more.
I also scanned for beacons with my Linux computer using the scan mode of bluetoothctl and btmon to monitor (described here). I caught several 'LE Advertising reports' from other devices (neighbourhood), but not a single from my devices (all i9305).

Sadly the i3905 (Samsung Galaxy SIII LTE) seems not suitable for this use case.
I am not sure about receiving capabilities. At least nRF Connect lists some beacons raw data, which were also printed by btmon. Nevertheless, without advertising/beacon its useless for CWA use case.

It's probably a separate issue that missing BLE advertising capabilities (somehow called "peripheral mode") are not detected/handled.
In fact there are plenty of issue tackling this, I just didn't recognise before: corona-warn-app/cwa-app-android#842, corona-warn-app/cwa-app-android#674, corona-warn-app/cwa-app-android#510 and most important corona-warn-app/cwa-app-android#688. There is also a hint how you can detect missing 'peripheral mode' using nRF Connect.

[Sorry for getting OT, this issue is about LineageOS + pico Gapps etc.]

Good news: I got it working on i9305 with some "unofficial" v16.0 Lineage build. Peripheral mode
tested with nRF Connect which received both, a custom one sent manually and beacons from CWA.

Please be aware that I neither know the source of the Lineage image, nor do I trust him/her.

I'm interested in a similar setup:
I have an Android device without Google Play Service and without Play Store. Play Service is replaced by FOSS microG Service Core.
So where to download the CWA without Play Store access???
Is it possible at all that the CWA runs properly based on microG?

So where to download the CWA without Play Store access???

You can use Apkpure: https://apkpure.com/corona-warn-app/de.rki.coronawarnapp
Or install Aurora Store, to download CWA with Aurora Store directly from Play Store: https://f-droid.org/en/packages/com.aurora.store/

Is it possible at all that the CWA runs properly based on microG?

Please test it and report here.

@ethpi Why did you close that?

We keep this issue open as reference for interested users who want to make the app work on LineageOS or simply discuss alternatives. However, we will move it to the cwa-app-android repository.

see https://github.com/corona-warn-app/cwa-wishlist/issues/192#issuecomment-649015012

Note: The downloaded Apk from Apkpure seems to be broken (v1.5.1), anyway I don't really trust Apkpure and would love to see an "official" German download site.
Using Aurora Store violates the terms of use of Google Play Store. I was looking for a legal method instead.

Sorry for closing temporary, I pressed the wrong button.

The guys of CWA told in the beginning that they only offer the Android CWA on Play Store. I think there is no official download site besides Play Store.

@stsichler

Note: The downloaded Apk from Apkpure seems to be broken (v1.5.1), anyway I don't really trust Apkpure and would love to see an "official" German download site.
Using Aurora Store violates the terms of use of Google Play Store. I was looking for a legal method instead.

Maybe this helps you: https://github.com/corona-warn-app/cwa-app-android/issues/1483

Sorry for closing temporary, I pressed the wrong button.

no problem :)

and there fortunately seems to be progress, as @Ein-Tim pointed out. Glad to see that. Thank you!

...it would be a shame for an App paid by German tax money if it was dependent on foreign closed-source code and Google terms of use.

BTW also see the related feature request for Android to publish the app on F-Droid. It also describes how you can use microG with the app. See https://github.com/corona-warn-app/cwa-app-android/issues/1483

I have a related question to this topic: I am using a galaxy A3 2017 with LOS 16 and open gapps (i think it was the micro package). My CWA says everything is working, however it consistently only shows 16 exposure checks over the last 14 days. So I assume it is not working properly. Any ideas how to get it working? Ideally I would prefer not to flash LOS with microG or any other ROM but rather keep the LOS 16

@murkamu This is normal behaviour. The app checks the risk status once per day (i.e. it compares the downloaded positive keys with your stored keys). Because the timeframe until the keys are deleted is 14-15 days, the number of checks/14 days is usually 16.


Corona-Warn-App Open Source Team

Here we have a FOI request (_freedom of information_; IFG – Informationsfreiheitsanfrage) on FragDenStaat about this issue:
https://fragdenstaat.de/anfrage/sap-cwa-jira-tickets-zu-den-themen-f-droid-vollkommen-quelloffener-software-und-reproduzierbare-builds-corona-warn-app/
Feel free to follow, it asks for some internal Jira tickets about this topic (this issue here)/reproducible builds/F-Droid etc.

Good news: I got it working on i9305 with some "unofficial" v16.0 Lineage build. Peripheral mode
tested with nRF Connect which received both, a custom one sent manually and beacons from CWA.

Just a minor update on this: I managed to get BLE peripheral mode also working on a Galaxy S3 (i9300) with this "unofficial" Lineage build.
Flashing of the ROM is not straightforward, though, since there are issues with TWRP as well as the updater script within the ROM. But it works at the end.

Please be aware that I neither know the source of the Lineage image, nor do I trust him/her.

Was this page helpful?
0 / 5 - 0 ratings