Allow microG and only microG to spoof package signature

* Create a new privileged permission FAKE_PACKAGE_SIGNATURE,
  which is required to spoof signature.
  This means it cannot be used by normal user apps.
* Add package name checks to allow only GmsCore and FakeStore
  to use this, since they're the only apps we want using this.
* Since both of those apps are system apps, package name checks
  are fine since no other app can pretend to be that package,
  it'd have to be signed the private keys used to sign those apps.
* Only allow them to spoof a hardcoded Google signature,
  since we do not want to allow spoofing of arbitrary signatures.

This patch originally started off from the upstream patches, but has been
significantly changed to heavily restrict the usage of this.

References:
* Upstream microG spoofing patches:
  https://github.com/microg/GmsCore/tree/master/patches
* ProtonAOSP Android 12 port:
  https://github.com/ProtonAOSP/android_frameworks_base/commit/0deff13d05e451fbe3803f66be73853237c6729c

Test: microG, open Self Check, verify output
Change-Id: I70af90eb808eaa892b2bad053350d502d84ca884
2 files changed