mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-01-27 13:09:40 +00:00
Put the inir.ramoops.sh to /vendor/bin/ The ramoops run commands are recorded in init.ramoops.rc individually Bug: 113147446 Test: Build pass and test on walleye and taimen can generate ramoops successfully. Change-Id: I370cdfc36d7031a7f695abc2045ff756066d1902 Signed-off-by: Chungjui Fan <chungjuifan@google.com>
23 lines
499 B
Bash
23 lines
499 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
|
|
if [[ $(getprop ro.hardware) == "walleye" ]]; then
|
|
ramoops -g -l -c
|
|
else
|
|
ramoops -g -l
|
|
fi
|
|
|