Closed Maxelweb closed 2 years ago
You must setup the $ANDROID_HOME
environment variable pointing at Android SDK and do npm install
inside the QRCodeFuzzer
folder. After that, follow these steps:
appium
in a terminalnode index.js
Remember to place verificac19.apk
inside that folder, as it will be automatically installed by Appium.
index.js
to make the application wait for updates
Automatic
in order to ensure auto-updates of the certificates). verification type
to BASE. gstreamer
and v4l2loopback
). After each occurence, we must simulate the back button to get back to the camera. We can decide to humanly supervise this operation or to take a screenshot immediately before hitting the back button (to save the results of this approach). Current bug: verificac19 does not want to update rules and data, it is stuck in "Aggiornamento in corso...", must investigate so as to use the android emulator (being not downloaded or build from official sources in my case, might be that the problem).
We will try with the one from Federico.
Current bug: verificac19 does not want to update rules and data, it is stuck in "Aggiornamento in corso...", must investigate so as to use the android emulator (being not downloaded or build from official sources in my case, might be that the problem).
We will try with the one from Federico.
Trying to install the original app through the play store using an android emulator leads to a working app. I tried to install the external apk after uninstalling the official app from the store. Perhaps we need to use the DEBUG mode in order to make it work properly.
@Kero2375 As soon as possible, attach here the APK of the debug version of the app.
Appium is working correctly, though we are gonna need the appium-inspector to understand what activity to parse and what to simulate inside the app: https://github.com/appium/appium-inspector
Current problem to fix (not finding .MainActivity, but it is normal, we have to analyze the app): https://bitcrumble.com/649ce798/?hl=34
New problem (almost resolved):
EDIT: thanks stackoverflow ❤️ https://stackoverflow.com/questions/951021/what-is-the-javascript-version-of-sleep
Just tested with @Kero2375, QRCodeFuzzing works ™️
We created 2 scripts that synchronize the automated test on the smartphone with the QR code visualization.
n
times (where n
is the number of total QR codes to scan) through the app by automatically clicking certain items on the screen. After recognizing the QR code this takes a screenshot and save it as an image file.The common file used to sync the script is a JSON file (data/fuzzer.json
):
status=1
)status=1
) and then, once the new qr is generated, we reset the status (status=0
). In the end, we tested over 1000 QR codes, and 90% of the times the screenshot is working correctly. Now we are trying to calibrate the timing and the QR code error correction and size to get the phone to operate in a quicker way.
We also added a main-generate.py
script to generate the GreenPass as for the GenQR script. Meanwhile, main-display.py
is used to run through every qr code.
update
callback@Kero2375 @donadelden
Ok, some bugfix made for the future todos.
Add documentation on feature/bugfix in the readme.md
branch:
feature/qr-fuzzer
Automatic QR Code fuzzer to try with VerificaC19. QR Code are automatically scanned using an instance of the app.