core: Spoof build fingerprint for Google Play Services
SafetyNet's CTS profile attestation checks whether Build.FINGERPRINT
matches that of the device's stock OS, which has passed CTS testing.
Spoof the fingerprint for Google Play Services to help pass SafetyNet.
We used to set the real system build fingerprint to the stock one, but
Android relies on each build having a unique fingerprint in order to
clear the correct caches and update persistent state for system changes.
On devices that no longer receive updates from the OEM, the build
fingerprint never changes and Android doesn't account for updates
correctly, which causes issues when updating without wiping data.
Only spoofing the fingerprint for Google Play Services fixes this issue.
Change-Id: I415b6760ecf4032bd60f886c319d43bc6d63aef6
core: Make build property spoofing more reliable
Determining the package name from Zygote's post-fork process name is
unreliable for several reasons:
- If USAP is enabled, Zygote will fork with the USAP process name, and
spoofing will never trigger when the forked process specializes into
a specific app.
- With the native fork loop backported from AOSP master,
Zygote.setAppProcessName() is no longer used for most apps because
the forking is handled by native code.
Instrumentation#newApplication() is responsible for creating the
Application singleton during each app's initialization, so hook it
instead for a more reliable and robust trigger.
[ghostrider-reborn] exclude nga stuff and use fixed walleye fp
Change-Id: Ic762d8853967bf78db614efaf46166e527cb397a
Co-authored-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
1 file changed