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

Play Integrity Api bypass #207

Closed
wants to merge 13 commits into from
Closed

Play Integrity Api bypass #207

wants to merge 13 commits into from

Conversation

Displax
Copy link
Contributor

@Displax Displax commented Jul 25, 2022

Bypass PIA (for now?) by changing fingerprint to old "marlin" 7.1.2 (does not required to apply other security patch level).
This kills two rabbits:
• fix old SN CTS profile check on some weird Custom ROMs
• bypass Integrity (MEETS_DEVICE_INTEGRITY) for now.

Other commit fix OnePlus OOS 12 problems ( thanks to @HuskyDG )

@Displax
Copy link
Contributor Author

Displax commented Jul 25, 2022

Close #224, #222, #220, #218, #212, #211, #210, #204, #203, #201, #196, #188, #171, #170

@kdrag0n
Copy link
Owner

kdrag0n commented Jul 26, 2022

Nice solution, thanks for looking into this. Have you noticed any features acting up with the old fingerprint?

Ideally, I think this should be scoped to Play Integrity code by identifying methods it calls near the beginning and end of integrity checks, and adding hooks to set and restore the fingerprint. I feel like setting a fingerprint that doesn't match the system in so many ways is bound to cause an issue somewhere.

@kdrag0n
Copy link
Owner

kdrag0n commented Jul 26, 2022

For example, the existing attestation hook could probably be used as a begin or end hook, depending on when Play Integrity calls it. We'd have to find another hook that can be installed within the constraints of reflection.

@Displax
Copy link
Contributor Author

Displax commented Jul 26, 2022

@kdrag0n
Hi, thank you for attention! Yes, I agree with you. We need separate target hook for this (if feasible) - will be more polite solution.
My solution - just quick example (and core resolve) with temp fix for impatient people))
Though to be honest I didn't notice any problems on my side (and no one report it for now). But need more testing with various devices.
Anyway, you have more knowledge than me on how to do it correctly and in better way ;)

Target process (one of?) "com.android.vending/com.google.android.finsky.integrityservice.IntegrityService"

To ensure that no one use same Android version
@HuskyDG

This comment was marked as outdated.

@kdrag0n
Copy link
Owner

kdrag0n commented Jul 31, 2022

Random thought: maybe the "delete key" method on the existing security provider could serve as an end hook. GMS generates a new keypair for each attestation so it probably deletes the keypair shortly afterwards.

Of course, this is all theoretical as it depends on the exact order of steps in the integrity checking process. Worst case scenario, we could just sleep for 1 second or so and revert the fingerprint change in a background thread. Not sure when I'll have time to look into it myself, but feel free to try implementing this idea:

  • Set the fingerprint in the key attestation hook
  • Spawn a thread to revert it after 3 seconds:
thread(daemon = true) {
    Thread.sleep(3000)
    /* revert */
}

@Displax
Copy link
Contributor Author

Displax commented Aug 2, 2022

@kdrag0n
Some theoretical thought... Can we simulate device with broken keystore (like some zenfone, oneplus models)? Reported that they pass STRONG_INTEGRITY even that it completely broken.

@Lohkdesgds
Copy link

I applied the mod version, I got

✔️ MEETS_DEVICE_INTEGRITY
✔️ MEETS_BASIC_INTEGRITY
❌ MEETS_STRONG_INTEGRITY
on integritycheck app.

Other apps like RootBeet Sample and SafetyNet Test all work great too, but they also did before this issue.

My device is an Zenfone 6 (2019), fingerprint is itself.

Google Pay/Wallet working just fine (YAAAAY)

I have MagiskHideProps, Shamiko, this and a module that enables stuff on my camera. I'm new to root, but I feel great KEKW
Thank you ;P

@pndwal pndwal mentioned this pull request Aug 5, 2022
@pndwal
Copy link

pndwal commented Aug 5, 2022

@kdrag0n Some theoretical thought... Can we simulate device with broken keystore (like some zenfone, oneplus models)? Reported that they pass STRONG_INTEGRITY even that it completely broken.

Seems what is broken in keymaster implementations varies.

Reports I've seen indicate that affected OnePlus devices generally don't pass STRONG_INTEGRITY, whereas Rog phone 3 (for one) passes...

@Efpophis
Copy link

Efpophis commented Aug 7, 2022

Hi guys, just want to let you know... I have a OnePlus 8T with the latest Android 12, rooted with latest Magisk, etc. Installing the module from this PR fixed my play store certification problem. I did have to wipe the past store app data after installing the module in order for it to pass certification. The Integrity checker app shows the strong integrity test failing, but that doesn't seem to make a difference with anything. Basic safety net stuff passes just fine.

Thank you!

@pndwal
Copy link

pndwal commented Aug 8, 2022

Re. "Req version that doesn't append a space character to the device model name" #211

@Displax, that issue makes me wonder...

It seems to me that if fingerprint should match the (expected) model as the issue suggests, then @kdrag0n's original model prop mismatch (to bypass hardware attestation enforcement) might also be produced by using a mismatched fingerprint, as your mod already does... (It is also apparent that this mismatch, at least with a very old print, causes no (known) problems for passing new MEETS_DEVICE_INTEGRITY.)

I haven't been able to test this*, but I now wonder if anyone using USNF with your 'Play Integrity Api bypass' (which introduces targeted fingerprint spoofing for gsm attestation process) actually needs altered model in addition if mismatch is achieved without it... Perhaps fingerprint spoofing can / does kill two birds... as well as two rabbits... 😛

*- On my Xiaomi RN8T w/ Android 10, if I restore ro.product.model using MHPC (ie. remove appended space) and reboot, I still have S/N passing w/ official USNF, so my device doesn't need the mismatch anyway...

@Displax
Copy link
Contributor Author

Displax commented Aug 8, 2022

I haven't been able to test this*, but I now wonder if anyone using USNF with your 'Play Integrity Api bypass' (which introduces targeted fingerprint spoofing for gsm attestation process) actually needs altered model in addition if mismatch is achieved without it...

Tested already, mismatched "model" still needed anyway

@ImperatorStorm
Copy link

ImperatorStorm commented Aug 9, 2022

Pixel 6 Pro, rooted with base rom with Magisk 25.2, failing STRONG_INTEGRITY with patch.
Android 12

@Displax
Copy link
Contributor Author

Displax commented Aug 9, 2022

Pixel 6 Pro, rooted with base rom with Magisk 25.2, failing STRONG_INTEGRITY with patch.
Android 12

Expected

@ghost ghost mentioned this pull request Aug 16, 2022
ExactExampl pushed a commit to ExactExampl/frameworks_base-old that referenced this pull request Aug 27, 2022
To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

Change-Id: I341550d61c65b66a743820cf7b4d75fec1bc86a3
pixelexperiencebot pushed a commit to PixelExperience/frameworks_base that referenced this pull request Aug 27, 2022
To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

Change-Id: I341550d61c65b66a743820cf7b4d75fec1bc86a3
pixelexperiencebot pushed a commit to PixelExperience/frameworks_base that referenced this pull request Aug 27, 2022
To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

Change-Id: I341550d61c65b66a743820cf7b4d75fec1bc86a3
ExactExampl pushed a commit to ExactExampl/frameworks_base that referenced this pull request Aug 28, 2022
To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

Change-Id: I341550d61c65b66a743820cf7b4d75fec1bc86a3
ExactExampl pushed a commit to ExactExampl/frameworks_base that referenced this pull request Aug 29, 2022
To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

Change-Id: I341550d61c65b66a743820cf7b4d75fec1bc86a3
ExactExampl pushed a commit to ExactExampl/frameworks_base that referenced this pull request Aug 29, 2022
To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

Change-Id: I341550d61c65b66a743820cf7b4d75fec1bc86a3
ExactExampl pushed a commit to ExactExampl/frameworks_base that referenced this pull request Aug 29, 2022
To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

Change-Id: I341550d61c65b66a743820cf7b4d75fec1bc86a3
ExactExampl pushed a commit to ExactExampl/frameworks_base that referenced this pull request Aug 29, 2022
To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

Change-Id: I341550d61c65b66a743820cf7b4d75fec1bc86a3
@xAffan
Copy link

xAffan commented Aug 30, 2022

Anyone with ROG 3 can test? Spoofing/Replicating should be fairly easy but someone please test and post the results here

ExactExampl pushed a commit to ExactExampl/frameworks_base that referenced this pull request Aug 30, 2022
To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

Change-Id: I341550d61c65b66a743820cf7b4d75fec1bc86a3
HELLINFIX pushed a commit to LineageOS-spaced-development/android_frameworks_base that referenced this pull request Jun 21, 2024
commit 444afd520dd93038d8cd9f68438536240a2b608e (pixel/thirteen, m/thirteen)
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Jul 2 18:34:00 2023 -0300

    PixelPropsUtils: Remove pixel whitelist

    Change-Id: I28ff6643ebe656478d3f5dde28ca88cd3d7a7542

commit a8561c81d7e2cae1730a1e25b74823a980838b86
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Thu Mar 23 16:22:25 2023 -0300

    PixelPropsUtils: Simplify GoogleCamera whitelisting

    Change-Id: I7db1b60343dff661a9f1c4116f689c3cc5afbdfc

    commit aa4c669
    Author: jhenrique09 <jhsv09@gmail.com>
    Date:   Wed Mar 22 12:39:22 2023 -0300

        PixelPropsUtils: Spoof user build

        Change-Id: Ie33e0213a2608ecceea37b0e4cfb1115d6a0b788

    Change-Id: I7583251294028bd7c8a9372c4a9ee79b42213f94

commit 9c9e560381218d27dd3100789bdcb42634939521
Author: Sourajit Karmakar <sourajitk@statixos.com>
Date:   Tue Jun 20 21:45:18 2023 -0400

    PixelPropsUtils: Enable new Velvet Weather UI

    Change-Id: I45310071f0267be1ea26f7c00044a56a763a3e6a

    * Adapt to current PixelPropsUtils

    Original commit:
    StatiXOS/android_frameworks_base@ce72977

    Change-Id: I0989ef14aec6fabcc0733232ddb65fd96fe7d80d
    Signed-off-by: someone5678 <nemui3353@gmail.com>

commit ad3fee4764092a5f8b2b36c9efda0cb55e757901
Author: aswin7469 <aswinas@pixysos.com>
Date:   Tue Jun 20 12:33:17 2023 +0530

    PixelPropUtils: Misc updates

    * unspoof gms pkg as whole, only spoof required processes
    * cleanup some duplicates
    * spoof play store to Pixel 5

    Co-authored-by: Ido Ben-Hur <idoybh2@gmail.com>
    Co-authored-by: someone5678 <nemui3353@gmail.com>
    Change-Id: Ifb9a4ed5a864e293c52f7d96a2f4d27cd6152c96

commit 232dbb7b0974819b2386cf59f3f3cf9d1c5e3ee0
Author: aswin7469 <aswinas@pixysos.com>
Date:   Sat Jun 17 13:53:45 2023 +0530

    PixelPropUtils: Add emojiwalls and cinematiceffects pkgs

commit dda7fccc336876d4843e32ad2b80a97edb977c47
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Jun 8 13:30:13 2023 +0530

    PixelPropUtils: Switch to raven for asi

    Change-Id: Ie57206e750e8554cf097c9466523526526b575b4

commit 9b492c93076552320a0bcbca65062ed7bb95551d
Author: aswin7469 <aswinas@pixysos.com>
Date:   Sat Feb 18 16:18:33 2023 +0530

    PixelPropsUtils: Add Pixel 6 Pro

    * fixes google dialer getting updated to
      pixel version and warn user about incompatibility

    * also remove unnecessory netflix spoof toggle

    Change-Id: I365f96acad5ee9d2aec1f74e2b49816bc121b891
    Co-authored-by: someone5678 <nemui3353@gmail.com>

