mirror of
https://github.com/Evolution-X-Devices/device_google_redbull
synced 2026-02-01 09:20:23 +00:00
Bug: 141911711 Test: Encrypt and decrypt ramoops successfully Change-Id: I30732d63be7e2413394d3d0c70a3b42fbc37178c Signed-off-by: Jason Chiu <jasoncschiu@google.com>
18 lines
417 B
Bash
18 lines
417 B
Bash
#!/vendor/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 vendor.ramoops.decryption.error $?
|
|
fi
|
|
|
|
# Trigger remount of pstore regardless of decryption state
|
|
setprop vendor.ramoops.decrypted true
|
|
|
|
# Generate keys (if none exist), and load the keys to carveout
|
|
ramoops -g -l -c
|