Erase LG V20 Disk Encryption Key
In a LG V20, Full-Disk Encryption (FDE) makes use of Secure Execution Environment (SEE, by Qualcomm). The password/pin you provide to Android will be used to unlock encryption key stored in SEE.
When Lineage OS (as of 17.1) encrypts an unencrypted disk, it tries to set up SEE with your password/pin. If SEE was already previously set up with an old password/pin at that time, it will reject the attempt by Lineage OS to set up a new one. This drops your phone into a boot-loop because Lineage OS is not able to make use of SEE for FDE.
If you erase the current key from SEE then SEE will accept a new setup from Lineage OS.
How to erase FDE encryption key from SEE:
- Root - use magisk
- Download the attached binary executable into your phone.
- Do adb shell
- Become root: su
- move theĀ mymod file into /sbin
- chmod +x /sbin/mymod
- Run: /sbin/mymod
You can check whether it has successful removed the old key material by looking at logcat for lines starting with "mymod". Indication of a 0 status means successful.
After running mymod and successfully removing the pre-existing encryption key from SEE, you can immediately ask Lineage OS to do FDE.