commit 00a5906509e7ea00214b06820b26e0093f85e0a7
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Thu Jun 8 16:55:44 2023 +0530

    PixelPropUtils: Un-spoof GMS while adding google account

    GMS uses its DroidGuard service (the same that's used for safetynet)
    to get the device name from the build fingerprint, which from our
    current certified props, is Pixel XL. The device name after Google
    login shows up in the login alert accordingly as Pixel XL, which is
    inconvenient especially when you have multiple devices on the same ROM.

    By restarting the DroidGuard service process (gms.unstable) as soon as
    the user starts adding Google account (i.e when the GMS add account
    activity is started and moved to the top of the task stack), we can
    skip spoofing to certified props in this instance. When the user
    stops/finishes adding account (GMS add account activity is no longer
    at the top of the task stack), restart the process again, this time
    spoofing to certified props in order to be ready for safetynet.

    This ensures while adding a Google account, GMS reads the original
    properties of the device and labels the device with its original name,
    while in any other situation GMS reads certified properties required
    to pass SafetyNet/Play Integrity.

    Test:
    - Add google account from setup wizard, settings, any other app
    - Observe correct device name in gmail login alert
    - SafetyNet (basic, CTS), Play Integrity (basic, device) passes.

    [aswin7469]: Adapted for PixelPropUtils

    Change-Id: Ia5463f220a8262f7963fc5b2640a7a5311a73210

commit deaa854f20181e3e31e920510f043296f04e90e1
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu May 18 14:26:26 2023 +0530

    core: block 2021/22 pixel features to ASI and pixel launcher

    * blacklist pe features and spoof redfin to get rid of tensor shits

    Change-Id: I83aa09c151f51ee61361510b2c1a9ac8865a2aee

commit cdaff9a21351200bef20ffd3aa663c5a875541c5
Author: John Galt <johngaltfirstrun@gmail.com>
Date:   Fri Apr 14 09:55:46 2023 -0400

    core: block 2022+ pixel experience xmls to ASI

    Resolves downloads on play store updated ASI (newer than
    image-cheetah-tq2a.230405.003.e1 shipping).

commit 8451c0b203fadf036ab36a468532ddf67915a9fd
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Thu Feb 23 16:44:35 2023 -0300

    PixelPropsUtils: Don't declare propsToChange as static

    * Since that variable was static, it may hold props from undesired devices (like Pixel 7), use a new instance on every app to fix that.

    Change-Id: I7cf0836056a9cd5c9664ef0b203fc2a9bc5237f5

commit 207382c0a673a705abaaa8eec4eba1fce46ad915
Author: John Galt <johngaltfirstrun@gmail.com>
Date:   Wed Mar 22 11:32:52 2023 -0400

    PixelPropsUtils: move snapchat to walleye spoofing

    Snapchat on A13 without spoofing has delayed messages issue on many
    devices. Spoofing to newer pixels does not resolve this and additionally
    can harm photo quality on non pixels. However spoofing to an older
    device and android version such as Walleye resolve the delayed messages
    without harming photo quality.

commit 8ed83d4d0d2c3341d30d16736e4241bfa8cfa10d
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Mar 22 16:44:42 2023 +0530

    PixelPropUtils: Update spoofs

commit 1793b260cf5062af2c90e339016e84c17f542dd7
Author: aswin7469 <aswinas@pixysos.com>
Date:   Tue Mar 14 04:08:17 2023 +0530

    PixelPropsUtils: Update build fp to march 2023

    Change-Id: I1f11e53e2718c5bbbfded177338fb11b3e3ccd39

commit 276703f3f91e19e78ef34d6998a3ac4bd4b39cc0
Author: minaripenguin <minaripenguin@users.noreply.github.com>
Date:   Wed Feb 8 22:36:56 2023 +0530

    PixelPropUtils: Update gms unstable process spoof to walleye

    * spoof product & device name also to fix cts/play certification as of today

    original commit: https://github.com/minaripenguin/android_frameworks_base/commit/3714dd8b8c6ab1bd621ba23cf14d32dc01abd302

    Change-Id: Ia32c6a6366cea9e03b76bec48e849dfe43620d2f
    Co-authored-by: aswin7469 <aswinas@pixysos.com>

commit 51b0f20d99f2dd9ba608ba53ae80069898faac28
Author: Anirudh Gupta <anirudhgupta109@aosip.dev>
Date:   Wed Jan 4 18:20:56 2023 +0000

    PixelPropsUtils: Set shipping level to 32 for devices >=33

    If ro.product.first_api_level is 33, its forced to use HW attestation even though the safteynet checker app shows BASIC
    setting it to 32 allows for software attestation and passing CTS

    Change-Id: Ie7326eaac48424cdea3d9633ebe13c65053ef6c1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>

commit e1cc436f2d0ebe43b868bc3c26b039f4b2bae83e
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Dec 6 15:59:08 2022 +0100

    PixelPropsUtils: Use actual device model name

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: I454654d87b3ea6286e12e9a9f5ed120f06cb2aa6

commit f54b8e06428fbe8b1d8b2293b6091448369b3ed0
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Jan 23 04:31:31 2023 +0000

    PixelPropsUtils: Use spoofBuildGms for FP and model alteration

    * From hentaiOS/platform_frameworks_base@05b3987.

    Change-Id: I4fb21862e8a79c4c616c1faaee3d393f2e40ba34

commit d991314b9872428c16fc54761ef94f65a4005858
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Jan 26 00:27:15 2023 +0530

    PixelPropsUtils: Update spoofs

    * change cheetah fingerprint to global varient

    Change-Id: Ie187749a304cbf4e1371d8dbed17729a92293cf4

commit 81bf1d7c04c41624034a5a5217be35b2703a8d18
Author: aswin7469 <aswinas@pixysos.com>
Date:   Fri Jan 13 20:03:52 2023 +0530

    PixelPropsUtils: Add toggle for Gaming and google photos spoofs

    Change-Id: I0e0e3fe7289ae4334981d6eed5280c71ab417b50
    Co-authored-by: Pranav Vashi <neobuddy89@gmail.com>
    Co-authored-by: ghostrider-reborn <gh0strider.2k18.reborn@gmail.com>
    Co-authored-by: spezi77 <spezi7713@gmx.net>

commit b97ca2c24fc51e3614f02f598a9875eaf6ac874e
Author: aswin7469 <aswinas@pixysos.com>
Date:   Fri Jan 13 14:25:58 2023 +0530

    PixelPropUtils: spoof snapchat

    Change-Id: I4b46bd5f1d58f256a356b685ad04e4de694d3dec

commit b5c12e0de721ca37b44f2cc1f447e2b07311961c
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Jan 4 11:41:56 2023 +0530

    PixelPropUtils: update january 2023

commit df0a5837b7344f62ab742192a2e09a7ac5d7787a
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Jan 1 13:37:37 2023 -0300

    PixelPropsUtils: Use redfin props for extra packages

    Change-Id: If51bba2e21c722301e57a85bad8387479fb83574
    (cherry picked from commit 8a6da0b)

    commit 26e9fdc220cd83093581cb96bd226a89a0590b55

commit 7248c21c7f2351c007e5f265f8415f098f400ee4
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:20:37 2022 +0530

    PixelPropsUtils: spoof nothing smartcenter to pixel

    * after the update to 2.0.2 , its checking for NTExperince on phone 1 (Spacewar) as the custom rom's lacking it just crashes so workaround this
 by spoofing it

    TEST: app opens and successfully connect to ear (1)
    Change-Id: Iad9cf39bb8e55e4c22ff237d8e2ee5160dcea4e1

commit d3c447e
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Mon Nov 7 21:14:13 2022 -0300

    PixelPropsUtils: Press F for flame and coral

    Change-Id: Icba703edb590586874628d672b33f5a20f7e85d3

commit 02b3886
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Fri Nov 4 15:40:04 2022 -0300

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb

commit 11eb143
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Sep 11 14:58:02 2022 -0300

    PixelPropsUtils: Correct spoof props for Samsung apps

    * Workaround to avoid force closes especially on Wearable apps

    Change-Id: Ieb5a6745f6f93914e2c509b1454c22324cf3c7d7

commit 0d858ac
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Oct 25 23:20:10 2022 +0530

    PixelPropsUtils: Spoof Gboard with PixelXL

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: If712cb9ca4da8883bd4108d933471f8c5f2101c4

commit 0e32da6
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit cb7054c
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b38f8d8
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e98f2a0
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6de0e93
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 085a344
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 7f4db31
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464

commit 0a351e8
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit cff3b11
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c90d87a
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 2b18c2d
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4f769c2
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: Ica5aee62c38ae46c5003a1d35ba6bdc9f865b2ef

commit ee51411
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 596a952
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 16f7bdf
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit bc334ec
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Mon Aug 22 21:40:25 2022 -0300

    Import PixelPropsUtils

    Thanks to @kdrag0n for the original idea at ProtonAOSP/android_frameworks_base@5a54bfd

    Also includes:

    commit b40a373
    Author: Danny Lin <danny@kdrag0n.dev>
    Date:   Mon Nov 1 20:06:48 2021 -0700

        Limit SafetyNet workarounds to unstable GMS process

        The unstable process is where SafetyNet attestation actually runs, so
        we only need to spoof the model in that process. Leaving other processes
        fixes various issues caused by model detection and flag provisioning,
        including screen-off Voice Match in Google Assistant, broken At a Glance
        weather and settings on Android 12, and more.

        Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8

    commit 5cb4294
    Author: Dyneteve <dyneteve@hentaios.com>
    Date:   Thu Dec 30 19:11:41 2021 +0100

        PixelPropsUtils: Use Pixel 5a codename to GMS on Pixels

        Change-Id: I0ba7225e23296f1f3aa95560af43c567949ba900
        (cherry picked from commit caedd88)

    commit 5017b2d
    Author: Karan Parashar <whyredfire@gmail.com>
    Date:   Sat Feb 5 08:01:40 2022 +0530

        PixelPropsUtils: Avoid spoofing for Pixel Buds

        - it breaks the app, thanks to @ helenius147 [TG] for pointing this out

        Change-Id: Id0dd0af78ca78db6ad50617e04dbc880c0515c2e
        (cherry picked from commit d19d773)

    commit 47ddf9a
    Author: Joey Huab <joey@evolution-x.org>
    Date:   Thu Jan 27 13:33:48 2022 +0900

        PixelPropsUtils: Whitelist ARCore

        * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
        * Crash occurs while being used in Google app search feature.

        Change-Id: I008da8b09b6467dca2ceb26649c3cb3dee44777d
        Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>

    commit e8a20fb
    Author: Joey Huab <joey@evolution-x.org>
    Date:   Fri Feb 18 03:16:18 2022 +0900

        PixelProps: Set Pixel 5 as spoof for more Google apps

        Change-Id: I7281356c89b5379f3a9c75e613e7a59e3c6c40ab

    commit 8e50c58
    Author: Anay Wadhera <awadhera@berkeley.edu>
    Date:   Fri Dec 10 13:11:49 2021 -0800

        PixelPropUtils: remove spoofing for currently supported Pixels

        Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
        Reviewed-on: https://review.statixos.com/c/android_frameworks_base/+/6410
        Tested-by: Anay Wadhera <anay1018@gmail.com>
        Reviewed-by: Sourajit Karmakar <sourajit@live.com>

        Change-Id: I926b23324e669e24079c78fecc0c7a0b77c15e13

    commit 838ff9e
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sat Nov 27 16:53:23 2021 +0530

        PixelPropsUtils: Avoid spoofing props for gcam and mods

        Change-Id: Ia6f095b1511152ae6ba705990def71e7e4546072

    commit d72b3ce
    Author: vladsendrix <83285656+vladsendrix@users.noreply.github.com>
    Date:   Fri Dec 31 03:18:04 2021 +0100

        PixelPropsUtils: Spoof Pixel XL for Google Photos

        pixel_2016_exclusive.xml is already added, why not have it actually work

        Change-Id: If0b8064c7cb633139ee7c30a7bf1a8543bcc9cad

    commit 0f73ff5
    Author: Danny Lin <danny@kdrag0n.dev>
    Date:   Mon Oct 11 20:00:44 2021 -0700

        keystore: Block key attestation for SafetyNet

        SafetyNet (part of Google Play Services) opportunistically uses
        hardware-backed key attestation via KeyStore as a strong integrity
        check. This causes SafetyNet to fail on custom ROMs because the verified
        boot key and bootloader unlock state can be detected from attestation
        certificates.

        As a workaround, we can take advantage of the fact that SafetyNet's
        usage of key attestation is opportunistic (i.e. falls back to basic
        integrity checks if it fails) and prevent it from getting the
        attestation certificate chain from KeyStore. This is done by checking
        the stack for DroidGuard, which is the codename for SafetyNet, and
        pretending that the device doesn't support key attestation.

        Key attestation has only been blocked for SafetyNet specifically, as
        Google Play Services and other apps have many valid reasons to use it.
        For example, it appears to be involved in Google's mobile security key
        ferature.

        Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6

    Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
    Co-authored-by: Danny Lin <danny@kdrag0n.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: Ic68aadf5d8d2352da4c3adf1e7f67ef0a1dd5df2

commit bfec00bf4ffc40297c97bf02d124696f279c0dbe
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:23:14 2022 +0530

    PixelPropsUtils: Spoof some more gooogle apps to cheetah

    * as we started using more cheetah components more spoofs are required

commit 4edf7f0408d7388891879419c80570f26ddaaa19
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:20:37 2022 +0530

    PixelPropsUtils: spoof nothing smartcenter to pixel

    * after the update to 2.0.2 , its checking for NTExperince on phone 1 (Spacewar) as the custom rom's lacking it just crashes so workaround this
 by spoofing it

    TEST: app opens and successfully connect to ear (1)

commit 0349f9f528d35faacd08589b01f9dcada9b3d109
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Sep 12 12:54:31 2022 +0000

    [SQUASH] Switch to AttestationHooks

    Also includes:

    Spoof product name for Google Play Services (hentaiOS/platform_frameworks_base@05b3987
c1)

    NB: This code is under the gmscompat package, but it does not depend on
    any code from gmscompat.

    Change-Id: Ic018c0d7abe4573143c3b92301a2625b91e6673a

    keystore: Block key attestation for SafetyNet (hentaiOS/platform_frameworks_base@cac8283
0ea5)

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6

    Limit SafetyNet workarounds to unstable GMS process (hentaiOS/platform_frameworks_base@fce9b65
472cb5a594)

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process. Leaving other processes
    fixes various issues caused by model detection and flag provisioning,
    including screen-off Voice Match in Google Assistant, broken At a Glance
    weather and settings on Android 12, and more.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8

    gmscompat: Apply the SafetyNet workaround to Play Store aswell (hentaiOS/platform_frameworks_base@c9a086f9b635bf4e3e6
1fbd501ade464f8f5b713)

    Play Store is used for the new Play Integrity API, extend the hack
    to it aswell

    Test: Device Integrity and Basic Integrity passes.

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1

    gmscompat: Use Nexus 6P fingerprint for CTS/Integrity (hentaiOS/platform_frameworks_base@813f11628014a93d45f55dedd434
fdddd9510eb0)

    Google seems to have patched the KM block to Play Store in record time,
    but is still not enforced for anything under android N.

    Since we moved to angler FP we don't need to spoof model to Play Store
    anymore, however the KM block is still needed.

    Test: Run Play Intregrity Attestation

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: Ic2401a6e40ddfc4318a1d0faa87e42eb118ac3d1

    Co-authored-by: Dyneteve <dyneteve@hentaios.com>

commit faa0f69a85bc241f7824057ab32b64d713716245
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Oct 13 23:30:50 2022 +0530

    core: Blacklist PIXEL_2022_EXPERIENCE for photos

commit 7fa6c569bb243d442a80333d25806bd06645f110
Author: ReallySnow <reallysnow233@gmail.com>
Date:   Fri Sep 23 14:18:46 2022 +0800

    core: Fix Pixel feature leaked to other apps

    * Current execution order is [1] `((A && B) && C) || (D) || (E) || (F) || (G)`
      and we want the execution order is [2] `A && B && (C || D || E || F || G)`
      If follow [1], it will not only affect GPhoto, but also Gcam, Gcam needs
      to read these functions or it will prompt for unsupported device and then crash

    Change-Id: I53c97591fe7526c8dc6f07b914a43dc0f8b197b7

commit 34765c3259207c1ee2fd83bccfb1caf9894b8cd3
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e

commit 21e6846ac9415bbfd9acb23bf418a44e30c578e0
Author: kondors1995 <normandija1945@gmail.com>
Date:   Mon Dec 20 16:53:46 2021 +0000

    core: Extend Pixel experience Blacklist For Google Photos

    Turns out having these brakes Original quality backups.
    Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Change-Id: I336facff7b55552f094997ade337656461a0ea1d

commit ac0056ac3cdfe5c82e61e958075e10a59d5bcdf8
Author: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
Date:   Mon Dec 13 07:16:55 2021 +0000

    core: Blacklist P21 midyear, P20, P20 midyear experience system feature from Google Photos

    naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
    Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to rem
ove any XMLs

    Test: Google Photos editor with PIXEL_2021_EXPERIENCE feature in product
    Change-Id: Iad083ce049cd1786494a71c3b8d575f0caabb4e7

commit d1061c15df7d259ab192345045868b7325b1054e
Author: Kuba Wojciechowski <nullbytepl@gmail.com>
Date:   Fri Nov 5 01:52:51 2021 +0300

    core: Blacklist P21 experience system feature from Google Photos

    We want to include the P21 experience flag to enable new features,
    however it seems like Google Photos uses it to decide whether to use the
    TPU tflite delegate. There doesn't seem to be any fallback so we need to
    make sure the feature is not exposed to the app so that a normal
    NNAPI/GPU delegate can be used instead.

    Test: Google Photos editor with PIXEL_2021_EXPERIENCE feature in product
    Signed-off-by: Kuba Wojciechowski <nullbytepl@gmail.com>
    Change-Id: I51a02f8347324c7a85f3136b802dce4cc4556ac5

Change-Id: I6b32d66fda2293afc1fc6ae82c5604274e6b73b0
MJPollard pushed a commit to AltairROM/android_frameworks_base that referenced this pull request Jun 21, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

@neobuddy89:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    @neobuddy89: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    @neobuddy89:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    @neobuddy89: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    @neobuddy89: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
SwapnilVicky pushed a commit to SampattiOS/android_frameworks_base that referenced this pull request Jun 22, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

@neobuddy89:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    @neobuddy89: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    @neobuddy89:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    @neobuddy89: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    @neobuddy89: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
HELLINFIX pushed a commit to LineageOS-spaced-development/android_frameworks_base that referenced this pull request Jun 22, 2024
commit 444afd520dd93038d8cd9f68438536240a2b608e (pixel/thirteen, m/thirteen)
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Jul 2 18:34:00 2023 -0300

    PixelPropsUtils: Remove pixel whitelist

    Change-Id: I28ff6643ebe656478d3f5dde28ca88cd3d7a7542

commit a8561c81d7e2cae1730a1e25b74823a980838b86
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Thu Mar 23 16:22:25 2023 -0300

    PixelPropsUtils: Simplify GoogleCamera whitelisting

    Change-Id: I7db1b60343dff661a9f1c4116f689c3cc5afbdfc

    commit aa4c669
    Author: jhenrique09 <jhsv09@gmail.com>
    Date:   Wed Mar 22 12:39:22 2023 -0300

        PixelPropsUtils: Spoof user build

        Change-Id: Ie33e0213a2608ecceea37b0e4cfb1115d6a0b788

    Change-Id: I7583251294028bd7c8a9372c4a9ee79b42213f94

commit 9c9e560381218d27dd3100789bdcb42634939521
Author: Sourajit Karmakar <sourajitk@statixos.com>
Date:   Tue Jun 20 21:45:18 2023 -0400

    PixelPropsUtils: Enable new Velvet Weather UI

    Change-Id: I45310071f0267be1ea26f7c00044a56a763a3e6a

    * Adapt to current PixelPropsUtils

    Original commit:
    StatiXOS/android_frameworks_base@ce72977

    Change-Id: I0989ef14aec6fabcc0733232ddb65fd96fe7d80d
    Signed-off-by: someone5678 <nemui3353@gmail.com>

commit ad3fee4764092a5f8b2b36c9efda0cb55e757901
Author: aswin7469 <aswinas@pixysos.com>
Date:   Tue Jun 20 12:33:17 2023 +0530

    PixelPropUtils: Misc updates

    * unspoof gms pkg as whole, only spoof required processes
    * cleanup some duplicates
    * spoof play store to Pixel 5

    Co-authored-by: Ido Ben-Hur <idoybh2@gmail.com>
    Co-authored-by: someone5678 <nemui3353@gmail.com>
    Change-Id: Ifb9a4ed5a864e293c52f7d96a2f4d27cd6152c96

commit 232dbb7b0974819b2386cf59f3f3cf9d1c5e3ee0
Author: aswin7469 <aswinas@pixysos.com>
Date:   Sat Jun 17 13:53:45 2023 +0530

    PixelPropUtils: Add emojiwalls and cinematiceffects pkgs

commit dda7fccc336876d4843e32ad2b80a97edb977c47
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Jun 8 13:30:13 2023 +0530

    PixelPropUtils: Switch to raven for asi

    Change-Id: Ie57206e750e8554cf097c9466523526526b575b4

commit 9b492c93076552320a0bcbca65062ed7bb95551d
Author: aswin7469 <aswinas@pixysos.com>
Date:   Sat Feb 18 16:18:33 2023 +0530

    PixelPropsUtils: Add Pixel 6 Pro

    * fixes google dialer getting updated to
      pixel version and warn user about incompatibility

    * also remove unnecessory netflix spoof toggle

    Change-Id: I365f96acad5ee9d2aec1f74e2b49816bc121b891
    Co-authored-by: someone5678 <nemui3353@gmail.com>

commit 00a5906509e7ea00214b06820b26e0093f85e0a7
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Thu Jun 8 16:55:44 2023 +0530

    PixelPropUtils: Un-spoof GMS while adding google account

    GMS uses its DroidGuard service (the same that's used for safetynet)
    to get the device name from the build fingerprint, which from our
    current certified props, is Pixel XL. The device name after Google
    login shows up in the login alert accordingly as Pixel XL, which is
    inconvenient especially when you have multiple devices on the same ROM.

    By restarting the DroidGuard service process (gms.unstable) as soon as
    the user starts adding Google account (i.e when the GMS add account
    activity is started and moved to the top of the task stack), we can
    skip spoofing to certified props in this instance. When the user
    stops/finishes adding account (GMS add account activity is no longer
    at the top of the task stack), restart the process again, this time
    spoofing to certified props in order to be ready for safetynet.

    This ensures while adding a Google account, GMS reads the original
    properties of the device and labels the device with its original name,
    while in any other situation GMS reads certified properties required
    to pass SafetyNet/Play Integrity.

    Test:
    - Add google account from setup wizard, settings, any other app
    - Observe correct device name in gmail login alert
    - SafetyNet (basic, CTS), Play Integrity (basic, device) passes.

    [aswin7469]: Adapted for PixelPropUtils

    Change-Id: Ia5463f220a8262f7963fc5b2640a7a5311a73210

commit deaa854f20181e3e31e920510f043296f04e90e1
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu May 18 14:26:26 2023 +0530

    core: block 2021/22 pixel features to ASI and pixel launcher

    * blacklist pe features and spoof redfin to get rid of tensor shits

    Change-Id: I83aa09c151f51ee61361510b2c1a9ac8865a2aee

commit cdaff9a21351200bef20ffd3aa663c5a875541c5
Author: John Galt <johngaltfirstrun@gmail.com>
Date:   Fri Apr 14 09:55:46 2023 -0400

    core: block 2022+ pixel experience xmls to ASI

    Resolves downloads on play store updated ASI (newer than
    image-cheetah-tq2a.230405.003.e1 shipping).

commit 8451c0b203fadf036ab36a468532ddf67915a9fd
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Thu Feb 23 16:44:35 2023 -0300

    PixelPropsUtils: Don't declare propsToChange as static

    * Since that variable was static, it may hold props from undesired devices (like Pixel 7), use a new instance on every app to fix that.

    Change-Id: I7cf0836056a9cd5c9664ef0b203fc2a9bc5237f5

commit 207382c0a673a705abaaa8eec4eba1fce46ad915
Author: John Galt <johngaltfirstrun@gmail.com>
Date:   Wed Mar 22 11:32:52 2023 -0400

    PixelPropsUtils: move snapchat to walleye spoofing

    Snapchat on A13 without spoofing has delayed messages issue on many
    devices. Spoofing to newer pixels does not resolve this and additionally
    can harm photo quality on non pixels. However spoofing to an older
    device and android version such as Walleye resolve the delayed messages
    without harming photo quality.

commit 8ed83d4d0d2c3341d30d16736e4241bfa8cfa10d
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Mar 22 16:44:42 2023 +0530

    PixelPropUtils: Update spoofs

commit 1793b260cf5062af2c90e339016e84c17f542dd7
Author: aswin7469 <aswinas@pixysos.com>
Date:   Tue Mar 14 04:08:17 2023 +0530

    PixelPropsUtils: Update build fp to march 2023

    Change-Id: I1f11e53e2718c5bbbfded177338fb11b3e3ccd39

commit 276703f3f91e19e78ef34d6998a3ac4bd4b39cc0
Author: minaripenguin <minaripenguin@users.noreply.github.com>
Date:   Wed Feb 8 22:36:56 2023 +0530

    PixelPropUtils: Update gms unstable process spoof to walleye

    * spoof product & device name also to fix cts/play certification as of today

    original commit: https://github.com/minaripenguin/android_frameworks_base/commit/3714dd8b8c6ab1bd621ba23cf14d32dc01abd302

    Change-Id: Ia32c6a6366cea9e03b76bec48e849dfe43620d2f
    Co-authored-by: aswin7469 <aswinas@pixysos.com>

commit 51b0f20d99f2dd9ba608ba53ae80069898faac28
Author: Anirudh Gupta <anirudhgupta109@aosip.dev>
Date:   Wed Jan 4 18:20:56 2023 +0000

    PixelPropsUtils: Set shipping level to 32 for devices >=33

    If ro.product.first_api_level is 33, its forced to use HW attestation even though the safteynet checker app shows BASIC
    setting it to 32 allows for software attestation and passing CTS

    Change-Id: Ie7326eaac48424cdea3d9633ebe13c65053ef6c1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>

commit e1cc436f2d0ebe43b868bc3c26b039f4b2bae83e
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Dec 6 15:59:08 2022 +0100

    PixelPropsUtils: Use actual device model name

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: I454654d87b3ea6286e12e9a9f5ed120f06cb2aa6

commit f54b8e06428fbe8b1d8b2293b6091448369b3ed0
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Jan 23 04:31:31 2023 +0000

    PixelPropsUtils: Use spoofBuildGms for FP and model alteration

    * From hentaiOS/platform_frameworks_base@05b3987.

    Change-Id: I4fb21862e8a79c4c616c1faaee3d393f2e40ba34

commit d991314b9872428c16fc54761ef94f65a4005858
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Jan 26 00:27:15 2023 +0530

    PixelPropsUtils: Update spoofs

    * change cheetah fingerprint to global varient

    Change-Id: Ie187749a304cbf4e1371d8dbed17729a92293cf4

commit 81bf1d7c04c41624034a5a5217be35b2703a8d18
Author: aswin7469 <aswinas@pixysos.com>
Date:   Fri Jan 13 20:03:52 2023 +0530

    PixelPropsUtils: Add toggle for Gaming and google photos spoofs

    Change-Id: I0e0e3fe7289ae4334981d6eed5280c71ab417b50
    Co-authored-by: Pranav Vashi <neobuddy89@gmail.com>
    Co-authored-by: ghostrider-reborn <gh0strider.2k18.reborn@gmail.com>
    Co-authored-by: spezi77 <spezi7713@gmx.net>

commit b97ca2c24fc51e3614f02f598a9875eaf6ac874e
Author: aswin7469 <aswinas@pixysos.com>
Date:   Fri Jan 13 14:25:58 2023 +0530

    PixelPropUtils: spoof snapchat

    Change-Id: I4b46bd5f1d58f256a356b685ad04e4de694d3dec

commit b5c12e0de721ca37b44f2cc1f447e2b07311961c
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Jan 4 11:41:56 2023 +0530

    PixelPropUtils: update january 2023

commit df0a5837b7344f62ab742192a2e09a7ac5d7787a
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Jan 1 13:37:37 2023 -0300

    PixelPropsUtils: Use redfin props for extra packages

    Change-Id: If51bba2e21c722301e57a85bad8387479fb83574
    (cherry picked from commit 8a6da0b)

    commit 26e9fdc220cd83093581cb96bd226a89a0590b55

commit 7248c21c7f2351c007e5f265f8415f098f400ee4
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:20:37 2022 +0530

    PixelPropsUtils: spoof nothing smartcenter to pixel

    * after the update to 2.0.2 , its checking for NTExperince on phone 1 (Spacewar) as the custom rom's lacking it just crashes so workaround this
 by spoofing it

    TEST: app opens and successfully connect to ear (1)
    Change-Id: Iad9cf39bb8e55e4c22ff237d8e2ee5160dcea4e1

commit d3c447e
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Mon Nov 7 21:14:13 2022 -0300

    PixelPropsUtils: Press F for flame and coral

    Change-Id: Icba703edb590586874628d672b33f5a20f7e85d3

commit 02b3886
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Fri Nov 4 15:40:04 2022 -0300

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb

commit 11eb143
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Sep 11 14:58:02 2022 -0300

    PixelPropsUtils: Correct spoof props for Samsung apps

    * Workaround to avoid force closes especially on Wearable apps

    Change-Id: Ieb5a6745f6f93914e2c509b1454c22324cf3c7d7

commit 0d858ac
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Oct 25 23:20:10 2022 +0530

    PixelPropsUtils: Spoof Gboard with PixelXL

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: If712cb9ca4da8883bd4108d933471f8c5f2101c4

commit 0e32da6
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit cb7054c
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b38f8d8
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e98f2a0
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6de0e93
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 085a344
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 7f4db31
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464

commit 0a351e8
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit cff3b11
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c90d87a
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 2b18c2d
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4f769c2
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: Ica5aee62c38ae46c5003a1d35ba6bdc9f865b2ef

commit ee51411
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 596a952
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 16f7bdf
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit bc334ec
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Mon Aug 22 21:40:25 2022 -0300

    Import PixelPropsUtils

    Thanks to @kdrag0n for the original idea at ProtonAOSP/android_frameworks_base@5a54bfd

    Also includes:

    commit b40a373
    Author: Danny Lin <danny@kdrag0n.dev>
    Date:   Mon Nov 1 20:06:48 2021 -0700

        Limit SafetyNet workarounds to unstable GMS process

        The unstable process is where SafetyNet attestation actually runs, so
        we only need to spoof the model in that process. Leaving other processes
        fixes various issues caused by model detection and flag provisioning,
        including screen-off Voice Match in Google Assistant, broken At a Glance
        weather and settings on Android 12, and more.

        Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8

    commit 5cb4294
    Author: Dyneteve <dyneteve@hentaios.com>
    Date:   Thu Dec 30 19:11:41 2021 +0100

        PixelPropsUtils: Use Pixel 5a codename to GMS on Pixels

        Change-Id: I0ba7225e23296f1f3aa95560af43c567949ba900
        (cherry picked from commit caedd88)

    commit 5017b2d
    Author: Karan Parashar <whyredfire@gmail.com>
    Date:   Sat Feb 5 08:01:40 2022 +0530

        PixelPropsUtils: Avoid spoofing for Pixel Buds

        - it breaks the app, thanks to @ helenius147 [TG] for pointing this out

        Change-Id: Id0dd0af78ca78db6ad50617e04dbc880c0515c2e
        (cherry picked from commit d19d773)

    commit 47ddf9a
    Author: Joey Huab <joey@evolution-x.org>
    Date:   Thu Jan 27 13:33:48 2022 +0900

        PixelPropsUtils: Whitelist ARCore

        * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
        * Crash occurs while being used in Google app search feature.

        Change-Id: I008da8b09b6467dca2ceb26649c3cb3dee44777d
        Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>

    commit e8a20fb
    Author: Joey Huab <joey@evolution-x.org>
    Date:   Fri Feb 18 03:16:18 2022 +0900

        PixelProps: Set Pixel 5 as spoof for more Google apps

        Change-Id: I7281356c89b5379f3a9c75e613e7a59e3c6c40ab

    commit 8e50c58
    Author: Anay Wadhera <awadhera@berkeley.edu>
    Date:   Fri Dec 10 13:11:49 2021 -0800

        PixelPropUtils: remove spoofing for currently supported Pixels

        Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
        Reviewed-on: https://review.statixos.com/c/android_frameworks_base/+/6410
        Tested-by: Anay Wadhera <anay1018@gmail.com>
        Reviewed-by: Sourajit Karmakar <sourajit@live.com>

        Change-Id: I926b23324e669e24079c78fecc0c7a0b77c15e13

    commit 838ff9e
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sat Nov 27 16:53:23 2021 +0530

        PixelPropsUtils: Avoid spoofing props for gcam and mods

        Change-Id: Ia6f095b1511152ae6ba705990def71e7e4546072

    commit d72b3ce
    Author: vladsendrix <83285656+vladsendrix@users.noreply.github.com>
    Date:   Fri Dec 31 03:18:04 2021 +0100

        PixelPropsUtils: Spoof Pixel XL for Google Photos

        pixel_2016_exclusive.xml is already added, why not have it actually work

        Change-Id: If0b8064c7cb633139ee7c30a7bf1a8543bcc9cad

    commit 0f73ff5
    Author: Danny Lin <danny@kdrag0n.dev>
    Date:   Mon Oct 11 20:00:44 2021 -0700

        keystore: Block key attestation for SafetyNet

        SafetyNet (part of Google Play Services) opportunistically uses
        hardware-backed key attestation via KeyStore as a strong integrity
        check. This causes SafetyNet to fail on custom ROMs because the verified
        boot key and bootloader unlock state can be detected from attestation
        certificates.

        As a workaround, we can take advantage of the fact that SafetyNet's
        usage of key attestation is opportunistic (i.e. falls back to basic
        integrity checks if it fails) and prevent it from getting the
        attestation certificate chain from KeyStore. This is done by checking
        the stack for DroidGuard, which is the codename for SafetyNet, and
        pretending that the device doesn't support key attestation.

        Key attestation has only been blocked for SafetyNet specifically, as
        Google Play Services and other apps have many valid reasons to use it.
        For example, it appears to be involved in Google's mobile security key
        ferature.

        Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6

    Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
    Co-authored-by: Danny Lin <danny@kdrag0n.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: Ic68aadf5d8d2352da4c3adf1e7f67ef0a1dd5df2

commit bfec00bf4ffc40297c97bf02d124696f279c0dbe
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:23:14 2022 +0530

    PixelPropsUtils: Spoof some more gooogle apps to cheetah

    * as we started using more cheetah components more spoofs are required

commit 4edf7f0408d7388891879419c80570f26ddaaa19
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:20:37 2022 +0530

    PixelPropsUtils: spoof nothing smartcenter to pixel

    * after the update to 2.0.2 , its checking for NTExperince on phone 1 (Spacewar) as the custom rom's lacking it just crashes so workaround this
 by spoofing it

    TEST: app opens and successfully connect to ear (1)

commit 0349f9f528d35faacd08589b01f9dcada9b3d109
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Sep 12 12:54:31 2022 +0000

    [SQUASH] Switch to AttestationHooks

    Also includes:

    Spoof product name for Google Play Services (hentaiOS/platform_frameworks_base@05b3987
c1)

    NB: This code is under the gmscompat package, but it does not depend on
    any code from gmscompat.

    Change-Id: Ic018c0d7abe4573143c3b92301a2625b91e6673a

    keystore: Block key attestation for SafetyNet (hentaiOS/platform_frameworks_base@cac8283
0ea5)

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6

    Limit SafetyNet workarounds to unstable GMS process (hentaiOS/platform_frameworks_base@fce9b65
472cb5a594)

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process. Leaving other processes
    fixes various issues caused by model detection and flag provisioning,
    including screen-off Voice Match in Google Assistant, broken At a Glance
    weather and settings on Android 12, and more.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8

    gmscompat: Apply the SafetyNet workaround to Play Store aswell (hentaiOS/platform_frameworks_base@c9a086f9b635bf4e3e6
1fbd501ade464f8f5b713)

    Play Store is used for the new Play Integrity API, extend the hack
    to it aswell

    Test: Device Integrity and Basic Integrity passes.

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1

    gmscompat: Use Nexus 6P fingerprint for CTS/Integrity (hentaiOS/platform_frameworks_base@813f11628014a93d45f55dedd434
fdddd9510eb0)

    Google seems to have patched the KM block to Play Store in record time,
    but is still not enforced for anything under android N.

    Since we moved to angler FP we don't need to spoof model to Play Store
    anymore, however the KM block is still needed.

    Test: Run Play Intregrity Attestation

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: Ic2401a6e40ddfc4318a1d0faa87e42eb118ac3d1

    Co-authored-by: Dyneteve <dyneteve@hentaios.com>

commit faa0f69a85bc241f7824057ab32b64d713716245
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Oct 13 23:30:50 2022 +0530

    core: Blacklist PIXEL_2022_EXPERIENCE for photos

commit 7fa6c569bb243d442a80333d25806bd06645f110
Author: ReallySnow <reallysnow233@gmail.com>
Date:   Fri Sep 23 14:18:46 2022 +0800

    core: Fix Pixel feature leaked to other apps

    * Current execution order is [1] `((A && B) && C) || (D) || (E) || (F) || (G)`
      and we want the execution order is [2] `A && B && (C || D || E || F || G)`
      If follow [1], it will not only affect GPhoto, but also Gcam, Gcam needs
      to read these functions or it will prompt for unsupported device and then crash

    Change-Id: I53c97591fe7526c8dc6f07b914a43dc0f8b197b7

commit 34765c3259207c1ee2fd83bccfb1caf9894b8cd3
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e

commit 21e6846ac9415bbfd9acb23bf418a44e30c578e0
Author: kondors1995 <normandija1945@gmail.com>
Date:   Mon Dec 20 16:53:46 2021 +0000

    core: Extend Pixel experience Blacklist For Google Photos

    Turns out having these brakes Original quality backups.
    Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Change-Id: I336facff7b55552f094997ade337656461a0ea1d

commit ac0056ac3cdfe5c82e61e958075e10a59d5bcdf8
Author: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
Date:   Mon Dec 13 07:16:55 2021 +0000

    core: Blacklist P21 midyear, P20, P20 midyear experience system feature from Google Photos

    naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
    Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to rem
ove any XMLs

    Test: Google Photos editor with PIXEL_2021_EXPERIENCE feature in product
    Change-Id: Iad083ce049cd1786494a71c3b8d575f0caabb4e7

commit d1061c15df7d259ab192345045868b7325b1054e
Author: Kuba Wojciechowski <nullbytepl@gmail.com>
Date:   Fri Nov 5 01:52:51 2021 +0300

    core: Blacklist P21 experience system feature from Google Photos

    We want to include the P21 experience flag to enable new features,
    however it seems like Google Photos uses it to decide whether to use the
    TPU tflite delegate. There doesn't seem to be any fallback so we need to
    make sure the feature is not exposed to the app so that a normal
    NNAPI/GPU delegate can be used instead.

    Test: Google Photos editor with PIXEL_2021_EXPERIENCE feature in product
    Signed-off-by: Kuba Wojciechowski <nullbytepl@gmail.com>
    Change-Id: I51a02f8347324c7a85f3136b802dce4cc4556ac5

Change-Id: I6b32d66fda2293afc1fc6ae82c5604274e6b73b0
nattolecats pushed a commit to 2by2-Project/android_frameworks_base that referenced this pull request Jun 22, 2024
commit 444afd520dd93038d8cd9f68438536240a2b608e (pixel/thirteen, m/thirteen)
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Jul 2 18:34:00 2023 -0300

    PixelPropsUtils: Remove pixel whitelist

    Change-Id: I28ff6643ebe656478d3f5dde28ca88cd3d7a7542

commit a8561c81d7e2cae1730a1e25b74823a980838b86
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Thu Mar 23 16:22:25 2023 -0300

    PixelPropsUtils: Simplify GoogleCamera whitelisting

    Change-Id: I7db1b60343dff661a9f1c4116f689c3cc5afbdfc

    commit aa4c66949ad5552b3221cbd5b7fdf072dd7ce60e
    Author: jhenrique09 <jhsv09@gmail.com>
    Date:   Wed Mar 22 12:39:22 2023 -0300

        PixelPropsUtils: Spoof user build

        Change-Id: Ie33e0213a2608ecceea37b0e4cfb1115d6a0b788

    Change-Id: I7583251294028bd7c8a9372c4a9ee79b42213f94

commit 9c9e560381218d27dd3100789bdcb42634939521
Author: Sourajit Karmakar <sourajitk@statixos.com>
Date:   Tue Jun 20 21:45:18 2023 -0400

    PixelPropsUtils: Enable new Velvet Weather UI

    Change-Id: I45310071f0267be1ea26f7c00044a56a763a3e6a

    * Adapt to current PixelPropsUtils

    Original commit:
    StatiXOS/android_frameworks_base@ce72977

    Change-Id: I0989ef14aec6fabcc0733232ddb65fd96fe7d80d
    Signed-off-by: someone5678 <nemui3353@gmail.com>

commit ad3fee4764092a5f8b2b36c9efda0cb55e757901
Author: aswin7469 <aswinas@pixysos.com>
Date:   Tue Jun 20 12:33:17 2023 +0530

    PixelPropUtils: Misc updates

    * unspoof gms pkg as whole, only spoof required processes
    * cleanup some duplicates
    * spoof play store to Pixel 5

    Co-authored-by: Ido Ben-Hur <idoybh2@gmail.com>
    Co-authored-by: someone5678 <nemui3353@gmail.com>
    Change-Id: Ifb9a4ed5a864e293c52f7d96a2f4d27cd6152c96

commit 232dbb7b0974819b2386cf59f3f3cf9d1c5e3ee0
Author: aswin7469 <aswinas@pixysos.com>
Date:   Sat Jun 17 13:53:45 2023 +0530

    PixelPropUtils: Add emojiwalls and cinematiceffects pkgs

commit dda7fccc336876d4843e32ad2b80a97edb977c47
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Jun 8 13:30:13 2023 +0530

    PixelPropUtils: Switch to raven for asi

    Change-Id: Ie57206e750e8554cf097c9466523526526b575b4

commit 9b492c93076552320a0bcbca65062ed7bb95551d
Author: aswin7469 <aswinas@pixysos.com>
Date:   Sat Feb 18 16:18:33 2023 +0530

    PixelPropsUtils: Add Pixel 6 Pro

    * fixes google dialer getting updated to
      pixel version and warn user about incompatibility

    * also remove unnecessory netflix spoof toggle

    Change-Id: I365f96acad5ee9d2aec1f74e2b49816bc121b891
    Co-authored-by: someone5678 <nemui3353@gmail.com>

commit 00a5906509e7ea00214b06820b26e0093f85e0a7
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Thu Jun 8 16:55:44 2023 +0530

    PixelPropUtils: Un-spoof GMS while adding google account

    GMS uses its DroidGuard service (the same that's used for safetynet)
    to get the device name from the build fingerprint, which from our
    current certified props, is Pixel XL. The device name after Google
    login shows up in the login alert accordingly as Pixel XL, which is
    inconvenient especially when you have multiple devices on the same ROM.

    By restarting the DroidGuard service process (gms.unstable) as soon as
    the user starts adding Google account (i.e when the GMS add account
    activity is started and moved to the top of the task stack), we can
    skip spoofing to certified props in this instance. When the user
    stops/finishes adding account (GMS add account activity is no longer
    at the top of the task stack), restart the process again, this time
    spoofing to certified props in order to be ready for safetynet.

    This ensures while adding a Google account, GMS reads the original
    properties of the device and labels the device with its original name,
    while in any other situation GMS reads certified properties required
    to pass SafetyNet/Play Integrity.

    Test:
    - Add google account from setup wizard, settings, any other app
    - Observe correct device name in gmail login alert
    - SafetyNet (basic, CTS), Play Integrity (basic, device) passes.

    [aswin7469]: Adapted for PixelPropUtils

    Change-Id: Ia5463f220a8262f7963fc5b2640a7a5311a73210

commit deaa854f20181e3e31e920510f043296f04e90e1
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu May 18 14:26:26 2023 +0530

    core: block 2021/22 pixel features to ASI and pixel launcher

    * blacklist pe features and spoof redfin to get rid of tensor shits

    Change-Id: I83aa09c151f51ee61361510b2c1a9ac8865a2aee

commit cdaff9a21351200bef20ffd3aa663c5a875541c5
Author: John Galt <johngaltfirstrun@gmail.com>
Date:   Fri Apr 14 09:55:46 2023 -0400

    core: block 2022+ pixel experience xmls to ASI

    Resolves downloads on play store updated ASI (newer than
    image-cheetah-tq2a.230405.003.e1 shipping).

commit 8451c0b203fadf036ab36a468532ddf67915a9fd
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Thu Feb 23 16:44:35 2023 -0300

    PixelPropsUtils: Don't declare propsToChange as static

    * Since that variable was static, it may hold props from undesired devices (like Pixel 7), use a new instance on every app to fix that.

    Change-Id: I7cf0836056a9cd5c9664ef0b203fc2a9bc5237f5

commit 207382c0a673a705abaaa8eec4eba1fce46ad915
Author: John Galt <johngaltfirstrun@gmail.com>
Date:   Wed Mar 22 11:32:52 2023 -0400

    PixelPropsUtils: move snapchat to walleye spoofing

    Snapchat on A13 without spoofing has delayed messages issue on many
    devices. Spoofing to newer pixels does not resolve this and additionally
    can harm photo quality on non pixels. However spoofing to an older
    device and android version such as Walleye resolve the delayed messages
    without harming photo quality.

commit 8ed83d4d0d2c3341d30d16736e4241bfa8cfa10d
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Mar 22 16:44:42 2023 +0530

    PixelPropUtils: Update spoofs

commit 1793b260cf5062af2c90e339016e84c17f542dd7
Author: aswin7469 <aswinas@pixysos.com>
Date:   Tue Mar 14 04:08:17 2023 +0530

    PixelPropsUtils: Update build fp to march 2023

    Change-Id: I1f11e53e2718c5bbbfded177338fb11b3e3ccd39

commit 276703f3f91e19e78ef34d6998a3ac4bd4b39cc0
Author: minaripenguin <minaripenguin@users.noreply.github.com>
Date:   Wed Feb 8 22:36:56 2023 +0530

    PixelPropUtils: Update gms unstable process spoof to walleye

    * spoof product & device name also to fix cts/play certification as of today

    original commit: https://github.com/minaripenguin/android_frameworks_base/commit/3714dd8b8c6ab1bd621ba23cf14d32dc01abd302

    Change-Id: Ia32c6a6366cea9e03b76bec48e849dfe43620d2f
    Co-authored-by: aswin7469 <aswinas@pixysos.com>

commit 51b0f20d99f2dd9ba608ba53ae80069898faac28
Author: Anirudh Gupta <anirudhgupta109@aosip.dev>
Date:   Wed Jan 4 18:20:56 2023 +0000

    PixelPropsUtils: Set shipping level to 32 for devices >=33

    If ro.product.first_api_level is 33, its forced to use HW attestation even though the safteynet checker app shows BASIC
    setting it to 32 allows for software attestation and passing CTS

    Change-Id: Ie7326eaac48424cdea3d9633ebe13c65053ef6c1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>

commit e1cc436f2d0ebe43b868bc3c26b039f4b2bae83e
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Dec 6 15:59:08 2022 +0100

    PixelPropsUtils: Use actual device model name

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: I454654d87b3ea6286e12e9a9f5ed120f06cb2aa6

commit f54b8e06428fbe8b1d8b2293b6091448369b3ed0
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Jan 23 04:31:31 2023 +0000

    PixelPropsUtils: Use spoofBuildGms for FP and model alteration

    * From hentaiOS/platform_frameworks_base@05b3987.

    Change-Id: I4fb21862e8a79c4c616c1faaee3d393f2e40ba34

commit d991314b9872428c16fc54761ef94f65a4005858
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Jan 26 00:27:15 2023 +0530

    PixelPropsUtils: Update spoofs

    * change cheetah fingerprint to global varient

    Change-Id: Ie187749a304cbf4e1371d8dbed17729a92293cf4

commit 81bf1d7c04c41624034a5a5217be35b2703a8d18
Author: aswin7469 <aswinas@pixysos.com>
Date:   Fri Jan 13 20:03:52 2023 +0530

    PixelPropsUtils: Add toggle for Gaming and google photos spoofs

    Change-Id: I0e0e3fe7289ae4334981d6eed5280c71ab417b50
    Co-authored-by: Pranav Vashi <neobuddy89@gmail.com>
    Co-authored-by: ghostrider-reborn <gh0strider.2k18.reborn@gmail.com>
    Co-authored-by: spezi77 <spezi7713@gmx.net>

commit b97ca2c24fc51e3614f02f598a9875eaf6ac874e
Author: aswin7469 <aswinas@pixysos.com>
Date:   Fri Jan 13 14:25:58 2023 +0530

    PixelPropUtils: spoof snapchat

    Change-Id: I4b46bd5f1d58f256a356b685ad04e4de694d3dec

commit b5c12e0de721ca37b44f2cc1f447e2b07311961c
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Jan 4 11:41:56 2023 +0530

    PixelPropUtils: update january 2023

commit df0a5837b7344f62ab742192a2e09a7ac5d7787a
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Jan 1 13:37:37 2023 -0300

    PixelPropsUtils: Use redfin props for extra packages

    Change-Id: If51bba2e21c722301e57a85bad8387479fb83574
    (cherry picked from commit 8a6da0b93664cfea9e30000bb38bf987f321be89)

    commit 26e9fdc220cd83093581cb96bd226a89a0590b55

commit 7248c21c7f2351c007e5f265f8415f098f400ee4
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:20:37 2022 +0530

    PixelPropsUtils: spoof nothing smartcenter to pixel

    * after the update to 2.0.2 , its checking for NTExperince on phone 1 (Spacewar) as the custom rom's lacking it just crashes so workaround this
 by spoofing it

    TEST: app opens and successfully connect to ear (1)
    Change-Id: Iad9cf39bb8e55e4c22ff237d8e2ee5160dcea4e1

commit d3c447e
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Mon Nov 7 21:14:13 2022 -0300

    PixelPropsUtils: Press F for flame and coral

    Change-Id: Icba703edb590586874628d672b33f5a20f7e85d3

commit 02b3886
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Fri Nov 4 15:40:04 2022 -0300

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb

commit 11eb143
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Sep 11 14:58:02 2022 -0300

    PixelPropsUtils: Correct spoof props for Samsung apps

    * Workaround to avoid force closes especially on Wearable apps

    Change-Id: Ieb5a6745f6f93914e2c509b1454c22324cf3c7d7

commit 0d858ac
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Oct 25 23:20:10 2022 +0530

    PixelPropsUtils: Spoof Gboard with PixelXL

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: If712cb9ca4da8883bd4108d933471f8c5f2101c4

commit 0e32da6
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit cb7054c
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b38f8d8
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e98f2a0
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6de0e93
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 085a344
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 7f4db31
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464

commit 0a351e8
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit cff3b11
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c90d87a
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 2b18c2d
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4f769c2
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: Ica5aee62c38ae46c5003a1d35ba6bdc9f865b2ef

commit ee51411
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 596a952
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 16f7bdf
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit bc334ec
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Mon Aug 22 21:40:25 2022 -0300

    Import PixelPropsUtils

    Thanks to @kdrag0n for the original idea at ProtonAOSP/android_frameworks_base@5a54bfd

    Also includes:

    commit b40a373888c6fd7287c490bbda6b53fdbcca5f09
    Author: Danny Lin <danny@kdrag0n.dev>
    Date:   Mon Nov 1 20:06:48 2021 -0700

        Limit SafetyNet workarounds to unstable GMS process

        The unstable process is where SafetyNet attestation actually runs, so
        we only need to spoof the model in that process. Leaving other processes
        fixes various issues caused by model detection and flag provisioning,
        including screen-off Voice Match in Google Assistant, broken At a Glance
        weather and settings on Android 12, and more.

        Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8

    commit 5cb42949b4725a6a21d4e021e71791578893d1be
    Author: Dyneteve <dyneteve@hentaios.com>
    Date:   Thu Dec 30 19:11:41 2021 +0100

        PixelPropsUtils: Use Pixel 5a codename to GMS on Pixels

        Change-Id: I0ba7225e23296f1f3aa95560af43c567949ba900
        (cherry picked from commit caedd884bbcad0425898d100537ac7b9a2c56456)

    commit 5017b2d530d5712770bd851cada56c368b5ef274
    Author: Karan Parashar <whyredfire@gmail.com>
    Date:   Sat Feb 5 08:01:40 2022 +0530

        PixelPropsUtils: Avoid spoofing for Pixel Buds

        - it breaks the app, thanks to @ helenius147 [TG] for pointing this out

        Change-Id: Id0dd0af78ca78db6ad50617e04dbc880c0515c2e
        (cherry picked from commit d19d773bf1aa2a1c5abcc15e72ab1347c6e2f5c7)

    commit 47ddf9a78caeb2fc65481b75e6f768533133254c
    Author: Joey Huab <joey@evolution-x.org>
    Date:   Thu Jan 27 13:33:48 2022 +0900

        PixelPropsUtils: Whitelist ARCore

        * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
        * Crash occurs while being used in Google app search feature.

        Change-Id: I008da8b09b6467dca2ceb26649c3cb3dee44777d
        Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>

    commit e8a20fb
    Author: Joey Huab <joey@evolution-x.org>
    Date:   Fri Feb 18 03:16:18 2022 +0900

        PixelProps: Set Pixel 5 as spoof for more Google apps

        Change-Id: I7281356c89b5379f3a9c75e613e7a59e3c6c40ab

    commit 8e50c58
    Author: Anay Wadhera <awadhera@berkeley.edu>
    Date:   Fri Dec 10 13:11:49 2021 -0800

        PixelPropUtils: remove spoofing for currently supported Pixels

        Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
        Reviewed-on: https://review.statixos.com/c/android_frameworks_base/+/6410
        Tested-by: Anay Wadhera <anay1018@gmail.com>
        Reviewed-by: Sourajit Karmakar <sourajit@live.com>

        Change-Id: I926b23324e669e24079c78fecc0c7a0b77c15e13

    commit 838ff9e
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sat Nov 27 16:53:23 2021 +0530

        PixelPropsUtils: Avoid spoofing props for gcam and mods

        Change-Id: Ia6f095b1511152ae6ba705990def71e7e4546072

    commit d72b3ce
    Author: vladsendrix <83285656+vladsendrix@users.noreply.github.com>
    Date:   Fri Dec 31 03:18:04 2021 +0100

        PixelPropsUtils: Spoof Pixel XL for Google Photos

        pixel_2016_exclusive.xml is already added, why not have it actually work

        Change-Id: If0b8064c7cb633139ee7c30a7bf1a8543bcc9cad

    commit 0f73ff5
    Author: Danny Lin <danny@kdrag0n.dev>
    Date:   Mon Oct 11 20:00:44 2021 -0700

        keystore: Block key attestation for SafetyNet

        SafetyNet (part of Google Play Services) opportunistically uses
        hardware-backed key attestation via KeyStore as a strong integrity
        check. This causes SafetyNet to fail on custom ROMs because the verified
        boot key and bootloader unlock state can be detected from attestation
        certificates.

        As a workaround, we can take advantage of the fact that SafetyNet's
        usage of key attestation is opportunistic (i.e. falls back to basic
        integrity checks if it fails) and prevent it from getting the
        attestation certificate chain from KeyStore. This is done by checking
        the stack for DroidGuard, which is the codename for SafetyNet, and
        pretending that the device doesn't support key attestation.

        Key attestation has only been blocked for SafetyNet specifically, as
        Google Play Services and other apps have many valid reasons to use it.
        For example, it appears to be involved in Google's mobile security key
        ferature.

        Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6

    Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
    Co-authored-by: Danny Lin <danny@kdrag0n.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: Ic68aadf5d8d2352da4c3adf1e7f67ef0a1dd5df2

commit bfec00bf4ffc40297c97bf02d124696f279c0dbe
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:23:14 2022 +0530

    PixelPropsUtils: Spoof some more gooogle apps to cheetah

    * as we started using more cheetah components more spoofs are required

commit 4edf7f0408d7388891879419c80570f26ddaaa19
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:20:37 2022 +0530

    PixelPropsUtils: spoof nothing smartcenter to pixel

    * after the update to 2.0.2 , its checking for NTExperince on phone 1 (Spacewar) as the custom rom's lacking it just crashes so workaround this
 by spoofing it

    TEST: app opens and successfully connect to ear (1)

commit 0349f9f528d35faacd08589b01f9dcada9b3d109
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Sep 12 12:54:31 2022 +0000

    [SQUASH] Switch to AttestationHooks

    Also includes:

    Spoof product name for Google Play Services (hentaiOS/platform_frameworks_base@05b3987
c1)

    NB: This code is under the gmscompat package, but it does not depend on
    any code from gmscompat.

    Change-Id: Ic018c0d7abe4573143c3b92301a2625b91e6673a

    keystore: Block key attestation for SafetyNet (hentaiOS/platform_frameworks_base@cac8283
0ea5)

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6

    Limit SafetyNet workarounds to unstable GMS process (hentaiOS/platform_frameworks_base@fce9b65
472cb5a594)

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process. Leaving other processes
    fixes various issues caused by model detection and flag provisioning,
    including screen-off Voice Match in Google Assistant, broken At a Glance
    weather and settings on Android 12, and more.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8

    gmscompat: Apply the SafetyNet workaround to Play Store aswell (hentaiOS/platform_frameworks_base@c9a086f9b635bf4e3e6
1fbd501ade464f8f5b713)

    Play Store is used for the new Play Integrity API, extend the hack
    to it aswell

    Test: Device Integrity and Basic Integrity passes.

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1

    gmscompat: Use Nexus 6P fingerprint for CTS/Integrity (hentaiOS/platform_frameworks_base@813f11628014a93d45f55dedd434
fdddd9510eb0)

    Google seems to have patched the KM block to Play Store in record time,
    but is still not enforced for anything under android N.

    Since we moved to angler FP we don't need to spoof model to Play Store
    anymore, however the KM block is still needed.

    Test: Run Play Intregrity Attestation

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: Ic2401a6e40ddfc4318a1d0faa87e42eb118ac3d1

    Co-authored-by: Dyneteve <dyneteve@hentaios.com>

commit faa0f69a85bc241f7824057ab32b64d713716245
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Oct 13 23:30:50 2022 +0530

    core: Blacklist PIXEL_2022_EXPERIENCE for photos

commit 7fa6c569bb243d442a80333d25806bd06645f110
Author: ReallySnow <reallysnow233@gmail.com>
Date:   Fri Sep 23 14:18:46 2022 +0800

    core: Fix Pixel feature leaked to other apps

    * Current execution order is [1] `((A && B) && C) || (D) || (E) || (F) || (G)`
      and we want the execution order is [2] `A && B && (C || D || E || F || G)`
      If follow [1], it will not only affect GPhoto, but also Gcam, Gcam needs
      to read these functions or it will prompt for unsupported device and then crash

    Change-Id: I53c97591fe7526c8dc6f07b914a43dc0f8b197b7

commit 34765c3259207c1ee2fd83bccfb1caf9894b8cd3
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e

commit 21e6846ac9415bbfd9acb23bf418a44e30c578e0
Author: kondors1995 <normandija1945@gmail.com>
Date:   Mon Dec 20 16:53:46 2021 +0000

    core: Extend Pixel experience Blacklist For Google Photos

    Turns out having these brakes Original quality backups.
    Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Change-Id: I336facff7b55552f094997ade337656461a0ea1d

commit ac0056ac3cdfe5c82e61e958075e10a59d5bcdf8
Author: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
Date:   Mon Dec 13 07:16:55 2021 +0000

    core: Blacklist P21 midyear, P20, P20 midyear experience system feature from Google Photos

    naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
    Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to rem
ove any XMLs

    Test: Google Photos editor with PIXEL_2021_EXPERIENCE feature in product
    Change-Id: Iad083ce049cd1786494a71c3b8d575f0caabb4e7

commit d1061c15df7d259ab192345045868b7325b1054e
Author: Kuba Wojciechowski <nullbytepl@gmail.com>
Date:   Fri Nov 5 01:52:51 2021 +0300

    core: Blacklist P21 experience system feature from Google Photos

    We want to include the P21 experience flag to enable new features,
    however it seems like Google Photos uses it to decide whether to use the
    TPU tflite delegate. There doesn't seem to be any fallback so we need to
    make sure the feature is not exposed to the app so that a normal
    NNAPI/GPU delegate can be used instead.

    Test: Google Photos editor with PIXEL_2021_EXPERIENCE feature in product
    Signed-off-by: Kuba Wojciechowski <nullbytepl@gmail.com>
    Change-Id: I51a02f8347324c7a85f3136b802dce4cc4556ac5

Change-Id: I6b32d66fda2293afc1fc6ae82c5604274e6b73b0
Signed-off-by: Pulkit077 <pulkitagarwal2k1@gmail.com>
nattolecats pushed a commit to 2by2-Project/android_frameworks_base that referenced this pull request Jun 22, 2024
commit 444afd520dd93038d8cd9f68438536240a2b608e (pixel/thirteen, m/thirteen)
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Jul 2 18:34:00 2023 -0300

    PixelPropsUtils: Remove pixel whitelist

    Change-Id: I28ff6643ebe656478d3f5dde28ca88cd3d7a7542

commit a8561c81d7e2cae1730a1e25b74823a980838b86
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Thu Mar 23 16:22:25 2023 -0300

    PixelPropsUtils: Simplify GoogleCamera whitelisting

    Change-Id: I7db1b60343dff661a9f1c4116f689c3cc5afbdfc

    commit aa4c66949ad5552b3221cbd5b7fdf072dd7ce60e
    Author: jhenrique09 <jhsv09@gmail.com>
    Date:   Wed Mar 22 12:39:22 2023 -0300

        PixelPropsUtils: Spoof user build

        Change-Id: Ie33e0213a2608ecceea37b0e4cfb1115d6a0b788

    Change-Id: I7583251294028bd7c8a9372c4a9ee79b42213f94

commit 9c9e560381218d27dd3100789bdcb42634939521
Author: Sourajit Karmakar <sourajitk@statixos.com>
Date:   Tue Jun 20 21:45:18 2023 -0400

    PixelPropsUtils: Enable new Velvet Weather UI

    Change-Id: I45310071f0267be1ea26f7c00044a56a763a3e6a

    * Adapt to current PixelPropsUtils

    Original commit:
    StatiXOS/android_frameworks_base@ce72977

    Change-Id: I0989ef14aec6fabcc0733232ddb65fd96fe7d80d
    Signed-off-by: someone5678 <nemui3353@gmail.com>

commit ad3fee4764092a5f8b2b36c9efda0cb55e757901
Author: aswin7469 <aswinas@pixysos.com>
Date:   Tue Jun 20 12:33:17 2023 +0530

    PixelPropUtils: Misc updates

    * unspoof gms pkg as whole, only spoof required processes
    * cleanup some duplicates
    * spoof play store to Pixel 5

    Co-authored-by: Ido Ben-Hur <idoybh2@gmail.com>
    Co-authored-by: someone5678 <nemui3353@gmail.com>
    Change-Id: Ifb9a4ed5a864e293c52f7d96a2f4d27cd6152c96

commit 232dbb7b0974819b2386cf59f3f3cf9d1c5e3ee0
Author: aswin7469 <aswinas@pixysos.com>
Date:   Sat Jun 17 13:53:45 2023 +0530

    PixelPropUtils: Add emojiwalls and cinematiceffects pkgs

commit dda7fccc336876d4843e32ad2b80a97edb977c47
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Jun 8 13:30:13 2023 +0530

    PixelPropUtils: Switch to raven for asi

    Change-Id: Ie57206e750e8554cf097c9466523526526b575b4

commit 9b492c93076552320a0bcbca65062ed7bb95551d
Author: aswin7469 <aswinas@pixysos.com>
Date:   Sat Feb 18 16:18:33 2023 +0530

    PixelPropsUtils: Add Pixel 6 Pro

    * fixes google dialer getting updated to
      pixel version and warn user about incompatibility

    * also remove unnecessory netflix spoof toggle

    Change-Id: I365f96acad5ee9d2aec1f74e2b49816bc121b891
    Co-authored-by: someone5678 <nemui3353@gmail.com>

commit 00a5906509e7ea00214b06820b26e0093f85e0a7
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Thu Jun 8 16:55:44 2023 +0530

    PixelPropUtils: Un-spoof GMS while adding google account

    GMS uses its DroidGuard service (the same that's used for safetynet)
    to get the device name from the build fingerprint, which from our
    current certified props, is Pixel XL. The device name after Google
    login shows up in the login alert accordingly as Pixel XL, which is
    inconvenient especially when you have multiple devices on the same ROM.

    By restarting the DroidGuard service process (gms.unstable) as soon as
    the user starts adding Google account (i.e when the GMS add account
    activity is started and moved to the top of the task stack), we can
    skip spoofing to certified props in this instance. When the user
    stops/finishes adding account (GMS add account activity is no longer
    at the top of the task stack), restart the process again, this time
    spoofing to certified props in order to be ready for safetynet.

    This ensures while adding a Google account, GMS reads the original
    properties of the device and labels the device with its original name,
    while in any other situation GMS reads certified properties required
    to pass SafetyNet/Play Integrity.

    Test:
    - Add google account from setup wizard, settings, any other app
    - Observe correct device name in gmail login alert
    - SafetyNet (basic, CTS), Play Integrity (basic, device) passes.

    [aswin7469]: Adapted for PixelPropUtils

    Change-Id: Ia5463f220a8262f7963fc5b2640a7a5311a73210

commit deaa854f20181e3e31e920510f043296f04e90e1
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu May 18 14:26:26 2023 +0530

    core: block 2021/22 pixel features to ASI and pixel launcher

    * blacklist pe features and spoof redfin to get rid of tensor shits

    Change-Id: I83aa09c151f51ee61361510b2c1a9ac8865a2aee

commit cdaff9a21351200bef20ffd3aa663c5a875541c5
Author: John Galt <johngaltfirstrun@gmail.com>
Date:   Fri Apr 14 09:55:46 2023 -0400

    core: block 2022+ pixel experience xmls to ASI

    Resolves downloads on play store updated ASI (newer than
    image-cheetah-tq2a.230405.003.e1 shipping).

commit 8451c0b203fadf036ab36a468532ddf67915a9fd
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Thu Feb 23 16:44:35 2023 -0300

    PixelPropsUtils: Don't declare propsToChange as static

    * Since that variable was static, it may hold props from undesired devices (like Pixel 7), use a new instance on every app to fix that.

    Change-Id: I7cf0836056a9cd5c9664ef0b203fc2a9bc5237f5

commit 207382c0a673a705abaaa8eec4eba1fce46ad915
Author: John Galt <johngaltfirstrun@gmail.com>
Date:   Wed Mar 22 11:32:52 2023 -0400

    PixelPropsUtils: move snapchat to walleye spoofing

    Snapchat on A13 without spoofing has delayed messages issue on many
    devices. Spoofing to newer pixels does not resolve this and additionally
    can harm photo quality on non pixels. However spoofing to an older
    device and android version such as Walleye resolve the delayed messages
    without harming photo quality.

commit 8ed83d4d0d2c3341d30d16736e4241bfa8cfa10d
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Mar 22 16:44:42 2023 +0530

    PixelPropUtils: Update spoofs

commit 1793b260cf5062af2c90e339016e84c17f542dd7
Author: aswin7469 <aswinas@pixysos.com>
Date:   Tue Mar 14 04:08:17 2023 +0530

    PixelPropsUtils: Update build fp to march 2023

    Change-Id: I1f11e53e2718c5bbbfded177338fb11b3e3ccd39

commit 276703f3f91e19e78ef34d6998a3ac4bd4b39cc0
Author: minaripenguin <minaripenguin@users.noreply.github.com>
Date:   Wed Feb 8 22:36:56 2023 +0530

    PixelPropUtils: Update gms unstable process spoof to walleye

    * spoof product & device name also to fix cts/play certification as of today

    original commit: https://github.com/minaripenguin/android_frameworks_base/commit/3714dd8b8c6ab1bd621ba23cf14d32dc01abd302

    Change-Id: Ia32c6a6366cea9e03b76bec48e849dfe43620d2f
    Co-authored-by: aswin7469 <aswinas@pixysos.com>

commit 51b0f20d99f2dd9ba608ba53ae80069898faac28
Author: Anirudh Gupta <anirudhgupta109@aosip.dev>
Date:   Wed Jan 4 18:20:56 2023 +0000

    PixelPropsUtils: Set shipping level to 32 for devices >=33

    If ro.product.first_api_level is 33, its forced to use HW attestation even though the safteynet checker app shows BASIC
    setting it to 32 allows for software attestation and passing CTS

    Change-Id: Ie7326eaac48424cdea3d9633ebe13c65053ef6c1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>

commit e1cc436f2d0ebe43b868bc3c26b039f4b2bae83e
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Dec 6 15:59:08 2022 +0100

    PixelPropsUtils: Use actual device model name

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: I454654d87b3ea6286e12e9a9f5ed120f06cb2aa6

commit f54b8e06428fbe8b1d8b2293b6091448369b3ed0
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Jan 23 04:31:31 2023 +0000

    PixelPropsUtils: Use spoofBuildGms for FP and model alteration

    * From hentaiOS/platform_frameworks_base@05b3987.

    Change-Id: I4fb21862e8a79c4c616c1faaee3d393f2e40ba34

commit d991314b9872428c16fc54761ef94f65a4005858
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Jan 26 00:27:15 2023 +0530

    PixelPropsUtils: Update spoofs

    * change cheetah fingerprint to global varient

    Change-Id: Ie187749a304cbf4e1371d8dbed17729a92293cf4

commit 81bf1d7c04c41624034a5a5217be35b2703a8d18
Author: aswin7469 <aswinas@pixysos.com>
Date:   Fri Jan 13 20:03:52 2023 +0530

    PixelPropsUtils: Add toggle for Gaming and google photos spoofs

    Change-Id: I0e0e3fe7289ae4334981d6eed5280c71ab417b50
    Co-authored-by: Pranav Vashi <neobuddy89@gmail.com>
    Co-authored-by: ghostrider-reborn <gh0strider.2k18.reborn@gmail.com>
    Co-authored-by: spezi77 <spezi7713@gmx.net>

commit b97ca2c24fc51e3614f02f598a9875eaf6ac874e
Author: aswin7469 <aswinas@pixysos.com>
Date:   Fri Jan 13 14:25:58 2023 +0530

    PixelPropUtils: spoof snapchat

    Change-Id: I4b46bd5f1d58f256a356b685ad04e4de694d3dec

commit b5c12e0de721ca37b44f2cc1f447e2b07311961c
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Jan 4 11:41:56 2023 +0530

    PixelPropUtils: update january 2023

commit df0a5837b7344f62ab742192a2e09a7ac5d7787a
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Jan 1 13:37:37 2023 -0300

    PixelPropsUtils: Use redfin props for extra packages

    Change-Id: If51bba2e21c722301e57a85bad8387479fb83574
    (cherry picked from commit 8a6da0b93664cfea9e30000bb38bf987f321be89)

    commit 26e9fdc220cd83093581cb96bd226a89a0590b55

commit 7248c21c7f2351c007e5f265f8415f098f400ee4
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:20:37 2022 +0530

    PixelPropsUtils: spoof nothing smartcenter to pixel

    * after the update to 2.0.2 , its checking for NTExperince on phone 1 (Spacewar) as the custom rom's lacking it just crashes so workaround this
 by spoofing it

    TEST: app opens and successfully connect to ear (1)
    Change-Id: Iad9cf39bb8e55e4c22ff237d8e2ee5160dcea4e1

commit d3c447e
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Mon Nov 7 21:14:13 2022 -0300

    PixelPropsUtils: Press F for flame and coral

    Change-Id: Icba703edb590586874628d672b33f5a20f7e85d3

commit 02b3886
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Fri Nov 4 15:40:04 2022 -0300

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb

commit 11eb143
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Sep 11 14:58:02 2022 -0300

    PixelPropsUtils: Correct spoof props for Samsung apps

    * Workaround to avoid force closes especially on Wearable apps

    Change-Id: Ieb5a6745f6f93914e2c509b1454c22324cf3c7d7

commit 0d858ac
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Oct 25 23:20:10 2022 +0530

    PixelPropsUtils: Spoof Gboard with PixelXL

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: If712cb9ca4da8883bd4108d933471f8c5f2101c4

commit 0e32da6
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit cb7054c
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b38f8d8
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e98f2a0
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6de0e93
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 085a344
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 7f4db31
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464

commit 0a351e8
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit cff3b11
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c90d87a
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 2b18c2d
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4f769c2
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: Ica5aee62c38ae46c5003a1d35ba6bdc9f865b2ef

commit ee51411
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 596a952
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 16f7bdf
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit bc334ec
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Mon Aug 22 21:40:25 2022 -0300

    Import PixelPropsUtils

    Thanks to @kdrag0n for the original idea at ProtonAOSP/android_frameworks_base@5a54bfd

    Also includes:

    commit b40a373888c6fd7287c490bbda6b53fdbcca5f09
    Author: Danny Lin <danny@kdrag0n.dev>
    Date:   Mon Nov 1 20:06:48 2021 -0700

        Limit SafetyNet workarounds to unstable GMS process

        The unstable process is where SafetyNet attestation actually runs, so
        we only need to spoof the model in that process. Leaving other processes
        fixes various issues caused by model detection and flag provisioning,
        including screen-off Voice Match in Google Assistant, broken At a Glance
        weather and settings on Android 12, and more.

        Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8

    commit 5cb42949b4725a6a21d4e021e71791578893d1be
    Author: Dyneteve <dyneteve@hentaios.com>
    Date:   Thu Dec 30 19:11:41 2021 +0100

        PixelPropsUtils: Use Pixel 5a codename to GMS on Pixels

        Change-Id: I0ba7225e23296f1f3aa95560af43c567949ba900
        (cherry picked from commit caedd884bbcad0425898d100537ac7b9a2c56456)

    commit 5017b2d530d5712770bd851cada56c368b5ef274
    Author: Karan Parashar <whyredfire@gmail.com>
    Date:   Sat Feb 5 08:01:40 2022 +0530

        PixelPropsUtils: Avoid spoofing for Pixel Buds

        - it breaks the app, thanks to @ helenius147 [TG] for pointing this out

        Change-Id: Id0dd0af78ca78db6ad50617e04dbc880c0515c2e
        (cherry picked from commit d19d773bf1aa2a1c5abcc15e72ab1347c6e2f5c7)

    commit 47ddf9a78caeb2fc65481b75e6f768533133254c
    Author: Joey Huab <joey@evolution-x.org>
    Date:   Thu Jan 27 13:33:48 2022 +0900

        PixelPropsUtils: Whitelist ARCore

        * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
        * Crash occurs while being used in Google app search feature.

        Change-Id: I008da8b09b6467dca2ceb26649c3cb3dee44777d
        Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>

    commit e8a20fb
    Author: Joey Huab <joey@evolution-x.org>
    Date:   Fri Feb 18 03:16:18 2022 +0900

        PixelProps: Set Pixel 5 as spoof for more Google apps

        Change-Id: I7281356c89b5379f3a9c75e613e7a59e3c6c40ab

    commit 8e50c58
    Author: Anay Wadhera <awadhera@berkeley.edu>
    Date:   Fri Dec 10 13:11:49 2021 -0800

        PixelPropUtils: remove spoofing for currently supported Pixels

        Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
        Reviewed-on: https://review.statixos.com/c/android_frameworks_base/+/6410
        Tested-by: Anay Wadhera <anay1018@gmail.com>
        Reviewed-by: Sourajit Karmakar <sourajit@live.com>

        Change-Id: I926b23324e669e24079c78fecc0c7a0b77c15e13

    commit 838ff9e
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sat Nov 27 16:53:23 2021 +0530

        PixelPropsUtils: Avoid spoofing props for gcam and mods

        Change-Id: Ia6f095b1511152ae6ba705990def71e7e4546072

    commit d72b3ce
    Author: vladsendrix <83285656+vladsendrix@users.noreply.github.com>
    Date:   Fri Dec 31 03:18:04 2021 +0100

        PixelPropsUtils: Spoof Pixel XL for Google Photos

        pixel_2016_exclusive.xml is already added, why not have it actually work

        Change-Id: If0b8064c7cb633139ee7c30a7bf1a8543bcc9cad

    commit 0f73ff5
    Author: Danny Lin <danny@kdrag0n.dev>
    Date:   Mon Oct 11 20:00:44 2021 -0700

        keystore: Block key attestation for SafetyNet

        SafetyNet (part of Google Play Services) opportunistically uses
        hardware-backed key attestation via KeyStore as a strong integrity
        check. This causes SafetyNet to fail on custom ROMs because the verified
        boot key and bootloader unlock state can be detected from attestation
        certificates.

        As a workaround, we can take advantage of the fact that SafetyNet's
        usage of key attestation is opportunistic (i.e. falls back to basic
        integrity checks if it fails) and prevent it from getting the
        attestation certificate chain from KeyStore. This is done by checking
        the stack for DroidGuard, which is the codename for SafetyNet, and
        pretending that the device doesn't support key attestation.

        Key attestation has only been blocked for SafetyNet specifically, as
        Google Play Services and other apps have many valid reasons to use it.
        For example, it appears to be involved in Google's mobile security key
        ferature.

        Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6

    Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
    Co-authored-by: Danny Lin <danny@kdrag0n.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: Ic68aadf5d8d2352da4c3adf1e7f67ef0a1dd5df2

commit bfec00bf4ffc40297c97bf02d124696f279c0dbe
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:23:14 2022 +0530

    PixelPropsUtils: Spoof some more gooogle apps to cheetah

    * as we started using more cheetah components more spoofs are required

commit 4edf7f0408d7388891879419c80570f26ddaaa19
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:20:37 2022 +0530

    PixelPropsUtils: spoof nothing smartcenter to pixel

    * after the update to 2.0.2 , its checking for NTExperince on phone 1 (Spacewar) as the custom rom's lacking it just crashes so workaround this
 by spoofing it

    TEST: app opens and successfully connect to ear (1)

commit 0349f9f528d35faacd08589b01f9dcada9b3d109
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Sep 12 12:54:31 2022 +0000

    [SQUASH] Switch to AttestationHooks

    Also includes:

    Spoof product name for Google Play Services (hentaiOS/platform_frameworks_base@05b3987
c1)

    NB: This code is under the gmscompat package, but it does not depend on
    any code from gmscompat.

    Change-Id: Ic018c0d7abe4573143c3b92301a2625b91e6673a

    keystore: Block key attestation for SafetyNet (hentaiOS/platform_frameworks_base@cac8283
0ea5)

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6

    Limit SafetyNet workarounds to unstable GMS process (hentaiOS/platform_frameworks_base@fce9b65
472cb5a594)

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process. Leaving other processes
    fixes various issues caused by model detection and flag provisioning,
    including screen-off Voice Match in Google Assistant, broken At a Glance
    weather and settings on Android 12, and more.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8

    gmscompat: Apply the SafetyNet workaround to Play Store aswell (hentaiOS/platform_frameworks_base@c9a086f9b635bf4e3e6
1fbd501ade464f8f5b713)

    Play Store is used for the new Play Integrity API, extend the hack
    to it aswell

    Test: Device Integrity and Basic Integrity passes.

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1

    gmscompat: Use Nexus 6P fingerprint for CTS/Integrity (hentaiOS/platform_frameworks_base@813f11628014a93d45f55dedd434
fdddd9510eb0)

    Google seems to have patched the KM block to Play Store in record time,
    but is still not enforced for anything under android N.

    Since we moved to angler FP we don't need to spoof model to Play Store
    anymore, however the KM block is still needed.

    Test: Run Play Intregrity Attestation

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: Ic2401a6e40ddfc4318a1d0faa87e42eb118ac3d1

    Co-authored-by: Dyneteve <dyneteve@hentaios.com>

commit faa0f69a85bc241f7824057ab32b64d713716245
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Oct 13 23:30:50 2022 +0530

    core: Blacklist PIXEL_2022_EXPERIENCE for photos

commit 7fa6c569bb243d442a80333d25806bd06645f110
Author: ReallySnow <reallysnow233@gmail.com>
Date:   Fri Sep 23 14:18:46 2022 +0800

    core: Fix Pixel feature leaked to other apps

    * Current execution order is [1] `((A && B) && C) || (D) || (E) || (F) || (G)`
      and we want the execution order is [2] `A && B && (C || D || E || F || G)`
      If follow [1], it will not only affect GPhoto, but also Gcam, Gcam needs
      to read these functions or it will prompt for unsupported device and then crash

    Change-Id: I53c97591fe7526c8dc6f07b914a43dc0f8b197b7

commit 34765c3259207c1ee2fd83bccfb1caf9894b8cd3
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e

commit 21e6846ac9415bbfd9acb23bf418a44e30c578e0
Author: kondors1995 <normandija1945@gmail.com>
Date:   Mon Dec 20 16:53:46 2021 +0000

    core: Extend Pixel experience Blacklist For Google Photos

    Turns out having these brakes Original quality backups.
    Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Change-Id: I336facff7b55552f094997ade337656461a0ea1d

commit ac0056ac3cdfe5c82e61e958075e10a59d5bcdf8
Author: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
Date:   Mon Dec 13 07:16:55 2021 +0000

    core: Blacklist P21 midyear, P20, P20 midyear experience system feature from Google Photos

    naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
    Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to rem
ove any XMLs

    Test: Google Photos editor with PIXEL_2021_EXPERIENCE feature in product
    Change-Id: Iad083ce049cd1786494a71c3b8d575f0caabb4e7

commit d1061c15df7d259ab192345045868b7325b1054e
Author: Kuba Wojciechowski <nullbytepl@gmail.com>
Date:   Fri Nov 5 01:52:51 2021 +0300

    core: Blacklist P21 experience system feature from Google Photos

    We want to include the P21 experience flag to enable new features,
    however it seems like Google Photos uses it to decide whether to use the
    TPU tflite delegate. There doesn't seem to be any fallback so we need to
    make sure the feature is not exposed to the app so that a normal
    NNAPI/GPU delegate can be used instead.

    Test: Google Photos editor with PIXEL_2021_EXPERIENCE feature in product
    Signed-off-by: Kuba Wojciechowski <nullbytepl@gmail.com>
    Change-Id: I51a02f8347324c7a85f3136b802dce4cc4556ac5

Change-Id: I6b32d66fda2293afc1fc6ae82c5604274e6b73b0
Signed-off-by: Pulkit077 <pulkitagarwal2k1@gmail.com>
DennySPB pushed a commit to aexmod-tmp/platform_frameworks_base-2 that referenced this pull request Jun 25, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

[neobuddy89]:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    [neobuddy89]: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    [neobuddy89]:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    [neobuddy89]: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    [neobuddy89]: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
imapotatook added a commit to CelestialDroid/frameworks_base that referenced this pull request Jun 28, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

@neobuddy89:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    @neobuddy89: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    @neobuddy89:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    @neobuddy89: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    @neobuddy89: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Dmitrii <bankersenator@gmail.com>
Wrdn28 pushed a commit to OrionOS-prjkt/android_frameworks_base that referenced this pull request Jun 29, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

@neobuddy89:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    @neobuddy89: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    @neobuddy89:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    @neobuddy89: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    @neobuddy89: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Subhashis2007 pushed a commit to RMX1821-Stuffs/android_frameworks_base that referenced this pull request Jun 30, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

@neobuddy89:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    @neobuddy89: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    @neobuddy89:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    @neobuddy89: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    @neobuddy89: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ArmSM pushed a commit to ProjectSakura/frameworks_base that referenced this pull request Jun 30, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

@neobuddy89:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    @neobuddy89: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    @neobuddy89:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    @neobuddy89: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    @neobuddy89: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: LordShenron <shen.priyanshu@gmail.com>

PixelPropsUtils: Fix up compilation

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: LordShenron <shen.priyanshu@gmail.com>

PixelPropsUtils: Update spoof packages

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: LordShenron <shen.priyanshu@gmail.com>

PixelPropsUtils: Update Spoof fingerprint (#1078)

* Updating props since latest changes from Google was causing Play Integrity to fail
Signed-off-by: Ionut Gherman <ghermanionut96@gmail.com>
Signed-off-by: LordShenron <shen.priyanshu@gmail.com>
SwapnilVicky pushed a commit to SampattiOS/android_frameworks_base that referenced this pull request Jun 30, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

@neobuddy89:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    @neobuddy89: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    @neobuddy89:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    @neobuddy89: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    @neobuddy89: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
DennySPB pushed a commit to aexmod-tmp/platform_frameworks_base-2 that referenced this pull request Jul 1, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

[neobuddy89]:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    [neobuddy89]: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    [neobuddy89]:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    [neobuddy89]: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    [neobuddy89]: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
DennySPB pushed a commit to aexmod-tmp/platform_frameworks_base-2 that referenced this pull request Jul 1, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

[neobuddy89]:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    [neobuddy89]: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    [neobuddy89]:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    [neobuddy89]: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    [neobuddy89]: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
DennySPB pushed a commit to aexmod-tmp/platform_frameworks_base-2 that referenced this pull request Jul 1, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

[neobuddy89]:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    [neobuddy89]: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    [neobuddy89]:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    [neobuddy89]: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    [neobuddy89]: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
DennySPB pushed a commit to aexmod-tmp/platform_frameworks_base-2 that referenced this pull request Jul 2, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

[neobuddy89]:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    [neobuddy89]: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    [neobuddy89]:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    [neobuddy89]: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    [neobuddy89]: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
DennySPB pushed a commit to aexmod-tmp/platform_frameworks_base-2 that referenced this pull request Jul 2, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

[neobuddy89]:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    [neobuddy89]: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    [neobuddy89]:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    [neobuddy89]: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    [neobuddy89]: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
nattolecats pushed a commit to 2by2-Project/android_frameworks_base that referenced this pull request Jul 3, 2024
commit 444afd520dd93038d8cd9f68438536240a2b608e (pixel/thirteen, m/thirteen)
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Jul 2 18:34:00 2023 -0300

    PixelPropsUtils: Remove pixel whitelist

    Change-Id: I28ff6643ebe656478d3f5dde28ca88cd3d7a7542

commit a8561c81d7e2cae1730a1e25b74823a980838b86
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Thu Mar 23 16:22:25 2023 -0300

    PixelPropsUtils: Simplify GoogleCamera whitelisting

    Change-Id: I7db1b60343dff661a9f1c4116f689c3cc5afbdfc

    commit aa4c66949ad5552b3221cbd5b7fdf072dd7ce60e
    Author: jhenrique09 <jhsv09@gmail.com>
    Date:   Wed Mar 22 12:39:22 2023 -0300

        PixelPropsUtils: Spoof user build

        Change-Id: Ie33e0213a2608ecceea37b0e4cfb1115d6a0b788

    Change-Id: I7583251294028bd7c8a9372c4a9ee79b42213f94

commit 9c9e560381218d27dd3100789bdcb42634939521
Author: Sourajit Karmakar <sourajitk@statixos.com>
Date:   Tue Jun 20 21:45:18 2023 -0400

    PixelPropsUtils: Enable new Velvet Weather UI

    Change-Id: I45310071f0267be1ea26f7c00044a56a763a3e6a

    * Adapt to current PixelPropsUtils

    Original commit:
    StatiXOS/android_frameworks_base@ce72977

    Change-Id: I0989ef14aec6fabcc0733232ddb65fd96fe7d80d
    Signed-off-by: someone5678 <nemui3353@gmail.com>

commit ad3fee4764092a5f8b2b36c9efda0cb55e757901
Author: aswin7469 <aswinas@pixysos.com>
Date:   Tue Jun 20 12:33:17 2023 +0530

    PixelPropUtils: Misc updates

    * unspoof gms pkg as whole, only spoof required processes
    * cleanup some duplicates
    * spoof play store to Pixel 5

    Co-authored-by: Ido Ben-Hur <idoybh2@gmail.com>
    Co-authored-by: someone5678 <nemui3353@gmail.com>
    Change-Id: Ifb9a4ed5a864e293c52f7d96a2f4d27cd6152c96

commit 232dbb7b0974819b2386cf59f3f3cf9d1c5e3ee0
Author: aswin7469 <aswinas@pixysos.com>
Date:   Sat Jun 17 13:53:45 2023 +0530

    PixelPropUtils: Add emojiwalls and cinematiceffects pkgs

commit dda7fccc336876d4843e32ad2b80a97edb977c47
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Jun 8 13:30:13 2023 +0530

    PixelPropUtils: Switch to raven for asi

    Change-Id: Ie57206e750e8554cf097c9466523526526b575b4

commit 9b492c93076552320a0bcbca65062ed7bb95551d
Author: aswin7469 <aswinas@pixysos.com>
Date:   Sat Feb 18 16:18:33 2023 +0530

    PixelPropsUtils: Add Pixel 6 Pro

    * fixes google dialer getting updated to
      pixel version and warn user about incompatibility

    * also remove unnecessory netflix spoof toggle

    Change-Id: I365f96acad5ee9d2aec1f74e2b49816bc121b891
    Co-authored-by: someone5678 <nemui3353@gmail.com>

commit 00a5906509e7ea00214b06820b26e0093f85e0a7
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Thu Jun 8 16:55:44 2023 +0530

    PixelPropUtils: Un-spoof GMS while adding google account

    GMS uses its DroidGuard service (the same that's used for safetynet)
    to get the device name from the build fingerprint, which from our
    current certified props, is Pixel XL. The device name after Google
    login shows up in the login alert accordingly as Pixel XL, which is
    inconvenient especially when you have multiple devices on the same ROM.

    By restarting the DroidGuard service process (gms.unstable) as soon as
    the user starts adding Google account (i.e when the GMS add account
    activity is started and moved to the top of the task stack), we can
    skip spoofing to certified props in this instance. When the user
    stops/finishes adding account (GMS add account activity is no longer
    at the top of the task stack), restart the process again, this time
    spoofing to certified props in order to be ready for safetynet.

    This ensures while adding a Google account, GMS reads the original
    properties of the device and labels the device with its original name,
    while in any other situation GMS reads certified properties required
    to pass SafetyNet/Play Integrity.

    Test:
    - Add google account from setup wizard, settings, any other app
    - Observe correct device name in gmail login alert
    - SafetyNet (basic, CTS), Play Integrity (basic, device) passes.

    [aswin7469]: Adapted for PixelPropUtils

    Change-Id: Ia5463f220a8262f7963fc5b2640a7a5311a73210

commit deaa854f20181e3e31e920510f043296f04e90e1
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu May 18 14:26:26 2023 +0530

    core: block 2021/22 pixel features to ASI and pixel launcher

    * blacklist pe features and spoof redfin to get rid of tensor shits

    Change-Id: I83aa09c151f51ee61361510b2c1a9ac8865a2aee

commit cdaff9a21351200bef20ffd3aa663c5a875541c5
Author: John Galt <johngaltfirstrun@gmail.com>
Date:   Fri Apr 14 09:55:46 2023 -0400

    core: block 2022+ pixel experience xmls to ASI

    Resolves downloads on play store updated ASI (newer than
    image-cheetah-tq2a.230405.003.e1 shipping).

commit 8451c0b203fadf036ab36a468532ddf67915a9fd
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Thu Feb 23 16:44:35 2023 -0300

    PixelPropsUtils: Don't declare propsToChange as static

    * Since that variable was static, it may hold props from undesired devices (like Pixel 7), use a new instance on every app to fix that.

    Change-Id: I7cf0836056a9cd5c9664ef0b203fc2a9bc5237f5

commit 207382c0a673a705abaaa8eec4eba1fce46ad915
Author: John Galt <johngaltfirstrun@gmail.com>
Date:   Wed Mar 22 11:32:52 2023 -0400

    PixelPropsUtils: move snapchat to walleye spoofing

    Snapchat on A13 without spoofing has delayed messages issue on many
    devices. Spoofing to newer pixels does not resolve this and additionally
    can harm photo quality on non pixels. However spoofing to an older
    device and android version such as Walleye resolve the delayed messages
    without harming photo quality.

commit 8ed83d4d0d2c3341d30d16736e4241bfa8cfa10d
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Mar 22 16:44:42 2023 +0530

    PixelPropUtils: Update spoofs

commit 1793b260cf5062af2c90e339016e84c17f542dd7
Author: aswin7469 <aswinas@pixysos.com>
Date:   Tue Mar 14 04:08:17 2023 +0530

    PixelPropsUtils: Update build fp to march 2023

    Change-Id: I1f11e53e2718c5bbbfded177338fb11b3e3ccd39

commit 276703f3f91e19e78ef34d6998a3ac4bd4b39cc0
Author: minaripenguin <minaripenguin@users.noreply.github.com>
Date:   Wed Feb 8 22:36:56 2023 +0530

    PixelPropUtils: Update gms unstable process spoof to walleye

    * spoof product & device name also to fix cts/play certification as of today

    original commit: https://github.com/minaripenguin/android_frameworks_base/commit/3714dd8b8c6ab1bd621ba23cf14d32dc01abd302

    Change-Id: Ia32c6a6366cea9e03b76bec48e849dfe43620d2f
    Co-authored-by: aswin7469 <aswinas@pixysos.com>

commit 51b0f20d99f2dd9ba608ba53ae80069898faac28
Author: Anirudh Gupta <anirudhgupta109@aosip.dev>
Date:   Wed Jan 4 18:20:56 2023 +0000

    PixelPropsUtils: Set shipping level to 32 for devices >=33

    If ro.product.first_api_level is 33, its forced to use HW attestation even though the safteynet checker app shows BASIC
    setting it to 32 allows for software attestation and passing CTS

    Change-Id: Ie7326eaac48424cdea3d9633ebe13c65053ef6c1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>

commit e1cc436f2d0ebe43b868bc3c26b039f4b2bae83e
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Dec 6 15:59:08 2022 +0100

    PixelPropsUtils: Use actual device model name

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: I454654d87b3ea6286e12e9a9f5ed120f06cb2aa6

commit f54b8e06428fbe8b1d8b2293b6091448369b3ed0
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Jan 23 04:31:31 2023 +0000

    PixelPropsUtils: Use spoofBuildGms for FP and model alteration

    * From hentaiOS/platform_frameworks_base@05b3987.

    Change-Id: I4fb21862e8a79c4c616c1faaee3d393f2e40ba34

commit d991314b9872428c16fc54761ef94f65a4005858
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Jan 26 00:27:15 2023 +0530

    PixelPropsUtils: Update spoofs

    * change cheetah fingerprint to global varient

    Change-Id: Ie187749a304cbf4e1371d8dbed17729a92293cf4

commit 81bf1d7c04c41624034a5a5217be35b2703a8d18
Author: aswin7469 <aswinas@pixysos.com>
Date:   Fri Jan 13 20:03:52 2023 +0530

    PixelPropsUtils: Add toggle for Gaming and google photos spoofs

    Change-Id: I0e0e3fe7289ae4334981d6eed5280c71ab417b50
    Co-authored-by: Pranav Vashi <neobuddy89@gmail.com>
    Co-authored-by: ghostrider-reborn <gh0strider.2k18.reborn@gmail.com>
    Co-authored-by: spezi77 <spezi7713@gmx.net>

commit b97ca2c24fc51e3614f02f598a9875eaf6ac874e
Author: aswin7469 <aswinas@pixysos.com>
Date:   Fri Jan 13 14:25:58 2023 +0530

    PixelPropUtils: spoof snapchat

    Change-Id: I4b46bd5f1d58f256a356b685ad04e4de694d3dec

commit b5c12e0de721ca37b44f2cc1f447e2b07311961c
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Jan 4 11:41:56 2023 +0530

    PixelPropUtils: update january 2023

commit df0a5837b7344f62ab742192a2e09a7ac5d7787a
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Jan 1 13:37:37 2023 -0300

    PixelPropsUtils: Use redfin props for extra packages

    Change-Id: If51bba2e21c722301e57a85bad8387479fb83574
    (cherry picked from commit 8a6da0b93664cfea9e30000bb38bf987f321be89)

    commit 26e9fdc220cd83093581cb96bd226a89a0590b55

commit 7248c21c7f2351c007e5f265f8415f098f400ee4
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:20:37 2022 +0530

    PixelPropsUtils: spoof nothing smartcenter to pixel

    * after the update to 2.0.2 , its checking for NTExperince on phone 1 (Spacewar) as the custom rom's lacking it just crashes so workaround this
 by spoofing it

    TEST: app opens and successfully connect to ear (1)
    Change-Id: Iad9cf39bb8e55e4c22ff237d8e2ee5160dcea4e1

commit d3c447e
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Mon Nov 7 21:14:13 2022 -0300

    PixelPropsUtils: Press F for flame and coral

    Change-Id: Icba703edb590586874628d672b33f5a20f7e85d3

commit 02b3886
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Fri Nov 4 15:40:04 2022 -0300

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb

commit 11eb143
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Sep 11 14:58:02 2022 -0300

    PixelPropsUtils: Correct spoof props for Samsung apps

    * Workaround to avoid force closes especially on Wearable apps

    Change-Id: Ieb5a6745f6f93914e2c509b1454c22324cf3c7d7

commit 0d858ac
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Oct 25 23:20:10 2022 +0530

    PixelPropsUtils: Spoof Gboard with PixelXL

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: If712cb9ca4da8883bd4108d933471f8c5f2101c4

commit 0e32da6
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit cb7054c
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b38f8d8
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e98f2a0
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6de0e93
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 085a344
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 7f4db31
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464

commit 0a351e8
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit cff3b11
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c90d87a
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 2b18c2d
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4f769c2
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: Ica5aee62c38ae46c5003a1d35ba6bdc9f865b2ef

commit ee51411
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 596a952
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 16f7bdf
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit bc334ec
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Mon Aug 22 21:40:25 2022 -0300

    Import PixelPropsUtils

    Thanks to @kdrag0n for the original idea at ProtonAOSP/android_frameworks_base@5a54bfd

    Also includes:

    commit b40a373888c6fd7287c490bbda6b53fdbcca5f09
    Author: Danny Lin <danny@kdrag0n.dev>
    Date:   Mon Nov 1 20:06:48 2021 -0700

        Limit SafetyNet workarounds to unstable GMS process

        The unstable process is where SafetyNet attestation actually runs, so
        we only need to spoof the model in that process. Leaving other processes
        fixes various issues caused by model detection and flag provisioning,
        including screen-off Voice Match in Google Assistant, broken At a Glance
        weather and settings on Android 12, and more.

        Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8

    commit 5cb42949b4725a6a21d4e021e71791578893d1be
    Author: Dyneteve <dyneteve@hentaios.com>
    Date:   Thu Dec 30 19:11:41 2021 +0100

        PixelPropsUtils: Use Pixel 5a codename to GMS on Pixels

        Change-Id: I0ba7225e23296f1f3aa95560af43c567949ba900
        (cherry picked from commit caedd884bbcad0425898d100537ac7b9a2c56456)

    commit 5017b2d530d5712770bd851cada56c368b5ef274
    Author: Karan Parashar <whyredfire@gmail.com>
    Date:   Sat Feb 5 08:01:40 2022 +0530

        PixelPropsUtils: Avoid spoofing for Pixel Buds

        - it breaks the app, thanks to @ helenius147 [TG] for pointing this out

        Change-Id: Id0dd0af78ca78db6ad50617e04dbc880c0515c2e
        (cherry picked from commit d19d773bf1aa2a1c5abcc15e72ab1347c6e2f5c7)

    commit 47ddf9a78caeb2fc65481b75e6f768533133254c
    Author: Joey Huab <joey@evolution-x.org>
    Date:   Thu Jan 27 13:33:48 2022 +0900

        PixelPropsUtils: Whitelist ARCore

        * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
        * Crash occurs while being used in Google app search feature.

        Change-Id: I008da8b09b6467dca2ceb26649c3cb3dee44777d
        Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>

    commit e8a20fb
    Author: Joey Huab <joey@evolution-x.org>
    Date:   Fri Feb 18 03:16:18 2022 +0900

        PixelProps: Set Pixel 5 as spoof for more Google apps

        Change-Id: I7281356c89b5379f3a9c75e613e7a59e3c6c40ab

    commit 8e50c58
    Author: Anay Wadhera <awadhera@berkeley.edu>
    Date:   Fri Dec 10 13:11:49 2021 -0800

        PixelPropUtils: remove spoofing for currently supported Pixels

        Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
        Reviewed-on: https://review.statixos.com/c/android_frameworks_base/+/6410
        Tested-by: Anay Wadhera <anay1018@gmail.com>
        Reviewed-by: Sourajit Karmakar <sourajit@live.com>

        Change-Id: I926b23324e669e24079c78fecc0c7a0b77c15e13

    commit 838ff9e
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sat Nov 27 16:53:23 2021 +0530

        PixelPropsUtils: Avoid spoofing props for gcam and mods

        Change-Id: Ia6f095b1511152ae6ba705990def71e7e4546072

    commit d72b3ce
    Author: vladsendrix <83285656+vladsendrix@users.noreply.github.com>
    Date:   Fri Dec 31 03:18:04 2021 +0100

        PixelPropsUtils: Spoof Pixel XL for Google Photos

        pixel_2016_exclusive.xml is already added, why not have it actually work

        Change-Id: If0b8064c7cb633139ee7c30a7bf1a8543bcc9cad

    commit 0f73ff5
    Author: Danny Lin <danny@kdrag0n.dev>
    Date:   Mon Oct 11 20:00:44 2021 -0700

        keystore: Block key attestation for SafetyNet

        SafetyNet (part of Google Play Services) opportunistically uses
        hardware-backed key attestation via KeyStore as a strong integrity
        check. This causes SafetyNet to fail on custom ROMs because the verified
        boot key and bootloader unlock state can be detected from attestation
        certificates.

        As a workaround, we can take advantage of the fact that SafetyNet's
        usage of key attestation is opportunistic (i.e. falls back to basic
        integrity checks if it fails) and prevent it from getting the
        attestation certificate chain from KeyStore. This is done by checking
        the stack for DroidGuard, which is the codename for SafetyNet, and
        pretending that the device doesn't support key attestation.

        Key attestation has only been blocked for SafetyNet specifically, as
        Google Play Services and other apps have many valid reasons to use it.
        For example, it appears to be involved in Google's mobile security key
        ferature.

        Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6

    Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
    Co-authored-by: Danny Lin <danny@kdrag0n.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: Ic68aadf5d8d2352da4c3adf1e7f67ef0a1dd5df2

commit bfec00bf4ffc40297c97bf02d124696f279c0dbe
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:23:14 2022 +0530

    PixelPropsUtils: Spoof some more gooogle apps to cheetah

    * as we started using more cheetah components more spoofs are required

commit 4edf7f0408d7388891879419c80570f26ddaaa19
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:20:37 2022 +0530

    PixelPropsUtils: spoof nothing smartcenter to pixel

    * after the update to 2.0.2 , its checking for NTExperince on phone 1 (Spacewar) as the custom rom's lacking it just crashes so workaround this
 by spoofing it

    TEST: app opens and successfully connect to ear (1)

commit 0349f9f528d35faacd08589b01f9dcada9b3d109
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Sep 12 12:54:31 2022 +0000

    [SQUASH] Switch to AttestationHooks

    Also includes:

    Spoof product name for Google Play Services (hentaiOS/platform_frameworks_base@05b3987
c1)

    NB: This code is under the gmscompat package, but it does not depend on
    any code from gmscompat.

    Change-Id: Ic018c0d7abe4573143c3b92301a2625b91e6673a

    keystore: Block key attestation for SafetyNet (hentaiOS/platform_frameworks_base@cac8283
0ea5)

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6

    Limit SafetyNet workarounds to unstable GMS process (hentaiOS/platform_frameworks_base@fce9b65
472cb5a594)

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process. Leaving other processes
    fixes various issues caused by model detection and flag provisioning,
    including screen-off Voice Match in Google Assistant, broken At a Glance
    weather and settings on Android 12, and more.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8

    gmscompat: Apply the SafetyNet workaround to Play Store aswell (hentaiOS/platform_frameworks_base@c9a086f9b635bf4e3e6
1fbd501ade464f8f5b713)

    Play Store is used for the new Play Integrity API, extend the hack
    to it aswell

    Test: Device Integrity and Basic Integrity passes.

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1

    gmscompat: Use Nexus 6P fingerprint for CTS/Integrity (hentaiOS/platform_frameworks_base@813f11628014a93d45f55dedd434
fdddd9510eb0)

    Google seems to have patched the KM block to Play Store in record time,
    but is still not enforced for anything under android N.

    Since we moved to angler FP we don't need to spoof model to Play Store
    anymore, however the KM block is still needed.

    Test: Run Play Intregrity Attestation

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: Ic2401a6e40ddfc4318a1d0faa87e42eb118ac3d1

    Co-authored-by: Dyneteve <dyneteve@hentaios.com>

commit faa0f69a85bc241f7824057ab32b64d713716245
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Oct 13 23:30:50 2022 +0530

    core: Blacklist PIXEL_2022_EXPERIENCE for photos

commit 7fa6c569bb243d442a80333d25806bd06645f110
Author: ReallySnow <reallysnow233@gmail.com>
Date:   Fri Sep 23 14:18:46 2022 +0800

    core: Fix Pixel feature leaked to other apps

    * Current execution order is [1] `((A && B) && C) || (D) || (E) || (F) || (G)`
      and we want the execution order is [2] `A && B && (C || D || E || F || G)`
      If follow [1], it will not only affect GPhoto, but also Gcam, Gcam needs
      to read these functions or it will prompt for unsupported device and then crash

    Change-Id: I53c97591fe7526c8dc6f07b914a43dc0f8b197b7

commit 34765c3259207c1ee2fd83bccfb1caf9894b8cd3
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e

commit 21e6846ac9415bbfd9acb23bf418a44e30c578e0
Author: kondors1995 <normandija1945@gmail.com>
Date:   Mon Dec 20 16:53:46 2021 +0000

    core: Extend Pixel experience Blacklist For Google Photos

    Turns out having these brakes Original quality backups.
    Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Change-Id: I336facff7b55552f094997ade337656461a0ea1d

commit ac0056ac3cdfe5c82e61e958075e10a59d5bcdf8
Author: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
Date:   Mon Dec 13 07:16:55 2021 +0000

    core: Blacklist P21 midyear, P20, P20 midyear experience system feature from Google Photos

    naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
    Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to rem
ove any XMLs

    Test: Google Photos editor with PIXEL_2021_EXPERIENCE feature in product
    Change-Id: Iad083ce049cd1786494a71c3b8d575f0caabb4e7

commit d1061c15df7d259ab192345045868b7325b1054e
Author: Kuba Wojciechowski <nullbytepl@gmail.com>
Date:   Fri Nov 5 01:52:51 2021 +0300

    core: Blacklist P21 experience system feature from Google Photos

    We want to include the P21 experience flag to enable new features,
    however it seems like Google Photos uses it to decide whether to use the
    TPU tflite delegate. There doesn't seem to be any fallback so we need to
    make sure the feature is not exposed to the app so that a normal
    NNAPI/GPU delegate can be used instead.

    Test: Google Photos editor with PIXEL_2021_EXPERIENCE feature in product
    Signed-off-by: Kuba Wojciechowski <nullbytepl@gmail.com>
    Change-Id: I51a02f8347324c7a85f3136b802dce4cc4556ac5

Change-Id: I6b32d66fda2293afc1fc6ae82c5604274e6b73b0
Signed-off-by: Pulkit077 <pulkitagarwal2k1@gmail.com>
imapotatook added a commit to CelestialDroid/frameworks_base that referenced this pull request Jul 6, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

@neobuddy89:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    @neobuddy89: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    @neobuddy89:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    @neobuddy89: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    @neobuddy89: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Dmitrii <bankersenator@gmail.com>
neobuddy89 pushed a commit to crdroidandroid/android_frameworks_base that referenced this pull request Jul 6, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

@neobuddy89:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    @neobuddy89: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    @neobuddy89:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    @neobuddy89: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    @neobuddy89: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
SwapnilVicky pushed a commit to SampattiOS/android_frameworks_base that referenced this pull request Jul 6, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

@neobuddy89:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    @neobuddy89: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    @neobuddy89:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    @neobuddy89: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    @neobuddy89: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
nattolecats pushed a commit to 2by2-Project/android_frameworks_base that referenced this pull request Jul 9, 2024
commit 444afd520dd93038d8cd9f68438536240a2b608e (pixel/thirteen, m/thirteen)
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Jul 2 18:34:00 2023 -0300

    PixelPropsUtils: Remove pixel whitelist

    Change-Id: I28ff6643ebe656478d3f5dde28ca88cd3d7a7542

commit a8561c81d7e2cae1730a1e25b74823a980838b86
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Thu Mar 23 16:22:25 2023 -0300

    PixelPropsUtils: Simplify GoogleCamera whitelisting

    Change-Id: I7db1b60343dff661a9f1c4116f689c3cc5afbdfc

    commit aa4c66949ad5552b3221cbd5b7fdf072dd7ce60e
    Author: jhenrique09 <jhsv09@gmail.com>
    Date:   Wed Mar 22 12:39:22 2023 -0300

        PixelPropsUtils: Spoof user build

        Change-Id: Ie33e0213a2608ecceea37b0e4cfb1115d6a0b788

    Change-Id: I7583251294028bd7c8a9372c4a9ee79b42213f94

commit 9c9e560381218d27dd3100789bdcb42634939521
Author: Sourajit Karmakar <sourajitk@statixos.com>
Date:   Tue Jun 20 21:45:18 2023 -0400

    PixelPropsUtils: Enable new Velvet Weather UI

    Change-Id: I45310071f0267be1ea26f7c00044a56a763a3e6a

    * Adapt to current PixelPropsUtils

    Original commit:
    StatiXOS/android_frameworks_base@ce72977

    Change-Id: I0989ef14aec6fabcc0733232ddb65fd96fe7d80d
    Signed-off-by: someone5678 <nemui3353@gmail.com>

commit ad3fee4764092a5f8b2b36c9efda0cb55e757901
Author: aswin7469 <aswinas@pixysos.com>
Date:   Tue Jun 20 12:33:17 2023 +0530

    PixelPropUtils: Misc updates

    * unspoof gms pkg as whole, only spoof required processes
    * cleanup some duplicates
    * spoof play store to Pixel 5

    Co-authored-by: Ido Ben-Hur <idoybh2@gmail.com>
    Co-authored-by: someone5678 <nemui3353@gmail.com>
    Change-Id: Ifb9a4ed5a864e293c52f7d96a2f4d27cd6152c96

commit 232dbb7b0974819b2386cf59f3f3cf9d1c5e3ee0
Author: aswin7469 <aswinas@pixysos.com>
Date:   Sat Jun 17 13:53:45 2023 +0530

    PixelPropUtils: Add emojiwalls and cinematiceffects pkgs

commit dda7fccc336876d4843e32ad2b80a97edb977c47
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Jun 8 13:30:13 2023 +0530

    PixelPropUtils: Switch to raven for asi

    Change-Id: Ie57206e750e8554cf097c9466523526526b575b4

commit 9b492c93076552320a0bcbca65062ed7bb95551d
Author: aswin7469 <aswinas@pixysos.com>
Date:   Sat Feb 18 16:18:33 2023 +0530

    PixelPropsUtils: Add Pixel 6 Pro

    * fixes google dialer getting updated to
      pixel version and warn user about incompatibility

    * also remove unnecessory netflix spoof toggle

    Change-Id: I365f96acad5ee9d2aec1f74e2b49816bc121b891
    Co-authored-by: someone5678 <nemui3353@gmail.com>

commit 00a5906509e7ea00214b06820b26e0093f85e0a7
Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
Date:   Thu Jun 8 16:55:44 2023 +0530

    PixelPropUtils: Un-spoof GMS while adding google account

    GMS uses its DroidGuard service (the same that's used for safetynet)
    to get the device name from the build fingerprint, which from our
    current certified props, is Pixel XL. The device name after Google
    login shows up in the login alert accordingly as Pixel XL, which is
    inconvenient especially when you have multiple devices on the same ROM.

    By restarting the DroidGuard service process (gms.unstable) as soon as
    the user starts adding Google account (i.e when the GMS add account
    activity is started and moved to the top of the task stack), we can
    skip spoofing to certified props in this instance. When the user
    stops/finishes adding account (GMS add account activity is no longer
    at the top of the task stack), restart the process again, this time
    spoofing to certified props in order to be ready for safetynet.

    This ensures while adding a Google account, GMS reads the original
    properties of the device and labels the device with its original name,
    while in any other situation GMS reads certified properties required
    to pass SafetyNet/Play Integrity.

    Test:
    - Add google account from setup wizard, settings, any other app
    - Observe correct device name in gmail login alert
    - SafetyNet (basic, CTS), Play Integrity (basic, device) passes.

    [aswin7469]: Adapted for PixelPropUtils

    Change-Id: Ia5463f220a8262f7963fc5b2640a7a5311a73210

commit deaa854f20181e3e31e920510f043296f04e90e1
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu May 18 14:26:26 2023 +0530

    core: block 2021/22 pixel features to ASI and pixel launcher

    * blacklist pe features and spoof redfin to get rid of tensor shits

    Change-Id: I83aa09c151f51ee61361510b2c1a9ac8865a2aee

commit cdaff9a21351200bef20ffd3aa663c5a875541c5
Author: John Galt <johngaltfirstrun@gmail.com>
Date:   Fri Apr 14 09:55:46 2023 -0400

    core: block 2022+ pixel experience xmls to ASI

    Resolves downloads on play store updated ASI (newer than
    image-cheetah-tq2a.230405.003.e1 shipping).

commit 8451c0b203fadf036ab36a468532ddf67915a9fd
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Thu Feb 23 16:44:35 2023 -0300

    PixelPropsUtils: Don't declare propsToChange as static

    * Since that variable was static, it may hold props from undesired devices (like Pixel 7), use a new instance on every app to fix that.

    Change-Id: I7cf0836056a9cd5c9664ef0b203fc2a9bc5237f5

commit 207382c0a673a705abaaa8eec4eba1fce46ad915
Author: John Galt <johngaltfirstrun@gmail.com>
Date:   Wed Mar 22 11:32:52 2023 -0400

    PixelPropsUtils: move snapchat to walleye spoofing

    Snapchat on A13 without spoofing has delayed messages issue on many
    devices. Spoofing to newer pixels does not resolve this and additionally
    can harm photo quality on non pixels. However spoofing to an older
    device and android version such as Walleye resolve the delayed messages
    without harming photo quality.

commit 8ed83d4d0d2c3341d30d16736e4241bfa8cfa10d
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Mar 22 16:44:42 2023 +0530

    PixelPropUtils: Update spoofs

commit 1793b260cf5062af2c90e339016e84c17f542dd7
Author: aswin7469 <aswinas@pixysos.com>
Date:   Tue Mar 14 04:08:17 2023 +0530

    PixelPropsUtils: Update build fp to march 2023

    Change-Id: I1f11e53e2718c5bbbfded177338fb11b3e3ccd39

commit 276703f3f91e19e78ef34d6998a3ac4bd4b39cc0
Author: minaripenguin <minaripenguin@users.noreply.github.com>
Date:   Wed Feb 8 22:36:56 2023 +0530

    PixelPropUtils: Update gms unstable process spoof to walleye

    * spoof product & device name also to fix cts/play certification as of today

    original commit: https://github.com/minaripenguin/android_frameworks_base/commit/3714dd8b8c6ab1bd621ba23cf14d32dc01abd302

    Change-Id: Ia32c6a6366cea9e03b76bec48e849dfe43620d2f
    Co-authored-by: aswin7469 <aswinas@pixysos.com>

commit 51b0f20d99f2dd9ba608ba53ae80069898faac28
Author: Anirudh Gupta <anirudhgupta109@aosip.dev>
Date:   Wed Jan 4 18:20:56 2023 +0000

    PixelPropsUtils: Set shipping level to 32 for devices >=33

    If ro.product.first_api_level is 33, its forced to use HW attestation even though the safteynet checker app shows BASIC
    setting it to 32 allows for software attestation and passing CTS

    Change-Id: Ie7326eaac48424cdea3d9633ebe13c65053ef6c1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>

commit e1cc436f2d0ebe43b868bc3c26b039f4b2bae83e
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Dec 6 15:59:08 2022 +0100

    PixelPropsUtils: Use actual device model name

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: I454654d87b3ea6286e12e9a9f5ed120f06cb2aa6

commit f54b8e06428fbe8b1d8b2293b6091448369b3ed0
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Jan 23 04:31:31 2023 +0000

    PixelPropsUtils: Use spoofBuildGms for FP and model alteration

    * From hentaiOS/platform_frameworks_base@05b3987.

    Change-Id: I4fb21862e8a79c4c616c1faaee3d393f2e40ba34

commit d991314b9872428c16fc54761ef94f65a4005858
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Jan 26 00:27:15 2023 +0530

    PixelPropsUtils: Update spoofs

    * change cheetah fingerprint to global varient

    Change-Id: Ie187749a304cbf4e1371d8dbed17729a92293cf4

commit 81bf1d7c04c41624034a5a5217be35b2703a8d18
Author: aswin7469 <aswinas@pixysos.com>
Date:   Fri Jan 13 20:03:52 2023 +0530

    PixelPropsUtils: Add toggle for Gaming and google photos spoofs

    Change-Id: I0e0e3fe7289ae4334981d6eed5280c71ab417b50
    Co-authored-by: Pranav Vashi <neobuddy89@gmail.com>
    Co-authored-by: ghostrider-reborn <gh0strider.2k18.reborn@gmail.com>
    Co-authored-by: spezi77 <spezi7713@gmx.net>

commit b97ca2c24fc51e3614f02f598a9875eaf6ac874e
Author: aswin7469 <aswinas@pixysos.com>
Date:   Fri Jan 13 14:25:58 2023 +0530

    PixelPropUtils: spoof snapchat

    Change-Id: I4b46bd5f1d58f256a356b685ad04e4de694d3dec

commit b5c12e0de721ca37b44f2cc1f447e2b07311961c
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Jan 4 11:41:56 2023 +0530

    PixelPropUtils: update january 2023

commit df0a5837b7344f62ab742192a2e09a7ac5d7787a
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Jan 1 13:37:37 2023 -0300

    PixelPropsUtils: Use redfin props for extra packages

    Change-Id: If51bba2e21c722301e57a85bad8387479fb83574
    (cherry picked from commit 8a6da0b93664cfea9e30000bb38bf987f321be89)

    commit 26e9fdc220cd83093581cb96bd226a89a0590b55

commit 7248c21c7f2351c007e5f265f8415f098f400ee4
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:20:37 2022 +0530

    PixelPropsUtils: spoof nothing smartcenter to pixel

    * after the update to 2.0.2 , its checking for NTExperince on phone 1 (Spacewar) as the custom rom's lacking it just crashes so workaround this
 by spoofing it

    TEST: app opens and successfully connect to ear (1)
    Change-Id: Iad9cf39bb8e55e4c22ff237d8e2ee5160dcea4e1

commit d3c447e
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Mon Nov 7 21:14:13 2022 -0300

    PixelPropsUtils: Press F for flame and coral

    Change-Id: Icba703edb590586874628d672b33f5a20f7e85d3

commit 02b3886
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Fri Nov 4 15:40:04 2022 -0300

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb

commit 11eb143
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Sun Sep 11 14:58:02 2022 -0300

    PixelPropsUtils: Correct spoof props for Samsung apps

    * Workaround to avoid force closes especially on Wearable apps

    Change-Id: Ieb5a6745f6f93914e2c509b1454c22324cf3c7d7

commit 0d858ac
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Oct 25 23:20:10 2022 +0530

    PixelPropsUtils: Spoof Gboard with PixelXL

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: If712cb9ca4da8883bd4108d933471f8c5f2101c4

commit 0e32da6
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit cb7054c
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b38f8d8
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e98f2a0
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6de0e93
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 085a344
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 7f4db31
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464

commit 0a351e8
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit cff3b11
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c90d87a
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 2b18c2d
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4f769c2
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: Ica5aee62c38ae46c5003a1d35ba6bdc9f865b2ef

commit ee51411
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 596a952
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 16f7bdf
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit bc334ec
Author: jhenrique09 <jhsv09@gmail.com>
Date:   Mon Aug 22 21:40:25 2022 -0300

    Import PixelPropsUtils

    Thanks to @kdrag0n for the original idea at ProtonAOSP/android_frameworks_base@5a54bfd

    Also includes:

    commit b40a373888c6fd7287c490bbda6b53fdbcca5f09
    Author: Danny Lin <danny@kdrag0n.dev>
    Date:   Mon Nov 1 20:06:48 2021 -0700

        Limit SafetyNet workarounds to unstable GMS process

        The unstable process is where SafetyNet attestation actually runs, so
        we only need to spoof the model in that process. Leaving other processes
        fixes various issues caused by model detection and flag provisioning,
        including screen-off Voice Match in Google Assistant, broken At a Glance
        weather and settings on Android 12, and more.

        Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8

    commit 5cb42949b4725a6a21d4e021e71791578893d1be
    Author: Dyneteve <dyneteve@hentaios.com>
    Date:   Thu Dec 30 19:11:41 2021 +0100

        PixelPropsUtils: Use Pixel 5a codename to GMS on Pixels

        Change-Id: I0ba7225e23296f1f3aa95560af43c567949ba900
        (cherry picked from commit caedd884bbcad0425898d100537ac7b9a2c56456)

    commit 5017b2d530d5712770bd851cada56c368b5ef274
    Author: Karan Parashar <whyredfire@gmail.com>
    Date:   Sat Feb 5 08:01:40 2022 +0530

        PixelPropsUtils: Avoid spoofing for Pixel Buds

        - it breaks the app, thanks to @ helenius147 [TG] for pointing this out

        Change-Id: Id0dd0af78ca78db6ad50617e04dbc880c0515c2e
        (cherry picked from commit d19d773bf1aa2a1c5abcc15e72ab1347c6e2f5c7)

    commit 47ddf9a78caeb2fc65481b75e6f768533133254c
    Author: Joey Huab <joey@evolution-x.org>
    Date:   Thu Jan 27 13:33:48 2022 +0900

        PixelPropsUtils: Whitelist ARCore

        * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
        * Crash occurs while being used in Google app search feature.

        Change-Id: I008da8b09b6467dca2ceb26649c3cb3dee44777d
        Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>

    commit e8a20fb
    Author: Joey Huab <joey@evolution-x.org>
    Date:   Fri Feb 18 03:16:18 2022 +0900

        PixelProps: Set Pixel 5 as spoof for more Google apps

        Change-Id: I7281356c89b5379f3a9c75e613e7a59e3c6c40ab

    commit 8e50c58
    Author: Anay Wadhera <awadhera@berkeley.edu>
    Date:   Fri Dec 10 13:11:49 2021 -0800

        PixelPropUtils: remove spoofing for currently supported Pixels

        Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
        Reviewed-on: https://review.statixos.com/c/android_frameworks_base/+/6410
        Tested-by: Anay Wadhera <anay1018@gmail.com>
        Reviewed-by: Sourajit Karmakar <sourajit@live.com>

        Change-Id: I926b23324e669e24079c78fecc0c7a0b77c15e13

    commit 838ff9e
    Author: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date:   Sat Nov 27 16:53:23 2021 +0530

        PixelPropsUtils: Avoid spoofing props for gcam and mods

        Change-Id: Ia6f095b1511152ae6ba705990def71e7e4546072

    commit d72b3ce
    Author: vladsendrix <83285656+vladsendrix@users.noreply.github.com>
    Date:   Fri Dec 31 03:18:04 2021 +0100

        PixelPropsUtils: Spoof Pixel XL for Google Photos

        pixel_2016_exclusive.xml is already added, why not have it actually work

        Change-Id: If0b8064c7cb633139ee7c30a7bf1a8543bcc9cad

    commit 0f73ff5
    Author: Danny Lin <danny@kdrag0n.dev>
    Date:   Mon Oct 11 20:00:44 2021 -0700

        keystore: Block key attestation for SafetyNet

        SafetyNet (part of Google Play Services) opportunistically uses
        hardware-backed key attestation via KeyStore as a strong integrity
        check. This causes SafetyNet to fail on custom ROMs because the verified
        boot key and bootloader unlock state can be detected from attestation
        certificates.

        As a workaround, we can take advantage of the fact that SafetyNet's
        usage of key attestation is opportunistic (i.e. falls back to basic
        integrity checks if it fails) and prevent it from getting the
        attestation certificate chain from KeyStore. This is done by checking
        the stack for DroidGuard, which is the codename for SafetyNet, and
        pretending that the device doesn't support key attestation.

        Key attestation has only been blocked for SafetyNet specifically, as
        Google Play Services and other apps have many valid reasons to use it.
        For example, it appears to be involved in Google's mobile security key
        ferature.

        Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6

    Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
    Co-authored-by: Danny Lin <danny@kdrag0n.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
    Change-Id: Ic68aadf5d8d2352da4c3adf1e7f67ef0a1dd5df2

commit bfec00bf4ffc40297c97bf02d124696f279c0dbe
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:23:14 2022 +0530

    PixelPropsUtils: Spoof some more gooogle apps to cheetah

    * as we started using more cheetah components more spoofs are required

commit 4edf7f0408d7388891879419c80570f26ddaaa19
Author: aswin7469 <aswinas@pixysos.com>
Date:   Wed Nov 2 15:20:37 2022 +0530

    PixelPropsUtils: spoof nothing smartcenter to pixel

    * after the update to 2.0.2 , its checking for NTExperince on phone 1 (Spacewar) as the custom rom's lacking it just crashes so workaround this
 by spoofing it

    TEST: app opens and successfully connect to ear (1)

commit 0349f9f528d35faacd08589b01f9dcada9b3d109
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Sep 12 12:54:31 2022 +0000

    [SQUASH] Switch to AttestationHooks

    Also includes:

    Spoof product name for Google Play Services (hentaiOS/platform_frameworks_base@05b3987
c1)

    NB: This code is under the gmscompat package, but it does not depend on
    any code from gmscompat.

    Change-Id: Ic018c0d7abe4573143c3b92301a2625b91e6673a

    keystore: Block key attestation for SafetyNet (hentaiOS/platform_frameworks_base@cac8283
0ea5)

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6

    Limit SafetyNet workarounds to unstable GMS process (hentaiOS/platform_frameworks_base@fce9b65
472cb5a594)

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process. Leaving other processes
    fixes various issues caused by model detection and flag provisioning,
    including screen-off Voice Match in Google Assistant, broken At a Glance
    weather and settings on Android 12, and more.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8

    gmscompat: Apply the SafetyNet workaround to Play Store aswell (hentaiOS/platform_frameworks_base@c9a086f9b635bf4e3e6
1fbd501ade464f8f5b713)

    Play Store is used for the new Play Integrity API, extend the hack
    to it aswell

    Test: Device Integrity and Basic Integrity passes.

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1

    gmscompat: Use Nexus 6P fingerprint for CTS/Integrity (hentaiOS/platform_frameworks_base@813f11628014a93d45f55dedd434
fdddd9510eb0)

    Google seems to have patched the KM block to Play Store in record time,
    but is still not enforced for anything under android N.

    Since we moved to angler FP we don't need to spoof model to Play Store
    anymore, however the KM block is still needed.

    Test: Run Play Intregrity Attestation

    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Change-Id: Ic2401a6e40ddfc4318a1d0faa87e42eb118ac3d1

    Co-authored-by: Dyneteve <dyneteve@hentaios.com>

commit faa0f69a85bc241f7824057ab32b64d713716245
Author: aswin7469 <aswinas@pixysos.com>
Date:   Thu Oct 13 23:30:50 2022 +0530

    core: Blacklist PIXEL_2022_EXPERIENCE for photos

commit 7fa6c569bb243d442a80333d25806bd06645f110
Author: ReallySnow <reallysnow233@gmail.com>
Date:   Fri Sep 23 14:18:46 2022 +0800

    core: Fix Pixel feature leaked to other apps

    * Current execution order is [1] `((A && B) && C) || (D) || (E) || (F) || (G)`
      and we want the execution order is [2] `A && B && (C || D || E || F || G)`
      If follow [1], it will not only affect GPhoto, but also Gcam, Gcam needs
      to read these functions or it will prompt for unsupported device and then crash

    Change-Id: I53c97591fe7526c8dc6f07b914a43dc0f8b197b7

commit 34765c3259207c1ee2fd83bccfb1caf9894b8cd3
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e

commit 21e6846ac9415bbfd9acb23bf418a44e30c578e0
Author: kondors1995 <normandija1945@gmail.com>
Date:   Mon Dec 20 16:53:46 2021 +0000

    core: Extend Pixel experience Blacklist For Google Photos

    Turns out having these brakes Original quality backups.
    Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Change-Id: I336facff7b55552f094997ade337656461a0ea1d

commit ac0056ac3cdfe5c82e61e958075e10a59d5bcdf8
Author: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
Date:   Mon Dec 13 07:16:55 2021 +0000

    core: Blacklist P21 midyear, P20, P20 midyear experience system feature from Google Photos

    naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
    Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to rem
ove any XMLs

    Test: Google Photos editor with PIXEL_2021_EXPERIENCE feature in product
    Change-Id: Iad083ce049cd1786494a71c3b8d575f0caabb4e7

commit d1061c15df7d259ab192345045868b7325b1054e
Author: Kuba Wojciechowski <nullbytepl@gmail.com>
Date:   Fri Nov 5 01:52:51 2021 +0300

    core: Blacklist P21 experience system feature from Google Photos

    We want to include the P21 experience flag to enable new features,
    however it seems like Google Photos uses it to decide whether to use the
    TPU tflite delegate. There doesn't seem to be any fallback so we need to
    make sure the feature is not exposed to the app so that a normal
    NNAPI/GPU delegate can be used instead.

    Test: Google Photos editor with PIXEL_2021_EXPERIENCE feature in product
    Signed-off-by: Kuba Wojciechowski <nullbytepl@gmail.com>
    Change-Id: I51a02f8347324c7a85f3136b802dce4cc4556ac5

Change-Id: I6b32d66fda2293afc1fc6ae82c5604274e6b73b0
Signed-off-by: Pulkit077 <pulkitagarwal2k1@gmail.com>
SwapnilVicky pushed a commit to SampattiOS/android_frameworks_base that referenced this pull request Jul 11, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

@neobuddy89:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    @neobuddy89: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    @neobuddy89:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    @neobuddy89: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    @neobuddy89: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ralf979 pushed a commit to Black-Iron-Project/frameworks_base that referenced this pull request Jul 12, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

@neobuddy89:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    @neobuddy89: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    @neobuddy89:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    @neobuddy89: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    @neobuddy89: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
pkm774 pushed a commit to pkm774/frameworks_base that referenced this pull request Jul 14, 2024
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 19:59:51 2021 -0700

    Alter model name to avoid SafetyNet HW attestation enforcement

    As of September 2, Google is enforcing SafetyNet's previously
    opportunistic hardware-backed attestation based on device information.
    Append a space to the device model name in order to avoid such
    enforcement.

    Also contains:
            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.

            Corresponding vendor commit:
            "Only use stock build fingerprint for Google Play Services"

            NB: This code is under the gmscompat package, but it does not depend on
            any code from gmscompat.

            Change-Id: I26a2498eb2e2163933303b03f6d516e5fb30fe51

    * We don't need to spoof the fingerprint here since we do it globally, but we
      use the Build field spoofing code it added for model

    Change-Id: Ib7779e0aae40cab3730a56785e9231896917ab0a

Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6

Author: Tim Zimmermann <tim@linux4.de>
Date:   Fri Jun 3 17:20:55 2022 +0200

    core: Spoof build properties for SafetyNet

    * Unfortunately system side security patch can't be spoofed
      so we'll need to update the fingerprint every month

    Change-Id: I3c6c17c43d297d18e7f19fa74b3d6c17b9961378

Author: Tim Zimmermann <tim@linux4.de>
Date:   Sat Jun 4 18:38:07 2022 +0200

    core: Also spoof properties for samsung apps

    * Especially galaxy wearable apps don't work
      on samsung devices running AOSP

    Change-Id: I3663df8761c52ab8a1259c17e3a663ebf2b0ddbd

Author: SamarV-121 <samarvispute121@pm.me>
Date:   Tue Nov 29 08:41:15 2022 +0000

    gmscompat: Spoof Nexus 6P build fingerprint for GMS

    * Helps to pass DEVICE_INTEGRITY, tested using https://github.com/1nikolas/play-integrity-checker-app
    REF: kdrag0n/safetynet-fix#207

    Change-Id: Id5f98f2f95f775ebba0a484caccb0e3beb75849b

Author: SamarV-121 <samarvispute121@pm.me>
Date:   Wed Nov 30 06:37:02 2022 +0000

    gmscompat: Stop spoofing vendor properties

    Change-Id: If1ba11a211efdbb4e0e752073b28a785eebc0132

Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process. Leaving other processes
    fixes various issues caused by model detection and flag provisioning,
    including screen-off Voice Match in Google Assistant, broken At a Glance
    weather and settings on Android 12, and more.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8

Author: SamarV-121 <samarvispute121@pm.me>
Date:   Sat Dec 24 12:10:55 2022 +0000

    AttestationHooks: Cleanup and refactor a bit

    Change-Id: I957a06e97ec1deb949eb659474658df8fb791924

Author: Anirudh Gupta <anirudhgupta109@aosip.dev>
Date:   Wed Jan 4 18:20:56 2023 +0000

    gmscompat: Set shipping level to 32 for devices >=33

    If ro.product.first_api_level is 33, its forced to use HW attestation even though the safteynet checker app shows BASIC
    setting it to 32 allows for software attestation and passing CTS

    Change-Id: Ie7326eaac48424cdea3d9633ebe13c65053ef6c1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>

Author: Dyneteve <dyneteve@hentaios.com>
Date:   Wed Feb 8 15:21:01 2023 +0000

    gmscompat: Make CTS/Play Integrity pass again

    The logic behind CTS and Play Integrity has been updated today it now
    checks the product and model names against the fingerprint and if
    they do not match the CTS profile will fail.

    Also while we are at it use a newer FP from Pixel XL and add logging
    for key attestation blocking for debugging.

    Test: Boot, check for CTS and Play Integrity

    Change-Id: I089d5ef935bba40338e10c795ea7d181103ffd15
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>

Author: Tim Josten <timjosten@gmail.com>
Date:   Tue Oct 24 21:55:02 2023 +0700

    gmscompat: Fix GMS drain triggered by an outdated ROM build date

    If the build date exceeds a month, GMS, thinking the device is Pixel, attempts a system update, which unexpectedly fails. This goes into an endless cycle which drains battery very quickly and generates a lot of heat. Let's fix it by spoofing the build date to something always fresh.

    Change-Id: Ib38883026d2a957e0d0a570e164c415dac154bb1

Change-Id: I774a8ffc98e329f5ccd79f07b0189b2ed19a6780
neobuddy89 pushed a commit to crdroidandroid/android_frameworks_base that referenced this pull request Jul 16, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

@neobuddy89:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    @neobuddy89: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    @neobuddy89:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    @neobuddy89: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    @neobuddy89: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
karthick111 pushed a commit to ForkLineageOS/android_frameworks_base that referenced this pull request Jul 16, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

@neobuddy89:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    @neobuddy89: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    @neobuddy89:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    @neobuddy89: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    @neobuddy89: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
SwapnilVicky pushed a commit to SampattiOS/android_frameworks_base that referenced this pull request Jul 17, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

@neobuddy89:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    @neobuddy89: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    @neobuddy89:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    @neobuddy89: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    @neobuddy89: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
pkm774 pushed a commit to pkm774/frameworks_base that referenced this pull request Jul 18, 2024
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 19:59:51 2021 -0700

    Alter model name to avoid SafetyNet HW attestation enforcement

    As of September 2, Google is enforcing SafetyNet's previously
    opportunistic hardware-backed attestation based on device information.
    Append a space to the device model name in order to avoid such
    enforcement.

    Also contains:
            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.

            Corresponding vendor commit:
            "Only use stock build fingerprint for Google Play Services"

            NB: This code is under the gmscompat package, but it does not depend on
            any code from gmscompat.

            Change-Id: I26a2498eb2e2163933303b03f6d516e5fb30fe51

    * We don't need to spoof the fingerprint here since we do it globally, but we
      use the Build field spoofing code it added for model

    Change-Id: Ib7779e0aae40cab3730a56785e9231896917ab0a

Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6

Author: Tim Zimmermann <tim@linux4.de>
Date:   Fri Jun 3 17:20:55 2022 +0200

    core: Spoof build properties for SafetyNet

    * Unfortunately system side security patch can't be spoofed
      so we'll need to update the fingerprint every month

    Change-Id: I3c6c17c43d297d18e7f19fa74b3d6c17b9961378

Author: Tim Zimmermann <tim@linux4.de>
Date:   Sat Jun 4 18:38:07 2022 +0200

    core: Also spoof properties for samsung apps

    * Especially galaxy wearable apps don't work
      on samsung devices running AOSP

    Change-Id: I3663df8761c52ab8a1259c17e3a663ebf2b0ddbd

Author: SamarV-121 <samarvispute121@pm.me>
Date:   Tue Nov 29 08:41:15 2022 +0000

    gmscompat: Spoof Nexus 6P build fingerprint for GMS

    * Helps to pass DEVICE_INTEGRITY, tested using https://github.com/1nikolas/play-integrity-checker-app
    REF: kdrag0n/safetynet-fix#207

    Change-Id: Id5f98f2f95f775ebba0a484caccb0e3beb75849b

Author: SamarV-121 <samarvispute121@pm.me>
Date:   Wed Nov 30 06:37:02 2022 +0000

    gmscompat: Stop spoofing vendor properties

    Change-Id: If1ba11a211efdbb4e0e752073b28a785eebc0132

Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process. Leaving other processes
    fixes various issues caused by model detection and flag provisioning,
    including screen-off Voice Match in Google Assistant, broken At a Glance
    weather and settings on Android 12, and more.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8

Author: SamarV-121 <samarvispute121@pm.me>
Date:   Sat Dec 24 12:10:55 2022 +0000

    AttestationHooks: Cleanup and refactor a bit

    Change-Id: I957a06e97ec1deb949eb659474658df8fb791924

Author: Anirudh Gupta <anirudhgupta109@aosip.dev>
Date:   Wed Jan 4 18:20:56 2023 +0000

    gmscompat: Set shipping level to 32 for devices >=33

    If ro.product.first_api_level is 33, its forced to use HW attestation even though the safteynet checker app shows BASIC
    setting it to 32 allows for software attestation and passing CTS

    Change-Id: Ie7326eaac48424cdea3d9633ebe13c65053ef6c1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>

Author: Dyneteve <dyneteve@hentaios.com>
Date:   Wed Feb 8 15:21:01 2023 +0000

    gmscompat: Make CTS/Play Integrity pass again

    The logic behind CTS and Play Integrity has been updated today it now
    checks the product and model names against the fingerprint and if
    they do not match the CTS profile will fail.

    Also while we are at it use a newer FP from Pixel XL and add logging
    for key attestation blocking for debugging.

    Test: Boot, check for CTS and Play Integrity

    Change-Id: I089d5ef935bba40338e10c795ea7d181103ffd15
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>

Author: Tim Josten <timjosten@gmail.com>
Date:   Tue Oct 24 21:55:02 2023 +0700

    gmscompat: Fix GMS drain triggered by an outdated ROM build date

    If the build date exceeds a month, GMS, thinking the device is Pixel, attempts a system update, which unexpectedly fails. This goes into an endless cycle which drains battery very quickly and generates a lot of heat. Let's fix it by spoofing the build date to something always fresh.

    Change-Id: Ib38883026d2a957e0d0a570e164c415dac154bb1

Change-Id: I774a8ffc98e329f5ccd79f07b0189b2ed19a6780
SwapnilVicky pushed a commit to SampattiOS/android_frameworks_base that referenced this pull request Jul 18, 2024
* That will spoof build fingerprints on some g00gle apps
* Thanks to kdrag0n for the original idea at
  ProtonAOSP/android_frameworks_base@5a54bfd

@neobuddy89:
* Squash subsequent changes by jhenrique09, SKULSHADY, Stallix

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also squashed commit of the following:

commit 780615526b4df07c0673c344ea65b1b9bb38f6c0
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 8 12:33:47 2022 +0800

    PixelPropsUtils: Get package name from context instead of app

    11-04 08:48:39.039 11637 11637 E AndroidRuntime: FATAL EXCEPTION: main
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: Process: com.NextFloor.DestinyChild, PID: 11637
    11-04 08:48:39.039 11637 11637 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{/androidx.startup.InitializationProvider}
    11-04 08:48:39.039 11637 11637 E AndroidRuntime:   at android.app.ActivityThread.installProvider(ActivityThread.java:7488)

    Change-Id: Icb12f938fe0fca710f8f9d29182d0134ba3c63eb
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit df0a1a8f9ce6c97474438798cd43f21355c0f1e9
Author: EnesSastim <sastimenes@gmail.com>
Date:   Tue Oct 25 14:04:49 2022 +0000

    PixelPropsUtils: Don't spoof euicc

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f10adfa0d2cd767dfb942ecfc6f52568fce4146f
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Oct 16 00:31:02 2022 +0530

    PixelPropsUtils: Update pixel devices list

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit f567f3c30163364d10598eb65871f65aae3b44d4
Author: Dyneteve <dyneteve@hentaios.com>
Date:   Tue Aug 23 18:57:05 2022 +0200

    PixelPropsUtils: Apply key attestation workaround to Play Store as well

    Play Store is used for the new Play Integrity API, extend the hack
    to it as well.

    Test: Device Integrity and Basic Integrity passes.

    Change-Id: Id607cdff0b902f285a6c1b769c0a4ee4202842b1
    Signed-off-by: Dyneteve <dyneteve@hentaios.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 4c557fd6ff68eed3e587d0ac2842647e75df904d
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Oct 13 13:06:00 2022 +0000

    PixelPropsUtils: Switch from raven fp to cheetah

    * Update packages
    * Remove GMS as we are setting it to angler

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ab2ce29eb1a259522b3c8a3638ce60b095e1a97
Author: Alexander Winkowski <dereference23@outlook.com>
Date:   Fri Oct 14 23:25:32 2022 +0200

    PixelPropsUtils: Spoof Nexus 6P for GMS unstable process

    To fix Play Integrity, taken from kdrag0n/safetynet-fix#207

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 6f386d6ac22c8a43b7381177600aa0e11c472217
Author: Akash Srivastava <akashniki@gmail.com>
Date:   Sat Aug 20 19:04:32 2022 +0700

    core: Pixel experience Blacklist For Google Photos for Android 13

    * See, in Android 13 pixel_experience_2022_midyear was added, which needs to be blacklisted aswell
    * Also bring in PIXEL_2021_EXPERIENCE which was missing

    Change-Id: Id36d12afeda3cf6b39d01a0dbe7e3e9058659b8e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e819f8fb14924c32abce93cccc14fd9ea69b032b
Author: Joey Huab <joey@evolution-x.org>
Date:   Mon Aug 15 18:23:48 2022 +0000

    PixelPropsUtils: Update game props

    * Removed new state as multiple crash reports.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 845fbd03cd9c521d0daa4cad63a7aa55aacfa995
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Sep 10 21:23:33 2022 +0530

    PixelPropsUtils: Use ro.build.incremental for settings intelligence

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 328b97baa8039e4b127585ac467846faf5f13cb9
Author: johnmart19 <johnivan19999@gmail.com>
Date:   Mon Jul 11 01:37:47 2022 +0300

    PixelPropsUtils: GameProps: Hide Apex Legends as Mi11

    Change-Id: I80b0136ef75f61154011ed7831994ffe8b5f5c96
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 1ddc5fc26838c3ab4592646028601c194b1cefee
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Nov 1 20:06:48 2021 -0700

    PixelPropsUtils: Limit SafetyNet workarounds to unstable GMS process

    The unstable process is where SafetyNet attestation actually runs, so
    we only need to spoof the model in that process.

    Change-Id: Idcf663907a6c3d0408dbd45b1ac53c9eb4200df8
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ea1e57ba3fd786f62f94d4860cbc18eb3e81a074
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun May 29 19:34:09 2022 +0530

    PixelPropsUtils: Exclude recorder from pixel props

    * Just like YouTube apps, Recorder shows device is Pixel 5.
      There is no special pixel feature associated with this app, exclude it.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit b52ac41246b1bc15b0316c58ae7516f3b272643d
Author: Anay Wadhera <awadhera@berkeley.edu>
Date:   Fri Dec 10 13:11:49 2021 -0800

    PixelPropsUtils: Remove spoofing for currently supported Pixel devices

    @neobuddy89: Selectively enabled for GPhotos spoof.

    Change-Id: I3a426f8671f841c16e5af7c0a2a204d19c502464
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit ce68c443c392c9be6fd0591958db960a1f10f9e3
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Mar 26 12:32:23 2022 +0530

    PixelPropsUtils: Add game props for mobile legends

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c56868a33f61bbed50aff989271e5b204333a3e1
Author: Omkar Chandorkar <gotenksIN@aosip.dev>
Date:   Sat Mar 5 02:35:21 2022 +0900

    PixelPropsUtils: Only spoof GMS to Raven

    * please shut the fuck up EdgeTpuDeviceFactory

    Change-Id: I2ef71a12e613bee7a01e27ae36f9b07a3b78e766
    Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 75ae3f4d46fa39ac9ea44ada3f3e79dcc660d684
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Feb 27 15:23:50 2022 +0530

    PixelPropsUtils: Whitelist YouTube apps

    * Otherwise casting shows wrong device connected.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 351c31da421ce13587e6b621b47c483a821f3023
Author: Joey Huab <joey@evolution-x.org>
Date:   Tue Feb 15 17:32:11 2022 +0900

    PixelPropsUtils: Refactor Pixel 2021 features availability

    * Apparently, Magic Eraser currently requires a
      specific Photos version for it to show up and
      actually work.
      APK: https://apkmirror.com/apk/google-inc/photos/photos-5-65-0-405472367-release/google-photos-5-65-0-405472367-10-android-apk-download

    * Basically, Magic Eraser feature will crash if
      Photos is spoofed as Pixel XL. We want to
      make Magic Eraser work by default as long as
      the Unlimited Photos spoof is turned off.

    * Set Pixel 5 as spoof for more Google apps that
      uses TPU when spoofed as Pixel 6.

    * Default Pixel 5 spoof for Photos and only switch
      to Pixel XL when spoof is toggled.

    * Pixel Buds has been reported to crash on Pixel 6 spoof
      so move it to Pixel 5.

    * Keep Google Translate to Pixel 5 as it's not really as
      used as the others.

    * We will try to bypass 2021 features and Raven
      props for non-Pixel 2021 devices as apps usage
      requires TPU.

    @neobuddy89:
    * Updated description to align with changes we made.
    * oriole and raven devices can add PIXEL_2021_EXPERIENCE xml
    * TODO: Skip PixelPropUtils for select pixel devices?

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8d65b4cd3ae65bb711ea7da5fafa3ecc92268769
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Feb 12 22:27:33 2022 +0530

    PixelPropsUtils: User toggle for GamesProp [1/2]

    * Disabled by default.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit c28564cec076e0ebc9ca84e5f832837668d12cc5
Author: spezi77 <spezi7713@gmx.net>
Date:   Mon Jan 31 01:02:38 2022 +0100

    PixelPropsUtils: User toggle for unlimited photos storage [1/2]

    @neobuddy89: Cleaned up.

    Squashed:
        From: Kuba Wojciechowski <nullbytepl@gmail.com>
        Date: Fri, 5 Nov 2021 01:52:51 +0300
        Subject: [PATCH] core: Blacklist P21 experience system feature from Google
         Photos

        We want to include the P21 experience flag to enable new features,
        however it seems like Google Photos uses it to decide whether to use the
        TPU tflite delegate. There doesn't seem to be any fallback so we need to
        make sure the feature is not exposed to the app so that a normal
        NNAPI/GPU delegate can be used instead.

        From: naveenjohnsonv <14140949+naveenjohnsonv@users.noreply.github.com>
        Date: Mon, 13 Dec 2021 07:16:55 +0000
        Subject: [PATCH] core: Blacklist P21 midyear, P20, P20 midyear experience
         system feature from Google Photos

        naveenjohnsonv: also blacklist PIXEL_2021_MIDYEAR_EXPERIENCE, PIXEL_2020_EXPERIENCE and PIXEL_2020_MIDYEAR_EXPERIENCE from Google Photos
        Along with crosshatch spoof for Google Photos using PixelPropUtils, this should enable Unlimited Original Quality Backup without needing to remove any XMLs

        From: kondors1995 <normandija1945@gmail.com>
        Date: Mon, 20 Dec 2021 16:53:46 +0000
        Subject: [PATCH] Core: Extend Pixel experience Blacklist For Google Photos

        Turns out having these brakes Original quality backups.
        Since these indicate that the device is pixel 4 with in the turn brakes device spoofing as OG pixel

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 50eeca3957d614362655a9846ba29c7d47319953
Author: Joey Huab <joey@evolution-x.org>
Date:   Thu Jan 27 13:33:48 2022 +0900

    PixelPropsUtils: Whitelist ARCore

    * ARCore crashes due to being spoofed as hardware and software mismatch is detected.
    * Crash occurs while being used in Google app search feature.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e3758d43036f5f38492d079bcaf2f249b9f88574
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:49:00 2022 +0530

    PixelPropsUtils: Bail out early when required

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit fdfe58f4c4ef89d5e5840daa137c31c75e732c7b
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Tue Jan 11 09:43:53 2022 +0530

    PixelPropsUtils: Extend list of packages to keep

    * It's better to not touch props for these packages at all,
      instead running loop over it.
    * Ref: AOSPA/android_frameworks_base@dc2940c

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e2ebc7e0d3e74bff76f1cdc56e958c1f07fd4c0b
Author: rdkng1 <richardraya39@gmail.com>
Date:   Sat Dec 11 05:17:22 2021 +0000

    PixelPropsUtils: Add GamesProps

      Based on PixelPropsUtils, GamesProps will spoof the device needed to unlock the FPS of the following games:
      * Free Fire - Spoof Asus ROG Phone 1 will unlock 90 FPS
      * COD Mobile - Spoof Xperia 5 || will unlock 120 FPS (only on multiplayer mode)
      * PUBG Mobile - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Wild Rift - Spoof OnePlus 8 Pro will unlock 120 FPS
      * Cyber Hunter - Spoof OnePlus 8 Pro will unlock 90 FPS
      * Fortnite - Spoof OnePlus 8 Pro will unlock 90 FPS

    @neobuddy89: Adapt GamesProps to existing PixelProps and update games list.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit e8353f537654f22b8236ab34d700c092049655cd
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Mon Jan 10 22:55:33 2022 +0530

    PixelPropsUtils: Consolidate google app checks

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 5079c980a5dc4ed220c4e92713d67785809f1212
Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sat Jan 8 18:35:43 2022 +0530

    PixelPropsUtils: Do not change props for play store

    * Else Play Protect certification fails.

    Test: Open Play Store > Settings > About
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

commit 8bd8e4d4741226075823e485b60dbe24a4fb5a73
Author: Danny Lin <danny@kdrag0n.dev>
Date:   Mon Oct 11 20:00:44 2021 -0700

    keystore: Block key attestation for SafetyNet

    SafetyNet (part of Google Play Services) opportunistically uses
    hardware-backed key attestation via KeyStore as a strong integrity
    check. This causes SafetyNet to fail on custom ROMs because the verified
    boot key and bootloader unlock state can be detected from attestation
    certificates.

    As a workaround, we can take advantage of the fact that SafetyNet's
    usage of key attestation is opportunistic (i.e. falls back to basic
    integrity checks if it fails) and prevent it from getting the
    attestation certificate chain from KeyStore. This is done by checking
    the stack for DroidGuard, which is the codename for SafetyNet, and
    pretending that the device doesn't support key attestation.

    Key attestation has only been blocked for SafetyNet specifically, as
    Google Play Services and other apps have many valid reasons to use it.
    For example, it appears to be involved in Google's mobile security key
    ferature.

    Change-Id: I5146439d47f42dc6231cb45c4dab9f61540056f6
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I2481b6789f33f4f2ec49637f545023bf7d34b7ca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
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 this pull request may close these issues.

None yet