SafetyNet on SFOS 4

Hello everyone,

has anyone ever tried to get safetynet running on aliendalvik (SFOS 4 / XA2 version)?
Meaning, via installing gapps and verifying it?

P.S.: I am runnign microg and it is a known issue that it is not safetynet compatible: https://github.com/microg/RemoteDroidGuard/issues/24

Looking forward to any experiences in this regard.


Without any intent to start a discussion: I feel obliged to have a safetynet compatible android, as more and more banks a disabling mTAN due to new EU regulations. In consequence of this, they are requiring TAN apps which in turn often require safetynet.

If you could get safetynet running on a non google phone this would be a security issue in safetynet and this will be fixed soon by google.

For banking most banks (at least here in Germany) also allow using photo tan with a separate device, so you are independent from the phone. This works perfectly for me.

Installing gapps on Alien Dalvik is a bit of a mess, as it actually involves taking the system.img from /opt/alien and implementing it directly. I can link to the original guides relating to installing the Gapps, but there’s no guarantee this will work on SFOS 4, now that it’s implemented with Android 9 as the base for AD.

As for MicroG, your solution to SafetyNet is the DroidGuard Helper that should be installed alongside GmsCore. In a strange event, I installed all of the MicroG assets in 3.4.0.24, SafetyNet refused to register. I also was never able to add my Google account. Some strange regression with how the built-in Webview worked, I’m not sure. By sheer magic, after upgrading to 4.0.1.45, SafetyNet registered without a hitch, and the Webview in AD 9 loaded the Google login just fine. There’s no telling how important the account is, as all of my apps seemed to work fine with just GmsCore installed and detected, but it should be enough. May need to test further now that I can actually use SafetyNet and my Google account in AD.

The installs working for me are

  • microG Services Core (GmsCore) version 0.2.15.204713
  • microG DroidGuard Helper version 0.1.0-10-gf64bf69
  • microG Services Framework Proxy version 0.1.0
  • FakeStore version 0.0.2

All of these versions are readily available in the F-Droid repo. As is the case always, make sure to enable signature spoofing where applicable.

And an obvious disclaimer, Jolla, the Sailfish community, F-Droid, or microG’s developers are NOT responsible for anything that happens with your Google account. Using microG, while it IS a clean-room re-engineering of Google services for Android software, is technically against the terms of service. It may be in your best interest to use a dummy Google account, or even no Google account at all using microG if possible.

1 Like

Did you ever get a Gmail account registered?

I had to hack the partition because of the bug re: the change from nemo to defaultuser. I’m scared to reinstall because the Revolut banking app sometimes won’t let you register a new phone. [Is it possible to backup the whole (encrypted) partition by sideloading TWRP?]

Update to 4 failed, not sure where error messages are. But Storeman ‘randomly’ says /opt doesn’t have room for the aliendalvik armv7hl.

This is an XA2, still on 3.4. I’m trying to get Google Pay and Google Keep to work. The latter at least needs a Gmail account registered.

Errors for the update are found in /var/log.
Do you mean the sigspoof-lxc fix? Please double check /opt/alien and see what files are there. You might have a pre_haystack file that must be removed to make the space available.

EDIT: I double-checked the link and realized you did use the fix, but it’s the non-LXC version for AD based on Android 4.4. The problem should still be a storage issue because /opt/alien is actually pointing to a partition where AD lives separately and is mounted by SFOS in /opt/alien. As it turns out, the sigspoof fix isn’t needed since you can simply symlink nemo in home to point to defaultuser, which should fix it.

As for the apps you’re curious about, Google Keep should work just fine, Google Pay is likely to not work at all. Even with DroidGuard Helper, SafetyNet has both basic calls and advanced calls. The average bank app likely won’t need more than the basic calls, but Google uses the advanced calls that DroidGuard Helper cannot use. See here for microG issues with Google Pay.

1 Like

You might have a pre_haystack file that must be removed to make the space available.

Bingo, a 250MB one.

Logs info was very useful and confirmed disk space shortage.

As it turns out, the sigspoof fix isn’t needed since you can simply symlink nemo in home to point to defaultuser, which should fix it.

Yes, works as in my reply to your other comment here.

As for the apps you’re curious about, Google Keep should work just fine

Yep, even Google’s frankly amazing voice recognition works.

Google Pay is likely to not work at all.

Very much worth knowing. [I’ve just emigrated and opening a bank account in France is a pain. I’m basically deciding between two e-banks for a Euro account. This points towards Transferwise as Revolut’s only advantage is native Google Pay utilisation.]