techlore / Plexus-app

Remove the fear of Android app compatibility on de-Googled devices.
https://plexus.techlore.tech
GNU General Public License v3.0
184 stars 12 forks source link

Incorrect detection of MicroG vs Google Play #24

Closed mtalexan closed 2 months ago

mtalexan commented 2 months ago

Description

On CalyxOS with microG, attempting to submit seems to think Google Play is installed.

Steps to reproduce the behaviour

  1. Go to Contribute: Submit rating
  2. Tap on an app
  3. Tap the "Submit" button
  4. Get banner message "Device should either be de-Googled or have microG to submit rating"

Screenshots/error messages (optional)

IMG_20240619_204835

Additional context (optional)

I'm running version 2.0.1 of the app. I have CalyxOS with microG enabled. I gave not gotten to the screen where I can pick the ROM or verify an email.

StellarSand commented 2 months ago

That could be the signature spoofing by microG which makes them look like Google Play service apps, and hence the app thinks you have Google Play services installed. I've tried detecting whether Google Play service or microG apps are installed based on certificates but never considered signature spoofing while implementing it.

Will definitely be fixed at some point but currently I am out of ideas.

mtalexan commented 2 months ago

That makes sense, but isn't one of the primary types of reports for devices with microG? Is there any case where microG doesn't spoof the Google Services?

I'm sure microG is very interest in not being able to be detected as not-Google so I don't know if there's anything that could reliably be checked.

Off the top of my head, maybe you could poke at the payment verification API as a check? I believe it indicates an error status you would never get from Google Services. Maybe there's a way to query that without actually having an ID to verify?

StellarSand commented 2 months ago

I think I'll check using the app name instead.

Package microG name Google name
com.google.android.gms microG Services Google Play services
com.android.vending microG Companion Google Play Store
com.google.android.gsf Services Framework Proxy Google Services Framework

That should work for now.

jonathanklee commented 2 months ago

@StellarSand Yes that's what I do in Sapio (; Congrat's for the new version!

mtalexan commented 2 months ago

2.0.2 Allowed me to go thru the initial setup and submit one rating, but the issue showed up again when I then tried to submit a rating for a second app. Not sure if they're related, but it's the same banner.

StellarSand commented 2 months ago

okay it's reproducible in release build but not in debug build. Debug build works fine.

StellarSand commented 2 months ago

I guess I'll disable minify so proguard doesnt remove necessary stuff required for the app to function properly. The downside would be app size would be around 9MB instead of ~4MB. After install ~28MB.

mtalexan commented 2 months ago

2.0.3 fixed it for me. I can submit a second rating from a microG system now.