scan barcode on GrapheneOS (Android)

Hello,

I’m using a highly secured Android system (GrapheneOS, https://grapheneos.org/) and I was unable to use the scan barcode function of Zotero until tonight.

Zotero would always issue the error that barcode scanning is not supported on my device, even though it’s a Pixel 9a running an Android 16.

Tonight, playing around with authorizations inside system settings I realized Zotero does not request access to the camera. There is also no way to add this permission. Zotero delegates this action to Google Play Services.
And by default, Google Play Services don’t have access to the camera. So I’m stuck with this alternative:
- either I let Google Play Services access to the camera, opening a large security hole in my setup (basically granting all apps that use Google Play Services access to the camera), but I can scan barcodes with Zotero
- or I don’t scan barcodes with Zotero (which is not terrible, just sad).

I wish there were a 3rd option: Zotero uses the camera without Google Play Services, and I can grant it the proper access, isolated from other apps.

Any idea why Zoter went this way, requiring Google Play Services?
Any plans to get rid of Google Play Services in a foreseeable future?

thanks
  • dstillman Zotero Team
    edited 9 days ago
    either I let Google Play Services access to the camera, opening a large security hole in my setup (basically granting all apps that use Google Play Services access to the camera)
    No, this isn't correct. The whole point of the Google code-scanner API that we're using is that apps don't get access to the camera. It's specifically a privacy-preserving option, as described on the linked page, where apps only get barcode info back rather than image data.

    It's true that you would need to give Google Play Services access to the camera, but it would only be used for the specific APIs that require it (e.g., the barcode scanner and the document scanner, which works the same way), and you'd get notified of camera use by Google Play Services as with any other app with that permission.

    There's a lower-level API from Google we could use if we implemented the camera view ourselves, but then we specifically would need camera privileges. This API lets us avoid requesting it.
  • Thank you for your reply.
    The point is not that Zotero uses only Google code-scanner API. The point is I must give Google Play Services access to the camera. Full access. Android does not allow for pick and choose here.
    Once I open this door, any app that uses Google Play Services inherit that access and the problem is here.
  • dstillman Zotero Team
    edited 9 days ago
    I addressed this. Google Play Services has specific APIs that use the camera, for specific tasks, without sending data to Google or giving image data to the apps. So granting camera access to Google Play Services isn't opening up some major "security hole" — it's just letting other apps do things like get barcode data back without getting image data. And as I say, you would still know exactly when the camera was used.
  • fcheslack Zotero Team
    Supporting the API in a way that is compatible with GrapheneOS' philosophy would be up to them and their sandboxed play services system.
Sign In or Register to comment.