Created
October 2, 2019 16:10
-
-
Save jfogarty/d986dff1184399d67f912da34baa71a5 to your computer and use it in GitHub Desktop.
Recover a file from extended RAM under a hypervisor guest OS
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
function chr() { | |
printf \\$(printf '%03o' $((16#$1)) ) | |
} | |
addr=$((16#302100000)) | |
cx=$(devmem $addr w) | |
c=$((16#${cx:2})) | |
echo "- The file size is $c bytes." | |
a=$((addr + 4)) | |
for (( i=0; i<$c; i++)) ; do | |
ch=$(devmem $((a + i)) b) | |
chr ${ch:2} >> AID_OPC.xml | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment