Playstation Update Package (PUP)

= Description =

The PSVita and PSVita TV OS can install the update as /PSP2/UPDATE/PSP2UPDAT.PUP or as /PSVITA/UPDATE/PSVUPDAT.PUP.

The update comes from:

http://djp01.psv.update.playstation.net/update/psv/image/image//pre_ /PSVUPDAT.PUP

It is only used by sony on the website; that's why there is no update list on that server.

Types of PSVita PUP
There are different types of PSVita PUP:
 * full -> core system stuff (majority of partitions are found here, most important ones being os0: and vs0:)
 * systemdata -> sa0: location
 * preinst -> pd0: location
 * devkit / testkit: Debug updates for PTEL-XXXX and PDEL-XXXX do not separate into three different PUPs. A single PUP will update all components. Additionally updates for PDEL units contains updates for the CP and probably other development unit specific components.

= Extraction =

The PSVita and PSVita TV update files can be extracted using:
 * "PS VITA Firmware xTractor"
 * pupunpack from vitatools.

= Decryption =

To decrypt the files that are unpacked using the tool, the key is available under PSVita Keys.

Structure
The file structure of the PSVita PUP files is almost identical to the PS3's, although there is a slight difference in the header and the hash algorithm. Whereas in PS3 the format was big-endian for the Vita it has been switched to little endian. Also the Package Version field in PSVita PUP is set to 2 where in PS3 updates it was set to 1. There is also 0x50 bytes of extra data in the header and the hashes used are of a longer length than in PS3 updates (0x20 bytes (SHA-256 length) in PSVita vs 0x14 (SHA-1 length) in PS3).

File Table
The file table consists of a number of file entries determined by File Count, with the format below (which is the same as the format in PS3 PUP1 files).

Hash Table
The hash table contains a hash entry for every file inside the PUP.

The hash entry format is:

full - 01.500.000
= Regioning =

Contrarly to PS3, there is no regioning in the .PUP files: they are the same for all different regions.

However, the PSVita gets the psp2-updatelist.xml from different servers, depending on the region of that model.

Retail:
 * Japan (jp)
 * USA (us)
 * Europe (eu)

11 jan 2012 :: full 01.520.000 + systemdata 01.000.010 + preinst 01.000.000:     http://djp01.psp2.update.playstation.net/update/psp2/image/2012_0111/rel_01a72de4dd90191f679f648da8d11a48/PSP2UPDAT.PUP?dest=jp    http://djp01.psp2.update.playstation.net/update/psp2/image/2012_0111/sd_d48c3a2ca8963ffc7ac01c73e873809c/PSP2UPDAT.PUP?dest=jp   http://djp01.psp2.update.playstation.net/update/psp2/image/2012_0111/pre_5899e51b24eb4ab2c985df08bf6c901b/PSP2UPDAT.PUP?dest=jp 

22 dec 2011 :: full 01.510.000 + systemdata 01.000.010 + preinst 01.000.000:     http://djp01.psp2.update.playstation.net/update/psp2/image/2011_1222/rel_48ac631ecae3837a7530506de0d73eaf/PSP2UPDAT.PUP?dest=jp  <recovery spkg_type="systemdata"> <image spkg_version="01.000.010" size="56817152"> http://djp01.psp2.update.playstation.net/update/psp2/image/2011_1222/sd_52ff6b714e5f701d15938a6fee68fb66/PSP2UPDAT.PUP?dest=jp <recovery spkg_type="preinst"> <image spkg_version="01.000.000" size="128837120"> http://djp01.psp2.update.playstation.net/update/psp2/image/2011_1222/pre_a18a91bb8c86f8c1a101d19fcb15fb6d/PSP2UPDAT.PUP?dest=jp </update_data_list>

14 dec 2011 :: full 01.500.000 + systemdata 01.000.010 + preinst 01.000.000:  <np level0_system_version="01.500.000" level1_system_version="01.500.000" level2_system_version="01.500.000"/> <version system_version="01.500.000" label="01.500"> <update_data update_type="full"> http://djp01.psp2.update.playstation.net/update/psp2/image/2011_1214/rel_f090a69bcf392b5c311b9e786c5cc0b5/PSP2UPDAT.PUP?dest=jp </update_data> <recovery spkg_type="systemdata"> <image spkg_version="01.000.010" size="56817152"> http://djp01.psp2.update.playstation.net/update/psp2/image/2011_1214/sd_484243f3964158b38ad1adaac0332a3e/PSP2UPDAT.PUP?dest=jp <recovery spkg_type="preinst"> <image spkg_version="01.000.000" size="128837120"> http://djp01.psp2.update.playstation.net/update/psp2/image/2011_1214/pre_24b5601c3b3aa63b51cf5eaeab718a4c/PSP2UPDAT.PUP?dest=jp </update_data_list>

Shop:  <np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000"/> <version system_version="00.000.000"> <update_data update_type="full"> NA      </update_data> </update_data_list>
 * shop
 * Japan (jp)
 * USA (us)
 * Europe (eu)

Retail basic structure of the update URL: http://d<TLD>01.psp2.update.playstation.net/update/psp2/image/<YYYY_MMDD>/pre_ /PSP2UPDAT.PUP?dest=<TLD> (TLD=2 letter abbreviation from above region, YYYY_MMDD is release date, md5 is 22-digits long HASH)

= Repo's =

Repo's:
 * http://thehomebrewplanet.com/psvfw/
 * http://zload.net/v2/archives/ofws/
 * http://www.gxarena.com/Firmwares/PSVita/

= Revisions =