psxdev / ps4link

ps4link a library for PS4 to communicate and use host file system with ps4sh host tool
Other
46 stars 14 forks source link

PS4LINK FOR PS4

=================== What does this do?

PS4Link is a group of tools (libps4link,libdebugnet,ps4sh) for PS4 and host. It is the same method that we used in ps2dev days, so basically it is the same protocol than ps2link and ps2client have been using since 2003.

Functions availables are defined like native sce functions so it is easy for homebrew developer to use these new functions:

FILEIO functions

  int ps4LinkOpen(const char *file, int flags, int mode);
  int ps4LinkClose(int fd);
  int ps4LinkRead(int fd, void *data, size_t size);
  int ps4LinkWrite(int fd, const void *data, size_t size);
  int ps4LinkLseek(int fd, int offset, int whence);
  int ps4LinkRemove(const char *file);
  int ps4LinkMkdir(const char *dirname, int mode);
  int ps4LinkRmdir(const char *dirname);
  int ps4LinkDopen(const char *dirname);
  int ps4LinkDread(int fd, struct dirent *dir);
  int ps4LinkDclose(int fd);

Remote Commands functions

1) execuser name.elf

This command let you load and exec elf files in user mode compiled with ps4sdk. Check samples directory.

2) execkernel name.elf

This command let you load and exec elf files in user mode compiled with ps4sdk. Check samples directory. I did not test it too much because PS4Link is running in superuser mode.

3) execwhoami

Show you uid and gid

4) execshowdir ps4path

Let you list filenames in directories from PlayStation 4 system.

5) execdecrypt ps4directorypath

Let you decrypt all elf,self,prx,sprx,sdll,sexe and eboot.bin files from PlayStation 4 system and save it in your PC/Mac with the same name ps4 directory. You need first create in pc/mac where are you running ps4sh mkdir -p ps4/yourps4path

For example for /system/sys decrypt

  ps4sh> mkdir -p ps4/system/sys
  ps4sh> execdecrypt /system/sys

Check output at link 5) exitps4

Try to close ps4link resources. If you try to run ps4sh again when all is released you will get a messager saying that it can't connect. Now you can leave ps4 browser.

check ps4link_internal.h and commands.c to see how can you implements new commands

================== How do I use it?

1) Configure your environment:

You will need:

=================== What next?

Improve code, incoporate new features to ps4sdk.

=================== Last Changes

=========================== Credits

Special thanks goes to: