Created
October 6, 2020 22:44
-
-
Save fredldotme/418db8d4035f340b7b45aa3b03b7f21c to your computer and use it in GitHub Desktop.
Mount encrypted pstore on Ubuntu Touch (sargo/bonito)
This file contains hidden or 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
#!/vendor/bin/sh | |
# Decrypt the keys and write them to the kernel | |
LD_LIBRARY_PATH=/vendor/lib64:/system/lib64:/android/system/lib64/vndk-28 /vendor/bin/ramoops -D | |
# Pivot (and decrypt) | |
echo 1 > /sys/devices/virtual/ramoops/pstore/use_alt | |
# Trigger remount of pstore regardless of decryption state | |
# setprop vendor.ramoops.decrypted true | |
# Generate keys (if none exist), and load the keys to carveout | |
LD_LIBRARY_PATH=/vendor/lib64:/system/lib64:/android/system/lib64/vndk-28 /vendor/bin/ramoops -g -l -c | |
umount /sys/fs/pstore | |
mount -t pstore pstore /sys/fs/pstore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment