mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-01-27 18:19:03 +00:00
Remount the pstore even if decryption fails so that if, by chance, something is there, we don't miss out on it. Bug: 37553996 Bug: 37554629 Test: booted taimen with and without keys, check properties and mount point Change-Id: I0e4821f807aee2b46748e14ad38410bd147f5516 Merged-In: I0e4821f807aee2b46748e14ad38410bd147f5516
23 lines
493 B
Bash
23 lines
493 B
Bash
#!/system/bin/sh
|
|
|
|
# Decrypt the keys and write them to the kernel
|
|
ramoops -D
|
|
|
|
if [ $? -eq 0 ]; then
|
|
# Pivot (and decrypt)
|
|
echo 1 > /sys/devices/virtual/ramoops/pstore/use_alt
|
|
else
|
|
setprop sys.ramoops.decryption.error $?
|
|
fi
|
|
|
|
# Trigger remount of pstore regardless of decryption state
|
|
setprop sys.ramoops.decrypted true
|
|
|
|
# Generate keys (if none exist), and load the keys to carveout
|
|
if [[ $(getprop ro.hardware) == "walleye" ]]; then
|
|
ramoops -g -l -c
|
|
else
|
|
ramoops -g -l
|
|
fi
|
|
|