[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] j4nn:
So I've changed the patch in following way - logging it similarly as done elsewhere in the driver:

printk(KERN_INFO "myQSEE: app_id %d (%s)\n", data->client.app_id, data->client.app_name);

and changed the

pr_debug("App id %d (%s) already exists\n"

into pr_info.

It results with following log:

[ 112.263534] QSEECOM: qseecom_load_app: App (tzloader) does'nt exist, loading apps for first time
[ 112.297368] QSEECOM: qseecom_load_app: App with id 196611 (tzloader) now loaded
[ 115.075820] logd: logdr: UID=0 GID=0 PID=715 b tail=0 logMask=19 pid=0 start=0ns timeout=0ns
[ 175.268163] type=1400 audit(35298790.869:452): avc: denied { ioctl } for pid=709 comm="loader" path="/dev/qseecom" dev="tmpfs" ino=40984 ioctlcmd=970a scontext=u:r:shell:s0 tcontext=u:object_r:tmpfs:s0 tclass=chr_file permissive=1 ppid=1 pcomm="init" pgid=1 pgcomm="init"
[ 175.268180] type=1400 audit(35298853.869:453): avc: denied { sys_rawio } for pid=709 comm="loader" capability=17 scontext=u:r:shell:s0 tcontext=u:r:shell:s0 tclass=capability permissive=1 ppid=1 pcomm="init" pgid=1 pgcomm="init"
[ 175.286012] QSEECOM: qseecom_query_app_loaded: App id 131074 (tzxflattest) already exists
[ 175.286875] myQSEE: app_id 131074 (tzxflattest)
[ 175.286888] myQSEE req: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.286896] myQSEE req: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.286904] myQSEE req: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.286912] myQSEE req: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.286919] myQSEE rsp: 00000000: 00 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.286926] myQSEE rsp: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.286934] myQSEE rsp: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.286941] myQSEE rsp: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.289161] myQSEE REQ: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.289170] myQSEE REQ: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.289178] myQSEE REQ: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.289185] myQSEE REQ: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.289194] myQSEE RSP: << 00000000: fd ff ff ff 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.289203] myQSEE RSP: << 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.289211] myQSEE RSP: << 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.289219] myQSEE RSP: << 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.289225] myQSEE: patched returned code 0xfffffffd (-3) to 0
[ 175.289228] myQSEE: patched unlock status [0x08] to 2
[ 175.289231] myQSEE: patched secure status [0x0c] to 1
[ 175.289924] myQSEE: app_id 131074 (tzxflattest)
[ 175.289933] myQSEE req: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.289942] myQSEE req: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.289949] myQSEE req: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.289957] myQSEE req: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.289964] myQSEE rsp: 00000000: 00 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.289971] myQSEE rsp: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.289978] myQSEE rsp: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.289986] myQSEE rsp: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.290603] myQSEE REQ: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.290612] myQSEE REQ: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.290619] myQSEE REQ: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.290627] myQSEE REQ: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.290634] myQSEE RSP: << 00000000: fd ff ff ff 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.290641] myQSEE RSP: << 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.290648] myQSEE RSP: << 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.290655] myQSEE RSP: << 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.290660] myQSEE: patched returned code 0xfffffffd (-3) to 0
[ 175.290663] myQSEE: patched unlock status [0x08] to 2
[ 175.290666] myQSEE: patched secure status [0x0c] to 1
[ 175.290868] type=1400 audit(35298853.869:453): avc: denied { sys_rawio } for pid=709 comm="loader" capability=17 scontext=u:r:shell:s0 tcontext=u:r:shell:s0 tclass=capability permissive=1 ppid=1 pcomm="init" pgid=1 pgcomm="init"
[ 175.290879] type=1400 audit(35298853.899:454): avc: denied { ioctl } for pid=709 comm="loader" path="/dev/block/sda" dev="tmpfs" ino=39142 ioctlcmd=1268 scontext=u:r:shell:s0 tcontext=u:object_r:tmpfs:s0 tclass=blk_file permissive=1 ppid=1 pcomm="init" pgid=1 pgcomm="init"
[ 175.297716] myQSEE: app_id 131074 (tzxflattest)
[ 175.297732] myQSEE req: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.297740] myQSEE req: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.297748] myQSEE req: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.297755] myQSEE req: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.297763] myQSEE rsp: 00000000: 00 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.297770] myQSEE rsp: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.297778] myQSEE rsp: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.297785] myQSEE rsp: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.298761] myQSEE REQ: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.298771] myQSEE REQ: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.298778] myQSEE REQ: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.298786] myQSEE REQ: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.298794] myQSEE RSP: << 00000000: fd ff ff ff 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.298802] myQSEE RSP: << 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.298809] myQSEE RSP: << 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.298817] myQSEE RSP: << 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.298821] myQSEE: patched returned code 0xfffffffd (-3) to 0
[ 175.298825] myQSEE: patched unlock status [0x08] to 2
[ 175.298828] myQSEE: patched secure status [0x0c] to 1
[ 175.311233] myQSEE: app_id 131074 (tzxflattest)
[ 175.311248] myQSEE req: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.311256] myQSEE req: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.311263] myQSEE req: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.311270] myQSEE req: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.311278] myQSEE rsp: 00000000: 00 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.311285] myQSEE rsp: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.311292] myQSEE rsp: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.311300] myQSEE rsp: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.312256] myQSEE REQ: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.312265] myQSEE REQ: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.312273] myQSEE REQ: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.312280] myQSEE REQ: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.312288] myQSEE RSP: << 00000000: fd ff ff ff 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.312297] myQSEE RSP: << 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.312304] myQSEE RSP: << 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.312311] myQSEE RSP: << 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.312315] myQSEE: patched returned code 0xfffffffd (-3) to 0
[ 175.312318] myQSEE: patched unlock status [0x08] to 2
[ 175.312321] myQSEE: patched secure status [0x0c] to 1
[ 175.313810] type=1400 audit(35298853.899:454): avc: denied { ioctl } for pid=709 comm="loader" path="/dev/block/sda" dev="tmpfs" ino=39142 ioctlcmd=1268 scontext=u:r:shell:s0 tcontext=u:object_r:tmpfs:s0 tclass=blk_file permissive=1 ppid=1 pcomm="init" pgid=1 pgcomm="init"
[ 175.313820] type=1400 audit(35298853.919:455): avc: denied { append } for pid=709 comm="loader" path="/log.log" dev="tmpfs" ino=17556 scontext=u:r:shell:s0 tcontext=u:object_r:rootfs:s0 tclass=file permissive=1 ppid=1 pcomm="init" pgid=1 pgcomm="init"
[ 175.313931] type=1400 audit(35298853.919:455): avc: denied { append } for pid=709 comm="loader" path="/log.log" dev="tmpfs" ino=17556 scontext=u:r:shell:s0 tcontext=u:object_r:rootfs:s0 tclass=file permissive=1 ppid=1 pcomm="init" pgid=1 pgcomm="init"
[ 175.313939] type=1400 audit(35298853.919:456): avc: denied { getattr } for pid=709 comm="loader" path="/dev/null" dev="tmpfs" ino=38907 scontext=u:r:shell:s0 tcontext=u:object_r:tmpfs:s0 tclass=chr_file permissive=1 ppid=1 pcomm="init" pgid=1 pgcomm="init"
[ 175.314819] myQSEE: app_id 131074 (tzxflattest)
[ 175.314831] myQSEE req: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.314839] myQSEE req: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.314846] myQSEE req: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.314853] myQSEE req: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.314860] myQSEE rsp: 00000000: 00 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.314867] myQSEE rsp: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.314892] myQSEE rsp: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.314900] myQSEE rsp: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.316469] myQSEE REQ: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.316478] myQSEE REQ: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.316487] myQSEE REQ: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.316494] myQSEE REQ: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.316503] myQSEE RSP: << 00000000: fd ff ff ff 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.316510] myQSEE RSP: << 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.316518] myQSEE RSP: << 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.316525] myQSEE RSP: << 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.316529] myQSEE: patched returned code 0xfffffffd (-3) to 0
[ 175.316532] myQSEE: patched unlock status [0x08] to 2
[ 175.316535] myQSEE: patched secure status [0x0c] to 1
[ 175.324901] myQSEE: app_id 131074 (tzxflattest)
[ 175.324917] myQSEE req: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.324925] myQSEE req: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.324933] myQSEE req: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.324941] myQSEE req: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.324948] myQSEE rsp: 00000000: 00 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.324956] myQSEE rsp: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.324963] myQSEE rsp: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.324970] myQSEE rsp: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.325955] myQSEE REQ: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.325965] myQSEE REQ: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.325972] myQSEE REQ: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.325980] myQSEE REQ: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.325988] myQSEE RSP: << 00000000: fd ff ff ff 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.325996] myQSEE RSP: << 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.326003] myQSEE RSP: << 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.326011] myQSEE RSP: << 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.326015] myQSEE: patched returned code 0xfffffffd (-3) to 0
[ 175.326018] myQSEE: patched unlock status [0x08] to 2
[ 175.326021] myQSEE: patched secure status [0x0c] to 1
[ 175.328105] myQSEE: app_id 131074 (tzxflattest)
[ 175.328116] myQSEE req: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.328125] myQSEE req: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.328132] myQSEE req: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.328140] myQSEE req: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.328148] myQSEE rsp: 00000000: 00 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.328155] myQSEE rsp: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.328163] myQSEE rsp: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.328170] myQSEE rsp: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.329005] myQSEE REQ: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.329014] myQSEE REQ: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.329022] myQSEE REQ: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.329029] myQSEE REQ: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.329037] myQSEE RSP: << 00000000: fd ff ff ff 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.329044] myQSEE RSP: << 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.329052] myQSEE RSP: << 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.329059] myQSEE RSP: << 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.329063] myQSEE: patched returned code 0xfffffffd (-3) to 0
[ 175.329066] myQSEE: patched unlock status [0x08] to 2
[ 175.329069] myQSEE: patched secure status [0x0c] to 1
[ 175.337853] myQSEE: app_id 131074 (tzxflattest)
[ 175.337870] myQSEE req: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.337878] myQSEE req: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.337886] myQSEE req: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.337893] myQSEE req: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.337901] myQSEE rsp: 00000000: 00 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.337910] myQSEE rsp: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.337917] myQSEE rsp: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.337925] myQSEE rsp: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.338888] myQSEE REQ: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.338898] myQSEE REQ: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.338906] myQSEE REQ: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.338914] myQSEE REQ: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.338922] myQSEE RSP: << 00000000: fd ff ff ff 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.338930] myQSEE RSP: << 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.338938] myQSEE RSP: << 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.338945] myQSEE RSP: << 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.338949] myQSEE: patched returned code 0xfffffffd (-3) to 0
[ 175.338952] myQSEE: patched unlock status [0x08] to 2
[ 175.338955] myQSEE: patched secure status [0x0c] to 1
[ 175.341094] myQSEE: app_id 131074 (tzxflattest)
[ 175.341107] myQSEE req: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.341115] myQSEE req: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.341123] myQSEE req: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.341130] myQSEE req: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.341138] myQSEE rsp: 00000000: 00 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.341146] myQSEE rsp: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.341153] myQSEE rsp: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.341160] myQSEE rsp: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.342046] myQSEE REQ: 00000000: 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
[ 175.342054] myQSEE REQ: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.342061] myQSEE REQ: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.342070] myQSEE REQ: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.342078] myQSEE RSP: << 00000000: fd ff ff ff 05 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.342085] myQSEE RSP: << 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.342092] myQSEE RSP: << 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.342099] myQSEE RSP: << 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 175.342104] myQSEE: patched returned code 0xfffffffd (-3) to 0
[ 175.342107] myQSEE: patched unlock status [0x08] to 2
[ 175.342110] myQSEE: patched secure status [0x0c] to 1
[ 175.343582] type=1400 audit(35298853.919:456): avc: denied { getattr } for pid=709 comm="loader" path="/dev/null" dev="tmpfs" ino=38907 scontext=u:r:shell:s0 tcontext=u:object_r:tmpfs:s0 tclass=chr_file permissive=1 ppid=1 pcomm="init" pgid=1 pgcomm="init"
[ 175.343593] type=1400 audit(35298853.949:457): avc: denied { read write } for pid=709 comm="loader" name="bcdUSB" dev="configfs" ino=2182 scontext=u:r:shell:s0 tcontext=u:object_r:configfs:s0 tclass=file permissive=1 ppid=1 pcomm="init" pgid=1 pgcomm="init"
[ 175.343734] type=1400 audit(35298853.949:457): avc: denied { read write } for pid=709 comm="loader" name="bcdUSB" dev="configfs" ino=2182 scontext=u:r:shell:s0 tcontext=u:object_r:configfs:s0 tclass=file permissive=1 ppid=1 pcomm="init" pgid=1 pgcomm="init"
[ 175.343744] type=1400 audit(35298853.949:458): avc: denied { open } for pid=709 comm="loader" path="/config/usb_gadget/g1/bcdUSB" dev="configfs" ino=2182 scontext=u:r:shell:s0 tcontext=u:object_r:configfs:s0 tclass=file permissive=1 ppid=1 pcomm="init" pgid=1 pgcomm="init"

The api is simply called multiple times. The applet clearly exists there and it is not tried to be loaded multiple times.

In my opinion it has been loaded already from bootloader - the lilo/loader loads only the 'tzloader' applet.

But we do not trigger the lilo/loader to actually use the 'tzloader' applet.

In my opinion we have the case that the called qseecom api does not work in normal (or recovery) boot mode, while it must work in xfl (flash/service) mode.

This is why I think xfl may get other api for use not normally available. The question is, what could be reached through such api.

It may not concern only the 'tzxflattest' applet, most likely it concerns at least the 'tzloader' too.

The kernel logs shown - they may serve as a starting point for analysis what gets called in those applets.

[MENTION=7543898]Blu-eyes[/MENTION], thanks a lot for that diaphora scripting - just tested it (needed only a few minor syntax fixes, probably because of some python incompatibility /flush=True/) and it worked great - not needed to start ida gui at all to create initial analysis and do diaphora comparison, that's just perfect!