Archive of https://github.com/drakmor/LibOrbisPkg — Library, GUI, CLI for creating, inspecting, and modifying PS4 PKG, SFO, PFS, and related filetypes https://github.com/drakmor/LibOrbisPkg
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
kiwipuppeh c1caa3ba25
Merge pull request #19 from InvoxiPlayGames/nested_sce_sys_entries
fix: nested directories in sce_sys are now counted as entries
2025-11-12 19:06:52 -05:00
.github/workflows ci: add automatic test execution 2024-10-12 20:06:08 +02:00
LibOrbisPkg Merge pull request #19 from InvoxiPlayGames/nested_sce_sys_entries 2025-11-12 19:06:52 -05:00
LibOrbisPkg.Core feat: central package management 2024-10-12 18:00:27 +02:00
LibOrbisPkgTests feat: central package management 2024-10-12 18:00:27 +02:00
PkgEditor Merge pull request #16 from jnackmclain/master 2025-11-12 19:05:44 -05:00
PkgEditor.Core feat: central package management 2024-10-12 18:00:27 +02:00
PkgTool feat: central package management 2024-10-12 18:00:27 +02:00
PkgTool.Core feat: central package management 2024-10-12 18:00:27 +02:00
.editorconfig Initial commit 2018-07-13 01:00:24 -04:00
.gitattributes Initial commit 2018-07-13 01:00:24 -04:00
.gitignore Initial commit 2018-07-13 01:00:24 -04:00
.gitmodules [PkgEditor] Create new PKG file browser view. Add entry extraction. Remove GameArchives dependency. Close #44 2019-06-14 22:50:24 -04:00
appveyor.yml this automated appveyor release junk seems to get appveyor stuck in a loop 2020-05-15 22:09:26 -04:00
CollisionResolver.bt Implement collision_resolver for the flat_path_table 2019-08-01 16:18:33 -04:00
Directory.Build.props ci: add automatic test execution 2024-10-12 20:06:08 +02:00
Directory.Packages.props upgrade: Microsoft.Windows.Compatibility to 8.0.8 2024-10-12 18:51:38 +02:00
idx.bt Added more 010 templates 2020-07-25 23:14:54 -04:00
LibOrbisPkg.Core.sln Add core-only solution that should build cross platform 2019-10-05 15:25:07 -04:00
LibOrbisPkg.sln feat: central package management 2024-10-12 18:00:27 +02:00
LICENSE.txt Add README and LICENSE 2018-07-13 18:54:40 -04:00
PFSC.bt Parallelize extraction in PkgTool 2019-01-21 05:22:17 -05:00
PlaygoChunkDat.bt Add bare-bones playgo chunk support 2018-12-24 00:15:01 -08:00
PS4PFS.bt Add test with a lot of files (5000) in one directory, fix bug exposed by said test 2019-07-29 15:58:23 -04:00
PS4PKG.bt Generate the ENTRY_KEYS data (#17) 2018-11-19 03:25:39 -05:00
README.md Update README 2022-12-27 13:59:00 -05:00
Rif.bt Added more 010 templates 2020-07-25 23:14:54 -04:00
rifa.bt Added more 010 templates 2020-07-25 23:14:54 -04:00
SFO.bt Add Param.SFO read/write, actually write pubtoolinfo into it 2018-11-10 04:57:33 -05:00

LibOrbisPkg

Build status

Note from OpenOrbis

The original developer (maxton) has passed away unexpectedly, we will be keeping this fork up to date as we rely on it for the OpenOrbis toolchain. His contributions will not be forgotten or abandoned. RIP.


I am developing an open source library for reading and writing PS4 PKG files. This project's goal is to eliminate the need to use proprietary SDK tools. Without a proper open PKG tool, the PS4 homebrew scene cannot flourish.

All code in this repository is licensed under the GNU LGPL version 3, which can be found in LICENSE.txt.

Download

The latest builds are available to download at AppVeyor.

Usage

For non-windows platforms, compile and use only the .Core projects. This can be achieved using the alternative root solution file using this CLI method: dotnet build LibOrbisPkg.Core.sln.

For Windows, which includes the PkgEditor GUI project as well, you can use this CLI command: dotnet build LibOrbisPkg.sln, or build it in Visual Studio.

PkgEditor

PkgEditor is a GUI tool with which you can edit GP4 projects, create and edit SFO files, and build PKG and PFS archives. The tool also supports opening PKGs directly. You can see the header, entries, and if the package is a fake PKG or you enter a passcode, you can browse files as well.

Screenshots

PKG Info

SFO Screenshot

GP4 Screenshot

PKG Files

PKG Digest Check

PkgTool

PkgTool is a command line tool for common PKG/PFS/SFO tasks. Integrate it into your build scripts!

Usage: PkgTool.exe <verb> [options ...]

Verbs:
  pfs_buildinner <input_project.gp4> <output_pfs.dat>
    Builds an inner PFS image from the given GP4 project.

  pfs_buildouter [--encrypt] <input_project.gp4> <output_pfs.dat>
    Builds an outer PFS image, optionally encrypted, from the given GP4 project.

  pfs_extract [--verbose] <input.dat> <output_directory>
    Extracts all the files from a PFS image to the given output directory. Use the verbose flag to print filenames as they are extracted.

  pkg_build <input_project.gp4> <output_directory>
    Builds a fake PKG from the given GP4 project in the given output directory.

  pkg_extract [--verbose] [--passcode <...>] <input.pkg> <output_directory>
    Extracts all the files from a PKG to the given output directory. Use the verbose flag to print filenames as they are extracted.

  pkg_extractentry [--passcode <...>] <input.pkg> <entry_id> <output.bin>
    Extracts the selected entry from the given PKG file.

  pkg_extractinnerpfs [--passcode <...>] <input.pkg> <output_pfs.dat>
    Extracts the inner PFS image from a PKG file.

  pkg_extractouterpfs [--encrypted] [--passcode <...>] <input.pkg> <pfs_image.dat>
    Extracts and decrypts the outer PFS image from a PKG file. Use the --encrypted flag to leave the image encrypted.

  pkg_listentries <input.pkg>
    Lists the entries in a PKG file.

  pkg_makegp4 [--passcode <...>] <input.pkg> <output_dir>
    Extracts all content from the PKG and creates a GP4 project in the output directory

  pkg_validate [--verbose] <input.pkg>
    Checks the hashes and signatures of a PKG.

  sfo_deleteentry <param.sfo> <entry_name>
    Deletes the named entry from the SFO file.

  sfo_listentries <param.sfo>
    Lists the entries in an SFO file.

  sfo_new <param.sfo>
    Creates a new empty SFO file at the given path.

  sfo_setentry [--value <...>] [--type <...>] [--maxsize <...>] [--name <...>] <param.sfo> <entry_name>
    Creates or modifies the named entry in the given SFO file.

Thanks

Everyone who helped, either directly or indirectly, but especially the following:

  • flatz
  • idc