Files
device_google_bonito/init.ramoops.sh
Chungjui Fan fba079d1dc b4s4: Add ramoops shell script to vendor
Bug: 116672107
Test: Build pass and boot sargo
Change-Id: I988794584814047b9528c2700df5ac4777f56a98
Signed-off-by: Chungjui Fan <chungjuifan@google.com>
2018-10-01 14:45:17 +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