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:
Reads a file to print or modify its SFO parameters. Supported file types:
Examples
Viewing SFO parameters:
Modifying SFO parameters:
Modifying SFO parameters but saving to a different file:
Extracting a param.sfo file from a PS4 PKG file:
Creating a new param.sfo file from scratch:
Printing a single parameter:
Querying will return 0 if the parameter exists:
Use querying to save parameters in your scripts/tools, for example (Bash):
Or parse them all (Bash):
How to compile
For Windows:
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:
Options:
You can print all SFO info:
You can search for a specific key (case-insensitive), for example:
You can also overwrite existing data, for example:
To overwrite integer data, you can use decimal or hexadecimal numbers.
Known issues:
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
- PS4 param.sfo (print and modify)
- PS4 disc param.sfo (print only)
- PS4 PKG (print only)
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.
Viewing SFO parameters:
Code:
sfo param.sfo
sfo example.pkg --verbose --decimal
Code:
sfo -e title "Super Mario Bros." -d title_00 -s int pubtool_ver 0x123 param.sfo
Code:
sfo -e title "Super Mario Bros." -d title_00 -s int pubtool_ver 0x123 param.sfo --output-file test.sfo
Code:
sfo example.pkg --output-file param.sfo
Code:
sfo --new-file -a str app_ver 01.00 -a str category gdk -a int attribute 12 param.sfo
Code:
$ sfo -q title param.sfo
Super Mario Bros.
Code:
$ sfo -q title param.sfo
Super Mario Bros.
$ echo $?
0
$ sfo -q asdf param.sfo
$ echo $?
1
Code:
title=$(sfo -q title param.sfo)
Code:
i=0
while read -r line; do
param[i]=${line%%=*}
value[i]=${line#*=}
((i++))
done < <(sfo param.sfo)
Code:
gcc sfo.c -O3 -s -o sfo
Code:
x86_64-w64-mingw32-gcc-win32 sfo.c -O3 -s -o sfo.exe
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]
Code:
-h Display help
-w Enable write mode
Code:
sfo param.sfo
sfo your-game.pkg
Code:
sfo param.sfo PUBTOOLINFO
sfo your-game.pkg content_id
Code:
sfo -w param.sfo app_type 2
Known issues:
- Overwriting PKG files directly may will result in a broken PKG. Writing the original values will restore the PKG.