Files
device_google_redbull/init.ramoops.sh
Jason Chiu 1f125615a8 redbull: Add ramoops shell script to vendor
Bug: 141911711
Test: Encrypt and decrypt ramoops successfully
Change-Id: I30732d63be7e2413394d3d0c70a3b42fbc37178c
Signed-off-by: Jason Chiu <jasoncschiu@google.com>
2020-02-17 18:27:12 +00:00

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