commit | 2c821a8c0a4fbaa6c7061282e5fc8b5b53e9b45a | [log] [tgz] |
---|---|---|
author | nijel8 <nijel8@gmail.com> | Sat Dec 29 04:56:41 2018 -0500 |
committer | nijel8 <nijel8@gmail.com> | Fri Feb 01 21:36:23 2019 -0500 |
tree | 8c90a6419398b1da04d45b9fde4269ded53ed91a | |
parent | c757a6647764a4cf5b308a353c09c2bc38733589 [diff] |
vold_decrypt: Add android 9.0 support * build modified vdc_pie binary with 'checkpw' command support if building with Android 9.0 platform. That command and others we don't care about, are removed from Pie vdc. Our vdc_pie will run if system sdk version is > 27, otherwise system vdc is used. Code adapted from Android 9.0 system/vold/vdc. * include prebuilt vdc_pie(arm, arm64) binary if building with lower than Android 9.0 platform - vdc_pie cannot be build from source with those platforms without additional imports from Android 9.0 * skip vdc "getpwtype" command for Pie - vds communicates with vold directly, no need for connection retries first * add /system/bin/servicemanager to required services * mount per-devive additional partitions needed for decryption listed with device BoardConfig.mk TW_CRYPTO_SYSTEM_VOLD_MOUNT flag like(space separated): TW_CRYPTO_SYSTEM_VOLD_MOUNT := vendor cust odm * add function to backup crypto footer before running vdc commands and restore it after - on Xiaomi Mi Max 3 both Oreo and Pie stock roms vold alters cripto footer when decrypting data in recovery which causes system to ask for crypto password at next reboot although password stays unchanged. Crypto footer backup/restore added as workaround for systems whit ro.build.version.sdk > 25. Also to preserve crypto footer integrity decryption attempts are skipped if footer backup fails to ensure no data loss. Code adapted from https://gerrit.omnirom.org/#/c/android_bootable_recovery/+/31206/ Change-Id: I0a383f3843578fa55595cfea3b7c9c4431646a1a
Team Win Recovery Project (TWRP)
You can find a compiling guide here.