[Magisk] badabing2003:
I can confirm that I get a similar behavior with Pixel 5

The patch works, however Integrity check fails

I have tried with the default classes.dex (which has sailfish print) as well as built my own from the linked commit of FrameworkPatch using unbanned print different from Sailfish.

Same effect.

Maybe the logs reveal something, it sounds like PIF part of the FrameworkPatch is not working, perhaps @chiteroman can shed some light.

- Copying zip to temp directory
- Installing FrameworkPatcherGO-v1.0.1-mod.zip
Getting: busybox
Getting: bash
Getting: bin
Getting: core
------------Device INFO------------
API=34
ABI=arm
ABILONG=arm64-v8a
PROC=redfin
arch=arm64
arch32=arm
max_arch=arm64
is64bit=true
chipname=snapdragon
status=Enforcing
encrypted=true
slot=_b
dynamic_partitions=true
virtual_partitions=true
free_root=0
free_system=0
free_vendor=0
------------Setup INFO------------
CUSTOM_SETUP=0
TMP=/dev/tmp6900
di_version=4.8-b
main_version=4.8
----------------------------------

Currently using: "/dev/tmp6900/ugu/unzip" binary
No possible changes found for: "unzip" binary

---------Installer Configs----------
devices=off
apex_mount=off
magisk_support=on
ensure_root=on
import_addons=off
extraction_speed=default
permissions=0:0:0755:0644
-----------------------------------
ZIP: Cant find folder [META-INF/addons]
/data/adb/magisk/util_functions.sh: line 35: ui_print: readonly function
/data/adb/magisk/util_functions.sh: line 39: toupper: readonly function
/data/adb/magisk/util_functions.sh: line 46: grep_cmdline: readonly function
/data/adb/magisk/util_functions.sh: line 54: grep_prop: readonly function
/data/adb/magisk/util_functions.sh: line 78: is_mounted: readonly function
/data/adb/magisk/util_functions.sh: line 86: abort: readonly function
/data/adb/magisk/util_functions.sh: line 244: find_block: readonly function
/data/adb/magisk/util_functions.sh: line 599: set_perm: readonly function
/data/adb/magisk/util_functions.sh: line 608: set_perm_recursive: readonly function
/data/adb/magisk/util_functions.sh: line 741: TMPDIR: readonly variable
----------------Running SCRIPTs------------
- Current boot slot: _b
- Device is system-as-root
----------------------------------------
>>> Powered by Magisk 27001
----------------------------------------

- Setting common permissions/contexts

set_context: u:object_r:system_file:s0 in /data/adb/modules_update/FrameworkPatcherGo
set_context: u:object_r:system_file:s0 in /data/adb/modules_update/FrameworkPatcherGo/dex
set_context: u:object_r:system_file:s0 in /data/adb/modules_update/FrameworkPatcherGo/customize.sh
set_context: u:object_r:system_file:s0 in /data/adb/modules_update/FrameworkPatcherGo/dex/classes.dex
set_context: u:object_r:system_file:s0 in /data/adb/modules_update/FrameworkPatcherGo/dex/Paste FrameworkPatch classes.dex here
set_context: u:object_r:system_file:s0 in /data/adb/modules_update/FrameworkPatcherGo/func.sh
set_context: u:object_r:system_file:s0 in /data/adb/modules_update/FrameworkPatcherGo/module.prop
- Installing from Magisk app

******************************
> Pre-installation check ...
******************************
[ OK ] Checking for existing Framework Patcher GO module.
[ OK ] Checking for deodexed /system/framework/framework.jar.
[ OK ] Checking for required classes.dex file.

******************************
> Decompiling framework.jar ...
******************************
I: Using Apktool 2.7.0 on framework.jar
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Baksmaling classes3.dex...
I: Baksmaling classes4.dex...
I: Baksmaling classes5.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

File found: /dev/tmp6900/framework/smali_classes3/android/security/keystore2/AndroidKeyStoreSpi.smali

******************************
> Patching AndroidKeyStoreSpi.smali file...
******************************

Method found: .method public whitelist test-api engineGetCertificateChain(Ljava/lang/String;)[Ljava/security/cert/Certificate;

--------------------
Patching engineGetCertificateChain method:

invoke-static {v3}, Lcom/android/internal/util/framework/Android;->engineGetCertificateChain([Ljava/security/cert/Certificate;)[Ljava/security/cert/Certificate;

move-result-object v3

added.
Edited: "/dev/tmp6900/framework/smali_classes3/android/security/keystore2/AndroidKeyStoreSpi.smali"
--------------------

File found: /dev/tmp6900/framework/smali/android/app/Instrumentation.smali

******************************
> Patching Instrumentation.smali file ...
******************************

Method found: .method public static whitelist newApplication(Ljava/lang/Class;Landroid/content/Context;)Landroid/app/Application;

--------------------
Patching newApplication static method:

invoke-static {p1}, Lcom/android/internal/util/framework/Android;->newApplication(Landroid/content/Context;)V

added.
Edited: "/dev/tmp6900/framework/smali/android/app/Instrumentation.smali"
--------------------

Method found: .method public whitelist newApplication(Ljava/lang/ClassLoader;Ljava/lang/String;Landroid/content/Context;)Landroid/app/Application;

--------------------
Patching newApplication method:

invoke-static {p3}, Lcom/android/internal/util/framework/Android;->newApplication(Landroid/content/Context;)V

added.
Edited: "/dev/tmp6900/framework/smali/android/app/Instrumentation.smali"
--------------------

File found: /dev/tmp6900/framework/smali/android/app/ApplicationPackageManager.smali

******************************
> Patching ApplicationPackageManager.smali file ...
******************************
It is optional but recommended to patch this file if your device has StrongBox or app attestation key support.
Do you want to patch this file?
- YES [Press volume UP]
- NO [Press volume DOWN]

Method found: .method public whitelist hasSystemFeature(Ljava/lang/String;)Z

--------------------
Patching hasSystemFeature method:

invoke-static {v0, p1}, Lcom/android/internal/util/framework/Android;->hasSystemFeature(ZLjava/lang/String;)Z

move-result v0

added.
Edited: "/dev/tmp6900/framework/smali/android/app/ApplicationPackageManager.smali"
--------------------

******************************
> Recompiling framework.jar ...
******************************
This may take a while, please wait.
-c/--copy-original has been deprecated. Removal planned for v3.0.0 (#2129)
I: Using Apktool 2.7.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes5 folder into classes5.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes4 folder into classes4.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes3 folder into classes3.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
W: Could not find resources
I: Copy original files...
I: Copy META-INF...
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk into: /dev/tmp6900/framework-patched.jar

******************************
> Setting up FrameworkPatch ...
******************************
5 dex files found in framework.jar
FrameworkPatch's compiled classes.dex renamed to classes6.dex and patched to framework.jar
Optimising framework.jar with zipalign
Cleaning boot-framework files ...
Some final touches ...

FrameworkPatch set up successfully!

rmdir: '/data/adb/modules_update/FrameworkPatcherGo': Directory not empty
-------------------------------------------

06-10 12:02:42.322 2282 3714 D ActivityManager: sync unfroze 7867 com.google.android.gms.unstable for 6
06-10 12:02:42.326 646 646 W keystore2: system/security/keystore2/src/remote_provisioning.rs:102 - Error occurred: system/security/keystore2/src/rkpd_client.rs:226: Trying to get to IRegistration service.
06-10 12:02:42.326 646 646 W keystore2:
06-10 12:02:42.326 646 646 W keystore2: Caused by:
06-10 12:02:42.326 646 646 W keystore2: 0: system/security/keystore2/src/rkpd_client.rs:120: Trying to get IRPC name.
06-10 12:02:42.326 646 646 W keystore2: 1: system/security/keystore2/src/globals.rs:440
06-10 12:02:42.326 646 646 W keystore2: 2: Error::Km(r#HARDWARE_TYPE_UNAVAILABLE)
06-10 12:02:42.331 608 617 D DrmLibTime: got the req here! ret=0
06-10 12:02:42.331 608 617 D DrmLibTime: command id, time_cmd_id = 770
06-10 12:02:42.331 608 617 D DrmLibTime: time_getutcsec starts!
06-10 12:02:42.331 608 617 D DrmLibTime: QSEE Time Listener: time_getutcsec
06-10 12:02:42.331 608 617 D DrmLibTime: QSEE Time Listener: get_utc_seconds
06-10 12:02:42.331 608 617 D DrmLibTime: QSEE Time Listener: time_get_modem_time
06-10 12:02:42.331 608 617 D DrmLibTime: QSEE Time Listener: Checking if ATS_MODEM is set or not.
06-10 12:02:42.331 608 617 D QC-time-services: Lib:time_genoff_operation: pargs->base = 13
06-10 12:02:42.331 608 617 D QC-time-services: Lib:time_genoff_operation: pargs->operation = 2
06-10 12:02:42.331 608 617 D QC-time-services: Lib:time_genoff_operation: pargs->ts_val = 0
06-10 12:02:42.331 608 617 D QC-time-services: Lib:time_genoff_operation: Send to server passed!!
06-10 12:02:42.331 1025 1213 D QC-time-services: Daemon: Connection accepted:time_genoff
06-10 12:02:42.331 1025 9248 D QC-time-services: Daemon:Received base = 13, unit = 1, operation = 2,value = 0
06-10 12:02:42.331 1025 9248 D QC-time-services: Daemon:genoff_opr: Base = 13, val = 0, operation = 2
06-10 12:02:42.331 1025 9248 D QC-time-services: offset is: 0 for base: 13
06-10 12:02:42.331 608 617 E QC-time-services: Receive Passed == base = 13, unit = 1, operation = 2, result = 0
06-10 12:02:42.331 608 617 D DrmLibTime: QSEE Time Listener: ATS_MODEM is not set. Fallback to Android system time.
06-10 12:02:42.331 608 617 D DrmLibTime: QSEE Time Listener: Retrieved Android system time: 1718035362
06-10 12:02:42.331 608 617 D DrmLibTime: time_getutcsec returns 0, sec = 1718035362; nsec = 0
06-10 12:02:42.331 608 617 D DrmLibTime: time_getutcsec finished!
06-10 12:02:42.332 608 617 D DrmLibTime: iotcl_continue_command finished! and return 0
06-10 12:02:42.332 608 617 D DrmLibTime: before calling ioctl to read the next time_cmd
06-10 12:02:42.336 1025 1213 E QC-time-services: Daemon: Time-services: Waiting to acceptconnection
06-10 12:02:42.425 5910 9213 I Finsky:background: [401] tlh.call(374): Integrity key attestation record generated successfully.
06-10 12:02:42.439 646 646 W keystore2: system/security/keystore2/src/remote_provisioning.rs:102 - Error occurred: system/security/keystore2/src/rkpd_client.rs:226: Trying to get to IRegistration service.
06-10 12:02:42.439 646 646 W keystore2:
06-10 12:02:42.439 646 646 W keystore2: Caused by:
06-10 12:02:42.439 646 646 W keystore2: 0: system/security/keystore2/src/rkpd_client.rs:120: Trying to get IRPC name.
06-10 12:02:42.439 646 646 W keystore2: 1: system/security/keystore2/src/globals.rs:440
06-10 12:02:42.439 646 646 W keystore2: 2: Error::Km(r#HARDWARE_TYPE_UNAVAILABLE)
06-10 12:02:42.442 608 617 D DrmLibTime: got the req here! ret=0
06-10 12:02:42.442 608 617 D DrmLibTime: command id, time_cmd_id = 770
06-10 12:02:42.442 608 617 D DrmLibTime: time_getutcsec starts!
06-10 12:02:42.442 608 617 D DrmLibTime: QSEE Time Listener: time_getutcsec
06-10 12:02:42.442 608 617 D DrmLibTime: QSEE Time Listener: get_utc_seconds
06-10 12:02:42.442 608 617 D DrmLibTime: QSEE Time Listener: time_get_modem_time
06-10 12:02:42.442 608 617 D DrmLibTime: QSEE Time Listener: Checking if ATS_MODEM is set or not.
06-10 12:02:42.442 608 617 D QC-time-services: Lib:time_genoff_operation: pargs->base = 13
06-10 12:02:42.442 608 617 D QC-time-services: Lib:time_genoff_operation: pargs->operation = 2
06-10 12:02:42.442 608 617 D QC-time-services: Lib:time_genoff_operation: pargs->ts_val = 0
06-10 12:02:42.442 608 617 D QC-time-services: Lib:time_genoff_operation: Send to server passed!!
06-10 12:02:42.442 1025 1213 D QC-time-services: Daemon: Connection accepted:time_genoff
06-10 12:02:42.442 1025 9250 D QC-time-services: Daemon:Received base = 13, unit = 1, operation = 2,value = 0
06-10 12:02:42.442 1025 9250 D QC-time-services: Daemon:genoff_opr: Base = 13, val = 0, operation = 2
06-10 12:02:42.442 1025 9250 D QC-time-services: offset is: 0 for base: 13
06-10 12:02:42.443 608 617 E QC-time-services: Receive Passed == base = 13, unit = 1, operation = 2, result = 0
06-10 12:02:42.443 608 617 D DrmLibTime: QSEE Time Listener: ATS_MODEM is not set. Fallback to Android system time.
06-10 12:02:42.443 608 617 D DrmLibTime: QSEE Time Listener: Retrieved Android system time: 1718035362
06-10 12:02:42.443 608 617 D DrmLibTime: time_getutcsec returns 0, sec = 1718035362; nsec = 0
06-10 12:02:42.443 608 617 D DrmLibTime: time_getutcsec finished!
06-10 12:02:42.443 608 617 D DrmLibTime: iotcl_continue_command finished! and return 0
06-10 12:02:42.443 608 617 D DrmLibTime: before calling ioctl to read the next time_cmd
06-10 12:02:42.443 1025 1213 E QC-time-services: Daemon: Time-services: Waiting to acceptconnection
06-10 12:02:42.612 7867 7910 I AdrenoGLES-0: QUALCOMM build : REDACTED
06-10 12:02:42.612 7867 7910 I AdrenoGLES-0: Build Date : 11/30/20
06-10 12:02:42.612 7867 7910 I AdrenoGLES-0: OpenGL ES Shader Compiler Version: EV031.31.04.01
06-10 12:02:42.612 7867 7910 I AdrenoGLES-0: Local Branch : QPR2
06-10 12:02:42.612 7867 7910 I AdrenoGLES-0: Remote Branch :
06-10 12:02:42.612 7867 7910 I AdrenoGLES-0: Remote Branch :
06-10 12:02:42.612 7867 7910 I AdrenoGLES-0: Reconstruct Branch :
06-10 12:02:42.612 7867 7910 I AdrenoGLES-0: Build Config : S P 10.0.4 AArch64
06-10 12:02:42.612 7867 7910 I AdrenoGLES-0: Driver Path : /vendor/lib64/egl/libGLESv2_adreno.so
06-10 12:02:42.619 7867 7910 I AdrenoGLES-0: PFP: 0x016dd093, ME: 0x00000000
06-10 12:02:43.410 5910 5910 I Finsky:background: [2] tmc.c(9): requestIntegrityToken() finished for com.henrikherzig.playintegritychecker.
06-10 12:02:43.417 9157 9177 I PlayCore: UID: [10260] PID: [9157] OnRequestIntegrityTokenCallback : onRequestIntegrityToken
06-10 12:02:43.417 9157 9212 I PlayCore: UID: [10260] PID: [9157] IntegrityService : Unbind from service.
06-10 12:02:43.420 9157 9157 I System.out: {
06-10 12:02:43.420 9157 9157 I System.out: "requestDetails": {
06-10 12:02:43.420 9157 9157 I System.out: "requestPackageName": "com.henrikherzig.playintegritychecker",
06-10 12:02:43.420 9157 9157 I System.out: "timestampMillis": "REDACTED",
06-10 12:02:43.420 9157 9157 I System.out: "nonce": "REDACTED"
06-10 12:02:43.420 9157 9157 I System.out: },
06-10 12:02:43.420 9157 9157 I System.out: "appIntegrity": {
06-10 12:02:43.420 9157 9157 I System.out: "appRecognitionVerdict": "UNEVALUATED"
06-10 12:02:43.420 9157 9157 I System.out: },
06-10 12:02:43.420 9157 9157 I System.out: "deviceIntegrity": {
06-10 12:02:43.420 9157 9157 I System.out: "recentDeviceActivity": {
06-10 12:02:43.420 9157 9157 I System.out: "deviceActivityLevel": "UNEVALUATED"
06-10 12:02:43.420 9157 9157 I System.out: }
06-10 12:02:43.420 9157 9157 I System.out: },
06-10 12:02:43.420 9157 9157 I System.out: "accountDetails": {
06-10 12:02:43.420 9157 9157 I System.out: "appLicensingVerdict": "UNEVALUATED"
06-10 12:02:43.420 9157 9157 I System.out: },
06-10 12:02:43.420 9157 9157 I System.out: "environmentDetails": {
06-10 12:02:43.420 9157 9157 I System.out: "playProtectVerdict": "UNEVALUATED"
06-10 12:02:43.420 9157 9157 I System.out: }
06-10 12:02:43.420 9157 9157 I System.out: }