Re: [Replicant] Exposure Notification not working

2021-02-05 Thread doak+list
Hi Nick, hi all,

I tried the bluetooth firmware from an i9300 Lineage 16.0 which worked with 
CCTG, but it did not succeed.
The app tries to get location permissions which does not work, i.e. the system 
config does not recognise this app needing it.
So it seems the Android permissons stack does not support the way the app 
requests it. In fact I do not believe that the firmware is even involed at that 
point.

Does anybody here know more about permissions API stuff? I thought the official 
german Corona app (CWA) as well as it fork using MicroG (CCTG) does support 
Android 6 (but I can be wrong). Is there anything special in this regard for 
Replicant 6.

Regards,
doak





On 8 January 2021 00:31:56 CET, doak  wrote:
>Hi Nick,
>
>there is some news about it:
>I have found a custom Lineage ROM which supports BLE peripheal mode (beacons) 
>for i9300 and it seems to work
>like a charm with and CCTG [1] which includes 'microG'.
>
>Both, Replicant 6 and these ROMs use Linux 3.0.101, hence it seems to be 
>possible to create a patch for the
>Bluetooth stack and perhaps use another firmware to get that working with 
>Replicant in a free software compatible
>manner.
>Let me know what you think.
>
>> Are you able to compare whether the
>> firmware in your working i9305 is the same as the one that you would
>> have used with replicant, [...]
>
>Sorry for leaving this unanswered. I am trying to have a look into this the 
>next days ^^
>
>[1] https://codeberg.org/corona-contact-tracing-germany/cwa-android
>
>
>Reagrds,
>doak
>
>
>
>On 20.10.20 14:25, Nick wrote:
>> Hi doak,
>> 
>> Thanks very much for your response, your questions are things that I
>> hadn't generally thought of!
>> 
>>> Did you check if your device actually sends BLE beacons?
>> 
>> I did not! I checked that it received beacons, and it does, so I
>> naively assumed therefore that all would be perfect.
>> 
>>> At the beginning of the german tracing app I configured an i9305 (S3 LTE) 
>>> with Lineage, OpenGApps and the
>>> app (this not free SW) and *it seemed* to work but did **not**!
>>> Reason was that BLE beacons could be received, but not sended. I checked 
>>> that with 'nRF Connect' which is
>>> able to trace bluetooth packets and shows additional information also for 
>>> BLE beacons. Furthermore it is
>>> able to list device capabilities. In my case 'Periphal mode' was not 
>>> availabble.
>>> At the end I have tried dozen different (questionable) ROMs till I found 
>>> one which in fact supports pheriphal
>>> mode and thus was able to send BLE beacons.
>> 
>> I found an apk for the proprietary 'nRF Connect' app
>> (no.nordicsemi.android.mcp) online and installed it. It does indeed
>> list 'Peripheral mode' as not supported on this device (basic
>> Bluetooth Low Energy is, though). I only have one other android
>> device, which has very old software on, and I couldn't get nRF
>> Connect to install, so I couldn't test whether my phone was indeed
>> successfully sending BLE beacons, but presumably not. There is more
>> information about this "peripheral mode" being essential to the
>> sending aspect of exposure notifications at [0].
>> 
>> There is still some utility in running the app in "receive only"
>> mode, as I would still be alerted if someone I was in contact with
>> sufficiently closely tested positive and could have been infectious
>> at the time. But obviously it's nicer to be able to return the
>> favour.
>> 
>>> I am still not sure if the signal strength is as strong as it should be. My 
>>> gut feeling is that it is too
>>> weak which would make the estimated risk wrong and thus useless.
>> 
>> I have no idea how one could test such a thing. It does seem to be
>> collecting lots of IDs when I've been out, more than I would expect
>> if it was weaker than it should be. But I have no way of knowing
>> either.
>> 
>>> Furthermore I at least know that the i9305 is able to send them if used 
>>> kernel/firmware supports it. Dunni
>>> about i9300.
>> 
>> That is interesting indeed. I wonder what would be required of
>> replicant to support it. Are you able to compare whether the
>> firmware in your working i9305 is the same as the one that you would
>> have used with replicant, presumably that listed in
>> i9305-fwinfo/bluetooth.txt from
>> https://code.fossencdi.org/firmwares_nonfree.git ? If it is the
>> same, then at least we know that it's likely to be a kernel, rather
>> than firmware, issue. And if not, then potentially finding some
>> newer firmware could be enough to fix it.
>> 
>> Thanks again,
>> 
>> Nick
>> 
>> 0: https://github.com/corona-warn-app/cwa-app-android/issues/688
>> 
>


signature.asc
Description: PGP signature
___
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant


Re: [Replicant] Exposure Notification not working

2021-01-07 Thread doak

Hi Nick,

there is some news about it:
I have found a custom Lineage ROM which supports BLE peripheal mode (beacons) 
for i9300 and it seems to work
like a charm with and CCTG [1] which includes 'microG'.

Both, Replicant 6 and these ROMs use Linux 3.0.101, hence it seems to be 
possible to create a patch for the
Bluetooth stack and perhaps use another firmware to get that working with 
Replicant in a free software compatible
manner.
Let me know what you think.


Are you able to compare whether the
firmware in your working i9305 is the same as the one that you would
have used with replicant, [...]


Sorry for leaving this unanswered. I am trying to have a look into this the 
next days ^^

[1] https://codeberg.org/corona-contact-tracing-germany/cwa-android


Reagrds,
doak



On 20.10.20 14:25, Nick wrote:

Hi doak,

Thanks very much for your response, your questions are things that I
hadn't generally thought of!


Did you check if your device actually sends BLE beacons?


I did not! I checked that it received beacons, and it does, so I
naively assumed therefore that all would be perfect.


At the beginning of the german tracing app I configured an i9305 (S3 LTE) with 
Lineage, OpenGApps and the
app (this not free SW) and *it seemed* to work but did **not**!
Reason was that BLE beacons could be received, but not sended. I checked that 
with 'nRF Connect' which is
able to trace bluetooth packets and shows additional information also for BLE 
beacons. Furthermore it is
able to list device capabilities. In my case 'Periphal mode' was not availabble.
At the end I have tried dozen different (questionable) ROMs till I found one 
which in fact supports pheriphal
mode and thus was able to send BLE beacons.


I found an apk for the proprietary 'nRF Connect' app
(no.nordicsemi.android.mcp) online and installed it. It does indeed
list 'Peripheral mode' as not supported on this device (basic
Bluetooth Low Energy is, though). I only have one other android
device, which has very old software on, and I couldn't get nRF
Connect to install, so I couldn't test whether my phone was indeed
successfully sending BLE beacons, but presumably not. There is more
information about this "peripheral mode" being essential to the
sending aspect of exposure notifications at [0].

There is still some utility in running the app in "receive only"
mode, as I would still be alerted if someone I was in contact with
sufficiently closely tested positive and could have been infectious
at the time. But obviously it's nicer to be able to return the
favour.


I am still not sure if the signal strength is as strong as it should be. My gut 
feeling is that it is too
weak which would make the estimated risk wrong and thus useless.


I have no idea how one could test such a thing. It does seem to be
collecting lots of IDs when I've been out, more than I would expect
if it was weaker than it should be. But I have no way of knowing
either.


Furthermore I at least know that the i9305 is able to send them if used 
kernel/firmware supports it. Dunni
about i9300.


That is interesting indeed. I wonder what would be required of
replicant to support it. Are you able to compare whether the
firmware in your working i9305 is the same as the one that you would
have used with replicant, presumably that listed in
i9305-fwinfo/bluetooth.txt from
https://code.fossencdi.org/firmwares_nonfree.git ? If it is the
same, then at least we know that it's likely to be a kernel, rather
than firmware, issue. And if not, then potentially finding some
newer firmware could be enough to fix it.

Thanks again,

Nick

0: https://github.com/corona-warn-app/cwa-app-android/issues/688





OpenPGP_signature
Description: OpenPGP digital signature
___
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant


Re: [Replicant] Exposure Notification not working

2020-10-21 Thread Korbinian Demmel

Hi Nick,

thanks for your report.

Did you check if your device actually sends BLE beacons?
At the beginning of the german tracing app I configured an i9305 (S3 LTE) with 
Lineage, OpenGApps and the
app (this not free SW) and *it seemed* to work but did **not**!
Reason was that BLE beacons could be received, but not sended. I checked that 
with 'nRF Connect' which is
able to trace bluetooth packets and shows additional information also for BLE 
beacons. Furthermore it is
able to list device capabilities. In my case 'Periphal mode' was not availabble.
At the end I have tried dozen different (questionable) ROMs till I found one 
which in fact supports pheriphal
mode and thus was able to send BLE beacons.
I am still not sure if the signal strength is as strong as it should be. My gut 
feeling is that it is too
weak which would make the estimated risk wrong and thus useless.
Nevertheless. I am still running four devices with that setup for my family.

TL;DR
It would be good to know if your setup is able to send BLE beacons. Perhaps you 
can check that with another
device.
Furthermore I at least know that the i9305 is able to send them if used 
kernel/firmware supports it. Dunni
about i9300.

Btw, regarding free SW variant for this to work there is an interesting threads 
on Github of the german
tracing app (CWA, Corona Warn App). Most likely you already know that, I will 
post the link just in case.
I also post the link [2] which is related to my non-free setup.

[1] https://github.com/corona-warn-app/cwa-app-android/issues/75
[2] https://github.com/corona-warn-app/cwa-wishlist/issues/192


Regards,
doak


On 14.10.20 15:13, Nick wrote:

Apologies for the list traffic, I just realised I missed out a step
from the below instructions.


To be more explicit, these are the steps I took to get it to work:
- Installed the bluetooth firmware using the script at
   https://code.fossencdi.org/firmwares_nonfree.git


The part I missed out should go here:
- Add the microG repository to your Fdroid:
https://microg.org/fdroid/repo
(for signing key see https://microg.org/download.html)


- Installed microG from Fdroid
...


Nick
___
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant





signature.asc
Description: OpenPGP digital signature
___
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant


Re: [Replicant] Exposure Notification not working

2020-10-20 Thread Nick
Hi doak,

Thanks very much for your response, your questions are things that I 
hadn't generally thought of!

> Did you check if your device actually sends BLE beacons?

I did not! I checked that it received beacons, and it does, so I 
naively assumed therefore that all would be perfect.

> At the beginning of the german tracing app I configured an i9305 (S3 LTE) 
> with Lineage, OpenGApps and the
> app (this not free SW) and *it seemed* to work but did **not**!
> Reason was that BLE beacons could be received, but not sended. I checked that 
> with 'nRF Connect' which is
> able to trace bluetooth packets and shows additional information also for BLE 
> beacons. Furthermore it is
> able to list device capabilities. In my case 'Periphal mode' was not 
> availabble.
> At the end I have tried dozen different (questionable) ROMs till I found one 
> which in fact supports pheriphal
> mode and thus was able to send BLE beacons.

I found an apk for the proprietary 'nRF Connect' app 
(no.nordicsemi.android.mcp) online and installed it. It does indeed 
list 'Peripheral mode' as not supported on this device (basic 
Bluetooth Low Energy is, though). I only have one other android 
device, which has very old software on, and I couldn't get nRF 
Connect to install, so I couldn't test whether my phone was indeed 
successfully sending BLE beacons, but presumably not. There is more 
information about this "peripheral mode" being essential to the 
sending aspect of exposure notifications at [0].

There is still some utility in running the app in "receive only" 
mode, as I would still be alerted if someone I was in contact with 
sufficiently closely tested positive and could have been infectious 
at the time. But obviously it's nicer to be able to return the 
favour.

> I am still not sure if the signal strength is as strong as it should be. My 
> gut feeling is that it is too
> weak which would make the estimated risk wrong and thus useless.

I have no idea how one could test such a thing. It does seem to be 
collecting lots of IDs when I've been out, more than I would expect 
if it was weaker than it should be. But I have no way of knowing 
either.

> Furthermore I at least know that the i9305 is able to send them if used 
> kernel/firmware supports it. Dunni
> about i9300.

That is interesting indeed. I wonder what would be required of 
replicant to support it. Are you able to compare whether the 
firmware in your working i9305 is the same as the one that you would 
have used with replicant, presumably that listed in 
i9305-fwinfo/bluetooth.txt from 
https://code.fossencdi.org/firmwares_nonfree.git ? If it is the 
same, then at least we know that it's likely to be a kernel, rather 
than firmware, issue. And if not, then potentially finding some 
newer firmware could be enough to fix it.

Thanks again,

Nick

0: https://github.com/corona-warn-app/cwa-app-android/issues/688
___
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant


Re: [Replicant] Exposure Notification not working

2020-10-18 Thread doak

Hi Nick,

thanks a lot for your report.

Did you check if your device actually sends BLE beacons?
At the beginning of the german tracing app I configured an i9305 (S3 LTE) with 
Lineage, OpenGApps and the
app (this not free SW) and *it seemed* to work but did **not**!
Reason was that BLE beacons could be received, but not sended. I checked that 
with 'nRF Connect' which is
able to trace bluetooth packets and shows additional information also for BLE 
beacons. Furthermore it is
able to list device capabilities. In my case 'Periphal mode' was not availabble.
At the end I have tried dozen different (questionable) ROMs till I found one 
which in fact supports pheriphal
mode and thus was able to send BLE beacons.
I am still not sure if the signal strength is as strong as it should be. My gut 
feeling is that it is too
weak which would make the estimated risk wrong and thus useless.
Nevertheless. I am still running four devices with that setup for my family.

TL;DR
It would be good to know if your setup is able to send BLE beacons. Perhaps you 
can check that with another
device.
Furthermore I at least know that the i9305 is able to send them if used 
kernel/firmware supports it. Dunni
about i9300.

Btw, regarding free SW variant for this to work there is an interesting threads 
on Github of the german
tracing app (CWA, Corona Warn App). Most likely you already know that, I will 
post the link just in case.
I also post the link [2] which is related to my non-free setup.

[1] https://github.com/corona-warn-app/cwa-app-android/issues/75
[2] https://github.com/corona-warn-app/cwa-wishlist/issues/192


Regards,
doak




On 14.10.20 15:13, Nick wrote:

Apologies for the list traffic, I just realised I missed out a step
from the below instructions.


To be more explicit, these are the steps I took to get it to work:
- Installed the bluetooth firmware using the script at
   https://code.fossencdi.org/firmwares_nonfree.git


The part I missed out should go here:
- Add the microG repository to your Fdroid:
https://microg.org/fdroid/repo
(for signing key see https://microg.org/download.html)


- Installed microG from Fdroid
...


Nick
___
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant





signature.asc
Description: OpenPGP digital signature
___
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant


Re: [Replicant] Exposure Notification not working

2020-10-14 Thread Nick
Apologies for the list traffic, I just realised I missed out a step 
from the below instructions.

> To be more explicit, these are the steps I took to get it to work:
> - Installed the bluetooth firmware using the script at 
>   https://code.fossencdi.org/firmwares_nonfree.git

The part I missed out should go here:
- Add the microG repository to your Fdroid: 
https://microg.org/fdroid/repo
(for signing key see https://microg.org/download.html)

> - Installed microG from Fdroid
> ...

Nick
___
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant


Re: [Replicant] Exposure Notification not working

2020-10-14 Thread Nick
Quoth Nick:
> Yes, this is what microG does. They reimplemented it theirselves, so 
> it is free software, though I believe I read that there is some 
> non-free server-side stuff that it relies on, but I can't find that 
> right now.

I found the link I was thinking of - 
https://old.reddit.com/r/MicroG/comments/j4chda/whats_the_main_reason_you_use_microg/g7oqsur/
So I was slightly incorrect with my above statement, thanks to my 
dodgy memory. The microG code is fully free software, but most (if 
not all) of the covid apps use a proprietary Google library to hook 
into it.  However there has been some work to replace that Google 
library with the appropriate code from microG for some apps, see 
here: 
https://github.com/microg/android_packages_apps_GmsCore/issues/1179

Nick
___
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant


Re: [Replicant] Exposure Notification not working

2020-10-13 Thread Nick
Hi GNUtoo, thanks for your thoughtful answer. Sorry for not 
providing more links in my email to help readers.

Quoth Denis 'GNUtoo' Carikli:
> On Tue, 13 Oct 2020 19:43:59 +0200
> Denis 'GNUtoo' Carikli  wrote: 
> I've came across an article about it here:
> https://en.wikipedia.org/wiki/Apple/Google_Exposure_Notification_system
> 
> It seems to be a standard. It can probably be implemented at the
> OS/distribution level or in applications.

Yes, this is what microG does. They reimplemented it theirselves, so 
it is free software, though I believe I read that there is some 
non-free server-side stuff that it relies on, but I can't find that 
right now.

Anyway, good news is that I got it working, all with free software.  
It looks like the BLE thing was an irrelevance. The app in my 
country (the UK) is free software, too, thankfully; 
https://github.com/nhsx/covid-19-app-android-ag-public

I discovered that the reason it wasn't working for me was that I was 
missing "signature spoofing support", which microG needs for the 
exposure notification stuff it provides. I got that by installing 
Xposed and the FakeGApps module.

To be more explicit, these are the steps I took to get it to work:
- Installed the bluetooth firmware using the script at 
  https://code.fossencdi.org/firmwares_nonfree.git
- Installed microG from Fdroid
- Installed FakeStore from Fdroid (needed for microG to work for 
  this)
- Installed Xposed Installer from Fdroid
- Enabled root for apps from Settings -> Developer options -> Root 
  access -> Apps only
- Ran Xposed Installer to install Xposed, and rebooted when it 
  prompted
- Disabled root for apps from Settings -> Developer options -> Root 
  access -> Disabled
- Installed the FakeGApps Xposed Module from Fdroid, and enabled it 
  by pressing on the notification that came up to enable, and ticking 
  the checkbox that then appears
- Rebooted the phone again (may or may not have been necessary)
- Installed the APK of the Covid app (which for my country is only 
  officially available on Play Store, unfortunately, so I got it from 
  apkmirror.com

I also granted all optional permissions to the microG app from the Self-
Check screen of the app, but I don't know if they're necessary; I'll try
disabling them soon.

So, I hope this helps someone, and am happy and relieved that we can get
it working with all free software (except for bluetooth firmware)!

Thanks for your help,

Nick
___
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant


Re: [Replicant] Exposure Notification not working

2020-10-13 Thread Denis 'GNUtoo' Carikli
On Tue, 13 Oct 2020 19:43:59 +0200
Denis 'GNUtoo' Carikli  wrote:

> Do you have links or pointers to find more information on what
> the 'Exposure Notification system' is? More importantly, do you know
> if there are enough technical documentation on it to enable anyone to
> implement a compatible free software application?
I've came across an article about it here:
https://en.wikipedia.org/wiki/Apple/Google_Exposure_Notification_system

It seems to be a standard. It can probably be implemented at the
OS/distribution level or in applications.

Denis.


pgpr4bbkRDqgJ.pgp
Description: OpenPGP digital signature
___
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant


Re: [Replicant] Exposure Notification not working

2020-10-13 Thread Denis 'GNUtoo' Carikli
On Tue, 13 Oct 2020 10:16:31 +0100
Nick  wrote:

> Hi,
Hi,

> I want to use the national app that my government recently made 
> available that uses the Exposure Notification system to alert me of 
> people I've been in contact with who turn out to have been 
> infectious.
The easiest way would be to have a free software application that does
the same thing, but I've no idea if some people coded that or not.

Do you have links or pointers to find more information on what
the 'Exposure Notification system' is? More importantly, do you know if
there are enough technical documentation on it to enable anyone to
implement a compatible free software application?

In France there is also a government application that is somewhat
similar to what you describe but I didn't have the time to look if
there was any technical documentation on it or not.

There seem to some Wikipedia articles on the topic:
https://en.wikipedia.org/wiki/COVID-19_apps
https://en.wikipedia.org/wiki/Contact_tracing

Given that the COVID-19_apps points to free software code as well, it
might be interesting to research that and understand in which countries
free software applications could work easily and if complete
applications do exit yet or not.

> I found that the microG project have implemented this in their 
> alternative to Google Play Services, which is great. However, after 
> installing it, and then installing the exposure notification app 
> from my country (NHS Covid-19 app), the Exposure Notification check 
> seems to fail.
> 
> Could this be due to Replicant not supporting BLE (I 
> have no idea if it does)?  I installed the bluetooth firmware on my 
> phone (i9300) specially, so at least basic bluetooth is active.
Wikipedia says that it the Galaxy SIII (GT-I9300) has 'Bluetooth 4.0'
but doesn't mention BLE at all.

From https://en.wikipedia.org/wiki/Bluetooth_v4.0 we have:
> "Bluetooth Low Energy, previously known as Wibree,[83] is a subset of
> Bluetooth v4.0 with an entirely new protocol stack"

And from https://en.wikipedia.org/wiki/Bluetooth_Low_Energy we have:
> Bluetooth Low Energy technology operates in the same spectrum range
> (the 2.400–2.4835 GHz ISM band) as classic Bluetooth technology, but
> uses a different set of channels. Instead of the classic Bluetooth
> seventy-nine 1-MHz channels, Bluetooth Low Energy has forty 2-MHz
> channels

So given that (1) It most probably wasn't supported with the stock
Android distribution and that (2) BLE most probably requires hardware
support for it in the Bluetooth controller, it most probably doesn't
work on that device.

I didn't check if the chip / hardware was capable of BLE or not. If
anyone is curious and wants to check, the Bluemon project probably has
the infos on that. It would be nice to have a free firwmare for
Bluetooth and WiFi but so far no one implemented that yet.

Denis.


pgp1DgdMLQdFP.pgp
Description: OpenPGP digital signature
___
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant