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

BankID säkerhetsapp-GmsCore-v0.2.7.17455 #824

Closed
vildevilde opened this issue Jun 6, 2019 · 80 comments · Fixed by #931
Closed

BankID säkerhetsapp-GmsCore-v0.2.7.17455 #824

vildevilde opened this issue Jun 6, 2019 · 80 comments · Fixed by #931

Comments

@vildevilde
Copy link

vildevilde commented Jun 6, 2019

BankID säkerhetsapp, Swedish app for elektronic identification.

BankID doesn't connect and are useless with last update GmsCore-v0.2.7.17455.

Same problem on two phones running LOS w MicroG, Google Pixel (Sailfish) LOS 16, and Google Nexus (Bullhead) running LOS 15. Both fully updated same issue. My solution was going back to GmsCore-v0.2.6.13280.

Sorry, I don't know how to make any logs and so, I did found out how to make logs see next entry.

@vildevilde
Copy link
Author

vildevilde commented Jun 7, 2019

Here follows logfile, while trying to make a new BankID on my bank with BankID app. Both from Google Nexus (Bullhead) LOS 15

First one with newest gmscore, GmsCore-v0.2.7.17455, and here BankID fails.
logcat_newestgmscore.txt

Next logfile, is with GmsCore-v0.2.6.13280 and here BankID works.
logcat_gmscoreold.txt

@vildevilde vildevilde reopened this Jun 7, 2019
@pedro-araujo
Copy link

pedro-araujo commented Jun 7, 2019

Sadly the latest update of BankID broke compatibility with MicroG, I believe it is related to the issue #676.

@vildevilde
Copy link
Author

I do have LOS 16 on Google Pixel and BankID 7.14.0.56, installed yesterday so it should be a newest version and it's working with GmsCore-v0.2.6.13280 but not with GmsCore-v0.2.7.17455

@roydenyates
Copy link

Confirmed LOS 16 on BQ Aquaris X and BankID 7.14.0.56 (latest) - it's working with GmsCore-v0.2.6.13280 but not with GmsCore-v0.2.7.17455.

@roydenyates
Copy link

Sadly the latest update of BankID broke compatibility with MicroG, I believe it is related to the issue #676.

I think it was the other way round

@vildevilde vildevilde changed the title BankID säkerhetsapp BankID säkerhetsapp-GmsCore-v0.2.7.17455 Jun 8, 2019
@Phydragelit
Copy link

(Both devices have BankID v7.14.0.71401 (latest) installed).
BankID säkerhetsapp worked on "OnePlus 3T (oneplus3)" running "LineageOS for microG 16" with "GmsCore-v0.2.6.13280" but "BankID säkerhetsapp" stopped working after system update with "GmsCore-v0.2.7.17455" upgrade.
Still works on "OnePlus One (bacon)" running "LineageOS for microG 16" with "GmsCore-v0.2.6.13280".
Both devices have working "Google Cloud Messaging" acording to "Push Notication Tester".

Haven't tested going back to older version of "LineageOS for microG 16" on "OnePlus 3T (oneplus3)" with "GmsCore-v0.2.6.13280" yet.

@churchthecat
Copy link

churchthecat commented Jun 11, 2019

Can confirm the issue on 1+3T , lineage for microg 16. can also confirm that downgrading worked. thanks vildevilde for the workaround

@ahstro
Copy link

ahstro commented Jun 15, 2019

Didn't manage to downgrade my OS (and almost botched the backup 😅 ), so if anyone needs some logs or testing, hmu.

@ghost
Copy link

ghost commented Jun 18, 2019

This has probably been fixed with the latest unreleased commits ("Fix calling package detection in KK+"). If BankID crashes with a SecurityException, rest assured that it will be fixed by the next update.

@ahstro
Copy link

ahstro commented Jun 19, 2019

BankID doesn't crash, it just loads forever, but I hope that it solves that.

@churchthecat
Copy link

