Files
device_google_wahoo/init.ramoops.sh
Patrick Tjin 7aefe5c13d Add ramoops decryption [DO NOT MERGE]
Bug: 37554629
Bug: 37553996
Test: Walleye/Taimen able to decrypt ramoops
Change-Id: I834460a0d8dc878aef511ebac47335eb30e53980
(cherry picked from commit 6f19c56092)
2017-07-28 05:57:25 +00:00

21 lines
455 B
Bash

#!/system/bin/sh
# Decrypt the keys and write them to the kernel
ramoops -D
if [ $? -eq 0 ]; then
# Pivot (and decrypt) and remount pstore
echo 1 > /sys/devices/virtual/ramoops/pstore/use_alt
setprop sys.ramoops.decrypted true
else
setprop sys.ramoops.decrypted Error-$?
fi
# 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