Join Us and become a Member for a Verified Badge to access private areas with the latest PS4 PKGs.
PS4 CFW and Hacks       Thread starter PSXHAX       Start date Jan 10, 2022 at 12:27 AM       7      
Status
Not open for further replies.
Proceeding his initial PS4 SFO Reader / Editor release, PS4 FTPDump Script and BIN2JS PS4 Payload Converter recently PlayStation 4 Scene developer Hippie68 updated his PS4 SFO program (written in C) which reads a file to print or modify its SFO parameters that can be used for automation or to build PS4 PARAM.SFO files from scratch. šŸ˜ƒ

Download: sfo.exe (64-bit) / sfo_32.exe (32-bit) / GIT

This comes following several previous updates to PARAM.SFO Editor / PARAM SFO Tools, the PKGEditor for PS4 that allows modifying the values when opening PS4 Packages (PKGs) in the SFO tab alongside orbis-pub-sfo.exe which includes a friendly UI for those interested.

From the README.md: sfo.c

sfo.c can be compiled into a command line program, which is faster than the old "sfo" Bash script (roughly by factor 30). It is still compatible with the "pkgrename" and "fw" scripts, making their output faster. It can be used to query or modify param.sfo data or to build new param.sfo files from scratch.

Usage:
Code:
sfo [OPTIONS] FILE
Reads a file to print or modify its SFO parameters. Supported file types:
  • PS4 param.sfo (print and modify)
  • PS4 disc param.sfo (print only)
  • PS4 PKG (print only)
The modification options (-a/--add, -d/--delete, -e/--edit, -s/--set) can be used multiple times. Modifications are done in memory first, in the order in which they appear in the program's command line arguments. If any modification fails, all changes are discarded and no data is written:
Code:
  Modification  Fail condition
  --------------------------------------
  Add           Parameter already exists
  Delete        Parameter not found
  Edit          Parameter not found
  Set           None

Options:
  -a, --add TYPE PARAMETER VALUE  Add a new parameter, not overwriting existing
                                  data. TYPE must be either "int" or "str".
  -d, --delete PARAMETER          Delete specified parameter.
      --debug                     Print debug information.
      --decimal                   Display integer values as decimal numerals.
  -e, --edit PARAMETER VALUE      Change specified parameter's value.
  -f, --force                     Do not abort when modifications fail. Make
                                  option --new-file overwrite existing files.
  -h, --help                      Print usage information and quit.
      --new-file                  If FILE (see above) does not exist, create a
                                  new param.sfo file of the same name.
  -o, --output-file OUTPUT_FILE   Save the final data to a new file of type
                                  "param.sfo", overwriting existing files.
  -q, --query PARAMETER           Print a parameter's value and quit.
                                  If the parameter exists, the exit code is 0.
  -s, --set TYPE PARAMETER VALUE  Set a parameter, whether it exists or not,
                                  overwriting existing data.
  -v, --verbose                   Increase verbosity.
      --version                   Print version information and quit.
Examples

Viewing SFO parameters:
Code:
sfo param.sfo
sfo example.pkg --verbose --decimal
Modifying SFO parameters:
Code:
sfo -e title "Super Mario Bros." -d title_00 -s int pubtool_ver 0x123 param.sfo
Modifying SFO parameters but saving to a different file:
Code:
sfo -e title "Super Mario Bros." -d title_00 -s int pubtool_ver 0x123 param.sfo --output-file test.sfo
Extracting a param.sfo file from a PS4 PKG file:
Code:
sfo example.pkg --output-file param.sfo
Creating a new param.sfo file from scratch:
Code:
sfo --new-file -a str app_ver 01.00 -a str category gdk -a int attribute 12 param.sfo
Printing a single parameter:
Code:
$ sfo -q title param.sfo
Super Mario Bros.
Querying will return 0 if the parameter exists:
Code:
$ sfo -q title param.sfo
Super Mario Bros.
$ echo $?
0

$ sfo -q asdf param.sfo
$ echo $?
1
Use querying to save parameters in your scripts/tools, for example (Bash):
Code:
title=$(sfo -q title param.sfo)
Or parse them all (Bash):
Code:
i=0
while read -r line; do
  param[i]=${line%%=*}
  value[i]=${line#*=}
  ((i++))
done < <(sfo param.sfo)
How to compile
Code:
gcc sfo.c -O3 -s -o sfo
For Windows:
Code:
x86_64-w64-mingw32-gcc-win32 sfo.c -O3 -s -o sfo.exe
Windows binaries are available at releases.

Troubleshooting

Option --debug prints the exact param.sfo file layout, making it easy to spot errors quickly.

Please report bugs or request features at issues.

sfo (old Bash script)

Prints or modifies SFO parameters of a PS4 PKG or a param.sfo file. Providing a search string will output the value of that specific key only. Providing a replacement string will write it to the file (needs option -w).

Usage:
Code:
sfo [options] file [search] [replace]
Options:
Code:
-h  Display help
-w  Enable write mode
You can print all SFO info:
Code:
sfo param.sfo
sfo your-game.pkg
You can search for a specific key (case-insensitive), for example:
Code:
sfo param.sfo PUBTOOLINFO
sfo your-game.pkg content_id
You can also overwrite existing data, for example:
Code:
sfo -w param.sfo app_type 2
To overwrite integer data, you can use decimal or hexadecimal numbers.

Known issues:
  • Overwriting PKG files directly may will result in a broken PKG. Writing the original values will restore the PKG.
Cheers to MSZ_MGS via Twitter for the heads-up on this earlier. šŸ»
PS4 SFO Program to Automate Build PARAM.SFO Files by Hippie68.jpg
 

Comments

@speed44
there is a selection when you are building
Code:
// reserve the file system area for large package

does anyone know how to fix Error Ce-30008-1 after dump from a disk ? keystone and TROPHY.TRP modified using dumper fix but still occur
 
So far there is only one dumper that works and decrypts but the problem is the trophy seems to come from nest folder but FTPDUMP works ive found
 
Status
Not open for further replies.
Back
Top