I'm in the US & moving to Sweden. The Swedish government requires immigrants to either verify their identity with the Freja app, or go to the embassy in Washington DC. Given my location, getting to DC would be too expensive (both monetarily and temporally).

Freja doesn't work for me. There's a step during which it tries to verify that my face is the same as the one in my passport, which fails. I contacted Freja support, and was told that the app was throwing the following error:
com.google.mlkit.common.MlKitException: Waiting for the face detection model to be downloaded. Please wait. at com.google.mlkit.vision.face.internal.zzb.zza(com.google.android.gms:play-services-mlkit-face-detection@@16.1.1:53)

It seems to be failing to download a face detection model from Google. I suspect that Graphene is preventing this from working as intended. I've tried and failed to use Freja on two devices running Graphene, while I know someone who got it to work on a device with the stock OS.

Honestly, this is exactly the kind of behavior I would want from Graphene in any other situation. I generally don't want my apps scanning my face. However, in this case, I need to find a way to make it work.

I've tried disabling my VPN and temporarily enabling all permissions for both Freja and Google Play Services. It still didn't work.

Any other ideas? Thanks.

    md691 Can you borrow a device running the stock OS? There are various workarounds that might be tried, but they might not work, and experimenting might take some time.

      md691 I'd suggest raising an issue on GitHub with same logs (assuming you have access) as shared with devs (thou it may have some PII so maybe share them outside GitHub or mask those).

      As for issue at hand, was this run through owner profile? With Google account added (not sure if this is needed for modules)? What if you'd try to set compatibility mode for exploit protection?

      de0u I was going to suggest this, but then they may need the same phone/app with data when crossing border so it may not work for op

      md691 If it's trying to download the model using Play Store then I think you need to be signed in to the Play Store. But I'm fumbling in the dark here.

      md691 Did you perhaps disallow the Play Store from using the Network permission? That's required for things like this to work.

      I have a bit of time to try to sort this out. I'll look into borrowing a phone or reinstalling stock if I can't get it working on Graphene soon.

      I don't have a Google account, and would rather not get one, so I can't easily test if logging in would fix it.

      Google Play Services has network permission. As I mentioned, I also tried enabling all permissions for it temporarily.

      I'll try to post an issue on GitHub. It would be great if the devs could make this work effortlessly in future versions, to save others this difficulty. I don't know if I should expect a fix quick enough to help me, though, so I'm still interested in hearing workaround ideas.

        md691 Google Play Services has network permission.

        That's good, but in this case it's also the Play Store that needs the Network permission if it's to download additional modules.

        md691

        Google Play Services has network permission. As I mentioned, I also tried enabling all permissions for it temporarily.

        Play Store is what retrieves these things for Play services. Does Play Store have the Network permission? Did you disable that for the Play Store or uninstalled/disabled it? That will break basic functionality of Play services.

        It worked! Enabling network permission for the Google Play Store allowed Freja to work with no trouble.

        I can't believe I both didn't think of that on my own, and didn't notice everyone saying "Store". Thank you all for your patience and persistence in getting through to me.

        In case anyone runs into similar issues, and comes across this post, I'll list all the permissions I had enabled for all mentioned apps when it worked. I suspect Freja would have worked with fewer, but I forgot to turn off suspected extraneous ones after my previous attempts. Of note, Graphene says that it never accessed my location, so that one almost certainly wasn't necessary.

        • Freja: Camera, Location, Network, Notifications, Phone, Sensors
        • Google Play Services: Network
        • Google Play Store: Network

          md691 Thanks for reporting back.

          It sounds like Freja was just requesting Play Store to download an additional asset, and Play Store failed because it couldn't contact the internet. So which permissions you granted to Freja is likely not relevant. I think.

          It would've been helpful if Play Store or Freja displayed a message akin to "hey, Play Store needs to download an additional package for you to be able to scan your face, but it's unable to do so. Please check your internet connection". But usable error messages are rare in this day and age.

            fid02 Apps using Play Services/Store functionality, along with Play Services/Store itself expects to have all permissions and more, so they rarely have errors for that, since it's not a use case that's expected to be met.