Extract Ps3 Dat File

5/26/2019

PS3xport: PS3/EXPORT backup manipulation utility

PS3xport is a utility for manipulating PS3 backup archives. It can create a fully working backup from scratch, as well as extract files from existing backups or rename, delete, or add new files to an existing backup.

A PS3 backup is created from the System Settings -> Backup Utility -> Backup menu on the XMB (Xross Media Bar). It requires the use of a FAT32-formatted storage and it will create the backup as a subdirectory of the directory PS3/EXPORT/ named with the current date and time. For example : D:/PS3/EXPORT/201412242359

Jay sean baby are you down mp3 song download. The backup directory will contain the following files :

  • archive.dat - This will be the 'Index file' for your backup
  • archive_00.dat, archive_01.dat, archive_02.dat, etc. - These are the 'Data files' for your backup
  • archive2.dat - This will be the 'Index file' of your copy-protected files
  • archive2_00.dat, archive2_01.dat, archive2_02.dat, etc. - These are the 'Data files' for your copy-protected data

As you can see, there are two types of files, Index files and Data files. The index files will contain the list of all the files and directories in the data files while the data files will only contain data. There are also two types of backups, regular files and copy-protected files. The copy-protected files are for your PSN games, copy-protected save files and the like. The copy-protected files are encrypted with your unique PS3 device ID so they cannot be decrypted on another PS3.The archive.dat files will not be encrypted with your PS3's Device ID so they can be restored on any PS3. However, the file does contain your OpenPSID which tells the PS3 from which console the backup was created. Not having the right PSID set in a backup has little significance, other than the fact that when restoring it, the PS3 will show a warning about the backup being restored from a different PS3.

PS3xport takes commands as arguments and multiple commands can be chained together in a single call.

Here is the usage of the tool :

The tool needs access to the PS3 keys in order to function. You can give it the path of the keys.conf file using the SetKeysFile command. If it is not specified, then the tool will first look for the keys.conf file in the current directory, then in the directory defined by the environment variable PS3_KEYS_PATH if it exists, then in the .ps3 directory in the home directory. The keys.conf file needs to have a key of type 'sc' with revision 3.

You can set the Device ID with the SetDeviceID command and give it the Device ID (also known as IDP) either as a hex string or by specifying the file name to a 16-byte binary file containing the device ID. The same can also be used for setting the OpenPSID of the console with the SetPSID command.

If you need to find the OpenPSID of your console, you can simply create a backup and use the ExtractPSID command, specifying the backup directory and a file name to write the PSID as a binary file.

Note that those settings are not permanent, so for them to be used by the tool, they need to precede another command which requires them. See examples for more information.

You can use the ReadIndex and ReadData commands to read the Index (archive.dat or archive2.dat) and Data files (archive_XX.dat or archive2_XX.dat) and print information about them. Using the ReadIndex command will list all the files and directories in the index file with their full path, sizes and permissions, etc..as well as any additional data available in the index file, such as the backup's unique ID, the console's PSID, the size of the copy-protected data, etc.. Using the ReadData command will simply output the backup's unique ID, the index of the data file (the files must be sequential), and will make sure that the files are not corrupted by hashing the entire data file. Note that for copy-protected files (archive2[_XX].dat), the DeviceID must be set.

The Decrypt command can be useful for debugging a file or for better understanding the file format. It will simply take a .dat file and decrypt it for you, either using a PS3 static key for archive.dat files or the Device ID for archive2.dat files.

The Dump command will extract an entire backup to the given destination directory. Note that in order to extract copy-protected content, you need to set the DeviceID first. If you wish to extract only a specific file, you can instead use the ExtraFile command and specify the file you want extracted. For even more freedom you can also use the ExtractPath command which will extract every file and directory which matches the path specified.

To delete a file from a backup, use the DeleteFile or DeletePath commands. They will basically just rename the file into the /dev_hdd0/tmp/null file as deleting a file would require the regeneration of the entire backup file.

The DeleteProtected command, however, will affect the archive.dat file so it acts as if there is no archive2.dat file that comes with it, thus removing the copy-protected content from the backup. This will mostly have the effect of disabling the warning on the PS3 when the backup is restored on a different PS3 that some of the data could not be restored.

To add new files to the backup, use the Add and AddProtected* commands. They will recursively add all the files specified to the backup. You can also create a backup from scratch with the CreateBackup command, giving it the backup directory to create, the directory for the content, and the directory for the copy-protected content. You can set either one of the directories to - in order to ignore that directory.

To get your OpenPSID, you can do:

./ps3xport ExtractPSID PS3/EXPORT/201412242359/ psid.bin

To show the list of non-protected files in a backup, type:

./ps3xport ReadIndex PS3/EXPORT/201412242359/archive.dat

To show the list of protected files in a backup, type:

./ps3xport SetDeviceID idp.bin ReadIndex PS3/EXPORT/201412242359/archive2.dat

To list every files in the backup and write it to a text file, type:

./ps3xport SetDeviceID idp.bin ReadIndex PS3/EXPORT/201412242359/archive.dat ReadIndex PS3/EXPORT/201412242359/archive2.dat > filelist.txt

Main gameplay includes hitting scrolling notes as they come toward the player. As before, the player has a choice between,,, and on four different difficulties (Easy, Normal, Hard and Expert). Rock

To create a new simple backup without copy-protected content:

./ps3xport SetPSID psid.bin CreateBackup PS3/EXPORT/MYBACKUP my_custom_dev_hdd0 -

or with copy-protected data:

./ps3xport SetPSID psid.bin SetDeviceID idp.bin CreateBackup PS3/EXPORT/MYBACKUP my_custom_dev_hdd0 my_protected_data

To add new files to a backup:

./ps3xport Add PS3/EXPORT/MYBACKUP dev_flash2

You can also chain multiple operations in a single command:

./ps3xport ExtractPSID PS3/EXPORT/201412242359/ psid.bin SetPSID psid.bin ExtractPath PS3/EXPORT/201412242359/ /dev_flash2 output_dev_flash2 SetDeviceID idp.bin CreateBackup PS3/EXPORT/MYBACKUP my_custom_dev_hdd0 my_protected_data Add PS3/EXPORT/MYBACKUP output_dev_flash2 DeleteProtected PS3/EXPORT/201412242359

The archive.dat file format is used to store PS3 Backup data. This feature was added since 1.32.

The PS3 backup/restore system will create archive.dat files on USB media which will contain a backup of your entire HDD.

There are four types of archive.dat files :

FilenameFunctionComment
archive.datIndex of backed dataThis will contain a list of all files/directories and information about the copy-protected archive
archive_XX.datBacked dataThis will contain the actual backed data
archive2.datIndex of Protected-Content dataThis will contain the index of the copy-protected content of your backup
archive2_XX.datProtected-Content dataThis will contain the copy-protected content

When a backup is created, the PS3 will divide the data to be backed upinto 2 types, generic data and copy-protected data. The copy-protecteddata will usually be your games folder and copy-protected save gamesand the like, so when you restore it on a different PS3, it will showthe error 'The data was backed up from a different PS3 system. Somedata cannot be restored'.

The archive.dat and archive2.dat files are Index files while thearchive_XX.dat and archive2_XX.dat files contain the actual data. Thearchive files are for normal data while the archive2 files are for thecopy-protected data. The archive.dat index file will contain a listingof all the files and folders that the data files contain, as well as afooter containing information about the archive2.dat content.

The file format is divided into 4 items : the DAT header, the Archiveheader, the payload and the Footer :

All files will contain the DAT header followed by the Archive header then the payload. The archive.dat file alone will contain a footer.

  • 3Index files

DAT header[edit]

The DAT header has a fixed size of 0x40 bytes and will appear at thestart of the file. It will never be encrypted.

OffsetSizeNameValuesComment
0x000x04Encryption type0x30 or 0x40Little-Endian value
0x040x04DAT type0x03 or 0x05Little-Endian value
0x080x14File hash..Hash of the encrypted data with HMAC
0x1C0x14Key seed..will be all zeroes if encryption type is 0x30
0x300x10Padding00..00all zeroes
0x40variableData..Encrypted data

The DAT content is always encrypted and requires the use of the keyseed from the header to generate the keys used for the encryption/decryption.The key seed will be a random value if the encryption type is 0x40, orit will be set to zero if the encryption type is 0x30, in which case,the ps3's IDP value will be used as a key seed.

A zeroed out buffer of 64 bytes which contains the key seed at offsetzero is encrypted with a zeroed IV using the VTRM engine to generatethe key/iv/hmac needed for the DAT file processing.

If the IDP is used, then a vtrm encrypt of type 3 is used, otherwise,if the key seed is used, a vtrm encrypt with portability of type 1 isused.

The resulting 64 bytes buffer is then divided into the followingstructure :

OffsetSizeName
0x000x10Key
0x100x10IV
0x200x0CPadding
0x2C0x14HMAC key


Archive header[edit]

The archive header goes right after the DAT header and will beencrypted of course. It will contain information on the currentarchive file :

OffsetSizeNameValuesComment
0x000x08ID..The unique ID of this archive
0x080x04Index..The index of this file within the archive
0x0C0x01Archive type0x04 or 0x05Determines if copy-protected content or not
0x0D0x01File type0x00 or 0x01It looks like it's set to 0 for data files and set to 1 for index files
0x0E0x02Padding0x0000all zeroes


The ID of the archive is a random value and it must be the same forall the archive files in the backup directory. The index is set to 0for index files and starts from 0 for data files and is incrementedfor each new data file created. The archive type is set to 0x04 whenthe data is copy-protected, but it only seems to be set to 0x04 in theindex file, not in the data files. The file type finally is set to 0for data files and 1 for index files.

Index files[edit]

The index files are the archive.dat and archive2.dat files, theycontain the list of all files and directories within the data files.After the archive header, the list of files appears in the form of ablock of 0x558 bytes, until the EOS file block which starts with a64-bit value of zero. After the list of files, the file will contain a list of directories in the form of blocks of 0x448 bytes until theEOS directory block which starts with a 64-bit value of zero.After the list of directories, if the file is archive.dat (archivetype is 0x05), then a footer is added at the end of the file.

Basically, you can see the file structure as a union between a EOSblock and a File Structure block. The EOS block represents the End OfStream, and starts with a 64-bit value of zero, while file blocksstart with the path to the file which cannot be zero.

File structure[edit]

OffsetSizeNameValuesComment
0x000x520Path..The full absolute path of the file
0x5200x34File stats..File stats as a sysFSStat structure (see lv2/sysfs.h)
0x5540x04Flags0x00 or 0x01The flags are set to 0x01 if the file resides in /dev_flash2

EOS File structure[edit]

OffsetSizeNameValuesComment
0x000x08Zero00.00Must be set to zero to indicate the end of the list
0x080x08Total files..The total number of files that were just listed
0x100x08Total file sizes..The total size of all the

files listed

0x180x540Padding00..00All zeroes until the end of the block

Directory structure[edit]

OffsetSizeNameValuesComment
0x000x420Path..The full absolute path of the directory
0x4200x34File stats..Directory stats as a sysFSStat structure (see lv2/sysfs.h)
0x4540x04Flags0x01 or 0x03The flags are set to 0x03 if the directory resides in /dev_flash2 or 0x01 otherwise

EOS Directory structure[edit]

OffsetSizeNameValuesComment
0x000x08Zero00.00Must be set to zero to indicate the end of the list
0x080x08Total directories..The total number of directories that were just listed
0x100x448Padding00..00All zeroes until the end of the block


Archive Index Footer[edit]

OffsetSizeNameValuesComment
0x000x10PSID..The OpenPSID of the PS3 on which this backup was created
0x100x08Archive2.dat total file sizes..The total file sizes of the copy-protected content (same value as in the EOS file structure of the archive2.dat)
0x180x08Padding00.00All zeroes

Data files[edit]

Data files are sequential files which contain only the DAT header andarchive header, followed by raw data. There is no compression, noseparation between the files, no padding, etc. the files will bepacked one after the other in the same order as they appear in theindex file.

A data file may even end on a non-16 byte boundary, in which case,there still will not be any additional padding and the AES128 CBCalgorithm has to be modified to allow encryption of a stream insteadof 16-byte blocks.

For the last block of the file to be encrypted, if it has less than 16bytes, then the IV is instead encrypted (so, the previous blockencrypted twice), then xor-ed with the remaining bytes of input.To decrypt, you simply need to decrypt the IV and xor it again withthe first bytes of the ciphertext to get the plaintext back.


  • https://github.com/kakaroto/ps3xport (KaKaRoTo Kind of ´Jailbreak´)
  • http://playstationhax.xyz/forums/topic/1092-release-arctool-and-arcunpack-by-flatz/[1]


SCE File Types
App Types·Capability Flags·Control Flags·SELF File Format and Decryption·NPDRM Selfs·SPRX File Format·EDAT files·SELF Types·SELFs inside ELFs·License Types·Revision versus Version
RCOXML
Rcomage·GimConv·Graphic Image Map (GIM)·MFAudio·Languages·XMB Fonts·XMB Layouts
RCOXML Script·RCOXML Images·RCOXML Fonts·RCOXML Texts·RCOXML Models·RCOXML Sounds·RCOXML Objects·RCOXML Animations
RCOXML ofw animations·RCOXML ofw sounds
CXML
Canyon.qrc·Earth.qrc·Icons.qrc·Icontex.qrc·Lines.qrc·Raf.qrc·Rhm.qrc·Store.qrc
01.p3t·raf_debug.p3t
coldboot.raf·mustache.raf·PlayStation JavaScript·VSMX
XMBML
XMB Config
XMB-Users·XMB-Settings·XMB-Photo·XMB-Music·XMB-Video·XMB-TV·XMB-Game·XMB-Network·XMB-PSN·XMB-Friends
DB Config
registory.xml·upload_list.xml·download_list.xml·playlist.xml·videodownloader_list.xml·savedata_list.xml
XMBML Folder Trees·XMBML module-action·XMBML Mountpoints·XMBML Database Access
Databases
XRegistry.sys·XMB database·Project Database (PDB)·MMS·XIL
System Data
XMB Preload
Content Information Files·PARAM.HIS·PARAM.PFD·PARAM.SFO·PS3_DISC.SFB
Licences
ACT.DAT·LIC.DAT·LICENSE.DAT·LICENSE.INFO·PKG DIGEST.DAT
·
PS3 Savedata·PS2 Savedata·PS1 Savedata·PSP Savedata
Trophy livelist·TROPHY.TRP·Trophy
Games/Apps
Web
Unsorted
archive.dat·bootflag.dat·Eboot.PBP·lv0ldr·lv0·lv1.self·SIG File Format
Retrieved from ‘http://www.psdevwiki.com/ps3/index.php?title=Archive.dat&oldid=48075’
Comments are closed.