Files
pkg2zip/README.md
T

76 lines
2.9 KiB
Markdown
Raw Normal View History

2017-09-23 10:18:46 -07:00
# pkg2zip
Utility that decrypts PlayStation Vita pkg file and creates zip package.
2017-09-24 18:25:29 -07:00
Optionally saves [NoNpDrm](https://github.com/TheOfficialFloW/NoNpDrm) license into work.bin file. You must provide license key.
2017-09-23 10:18:46 -07:00
DLC support available when VitaShell will include [this pull request](https://github.com/TheOfficialFloW/VitaShell/pull/310).
2017-09-23 10:18:46 -07:00
# 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.
2017-09-23 10:18:46 -07:00
* **fast**, uses AESNI hardware accelerated AES decryption if supported by CPU (requires [AESNI](https://en.wikipedia.org/wiki/AES_instruction_set) and [SSSE3](https://en.wikipedia.org/wiki/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.
2017-10-26 01:04:21 -07:00
* **DLC** and **PATCH** pkg support.
2017-09-23 10:18:46 -07:00
Limitations:
* currently no PSM or update pkg files are supported.
2017-09-23 10:18:46 -07:00
# Usage
If you have zRIF fake license, then execute:
2017-09-23 10:18:46 -07:00
pkg2zip package.pkg zRIF_STRING
2017-09-24 18:25:29 -07:00
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:
2017-10-26 01:04:21 -07:00
pkg2zip package.pkg
2017-10-26 01:04:21 -07:00
Resulting zip file will not include work.bin. This is useful for patch pkg files.
2017-09-24 18:25:29 -07:00
# Generating zRIF string
2017-09-24 18:25:29 -07:00
If you have working main.bin file you can create zRIF string with `rif2zrif.py` python script:
2017-09-24 18:25:29 -07:00
$ python rif2zrif.py path/to/main.bin
It will print zRIF string to stdout.
2017-09-23 10:18:46 -07:00
To generate main.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.
2017-09-23 10:18:46 -07:00
# Download
Get latest Windows binaries [here](https://github.com/mmozeiko/pkg2zip/releases).
2017-09-23 21:01:09 -07:00
ArchLinux users can build binary with [pkg2zip](https://aur.archlinux.org/packages/pkg2zip/) package in AUR repository. For example, with pacaur:
$ pacaur -S pkg2zip
2017-09-23 10:18:46 -07:00
# Building
Execute `make` if you are on GNU/Linux or macOS.
On Windows you can build either with MinGW (get [MinGW-w64](http://www.msys2.org/)) or [Visual Studio 2017 Community Edition](https://www.visualstudio.com/vs/community/).
* for MinGW make sure you have make installed, and then execute `mingw32-make`
* for Visual Studio run `build.cmd`
# Alternatives
* https://github.com/RikuKH3/unpkg_vita
* https://github.com/St4rk/PkgDecrypt
2017-09-24 18:25:29 -07:00
* https://github.com/weaknespase/PkgDecrypt
2017-09-23 10:18:46 -07:00
# License
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.