Files
device_google_sunfish/init.ramoops.sh
achigoliu 70ba42a943 s5: Add ramoops shell script to vendor
Bug: 147082732
Test: Encrypt and decrypt ramoops successfully
Change-Id: Ie7caf943e3e1ff3db664d6b14c06b93a7700f0ae
Signed-off-by: achigoliu <achigoliu@google.com>
2020-01-15 21:34:57 +08:00

19 lines
418 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