MyHush / SilentDragonAndroid

Android companion app for SilentDragon
https://www.myhush.org
GNU General Public License v3.0
5 stars 12 forks source link

Pixel 3 QR Scan Code Unreadable #95

Closed oDinZu closed 3 years ago

oDinZu commented 4 years ago

Overall, on the Pixel 3 via Graphene OS, when scanning a QR code, it doesn't pickup the QR code. On Pixel 2 v8.1 Google Android, this works as should.

I tested with another QR code scanner, then manually entered string that way to verify it wasn't the camera malfunctioning.

On APK install via GitHub, I installed the 0.5.15 version and verified it in downloads folder, although the version on the app shows 0.5.14; maybe this is a typo or maybe the APK hasn't been released yet fixing this?

Yeah, verifying on Pixel 2 about page, version shows 0.5.15, but this was installed via Google Play Store. I assume the APK hasn't been built yet for 0.5.15 and this was a bug in older release of 0.5.14.

leto commented 4 years ago

@csharpee you are correct, there seems to be a bug with QR codes on GrapheneOS when trying to use the camera. You are also correct that our Github APK has the incorrect version, very good eye! Our Google Play release has the correct version, otherwise they are the same code.

So, this is actually a bug in GrapheneOS OR we need to change SDA code to be more friendly to Graphene, I am not sure.

In my experience, Graphene correctly shows the camera "fragment" but never takes the picture or recognizes the QR code. This may have something to do with Graphene using a different Camera app than Google Android.

thestinger commented 4 years ago

The code is using Google Play Services to scan QR codes rather than baseline Android functionality:

https://github.com/MyHush/SilentDragonAndroid/blob/master/app/src/main/java/org/myhush/silentdragon/QrReaderActivity.kt#L17-L20

You could switch to using the same QR scanning library we use in Auditor:

https://github.com/GrapheneOS/Auditor/blob/master/app/src/main/java/app/attestation/auditor/QRScannerActivity.java

Unfortunately, the developer stopped maintaining it, and we're considering forking it. It desperately needs maintenance including modernization:

https://github.com/dm77/barcodescanner

Moving to CameraX would likely be a good idea.

Djozeffreak commented 4 years ago

Same issue on Lineage OS, not able to scan QR not even to paste a string the only way was to enter manually.

leto commented 4 years ago

@Djozeffreak thank you. Our code currently only works on Stock Android but we have a fix planned for our next SDA release!

leto commented 4 years ago

@jahway603 if you are looking for something to work on, this bug would fix support for Lineage and Graphene :smile_cat:

jahway603 commented 3 years ago

I do not have a Graphene OS device, but I have successfully implemented and tested a ZXing library for QR Code scanning on LineageOS as pull request #106.