Hacking Help unpacking PSV images

nitro322

Active Member
OP
Newcomer
Joined
Mar 5, 2014
Messages
35
Trophies
0
XP
294
Country
United States
Hello. I'm having trouble unpacking / extracting files from PSV images. I'm sure I must be missing something dumb, but I've been at this a couple hours now and I'm stuck.

I dumped my own carts using Virtual GC, basically using the No-Intro process. If I strip out the license and header, they match the PSV images already DATted by no-intro, so 'm pretty sure my dumps are good.

To extract, I'm trying to use psvimg-extract, but here's where I'm stuck:

Code:
psvimg-extract -K XXXXX PlayStation\ All-Stars\ Battle\ Royale.psv outdir
hash mismatch at offset 0x8010, (buffer size 0x8020)
expected: AF71EA1CEE8F1AF3BE77CFBED9890FCEAF71EA1CEE8F1AF3BE77CFBED9890FCE
actual: D2E3D403318CC002A64FAA32A25C2A3535382CDD8C04F8F2F5B2E3BB5457FE01
all done.

The key I'm using came from http://cma.henkaku.xyz/. Is that the right way to call the program?

I'm confident I'm pasting the key correctly. Just to be sure I'm even using the right key (I originally created this a while back) I used dump_partials to dump a new partials-XXXXX.bin. Sure enough, that AID converted via the cma website yields the same key I'm trying to use.

The only other odd thing I've found is that I tried to use psvimg-keyfind to find my key basically as a second way to verify the result, but that gives me something different:

Code:
$ psvimg-keyfind 1 partials-XXXXX.bin 
Found 0/8 words, current knowledge:
  ****************************************************************
dispatching 1 jobs with 0xFFFFFFFF tries per job.

  0% [                                                  ] (left: 0xffffffff)
Found 1/8 words, current knowledge:
  00000000********************************************************
dispatching 1 jobs with 0xFFFFFFFF tries per job.

<SNIP>

  0% [                                                  ] (left: 0xffffffff)
Found 7/8 words, current knowledge:
  00000000000000000000000000000000000000000000000000000000********
dispatching 1 jobs with 0xFFFFFFFF tries per job.

  0% [                                                  ] (left: 0xffffffff)
Key found: 0000000000000000000000000000000000000000000000000000000000000000

This completes instantly. I really don't know what that's about. Just for grins I tried using all zeros as my key, but get similar results from psvimg-extract (same error, but different hashes).

I really don't know what I'm doing wrong. Any suggestions?
 

godreborn

Well-Known Member
Member
Joined
Oct 10, 2009
Messages
22,208
Trophies
1
XP
13,889
Country
United States
it sounds like you got your aes key correctly, but that error suggests that it's wrong from what I remember. not sure what could be going on. has it worked for any content? try it with a save or something small.

--------------------- MERGED ---------------------------

I can't recall if the aid is actually the little endian or not, which would be the cma folder. try either one. the aes key will be different both times, but try to extract something with each one.

--------------------- MERGED ---------------------------

little endian means byte reversed btw.

--------------------- MERGED ---------------------------

I just checked on my end (with a save):

upload_2021-9-16_12-14-13.png


you don't want it to say outdir (specify a location or else it will extract the image at the root folder (possibly of the drive, can't remember).

--------------------- MERGED ---------------------------

it will create a folder like this:

upload_2021-9-16_12-18-53.png


if your location has any spaces, put the entire location in quotes.
 
  • Like
Reactions: NeoGranzon

nitro322

Active Member
OP
Newcomer
Joined
Mar 5, 2014
Messages
35
Trophies
0
XP
294
Country
United States
Argh! I figured it out. And appreciate all the responses you gave, because they pointed me in the right direction.

It looks like psvimgtools only works on ".psvimg" and ".psvmd" files backed by via CMA. I understand that's exactly what is says in the README, but I interpreted PSV image as a .psv game image file. I wasn't at all thinking in the context of CMA. Sure enough, I just tried extracting a .psvimg file that I Had backed up through CMA, and that worked perfectly fine.

So man, that was a lot of time wasted on a solution for a completely different problem than the one I'm trying to solve.

So if I may, I'd like to pivot. My actual problem is "how do I extract the contents from PSV game backups as generated by psvgamesd / Virtual GC? I thought psvimgtools was the solution for that, which is obviously wrong, and I'm having trouble finding anything else to do the job.

Any suggestions?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: https://imgur.com/gallery/BiJtKTt