churchthecat commented Jun 19, 2019

ahstro you only need to downgrade gmscore not the entire OS/ROM. uninstall gmscore from priv-app. Install the older one in priv-app again.

@ahstro
Copy link

ahstro commented Jun 19, 2019

@churchthecat, thanks, I'll try that. I'm using microG's LineageOS ROM, so I thought I'd just make it "easy" for me, but easy is never easy, huh. I'll try your solution ASAP. Sorry for diverging the issue thread a bit 😇

@roydenyates
Copy link

roydenyates commented Jun 19, 2019

@churchthecat, thanks, I'll try that. I'm using microG's LineageOS ROM, so I thought I'd just make it "easy" for me, but easy is never easy, huh. I'll try your solution ASAP. Sorry for diverging the issue thread a bit innocent

If you are on Lineage OS 16 from Microg and updated the OS a few days back, it updated GmsCore to the problematic v0.2.7.17455 as a system app. This will not uninstall or downgrade on device AFAIK.

@churchthecat
Copy link

churchthecat commented Jun 19, 2019

I am on linage for microG as well. No problem remove and install it (I used magisk modules debloater and systemizer in termux) just don't update the ROM afterwards as it will install the problematic version again ( I assume).

@vildevilde
Copy link
Author

This has probably been fixed with the latest unreleased commits ("Fix calling package detection in KK+"). If BankID crashes with a SecurityException, rest assured that it will be fixed by the next update.

Any idea when this next update will come? is there some way to test this fix before?

@vildevilde
Copy link
Author

vildevilde commented Jun 20, 2019

On my G Pixel there is a new update today, LOS w MicroG, are there any way safe to update the rom and then roll back microG? Last time it failed to me and I had to reinstall the rom. Then I reinstalled an older rom with working MicroG and the update the rom before I rolled back MicroG, that worked. But I don't want to reinstall to update rom.

@churchthecat
Copy link

all I can say is that it worked for me, but I wait to install any ROM updates until a new version of gmscore is included.

@roydenyates
Copy link

On my phone, the bootloader does not like a rw /system and the OS freezes. That meant magisk etc was useless. BUT, using TWRP I could mount /system rw in a stable way and then use adb to install GsmCore in the older version as a system app (in /system/priv-app/GsmCore/). And it must be a system app for spoofing to work and correct signature.

@vildevilde
Copy link
Author

On my phone, the bootloader does not like a rw /system and the OS freezes. That meant magisk etc was useless. BUT, using TWRP I could mount /system rw in a stable way and then use adb to install GsmCore in the older version as a system app (in /system/priv-app/GsmCore/). And it must be a system app for spoofing to work and correct signature.

Ok, from being in twrp with system rw, how exactly did you install the older GsmCore with adb?

@roydenyates
Copy link

Easiest is to get the right GmsCore .apk on the device beforehand. Or from PC,
adb push xxxxx.apk /sdcard/ (choose right apk name, & dir path in place of /sdcard/
then
adb shell
su (from TWRP you likely should be root anyway)
rm /system/priv-app/GmsCore/GmsCore.apk (this removes the installed "problem" version)
cd /sdcard (or where you have pushed the xxxx.apk)
mv xxxxx.apk /system/priv-app/GmsCore/xxxxxx.apk (replace xxx as appropriate)
chmod 644 /system/priv-app/GmsCore/xxxxx.apk

Then unmount system in Twrp and reboot. GmsCore should now be "systemized" at the working version, and microg should show it is working.

@vildevilde
Copy link
Author

Easiest is to get the right GmsCore .apk on the device beforehand. Or from PC,
adb push xxxxx.apk /sdcard/ (choose right apk name, & dir path in place of /sdcard/
then
adb shell
su (from TWRP you likely should be root anyway)
rm /system/priv-app/GmsCore/GmsCore.apk (this removes the installed "problem" version)
cd /sdcard (or where you have pushed the xxxx.apk)
mv xxxxx.apk /system/priv-app/GmsCore/xxxxxx.apk (replace xxx as appropriate)
chmod 644 /system/priv-app/GmsCore/xxxxx.apk

Then unmount system in Twrp and reboot. GmsCore should now be "systemized" at the working version, and microg should show it is working.

Thank you, what's the difference from just deleting/removing the files with the filemanager in twrp?

@roydenyates
Copy link

None, I just was in the adb groove :-)

@vildevilde
Copy link
Author

I did it, it worked this time, just replaced the file with twrp filemanager, just as first time I did it, wonder why it didn't work the second time?

@vildevilde
Copy link
Author

vildevilde commented Jul 4, 2019

There is a new release of GmsCore since yesterday. v0.2.8.17785, there are two versions, GmsCore-v0.2.8.17785-mapbox.apk and GmsCore-v0.2.8.17785-vtm.apk.
Today after a new update with LOS MicroG on Google Pixel (Sailfish) instead of changing back to the old GmsCore-v0.2.6.13280.apk, as I usually do I tried both the new versions but unfortunately I have the same issue as before. BankId is not working and i had to go back to the old version again :(

@ale5000-git
Copy link
Member

ale5000-git commented Jul 9, 2019

Could all of you update to this build and retry please?

@vildevilde: It is more recent then the versions you already tried and also more recent than the last release.

@vildevilde
Copy link
Author

Could all of you update to this build and retry please?

@vildevilde: It is more recent then the versions you already tried and also more recent than the last release.

Tried it but no, sorry but not working same issue :(

@vildevilde
Copy link
Author

vildevilde commented Jul 9, 2019

logcat_gmscoretest.txt

LOS 16 Google Pixel (sailfish)

@pabloyoyoista
Copy link

pabloyoyoista commented Aug 15, 2019

Ok then what I've been compiling seems to do what it should do. I do not have a lot of time these days, so troubleshooting the problem in my device with the locally compiled files might take me quite a while. Otherwise, @vildevilde , we could basically do two things if you have the time for it:

  • I compile every-single-commit between versions 0.2.6 and 0.2.7, make them available to you. Then you can test them and bisect the commit which introduced the error (do you have experience with git?)
  • The other option is to have a meeting in which we can go together through this, so I compile commits, share them with you and you test them later. You can write to my github's email address (ablocorrea@hotmail.com) and we can set a time and date.

If none of the above is possible, I might be able to troubleshoot the problem I have with my personal device, but I have no idea on how long could that take.

@vildevilde
Copy link
Author

Ok then what I've been compiling seems to do what it should do. I do not have a lot of time these days, so troubleshooting the problem in my device with the locally compiled files might take me quite a while. Otherwise, @vildevilde , we could basically do two things if you have the time for it:

* I compile every-single-commit between versions 0.2.6 and 0.2.7, make them available to you. Then you can test them and bisect the commit which introduced the error (do you have experience with git?)

* The other option is to have a meeting in which we can go together through this, so I compile commits, share them with you and you test them later. You can write to my github's email address ([ablocorrea@hotmail.com](mailto:ablocorrea@hotmail.com)) and we can set a time and date.

If none of the above is possible, I might be able to troubleshoot the problem I have with my personal device, but I have no idea on how long could that take.

@pablofsf It has to be option 2, I have no idea about git, in fact I don't even know what git is really. I am a user not a programmer or anything like that. I send you a mail.

@an0nkyle
Copy link

an0nkyle commented Aug 21, 2019

I'm using microg 0.2.8.17785 and I tried an qr scanner in f droid for bankid it comes up with this error.
NOTE: I'm using yalp store (its alternative googleplaystore)

"Technical error 134
Try again
If this error remains you may need to remove the BankID security app from your device and try again by installing the app from the Google Play and activating a new BankID from your bank."

@AsavarTzeth
Copy link
Contributor

AsavarTzeth commented Aug 21, 2019

Hi all!

This has been a big issue to me for a long time but I never had the time to debug the issue. Today however, I managed to find the bad commit using git bisect.

725926529a9cbc493535ccaf3f118a30cb01fdd7 is the first bad commit
commit 725926529a9cbc493535ccaf3f118a30cb01fdd7
Author: voidstarstar <voidstarstar@users.noreply.github.com>
Date:   Mon Oct 8 22:09:06 2018 -0400

    Add implementation of ProviderInstallerImpl

 play-services-core/build.gradle                                       | 2 ++
 .../com/google/android/gms/common/security/ProviderInstallerImpl.java | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

I hope this helps!

Detailed debugging process:
(for others, like myself, that are otherwise easily confused)

  • I used a left over Nexus 7 2013 LTE (found in my basement), with a fresh install of LineageOS 16.0 (Android 9), without Google Apps. A real clean test environment.
  • Made sure I had a baseline:
    • Verified that the last official release that works with BankID is v0.2.6.13280
    • Tested all other later official releases and verified that none of them worked.
    • Verified that a local build of v0.2.6.13280 still worked with BankID.
    • Verified that a local build of v0.2.7.17455 still did not work with BankID.
  • Removed all previous installs of microG Services Core, using adb shell 'rm /system/priv-app/GmsCore/*' to remove all contents of /system/priv-app/GmsCore.
    • Note: Since my ROM had no way of granting the spoofing permission (including from the command line), I had to install it this way.
  • Built, signed and zip aligned the apk. Then installed it using adb push ... /system/priv-app, in TWRP recovery.
    • Included the commit hash in all my finished apk's, to help make sure I installed the correct file.
  • Booted into system. Then made sure to check the app's "Self-Check" tab and the commit listed in the "About" section.
  • Did a test involving issuing a BankID certificate via my bank. This required the use of a third-party QR app, which worked well as expected.
  • Once I had started the bisection I finished by marking the commit appropriately (good/bad).

@an0nkyle
Copy link

Can you send the zip file for twrp here? :) I'm to lazy

@jonjonasson
Copy link

@AsavarTzeth Thank you for doing this!

Does current master work with the bad commit reverted?

@AsavarTzeth
Copy link
Contributor

@jonjonasson I will check the first chance I get tomorrow! Its been a busy day.

@an0nkyle What zip file? A zip archive containing the last working apk I built? I don't see the point, since it is hardly much newer than v0.2.6.13280. I would personally like to spend my time fixing the issue instead. Hopefully it won't take long!

AsavarTzeth added a commit to AsavarTzeth/android_packages_apps_GmsCore that referenced this issue Aug 23, 2019
The addition of the ProviderInstallerImpl broke com.bankid.bus
(BankID säkerhetsapp). This app is essential to Swedish users since it
is effectively the de facto Swedish online id.

This issue is resolved by adding the app id to the existing black list.

Fixes microg#824
@AsavarTzeth
Copy link
Contributor

Reverting the bad commit proved complicated. There was a big conflict to resolve which I did not feel at all comfortable with and any changes I made would likely affects other components.

Luckily I managed to do better!

@jonjonasson
Copy link

@AsavarTzeth Fantastic! Nice find! Big thanks for putting in the time and effort!

@vildevilde
Copy link
Author

@AsavarTzeth I'd like to thank you for your effort, and also all others who helped and tried to help.

But, Excuse me for not knowing, but what happens now? is there a new GmsCore that are working with BankId or will it take some time?

@chris42
Copy link

chris42 commented Aug 23, 2019

To have it in the official microg, Marvin will need to review the pull request, accept it and then create a new release. Then it will be regularly available.

If you can't wait for that you can compile the current version with the fix and use it (or ask someone to do that for you). Installing self-compiled versions is easy, but not straight forward.

@vildevilde
Copy link
Author

To have it in the official microg, Marvin will need to review the pull request, accept it and then create a new release. Then it will be regularly available.

If you can't wait for that you can compile the current version with the fix and use it (or ask someone to do that for you). Installing self-compiled versions is easy, but not straight forward.

Thank you for a quick and informative answer, I can wait, I just wanted to know what will happen.

@AsavarTzeth
Copy link
Contributor

Luckily this is a small change that won't affect anything else. The only possible hold up I could foresee is a minor style error or some best practice I am unaware off.

It is certainly possible, since I am a not at all a good programmer and I basically don't know anything specific to Java.

@vildevilde
Copy link
Author

I'm really glad if this issue now is solved for us all here Sweden :)

Jag tackar och bugar ;)

@rub3rth
Copy link

rub3rth commented Sep 11, 2019

Hi all, what's the latest news on this? I'm on an S7 and get error 134 on BankID and the general vibe of this thread seems to be an optimistic one. Is it possible to get some guidance as to how I should go about fixing this? I'm on the latest version of the gsmcore.

Thanks

T Ruberth

EDIT:
Never mind, I was a little quick to comment. For what it's worth I just run the last working gsmcore and hopefully asavars fix will be implemented into the next update.

@eklof
Copy link

eklof commented Sep 20, 2019

I'm waiting for this issue to be resolved, and so is all swedish third party ROM users, is there some timeline as to when this can be resolved. A few weeks, month ?

@AsavarTzeth
Copy link
Contributor

AsavarTzeth commented Sep 20, 2019

@eklof

To have it in the official microg, Marvin will need to review the pull request, accept it and then create a new release. Then it will be regularly available.

Like many other community projects it is dependent on free time and unpaid work. It is not uncommon that a project has no timelines.

What I can tell you is that the review itself will likely only take minutes. If there are questions or change requests it could take hours, depending on time zone differences (and again availability of free time).

@AsavarTzeth
Copy link
Contributor

AsavarTzeth commented Sep 20, 2019

@mar-v-in I understand your time is limited but could you please do a quick review of #931? It is a small 2 line fix that would make all Swedish users very happy. We would all very much appreciate it.

@osilvab
Copy link

osilvab commented Sep 27, 2019

Hi, im arriving late to the party. I just installed LOS+microg in my device.
as I understand if I want bankid to work then i should install an older version of gmscore. right?
how do I install that? I couldnt find any system/priv-app folder. Neither couldnt see the app installed in f-droid to chose older versions

thanks for help!

mar-v-in pushed a commit that referenced this issue Sep 27, 2019
The addition of the ProviderInstallerImpl broke com.bankid.bus
(BankID säkerhetsapp). This app is essential to Swedish users since it
is effectively the de facto Swedish online id.

This issue is resolved by adding the app id to the existing black list.

Fixes #824
@monperrus
Copy link

as I understand if I want bankid to work then i should install an older version of gmscore. right?

yes, by downloading it from https://github.com/microg/android_packages_apps_GmsCore/releases/

@eklof
Copy link

eklof commented Sep 28, 2019 via email

@osilvab
Copy link

osilvab commented Sep 28, 2019

Same for me I downloaded it. It didnt install.

I tried adding the file to /data/app-private but the rom got corrupted and had to format and install again.

@vildevilde
Copy link
Author

vildevilde commented Sep 28, 2019

As I understand the work to get the fix in to the app is on the way.

Anyway, as I wrote before my "fix" to get I get around the problem in the mean time by just disable GMSCore in the settings. That make a message in BankId come up that it will not work without Google play service, but just ignore that, tap outside the message square and BankId will work. Maybe this will affect other apps I don't have so many apps.

@osilvab
Copy link

osilvab commented Sep 28, 2019

Thanks @vildevilde. It worked perfectly doing that.

@eklof
Copy link

eklof commented Sep 28, 2019 via email

@churchthecat
Copy link

This thread is closed, the fix is merged and next update will work. read previous comments, all your questions are answered there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.