Jump to content
  • Announcements

    • GregoryRasputin

      Say Hello, Make An Introduction Thread :)   11/20/2015

      We love having new members join the forum, what we like more is them being productive people and contributing a little bit to the forum. So if you are a new member, let us know who you are by saying hi in an introduction thread, you can find the forum section here: https://playstationhax.xyz/forums/forum/15-member-introduction/
MistyVermin

How to Decompile, Modify, and Recompile Bdjstack

Recommended Posts

MistyVermin    17

Note: As of now you cannot replace bdjstack.jar inside the PS4 file-system but I have noticed that there is very little information in the scene about anything related to creating your programs/coding for PS4 and thought this may help when we do have write access to bdjstack.jar.

 

I also apologize for the huge pictures but i am way to tired to fix them at the moment but will do later.

 

And one last thing, knowledge is power!

Now lets begin!

 

First of we must download a few things and also set up a few things.

  • We're going to need a Java decompiler, any Java decompiler should work but I personally use JD Project which is a relatively easy to use decompiler has quite a bit of features that help out quite a bit. You can download JD Project here.
  • We're also going to need to install JDK(Java Development Kit) if you have not already. You can download JDK here.

 

After you have installed JDK and have downloaded a Java decompiler of your choice we're going to need to set up environment variables for jdk.

(If you have already used JDK before and have environment variables you can skip this.)

 

First open up control panel and search "environment variables", this should come up.

o1FqXqj.png

Click "Edit the system environment variables" and this window should pop up.

09wsxDP.png

Click on the button labeled "Environment Variables..." and now were in the environment variables.

QmfP0Z2.png

Now you should see at the top of the top list called PATH, if not click new create a new variable called PATH in all caps and set the value to any text.

RoMgoQc.png

Now click on PATH then click Edit.

Now find your JDK bin path (Typically in Program Files) copy it and click new and paste it in and hit enter.

Y9sDddI.png

You have successfully set up your environment variables! Now you can close out everything we just opened.

 

Now lets start decompiling!

Alright now start up the JD Project program. 

VVyGItI.png

Drag in your bdjstack.jar into JD and you should see something like this.

Y8AjBB4.png

After dragging it in click file on the top left and click save all sources and save it in any location of your choice.

Now you can open up the zip file and edit any of the java files to your liking! When editing the files make sure you remember what files you have edited, where their file path was, and keep them in a safe place for now.

 

When you're finished lets start to recompile!

 

Now to begin with your going to want to create two new batch files one named "classupdater.bat" and the other "compilebdjstack.bat" and put them in a separate folder from everything else.

etXVkJy.png

Now that you have done that you're going to want to copy your backed up bdjstack.jar to the same folder as well as the the modified java files.

Rs4qbkj.png

Alright now add this to your compilebdjstack.bat file but replace "javafilehere.java" with the name of your own java file no quotes.

javac "javafilehere.java" -classpath bdjstack.jar
pause

Now run compilebdjstack.bat and a new file should appear with the same name as your java file but with a class extension.

A6pjsya.png

Now that that is done your going to have to recreate the file path inside the jar inside your folder and place it the end of the path.

For example: If your java file was located at com\sony\gemstack\event\ you need to add those folders in that order and put your class file at the last folder which would be the \event\ folder.

kl9mdnE.png

Now edit classupdater.bat and replace the "filepath" with the file path you have already created no quotes.

jar uf bdjstack.jar "filepath/javafile.java"
pause

Or for example:

jar uf bdjstack.jar com\sony\gemstack\event\KeySupport.class
pause

Now run classupdater.bat and you should notice that the date modified on the bdjstack.jar should have changed if it did congratulations your bdjstack.jar should be fully recompiled. 

tH1j5ue.png

Well that's all for now, as of now were just going to have to wait until we get access to protected PS4 files, and after that we should be able mod to our hearts content on BDJ.

Edited by MistyVermin

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×