Skip to content

Commit

Permalink
ramoops: remount pstore even if decryption fails
Browse files Browse the repository at this point in the history
Remount the pstore even if decryption fails so that if,
by chance, something is there, we don't miss out on it.

Bug: 37553996
Bug: 37554629
Change-Id: I0e4821f807aee2b46748e14ad38410bd147f5516
  • Loading branch information
pattjin committed Aug 1, 2017
1 parent da5d245 commit 7f78b25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions init.ramoops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
ramoops -D

if [ $? -eq 0 ]; then
# Pivot (and decrypt) and remount pstore
# Pivot (and decrypt)
echo 1 > /sys/devices/virtual/ramoops/pstore/use_alt
setprop sys.ramoops.decrypted true
else
setprop sys.ramoops.decrypted Error-$?
setprop sys.ramoops.decryption.error $?
fi

# Trigger remount of pstore regardless of decryption state
setprop sys.ramoops.decrypted true

# Generate keys (if none exist), and load the keys to carveout
if [[ $(getprop ro.hardware) == "walleye" ]]; then
ramoops -g -l -c
Expand Down
2 changes: 1 addition & 1 deletion sepolicy/private/property_contexts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sys.ramoops.decrypted u:object_r:ramoops_prop:s0
sys.ramoops. u:object_r:ramoops_prop:s0

0 comments on commit 7f78b25

Please sign in to comment.