Did you get a chance to review the post above regarding using OpenSSL to decrypt/re-encrypt the donor MLC nand?Well, I fixed the error above by injecting the BaristaIconDataBase.dat back into the mlc. The original has issues with uppercase files.
Finally got back to this project, and yeah that command seems to work for decrypting it, at least partially. It also "decrypts" the blank 00 bytes into garbage data, so I'm guessing that's screwing with re-encryption, or at least part of it. We really need to figure out how wfslib determines what to decrypt and emulate that method instead. But god damn that codebase is dense.Did you get a chance to review the post above regarding using OpenSSL to decrypt/re-encrypt the donor MLC nand?
It isn't that simple. WFS is a very complex file system, and the encryption is integrated into it. That is why I implemented it with abstractions layers for the encryption. Basically, each block is encrypted separately and the IV of it is based on context. There are also multiple possible block sizes. If you want to transfer one mlc to another console, you have to reencrypt every block. For that you have to find all the blocks with the correct context. My code for extracting covers only parts of the filesystem. There are still mabyy structures that my code doesn't cover.Finally got back to this project, and yeah that command seems to work for decrypting it, at least partially. It also "decrypts" the blank 00 bytes into garbage data, so I'm guessing that's screwing with re-encryption, or at least part of it. We really need to figure out how wfslib determines what to decrypt and emulate that method instead. But god damn that codebase is dense.
Oh hi, glad to see you here! It's unfortunate we don't yet know enough about the filesystem to be able to achieve what I want. I couldn't figure out how to inject files manually when the file it's trying to replace is corrupted or just gone from the filesystem, so I thought maybe a brute force blockwise method would work. Is there any other way you can think of fixing a broken filesystem?It isn't that simple. WFS is a very complex file system, and the encryption is integrated into it. That is why I implemented it with abstractions layers for the encryption. Basically, each block is encrypted separately and the IV of it is based on context. There are also multiple possible block sizes. If you want to transfer one mlc to another console, you have to reencrypt every block. For that you have to find all the blocks with the correct context. My code for extracting covers only parts of the filesystem. There are still mabyy structures that my code doesn't cover.
Basically there are two big parts that my code doesn't handle:
1. The free blocks tree
2. The journal
I already did a lot of research into 1, and I fully understand (or at least understood when I last worked on it) the full tree structures (which is pretty complex)
I still have to implement it and than understand the journal, which I had hard time to do. But I need to get back to it.
Only after my code would be able to parse every bit of the filesystem, it would be possible to reencrypt all the blocks.
I had a file in the mlc dump that I think was corrupted, so I ftp'd the file then used wfs inject. It sometimes does and sometimes doesn't work. It worked for me though. It was the BaristaIconDataBase.dat.Oh hi, glad to see you here! It's unfortunate we don't yet know enough about the filesystem to be able to achieve what I want. I couldn't figure out how to inject files manually when the file it's trying to replace is corrupted or just gone from the filesystem, so I thought maybe a brute force blockwise method would work. Is there any other way you can think of fixing a broken filesystem?
Unfortunately trying to inject files tends not to work on mine because the allocated space for them is too small (or something, it's been a while).I had a file in the mlc dump that I think was corrupted, so I ftp'd the file then used wfs inject. It sometimes does and sometimes doesn't work. It worked for me though. It was the BaristaIconDataBase.dat.
what's odd is that that file I mentioned seems to be cut off when extracted, even with the forks, compared with if you were to ftp it. I don't know if the allocated space is what's causing that to happen, but I've dumped the nand like 3 or 4 times, and every time, it's that file that's corrupted (I think). it will say "cannot read BaristaIconDataBase.dat." not sure how it happened, but one time it worked. I had to compile the fork with a fix for uppercase locations, because the original will say that it can't find the location if it has uppercase. it injects without error now, but only sometimes will dump afterwards without error. I kept the dump that always works, but as I mentioned, it seems to be cutoff that file or something which makes me wonder if other files are cutoff. even when the dump dumps everything successfully, without error, that file is still cutoff.Unfortunately trying to inject files tends not to work on mine because the allocated space for them is too small (or something, it's been a while).