Tutorial: How To Setup the PS4SDK on Windows 10

0x1995 months ago

Today I'm going to explain how to setup the PS4SDK on Windows 10. Get that VM out of the way, it's time for the real deal.

Requirements

  • Desktop with Windows 10 installed

Let's get started

Part 1: Installing Bash on Ubuntu on Windows 10

First things first, we're going to enable developer mode on your Windows 10 desktop.

Go to Settings -> Update and Security -> For Developers -> Developer Mode.

Developer Mode

Now head over to the Control Panel and click Programs. Once there, click "Turn Windows Features On or Off" under Programs and Features. A list will appear:

Modules

Enable "Windows Subsystem for Linux (Beta)" in that list and click OK. Reboot your desktop so Windows 10 can install Bash.

Once restarted, type in the search bar "bash" and hit enter.

bash

The first time you run the bash.exe file, you'll be prompted to accept the terms of service. The command will then download the "Bash on Ubuntu on Windows" application from the Windows Store. You'll be asked to create a user account and password for use in the Bash environment.

Just follow the setup.

bash

When you're being asked for your username, enter anything but "root", same goes for your password.

You're now done with setting up Bash on your Windows 10 desktop.

Part 2: Installing the SDK on Bash

So the first thing we want to do is install updates. For this, we type in Bash the following:

sudo apt-get update

It will ask you for your password, enter the password you used in the setup.

Now we're going to install the required packages to build our SDK:

sudo apt-get install make
sudo apt-get install clang
sudo apt-get install gcc
sudo apt-get install llvm
sudo apt-get install binutils

Once that's done, we're going to pull our SDK. Type the following:

cd ~
git clone https://github.com/idc/ps4-payload-sdk PS4-SDK

And hit enter. This will install the SDK to /home/yourusername/PS4-SDK.

Time to set up our environment variable for the SDK and export the SDK. Type the following:

sudo nano .bashrc

This will open .bashrc, go to the very end of the file using the arrow down key.

Once at the end of the file, type this:

export PS4SDK=~/PS4-SDK

And now save the file using CTRL + X, hit Y and press enter like last time.

Now refresh Bash:

source ~/.bashrc

Part 3: Getting the SDK Ready

We're going to CD to our SDK:

cd PS4-SDK

Once there, type

cd libusbfatfs

And type

make

The SDK library libusbfatfs will now be ready. Just one more to build.

CD back to the PS4-SDK like so:

cd ..

Now CD into libPS4:

cd libPS4

And type

make

If you got an error, do the following:

sudo nano source/syscall.s

There will be these lines at the top of the file:

#If your assember complains about the following uncommented line change it to:
#.section .sc_rop,"w"
.section .sc_rop,"wb"

Uncomment the second line and comment the third one, like so

#If your assember complains about the following uncommented line change it to:
.section .sc_rop,"w"
#.section .sc_rop,"wb"

And now save the file using CTRL + X, hit Y and press enter. Type make again and it should compile correctly.

make

The PS4 SDK has been setup now and is ready to compile payloads.

Part 4: Compiling Payloads

To compile payloads, you want to CD into the payload folder and type make. This will compile your payload so you can inject it into your PS4.

Things should be a lot easier now that you don't have to boot up a VM everytime to compile a simple payload. Thanks to @ZeraTron for helping me out fixing errors! Happy modding!