chiteroman / Reprogram-TEE-on-Qualcomm-devices
- четверг, 4 января 2024 г. в 00:00:07
Guide to reprogram the TEE on Qualcomm devices to fix lost attestation keys
Guide to reprogram the TEE on Qualcomm devices to fix lost attestation keys.
If you are here it is because your phone has lost the TEE attestation keys, possibly due to flashing the persist partition of your phone.
If opening Key Attestation Demo does not give you any error, do NOT follow this guide.
If you want to pass the Strong verdict from Play Integrity you could, but that is not the purpose of this guide and I will NOT provide instructions for that.
adb root
adb disable-verity
adb reboot
adb root
adb remount
adb shell mkdir –p /data/nativetest64/qti_keymaster_tests/
adb push keybox.xml /data/nativetest64/qti_keymaster_tests/
adb shell
cd /data/nativetest64/qti_keymaster_tests/
LD_LIBRARY_PATH=/vendor/lib64/hw KmInstallKeybox {KEYBOX FILE} {KEYBOX DEVICE ID} {ATTEST PROPS?}
{KEYBOX FILE}: Should be "keybox.xml"
{KEYBOX DEVICE ID}: Open keybox file and search for "DeviceID", repo keybox uses "X705F100000000"
{ATTEST PROPS?}: Boolean, should be true/false, I recommend setting it as false always, not all TEE support this.
So, for the keybox in the repo you must run:
LD_LIBRARY_PATH=/vendor/lib64/hw KmInstallKeybox keybox.xml X705F100000000 false