-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
s5: Add ramoops shell script to vendor
Bug: 147082732 Test: Encrypt and decrypt ramoops successfully Change-Id: Ie7caf943e3e1ff3db664d6b14c06b93a7700f0ae Signed-off-by: achigoliu <[email protected]>
- Loading branch information
achigoliu
committed
Jan 15, 2020
1 parent
100c702
commit 70ba42a
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/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 | ||
|