Skip to content
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

gms.vision in microG #395

Open
mehdiae opened this issue Jun 29, 2017 · 25 comments
Open

gms.vision in microG #395

mehdiae opened this issue Jun 29, 2017 · 25 comments
Labels
📸 Vision Play Services Vision and MLKit Vision (Barcode Scanning, Face Recognition, Text Recognition)

Comments

@mehdiae
Copy link

mehdiae commented Jun 29, 2017

Hi,
Any intent to add gms.vision into microG GmsCore in close future?

@ravilov
Copy link

ravilov commented May 29, 2019

Seconded. Using the latest microG, most things work well but getting stuck at anything to do with barcode/QR code scanning. Apps either report an error right away, or show the feedback from camera but don't recognize any barcode I throw at them.

A workaround would also be appreciated.

@mar-v-in
Copy link
Member

mar-v-in commented Dec 5, 2020

Vision Barcode API is now added via 5e39818. Vision Text and Face APIs are not available yet.

@ArchangeGabriel
Copy link
Contributor

They are three issues (#1637, #1639 and #1640) that seem to show there has been a change with this API somehow. @lfxgroove, since you initially implemented that, could you have a look?

@Jeroen0494
Copy link

DigiD in the Netherlands also doesn't work, which means you cannot use is to login to any Government service. Especially during tax season this is a problem...

@voorstad
Copy link

DigiD in the Netherlands also doesn't work, which means you cannot use is to login to any Government service. Especially during tax season this is a problem...

Indeed this is causing an issue when trying to scan a QR-code within the DigID app. Would be great if this implementation could be made fully working.

@MaeIsBad
Copy link

MaeIsBad commented May 9, 2023

DigiD in the Netherlands also doesn't work, which means you cannot use is to login to any Government service. Especially during tax season this is a problem...

there are two problems with digid:

@ale5000-git
Copy link
Member

ale5000-git commented May 9, 2023

  • the qr code generated by the website is extremely low quality, and zxing fails to scan it(try going to ...)

The link isn't working, it would be nice if you can screenshot the qr code and post it here as sample.

@MaeIsBad
Copy link

MaeIsBad commented May 9, 2023

The link isn't working, it would be nice if you can screenshot the qr code and post it here as sample.

I thought the state was stored fully in the URL. You can instead go to https://digid.nl/inloggen, click digid and type in "XXXX".

image

The code without the logo:

image

I could've sworn I wasn't even able to scan the code from a screenshot with zxing before, but I am unable to reproduce that. Regardless after trying for a very long time while debugging this I never got zxing to scan the code from a camera(even when using android emulator's virtual scene instead of a real camera), while zxing-cpp managed to scan it without much trouble.

the most recent version is using the play-services-mlkit-barcode-scanning api instead, which isn't implemented by microg

I think this is incorrect, it looks like they use mlkit as a library directly and mlkit itself makes calls to some play-services apis

Disregard, the stack trace mislead me

@MaeIsBad
Copy link

MaeIsBad commented May 9, 2023

now I feel like I'm going insane. I am able to scan the codes I just generated, but the one example I kept from debugging yesterday still refuses to scan, even when directly uploading the screenshot to zxing.org, while zxing-cpp is able to easily scan it by just pointing the camera at my screen

asdf

@Foxite
Copy link

Foxite commented May 12, 2023

the most recent version is using the play-services-mlkit-barcode-scanning api instead, which isn't implemented by microg

I need this to work very soon. I would like to place an €80 bounty for microg to support DigiD. Is there a preferred way to do this?

@zeekoe
Copy link

zeekoe commented Sep 19, 2023

@mar-v-in I second that I would like to sponsor support for MLKit QR code functionality, as also proposed in #2018. Is this something that you could do? What would be the cost; perhaps we could do a crowdfunding for this feature? Or is this not how it works?
Quite some Dutch apps (banking, government identification) started relying on MLKit for QR scanning.

@MaeIsBad
Copy link

I started reversing this API a few months ago, I'd be happy to pick it back up if someone knowledgeable about the inner workings of gms/microg would be willing assist me by answering questions along the way

@Redsandro
Copy link

DigiD used to work for users that want to evade invasive Internet oligopolies by using privacy-focused alternatives like /e/OS or LineageOS-MicroG. However, as of January this year, DigiD has taken a concerning turn. An update has introduced a hard-coded, unnecessary feature availability check for Google Mobile Services. An honest mistake at best, or masquerading as an anti-tampering measure at worst. In reality, it does nothing more than create a vendor lock-in, directly contradicting the government's stated goal of reducing dependence on foreign tech giants and increasing the accessibility to digital government services. The DigiD team needs to acknowledge the problem lies with their app, not our devices.

This is a pivotal moment where the Dutch government must practice what it preaches. By enforcing this update, they are pushing users away from privacy-respecting solutions and further into the arms of invasive big tech companies. It's a step in the wrong direction.

What You Can Do:

  1. Voice your concerns: Reach out to the DigiD X/Twitter account (or other contact options) and express your concerns.
  2. Stay Informed: Don't be discouraged or misled by irrelevant suggestions such as increasing your screen size, changing your camera settings, or using a different browser. The core issue lies within the app itself, is logged by logcat, and is well-understood.
  3. Explore Alternatives: Until now, it was and sometimes still is possible to use SMS-verification in stead of scanning a QR-code, but this option is slowly disappearing from government services because it is deemed unsafe. SMS is not encrypted and SIM swap attacks are on the rise. For this reason, it is no longer possible to activate "Identity card login" using this method.
  4. Mobilize: If anyone you know faces similar problems, convince them to voice their concerns to DigiD as well.

Now is the time to take action and ensure that the Dutch government aligns its actions with its principles of privacy and data sovereignty. Don't let this update hinder your choice of a privacy-conscious digital environment.

@Iey4iej3
Copy link

Iey4iej3 commented Oct 5, 2023

An update has introduced a hard-coded, unnecessary feature availability check for Google Mobile Services. An honest mistake at best, or masquerading as an anti-tampering measure at worst.

I am not sure that DigiD is performing a feature availability check. Instead, they are just using MLKit API (cf. https://developers.google.com/ml-kit/vision/barcode-scanning), which seems to be strongly recommended by Google. Sooner or later, many apps (which depends on GMS) will use that, I think.

@baahver
Copy link

baahver commented Oct 27, 2023

Since MicroG Services version 0.29.233013 (but maybe earlier) I'm able to scan the Digid-app QR-code! Digid-app version 6.9.3. But only if I zoom in the QR-code a bit.

@Foxite
Copy link

Foxite commented Oct 27, 2023

Awesome! Is that because digid switched back away from gms.vision or because microG implemented it?

I'll test it later and if it works because of microG, I'll be ready to deliver the bounty I offered, if anyone wants it.

@Evanyoub
Copy link

Why can't I log in to my Google account in Micro G?

@baahver
Copy link

baahver commented Oct 27, 2023

Awesome! Is that because digid switched back away from gms.vision or because microG implemented it?

I'll test it later and if it works because of microG, I'll be ready to deliver the bounty I offered, if anyone wants it.

I'm not sure. I know that Digid developers where working on this Google vendor lockin.

@baahver
Copy link

baahver commented Oct 27, 2023

Why can't I log in to my Google account in Micro G?

Why would you login to your Google account within MicroG!?

@rugk
Copy link

rugk commented Oct 27, 2023

@Evanyoub You can, just go into the microG settings and select the option. Also, this is off-topic. For further questions or issues regarding this, please open a new issue.

@Redsandro
Copy link

Since MicroG Services version 0.29.233013 (but maybe earlier) I'm able to scan the Digid-app QR-code! Digid-app version 6.9.3. But only if I zoom in the QR-code a bit.

@baahver this could be good news. I have those same versions but I can't get it to work. What do you mean exactly with "zoom in a bit"? You don't have any Gapps package installed?

Also, I noticed that the N26 bank app QR-code scanner (for iDeal) is not working with MicroG in stead of GMS. Perhaps it's the same issue.

@Sjoerdfc
Copy link

Sjoerdfc commented Oct 29, 2023

The fact that the DigiD app now works has nothing to do with changes in MicroG. The developers of the DigiD app changed the QR code scanner part and it does not depend on Google Play Services anymore, as you can read here (in Dutch):
https://www.logius.nl/domeinen/toegang/digid/releases-updates/digid-app-release-693

So it's good news, but nothing has changed for this issue. As far as I know other apps which use ML kit still don't work.

@zeekoe
Copy link

zeekoe commented Oct 30, 2023

Great!
A workaround that might or might not work for other apps: use SecScanQR, scan the QR code and tap "Open in Web". This works if the app in question can be opened by intent, and the QR code in question contains such an intent URL. Specifically SecScanQR supports opening these intent URLs.

@matthijskooijman
Copy link

Great! A workaround that might or might not work for other apps: use SecScanQR, scan the QR code and tap "Open in Web". This works if the app in question can be opened by intent, and the QR code in question contains such an intent URL. Specifically SecScanQR supports opening these intent URLs.

Ah, nice trick! I tried it for the DigiD app (3.9.3) and could not get it to work - SecScanQR could not scan the QR code, and the BinaryEye app which I usually use could scan the code (it contains a digid-app-auth:// url), but does not offer to open it with the DigiD app, only offers a list of search engines (but I'm not sure if this is a limitation in Binary Eye or because Digid does not register te intent).

The fact that the DigiD app now works has nothing to do with changes in MicroG. The developers of the DigiD app changed the QR code scanner part and it does not depend on Google Play Services anymore, as you can read here (in Dutch):

Just tested this and indeed, the DigiD app now works without GMS as expected (though scanning is a bit finnicky, zooming my browser to make the QR bigger on screen seems to help, though also reveals significant JPG artifacts that probably not help with scanning...). I've sent DigiD a message about not working without GMS early september, and even though I did not get any reply to that, apparently they did take my message to heart and fixed it, which is good :-)

But indeed, as mentioned, that does not change the status of this issue - it would be good if microg would also implement this API for other apps that still use it.

@Foxite
Copy link

Foxite commented Oct 31, 2023

Can confirm, Digid works with some finagling.

As for this issue still being necessary: absolutely. My bounty is still on. :)

@mar-v-in mar-v-in added the 📸 Vision Play Services Vision and MLKit Vision (Barcode Scanning, Face Recognition, Text Recognition) label Dec 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📸 Vision Play Services Vision and MLKit Vision (Barcode Scanning, Face Recognition, Text Recognition)
Projects
None yet
Development

No branches or pull requests