Finally got to install SDK 1.92 and just trying to get a grasp off everything. This is what I am trying.
Extract folding-gamecategory.pkg. make small config changes, recompile to .pkg and compare. Problem is when I compare the two .pkg files they are nothing alike other then the title_ID, the entire body of the file is different when viewed in a hex editor.
Can anyone clarify this for me, i was expecting to extract, make a small change, recompile and see whats different expecting small change not the entire file?
I made a PKG Template for 010 Editor (find it quite a good hex editor, competitive to WinHex I'd say quite some time ago and just recently made it "compatible" with latest PKG-Files, maybe is of help. Don't take the variable-names as granted though.
I reversed the fileformat from some pkg + make_package_npd* from the 1.60 leaked SDK and I read the partly reversed structure that is/awas available on the net that time so credits to them as well, not sure how much I coppied from that one though.
Another thing I found out was that there seems to be a PS3LOGO.DAT or so, which is embedded in the make_package_npd*, in nearly every pkg which is a png file and is hidden by make_package_npd*. it seemed to be always the first entry so one might exploit that to a certain degree.
For Devpackages (de)crypting you might want to take a look at  not sure if it did change though.
PS: I still don't really get what you're trying, do u have the dev packages? or is 1.92 SDK able to unpack retail packages?
The Dev package of folding @ home is available to download here, its old but something to play with. I can extract it with SDK 1.92 into a folder (of all the files making up the pkg). successfully.
When I recreate the pkg using the files I just extracted I was expecting the two pkg files to be the same, but I was wrong.
Any ideas why??
To your question, for one new make_pkg* versions seem to add/support more properties which are saved within the pkg header, the pkg header also holds the packer version so you might check that value.
also you might not have the same encryption key as they used, you specify a key in the config file, but I didn't bother finding out how to get the encryption key from that and vise versa, all I know is where you get the decryption key from compiled dev pkg, you can read that in the post linked to, in my last post.
another thing might be the PS3LOGO.DAT (caps on purpose since it's saved that way) which might not be included in the original pkg. the make_pkg* checks for that filename and won't display it in the filelist, but if u get the location of the filenames you could just change one or two bits to make it like xS3LOGO.DAT and it would be displayed, or change the apropriate string in the make_pkg* file.
I had some 010 Editor script to decrypt the pkg data for dev packages but I think it's currently unavailable cause of a OS meltdown on my server, but with the description in the older decompile thread it should be possible to do it by hand for the first few lines of the pkg.
The Unencrypted pkg data has a header as well containing 32 bytes for each entry with 64bit filesize, 64bit offset some flags and filename length not in that order though. the filenames them self followed after that, if I remember correctly, and where multiples of 16Byte zero padded, which is why you can change quite some bytes without a problem.
I think I may have answered that one myself. I made a basic config file to generate a package file and it is telling me:
So the KLicensee must be decryption key right?Code:!!Caution: Please set a unique value to the Klicensee for DRM protection. !!Caution: ( such as `head -c 16 /dev/random | xxd -g 16` on linux. ) !!Caution: 0x00000000000000000000000000000000 is not a random value.
Last edited by internetfloozy; 02-02-2010 at 10:26 AM Reason: Automerged Doublepost
The decryption key in the pkg is the 16Byte 0x60-0x6f, see , but the k_lic might not be saved to the pkg since it's sony you could try if they save the sha of the k_lic
Hope no one minds me continuing to update this thread with small findings, If i don't i will lose everything.
It appears that when opening a pkg file in a hex editor address 203 [CBh] states if the file is either free or local. 03=free, 02-local
Also at 254 [FEh] to 255 [FFh] is the package version.. both those variables are set in a config file when creating a pkg file.
Whatever changed I make to the K-licensee address 288[120h] to 351[15Fh] never changes... this could be that PS3Logo.DAT you were talking about.
Last edited by internetfloozy; 02-03-2010 at 02:12 PM Reason: Automerged Doublepost
My English is not very good, if not the right answer to your question. This is used when they created file.conf Folding-ell GameCategory.pkg:
byeCode:foldingnppackage.conf # This product ID is only for sample. Please modify to what you owned. # Product_ID = NPUA80021_00-NP9000-SAMPLE0000000001 IP9100-NPIA00002_00 Product_ID =-0000111122223333 # This is only for sample k_licensee. Please modify to what you want. # Please use a unique value for each title except if you have special reason. # (Unique values for each packages are especially recommended.) K_licensee = 0xc0a3b3641c2ad1ef23153a48a3e12345 # K_licensee = NULL # Please select DRM type. # Local: the package will be distributed with charge. # Free: the package will be distributed without charge. DRMType = free # Please select content type. # Gamedata: the package will appear in the Game Data Utility. # GameExec: the package will appear in the Game Column and is executable. ContentType = GameExec # Please set the master package version for submission. PackageVersion = 00.90