Thanks for testing, it was worth a check, shane it did not work.... wonder why...
I noticed Stooged has an android host for ps4 exploits and one of his payloads is to dump those files as backups in same location they exist.
May come in very handy in future.
I guess, I'm gonna just backup the app.db from now on, that should be my insurance.
Also, I did some further testing: I reinstalled one pkg that is still on the HDD as a "deleted" game.
The ps4 asked me if I wanted to reinstall the pkg, because it knew it was there. I said yes.
Then I checked the difference, from a filezilla search on the / directory(the root of the HDD), between this PKG entries and another "deleted" PKG.
Well, the two search results are a bit different: when a PKG is installed, the ps4 creates a bunch of directories with the CUSA----- name.
You can do the search too on filezilla, I searched for "03745", which is the PKG for last guardian which I reinstalled. The game works, of course, and it asked me if I wanted to continue, of course. Then I searched for 00303. I don't even know what that is.
Anyway, the difference in folders, is that the properly installed pkg have 5 more entries in the "av_contents" folder (which I cannot find on FTP, must be hidden)
and another 5 more entries in the "user/av_contents" folder (which I can browse to). So basically, the PS4 has deleted these folders when it rebuilt the database.
The entries have the same name on both folders, and are:
content_tmp
photo/NPXS20001
thumbnails/photo/NPXS20001
thumbnails/video/NPXS20001
video/NPXS20001
Well, if that's usefull info for somebody that knows how to tell the PS4 to rebuild the lost directories, we could have a solution.