Skip to content

Instantly share code, notes, and snippets.

@fredldotme
Created October 6, 2020 22:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fredldotme/418db8d4035f340b7b45aa3b03b7f21c to your computer and use it in GitHub Desktop.
Save fredldotme/418db8d4035f340b7b45aa3b03b7f21c to your computer and use it in GitHub Desktop.
Mount encrypted pstore on Ubuntu Touch (sargo/bonito)
#!/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