More actions
No edit summary |
|||
Line 4: | Line 4: | ||
|description=Convert pkg files to zip ones. | |description=Convert pkg files to zip ones. | ||
|author=Yoti, mmozeiko, lusid1 | |author=Yoti, mmozeiko, lusid1 | ||
|lastupdated=2023/ | |lastupdated=2023/07/07 | ||
|type=PC Utilities | |type=PC Utilities | ||
|version=2.5 | |version=2.5 |
Revision as of 03:16, 9 July 2023
pkg2zip | |
---|---|
General | |
Author | Yoti, mmozeiko, lusid1 |
Type | PC Utilities |
Version | 2.5 |
License | Public Domain |
Last Updated | 2023/07/07 |
Links | |
Download | |
Website | |
Source | |
Pkg2zip, an utility that decrypts PlayStation Vita pkg file and creates zip package.
Supported pkg files - main application, DLC, patch, theme and PSM files. Also supported PKG, PSX and PSP PKG files for use with Adrenaline.
Optionally writes NoNpDrm or NoPsmDrm fake license file from zRIF string. You must provide license key.
Features
- Portable, written in cross-platform C code, runs on Windows, GNU/Linux, macOS (system dependent functionality is isolated in sys.c file).
- Small, has no external library dependencies and uses very minimal dynamic memory allocations.
- Fast, uses AESNI hardware accelerated AES decryption if supported by CPU (requires AESNI and SSSE3 instructions).
- Simple, creates zip package with same folder structure that Vita expects (just drag & drop all file from zip archive to ux0:). Zip file is created directly from pkg without any intermediate temporary files.
- Vita DLC, Vita PATCH and PSM pkg unpacking.
- PSX, PSP, PSP Updates, PSP DLC, and PSP THEME pkg unpacking.
Limitations:
- no actual title name is extracted for PSM pkg files.
User guide
Requirements
- HENkaku / enso.
- NoNpDrm.
- NoPsmDrm for PSM titles.
- VitaShell v1.76 or newer required for DLC installation.
- Adrenaline for PSX or PSP titles.
- Npdrm free for PSP titles in eboot format.
How to use
If you have zRIF fake license, then execute:
pkg2zip package.pkg zRIF_STRING
This will create title [id] [region].zip
file. Title, ID and region is automatically detected from pkg file. It will include work.bin file.
If you don't have zRIF fake license, but just want to unpack files, then omit last argument:
pkg2zip package.pkg
Resulting zip file will not include work.bin. This is useful for patch pkg files.
To get output file name of the zip, use -l
(must come before pkg file and cannot be used with -x
):
pkg2zip -l package.pkg
To avoid zipping process and create individual files, use -x
argument (must come before pkg file):
pkg2zip -x package.pkg [zRIF_STRING]
PSX or PSP pkg files do not require zRIF argument. It will be ignored.
For PSP files pkg2zip by default will create .ISO file. To create compressed .CSO file pass -cN argument where N is compression factor. For example, for fastest compression use:
pkg2zip -c1 package.pkg
To create smaller cso file (more compression will require more time) use -c9, or anything inbetween:
pkg2zip -c9 package.pkg
You can combine -cN argument together with -x:
pkg2zip -x -c9 package.pkg
To extract PSP files in their original EBOOT.PBP format use the '-p' argument:
pkg2zip -p package.pkg
Note: On PSP hardware titles with DLC should be kept in ISO/CSO format due to limitations on the CFW NoDRM Engine.
Generating zRIF string
If you have working NoNpDrm license file (work.bin or 6488b73b912a753a492e2714e9b38bc7.rif) you can create zRIF string with rif2zrif.py
python script:
$ python rif2zrif.py path/to/work.bin
It will print zRIF string to stdout.
To generate work.bin from zRIF string use zrif2rif.py
script:
$ python zrif2rif.py zRIF work.bin
Last argument is optional, it specifies where to save file and defaults to work.bin name.
Limitations
No actual title name is extracted for PSM pkg files.
Alternatives
Screenshots
Changelog
v2.5 (by Yoti)
- Added support for more regions
v2.4 (by Yoti)
- Added support to decrypt/extract PKG type 1
- Added support for KEYS.BIN for PKG type 1
- Added region detection for PS1 games
- Fixed some messages here and there
v2.3 (by lusid1)
- Only decrypt PSP EDAT files in ISO mode.
- Fixes PCEngine extraction in PBP mode (-p).
- Fixes DLC compatibility in PBP mode (-p).
- Added -d switch to force EDAT decryption
- Merged cli improvements and other fixes from sigmaboy
v2.2 (by lusid1)
- PSP Theme names are now used for zip file names.
v2.1 (by lusid1)
- PSX pkg unpacking now includes keys.bin
v2.0 (by lusid1)
- Added support for VITA Theme pkg.
- Added support for PSP Theme pkg.
- Added support for PSP DLC pkg.
- Added support for pocketstation pkg.
- Added option to unpack PSP pkg to EBOOT.PBP.
- Fixed CSO compression.
- Fixed psm dev kit cert.bin extraction.
v1.8 (by mmozeiko/Mārtiņš Možeiko)
- Support PSP pkg file unpacking, including NeoGeo, Mini, Go, PC Engine pkg files.
- Unpack PSP pkg files to ISO or CSO.
- Better output with UTF-8 encoding on Windows for title names.
- Show unpacking progress in percents.
v1.7
- Fix issue with patch file unpacking in -x mode.
v1.6
- Much faster zip file creation - depending on CPU and disk speed it is now ~2 to 3 times faster.
- Add -x argument which makes unpacking files in extracted form - with same layout as ux0.
- Unpacking PSM pkg files for use with NoPsmDrm.
- Unpacking PSX pkg files for use with Adrenaline.
- Unpacking PSP pkg files. Result is not yet directly usable on Vita - it produces EBOOT.PBP which requires to be unpacked further with different 3rd party tool.
v1.5
- Adjust size of tail.bin - now it uses all remaining data after encrypted blob.
v1.4
- Add support for DLC and PATCH pkg file unpacking.
- Supports unlimited amount of files inside zip file.
- Fix for zip files larger than 4GB.
- Drop support for dummy work.bin generation (without key inside).
- Drop support for hexkey argument to try generate work.bin.
v1.3
- Fix a bug when wrong title id was put in work.bin when generating it from raw key.
- Display minimum required firmware version to run the game.
- Verify integrity of zRIF before starting to unpack pkg file, and display error if it is not correct zRIF.
- Allow utf-8 characters in automatic zip filename, useful for non-english game names.
- Increase limit of max allowed files in zip file.
v1.2
- Support zRIF strings for generating work.bin file.
- Add rif2zrif python script to create zRIF string.
- Identify PCSD prefix as JPN region.
v1.1
- Fixes wrong head.bin when it is larger than 64KB.
v1.0
- First Release..
External links
- GitHub - https://github.com/Yoti/pkg2zip
- GitHub - https://github.com/lusid1/pkg2zip
- GitHub - https://github.com/mmozeiko/pkg2zip
- VitaDB - https://vitadb.rinnegatamante.it/#/info/342