-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using microG EN as library #1179
Comments
OK, some progress.
Now on to see if it does what it should be doing. :) |
Just FYI, the following modules should be enough for your usecase:
|
Yes that is precisely the list that I have reached, by pulling the strings and see what was coming with. :) |
As much as I can see, the app looks to be working: debug traces look good, and with a scanner, I can see beacons being generated, which stop when I change the app to stop advertising. I have to find out how to execute more sophisticated tests. |
Tried with a phone installed with stock LineageOS 17.1 (no microG). |
I am trying to verify that SwissCovid bundled with microG as libraries properly computes an exposure. I have the following scenario (using the SwissCovid calibration app):
Unfortunately, 3. never happens, and I am having a hard time debugging it. @mar-v-in: I did not find unit or integration tests regarding matching... how did you proceed to verify proper operation? |
@cgrigis I did the following tests:
RPI generation code for referenceCode to generate RPIs from within unit tests. Replace hex string and start interval number with appropriate values from real key. Prints out SQL statements to be executed on the `exposure.db`. public void testGenerateSample() {
key = new TemporaryExposureKey.TemporaryExposureKeyBuilder()
.setKeyData(ByteString.decodeHex("00024acc19391ca7523e1bdf8deeb018").toByteArray())
.setRollingStartIntervalNumber(2668896)
.setRollingPeriod(TestVectors.KEY_ROLLING_PERIOD_MULTIPLE_OF_ID_PERIOD)
.build();
for (int i = 0; i < TestVectors.KEY_ROLLING_PERIOD_MULTIPLE_OF_ID_PERIOD; i++) {
byte[] rpi = CryptoKt.generateRpiId(key, key.getRollingStartIntervalNumber() + i);
byte[] aem = CryptoKt.cryptAem(key, rpi, TestVectors.get_BLE_METADATA());
System.out.println("INSERT INTO advertisements(rpi, aem, timestamp, rssi, duration) VALUES (X'" + ByteString.of(rpi).hex() + "', X'" + ByteString.of(aem).hex() + "', "+((long)(key.getRollingStartIntervalNumber() + i)) * 600000L+", 0, 600000);");
}
} |
@mar-v-in As you pointed out in #1215, the fix already exists in |
@cgrigis do you have a fork of the EN application you are working on? I would like to do something similar with the Dutch app and would love to see exactly how you did this with SwissCovid |
@jellelicht There is a fork, but we're still working on it before releasing the code... should be a matter of a few days. |
Any news on this? I would also be interested in a GMS free version of the SwissCovid App. |
@oscaropenness There were some issues related to the backend that brought some delays due to testing, but there is now a very-alpha release of SwissCovid 1.2.0 available here: https://github.com/c4dt/dp3t-app-android-ch/releases/tag/nogaen-1-alpha2 . It uses the current master of microG instead of the latest release due to this blocking issue. |
Thank you very much! Anything in particular you would like to have tested? (Just mentioning some issues that are all related to this and might profit from your work.) |
@oscaropenness Thank you for testing! The next step is to make a release on F-Droid. If anyone has experience with the process, I would be happy to have some pointers. :) |
@Bubu Thank you for the links! I will try to mimic this, but I have a quick question: SwissCovid depends on the DP3T-SDK library; what is the proper way to do this in F-Droid? Using a |
Yes, either as a srclib built in the fdroid build run or pushed to jcenter/mavencentral/included via jitpack. |
A version of SwissCovid using microG as a library is now available on F-Droid. |
I am attempting to use microG as a library for the SwissCovid app as has been suggested by @mar-v-in.
My apologies in advance if I am doing something silly, just starting up with microG...
What I have done so far is remove the dependencies on GMS in my project, put the relevant modules in (
play-services-core
etc.), implementprovideDiagnosisKeys()
in the client lib, and minor fixes until the app compiles. Now the app starts running, but as soon as it tries to start EN (sendingcom.google.android.gms.nearby.exposurenotification.START
Intent), it fails to bind inMultiConnectionKeeper.this.context.bindService()
(returnsfalse
), eventually returningAPI_UNAVAILABLE
to the app. I have tried to change GMS_PACKAGE_NAME toorg.microg.gms
or the app package, with no success.From logcat:
My questions are:
Thank you in advance for any help!
The text was updated successfully, but these errors were encountered: