to backup database:
run the hen payload and then run the ftp payload.
ftp into /system_data/priv/mms/
and copy app.db to your computer.
you can take addcont.db if you like that holds stuff like extra seasons of games.
Note: when you install new games you will need to backup app.db again so it includes those new games too.
to restore broken database:
run the hen payload and then run the ftp payload.
ftp into /system_data/priv/mms/
upload your saved app.db from your computer to that directory overwriting the app.db inside the ps4
power off the ps4 as you normally would then boot it back up and see if it has changed.
this worked for me when I was playing around with that run games from hdd idea, my database rebuilt and I lost all the tiles for 40+ games but I had saved a copy of my app.db and when I tried to put it back with just the ftp payload running it would rebuild again but when I used hen payload and the ftp payload it restored all my tiles and still works now.
if someone wanted to make a payload to back it up they could do something like this
Code:#include "ps4.h" int _main(void) { initKernel(); initLibc(); copyFile("/system_data/priv/mms/app.db", "/system_data/priv/mms/app.backup"); return 0; } void copyFile(char *sourcefile, char* destfile) { FILE *src = fopen(sourcefile, "r"); FILE *out = fopen(destfile,"w"); char buffer[60480]; size_t bytes; while (0 < (bytes = fread(buffer, 1, sizeof(buffer), src))) fwrite(buffer, 1, bytes, out); fclose(src); fclose(out); }
thanks very much for the explanation. i think this should be in the tutorial section of the PS4 forums. it will help lots of people