PS Vita Magic-reader

Made this script in about 10min. It extract the Magic ASCII, PUP Version and License.xml from a VITA PUP here is the script.
Right now the script is stupid and doesn’t do much, I plan on adding a full PUP dump and a SFO/PSF dumper. 🙂


# PsDev 2012. this script extract the PUP magic.

#Edit from PsiColio

#Will be adding on more stuff for it to extract in time…

# File names to extract from the PUP

Extract=( “Magic” “PUP_Version” “license.xml” )

#length starting from the offset and it ending in the offsets total length

length=( 0x8 0x10 0x724B4) #how many long the file is how much to copy, for example the Magic starts at 0x0 and the length is 0x8 bytes.

#offset of the Magic, Version and License

offset=( 0x0 0x9FF 0xC00 ) #where the file dump begins in the hex.


printf “____________________________\n”

printf ” PsDev \n”

printf ” PUP READER \n”

printf “____________________________ \n\n”

for file in “${Extract[@]}” #tells it for a file look in Extract = the the file names


printf “____________________________ \n”

printf ” %s\n” “${file}” #file name

printf “____________________________ \n”

printf “offset= %s\n” “${offset[$cont]}” #tells offset of file

printf “length= %s\n” “${length[$cont]}” #tells total offset length of file

printf “%s\n” “${cont}”

dd if=$1 of=$file bs=1 obs=1 skip=$((${offset[$cont]})) count=$((${length[$cont]}))

cont=$(($cont+1)) # make sure the usage is “./ PSP2UPDAT.PUP”


I added a lot of comments to it, just to make it more clear on what’s going on. Also added a offset and length teller for the hex and then the rest of the edit of course

How to:
Make a new file named “”

\Run “chmod +x” to give to execution permissions

Now in terminal run it. “./ PSP2UPDAT.PUP” It will output the three files in the folder/location the scripts located in.

Example out Terminal LOG:

offset= 0x0
length= 0x8
8+0 records in
8+0 records out
8 bytes (8 B) copied, 0.0153084 s, 0.5 kB/s
offset= 0x9FF
length= 0x10
16+0 records in
16+0 records out
16 bytes (16 B) copied, 0.0528894 s, 0.3 kB/s
offset= 0xC00
length= 0x724B4


One response

  1. […] Source: PsDev’s Blog […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: