Coder Social home page Coder Social logo

qinxiao122 / reprogram-tee-on-qualcomm-devices Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chiteroman/reprogram-tee-on-qualcomm-devices

0.0 0.0 0.0 28 KB

Guide to reprogram the TEE on Qualcomm devices to fix lost attestation keys

License: The Unlicense

reprogram-tee-on-qualcomm-devices's Introduction

Reprogram TEE on Qualcomm devices

Guide to reprogram the TEE on Qualcomm devices to fix lost attestation keys.

Why?

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.

This guide will NOT provide instructions for passing Strong verdict.

WARNINGS:

  • Your data will be lost, so backup your phone data first.
  • The original keys that your phone may include in the TEE will be lost.
  • I am not responsible for any other problems that may arise, these instructions are made on a POCO X3 Pro (vayu) and work perfectly, they may not work as they should on other phones.

You will need:

  • A working brain.
  • A working computer.
  • An unlocked bootloader.
  • BASIC KNOWLEDGE OF LINUX.
  • A valid keybox.xml file, you can use this one in the repo.
  • The engineering ROM for your device.

Instructions:

  1. Flash engineering ROM.
  2. Phone must be connected to PC, then execute this commands IN ORDER:

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/

For non StrongBox devices:

adb shell LD_LIBRARY_PATH=/vendor/lib64/hw KmInstallKeybox /data/nativetest64/qti_keymaster_tests/{KEYBOX FILE} {KEYBOX DEVICE ID} {ATTEST PROPS?}

For StrongBox devices:

adb shell LD_LIBRARY_PATH=/vendor/lib64/hw KmInstallKeybox /data/nativetest64/qti_keymaster_tests/{KEYBOX FILE} {KEYBOX DEVICE ID} {ATTEST PROPS?} {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 "0"

{ATTEST PROPS?}: Boolean, should be true/false, I recommend setting it as true always. If it gives any error use false.

So, for the keybox in the repo you must run:

adb shell LD_LIBRARY_PATH=/vendor/lib64/hw KmInstallKeybox /data/nativetest64/qti_keymaster_tests/keybox.xml 0 true

If your device has StrongBox:

adb shell LD_LIBRARY_PATH=/vendor/lib64/hw KmInstallKeybox /data/nativetest64/qti_keymaster_tests/keybox.xml 0 true keybox.xml 0 true

reprogram-tee-on-qualcomm-devices's People

Contributors

cani1see avatar chiteroman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.