Sorry I'm using a mac at the moment and can't compile for windows. Did you include zlib?
Here's all the files you need to compile if anyone's having trouble: https://db.tt/6OuMv14j
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
[Mobile] Kingdom Hearts Unchained file archives
Re: [Mobile] Kingdom Hearts Unchained file archives
Thanks for the files, unfortunately it doesn't compile either. I even tried switched from Visual Studio to MinGW, maybe it's a Windows specific problem, I really don't know enough about this.
- MayBeePah
- advanced
- Posts: 44
- Joined: Mon Oct 06, 2014 7:22 am
- Has thanked: 1 time
- Been thanked: 30 times
Re: [Mobile] Kingdom Hearts Unchained file archives
I updated it with support for windows but i can't tell if it'll compile, hope it will
https://db.tt/6OuMv14j
https://db.tt/6OuMv14j
Re: [Mobile] Kingdom Hearts Unchained file archives
I was able to compile it after I linked an already compiled zlib library, I'm too much of a noob to understand why including zlib.h wasn't enough to recognize the decompress command, I always got an "undefinied reference error".
Anway, after finally having compiled it, the program still doesn't seem to work. I use it as you described on the last page: khux_decrypt "path to misc.mp4"misc.mp4 "output folder" but absoutely nothing happens.
I probably broke something in the process, hopefully someone more competent than me can chime in.
Edit: After having a deeper look at the resulting exe there really seems to be something wrong with it, so forget what I said above.
Maybe I should just try to split the process, make a script for the decryption (is this possible with QuickBMS?) and decompress the files afterwards.
Anway, after finally having compiled it, the program still doesn't seem to work. I use it as you described on the last page: khux_decrypt "path to misc.mp4"misc.mp4 "output folder" but absoutely nothing happens.
I probably broke something in the process, hopefully someone more competent than me can chime in.
Edit: After having a deeper look at the resulting exe there really seems to be something wrong with it, so forget what I said above.
Maybe I should just try to split the process, make a script for the decryption (is this possible with QuickBMS?) and decompress the files afterwards.
-
- advanced
- Posts: 59
- Joined: Wed Apr 16, 2014 9:25 pm
- Location: In the depths of a game...
- Has thanked: 1 time
- Been thanked: 33 times
- Contact:
Re: [Mobile] Kingdom Hearts Unchained file archives
Yo,
So after a certain someone annoyed me enough so that I fix (and partially reprogram to be able to repack archs) this soft to be able to run on windows
here it is
http://www.govanify.com/files/khuxdecry ... ypt.tar.gz
files that cannot be used(so far only / file that is a filelist, present in misc.png) are renamed as @noname. khux can have VERY long filenames so windows user
should have a lite path such as C:\TEST\ pointing to the extracted files.
Here are also compiled versions both for windows and linux, not any for MACs b\c, excepted MayBeePah, who uses macs anyways ;p
http://www.govanify.com/files/khuxdecry ... ecrypt.elf
http://www.govanify.com/files/khuxdecry ... ecrypt.exe
Not making any diff/patch file but eh you have a makefile and compiled binaries, should be enough.
Not much to say, if you want to see stuff check the source.
On those words me, the white knight of the...what already?
Oh whatever with those endings, I'll just leave on those words.
-GY
So after a certain someone annoyed me enough so that I fix (and partially reprogram to be able to repack archs) this soft to be able to run on windows
here it is
http://www.govanify.com/files/khuxdecry ... ypt.tar.gz
files that cannot be used(so far only / file that is a filelist, present in misc.png) are renamed as @noname. khux can have VERY long filenames so windows user
should have a lite path such as C:\TEST\ pointing to the extracted files.
Here are also compiled versions both for windows and linux, not any for MACs b\c, excepted MayBeePah, who uses macs anyways ;p
http://www.govanify.com/files/khuxdecry ... ecrypt.elf
http://www.govanify.com/files/khuxdecry ... ecrypt.exe
Not making any diff/patch file but eh you have a makefile and compiled binaries, should be enough.
Not much to say, if you want to see stuff check the source.
On those words me, the white knight of the...what already?
Oh whatever with those endings, I'll just leave on those words.
-GY
Last edited by GovanifY on Thu Jun 02, 2016 4:01 pm, edited 1 time in total.
The only limit I've encountered so far is my brain.
-----------------------------------------------
Ya can check my work here:
http://www.govanify.blogspot.fr
http://www.govanify.com
https://twitter.com/GovanifY
-----------------------------------------------
Ya can check my work here:
http://www.govanify.blogspot.fr
http://www.govanify.com
https://twitter.com/GovanifY
- MayBeePah
- advanced
- Posts: 44
- Joined: Mon Oct 06, 2014 7:22 am
- Has thanked: 1 time
- Been thanked: 30 times
Re: [Mobile] Kingdom Hearts Unchained file archives
Thanks GovanifY for this
But try not to be a smart ass next time, I'm sure you didn't know everything when you started programming either.
I got the decryption algorithm though...
But try not to be a smart ass next time, I'm sure you didn't know everything when you started programming either.
I got the decryption algorithm though...
You do not have the required permissions to view the files attached to this post.
-
- advanced
- Posts: 59
- Joined: Wed Apr 16, 2014 9:25 pm
- Location: In the depths of a game...
- Has thanked: 1 time
- Been thanked: 33 times
- Contact:
Re: [Mobile] Kingdom Hearts Unchained file archives
Oh sorry that was not for you xD
I was trying to port a library for my toolkit(libkirk) and had issues w/ it
I made this port in few hours, I didn't even looked at it when I posted this tweet lol
Tho I DID got mad w/ your code at a point b\c windows is just not constant(the binary
file mode) but you have a constant code style w/ spaces instead of tabs and not lines over
80 chars(just issues w/ the trailing) so tbh it was not bad coded, just few part you were missing
man doc AND windows was missing smartness
I was trying to port a library for my toolkit(libkirk) and had issues w/ it
I made this port in few hours, I didn't even looked at it when I posted this tweet lol
Tho I DID got mad w/ your code at a point b\c windows is just not constant(the binary
file mode) but you have a constant code style w/ spaces instead of tabs and not lines over
80 chars(just issues w/ the trailing) so tbh it was not bad coded, just few part you were missing
man doc AND windows was missing smartness
The only limit I've encountered so far is my brain.
-----------------------------------------------
Ya can check my work here:
http://www.govanify.blogspot.fr
http://www.govanify.com
https://twitter.com/GovanifY
-----------------------------------------------
Ya can check my work here:
http://www.govanify.blogspot.fr
http://www.govanify.com
https://twitter.com/GovanifY
- MayBeePah
- advanced
- Posts: 44
- Joined: Mon Oct 06, 2014 7:22 am
- Has thanked: 1 time
- Been thanked: 30 times
Re: [Mobile] Kingdom Hearts Unchained file archives
Don't worry, It just seemed coincidental that you ported my code to windows close to the day you posted your tweet
Also I haven't programmed in C in a few years, so I've forgotten a lot of windows specific code
I used C to make the code portable because i'm using Swift at the moment, which only compiles for Mac and Linux
Also I haven't programmed in C in a few years, so I've forgotten a lot of windows specific code
I used C to make the code portable because i'm using Swift at the moment, which only compiles for Mac and Linux
-
- advanced
- Posts: 59
- Joined: Wed Apr 16, 2014 9:25 pm
- Location: In the depths of a game...
- Has thanked: 1 time
- Been thanked: 33 times
- Contact:
Re: [Mobile] Kingdom Hearts Unchained file archives
Never used Swift and don't think I'm going to use it soon, kinda old school while talking about languages
(Let's say I surely will not use perl, rails or Go before a while while I'm using Vim Script and editing w/ Neovim :p)
As for portable code I can't blame you, windows is shit and it will stay shit for cross compilation, it deprecates libs
to make """safer""" one, changing names, is the only OS non POSIX-compliant, have its own different integration for about
all and is just badly designed. I can't tell you how much cross compiling can be a pain in the ass sometimes T_T.
As for the rest surely won't work on khux anyways, on other projects and I'm not really hot to work on the kh scene before
a while(I'm already working w/ skynism to make this anyways: https://www.youtube.com/watch?v=55p8NWp ... tml5=False
old trailer but tbh the best one we've produced, for specs game has been in RMXP, completely in reprogrammation w/ http://godotengine.org/
I made a custom engine out of this and will surely last for next projects, point is it's easy to use even for non devs and way better than unity/UE while
beeing free and open source(I'm kinda a libre fag on that point). By this I meant design, as for the "non dev" you still require a bit of knowledge but not
much, and UI for anims, maps and stuff we made is just awesome.)
So yeah not sure I'll fix any tools more unless someone pokes me but at least you have this one. Will post the repacker when I'll feel like it
(Might sounds like an ass but eh pretty sure it's buggy, we didn't tested it yet after all)
(Let's say I surely will not use perl, rails or Go before a while while I'm using Vim Script and editing w/ Neovim :p)
As for portable code I can't blame you, windows is shit and it will stay shit for cross compilation, it deprecates libs
to make """safer""" one, changing names, is the only OS non POSIX-compliant, have its own different integration for about
all and is just badly designed. I can't tell you how much cross compiling can be a pain in the ass sometimes T_T.
As for the rest surely won't work on khux anyways, on other projects and I'm not really hot to work on the kh scene before
a while(I'm already working w/ skynism to make this anyways: https://www.youtube.com/watch?v=55p8NWp ... tml5=False
old trailer but tbh the best one we've produced, for specs game has been in RMXP, completely in reprogrammation w/ http://godotengine.org/
I made a custom engine out of this and will surely last for next projects, point is it's easy to use even for non devs and way better than unity/UE while
beeing free and open source(I'm kinda a libre fag on that point). By this I meant design, as for the "non dev" you still require a bit of knowledge but not
much, and UI for anims, maps and stuff we made is just awesome.)
So yeah not sure I'll fix any tools more unless someone pokes me but at least you have this one. Will post the repacker when I'll feel like it
(Might sounds like an ass but eh pretty sure it's buggy, we didn't tested it yet after all)
The only limit I've encountered so far is my brain.
-----------------------------------------------
Ya can check my work here:
http://www.govanify.blogspot.fr
http://www.govanify.com
https://twitter.com/GovanifY
-----------------------------------------------
Ya can check my work here:
http://www.govanify.blogspot.fr
http://www.govanify.com
https://twitter.com/GovanifY
-
- advanced
- Posts: 61
- Joined: Wed Jun 23, 2010 10:12 pm
- Has thanked: 23 times
- Been thanked: 3 times
Re: [Mobile] Kingdom Hearts Unchained file archives
Thanks for compiling and fixing the windows version GovanifY, you are a godsend.
There is some really interesting stuff in there, unfortunately I can't open any image file. Since the game apparently uses lwf all images should be either lossless png or gif, but that's not the case here, instead the header contains "btf" which I couldn't find any information about that would make sense.
Are they encrypted again?
The files in the attachments should be the same, one is from the browser version, the other from the unpacked Unchained archive, both have the same file name.
There is some really interesting stuff in there, unfortunately I can't open any image file. Since the game apparently uses lwf all images should be either lossless png or gif, but that's not the case here, instead the header contains "btf" which I couldn't find any information about that would make sense.
Are they encrypted again?
The files in the attachments should be the same, one is from the browser version, the other from the unpacked Unchained archive, both have the same file name.
You do not have the required permissions to view the files attached to this post.
-
- ultra-n00b
- Posts: 3
- Joined: Thu Jun 16, 2016 6:21 am
- Has thanked: 2 times
Re: [Mobile] Kingdom Hearts Unchained file archives
Did you guys ever figure this out? I know the .lwf file refers to http://gree.github.io/lwf/ **NOT** LuraWave image files. So a lot of the animations are made that way (and the game itself is Cocos2D). But I wasn't sure how to view the individual .png files even knowing this...
-
- advanced
- Posts: 61
- Joined: Wed Jun 23, 2010 10:12 pm
- Has thanked: 23 times
- Been thanked: 3 times
Re: [Mobile] Kingdom Hearts Unchained file archives
The btf format is most likely linked to Cocos2D, there are some bits to be found in the shared library "libcocos2dcpp.so" in the apk file, but I'm not sure that's helpful. I had no luck opening it with Cocos either.
-
- advanced
- Posts: 61
- Joined: Wed Jun 23, 2010 10:12 pm
- Has thanked: 23 times
- Been thanked: 3 times
Re: [Mobile] Kingdom Hearts Unchained file archives
That's literally in the OP but thanks I guess.stellarren21 wrote:You should understand one most important thing right here that 'Kingdom Hearts Unchained' uses these two different gameplay elements:
1st) misc.mp4
2nd) misc.png
Therefore, whenever there is any kind of update then Sizes of original files get enlarged and even sometimes post-installation processes even make your files look even bigger.
I fiddled around with Cocos some more, but I can't seem to find such an optional image format. So it's probably built on top, most likely another encryption since compression wouldn't make that much sense for png files (at least I think so).
-
- beginner
- Posts: 29
- Joined: Sun Aug 07, 2016 1:57 am
- Has thanked: 3 times
- Been thanked: 5 times
Re: [Mobile] Kingdom Hearts Unchained file archives
Okay so thanks to your amazing work, I've created a SaveFile Extractor. You grab your "Cocos2dxPrefsFile.xml" from your device and place it with the tool, then you run it and the tool will convert the save into a decoded BGAD file. (There are other tools to extract each BGAD alone as well).
Note that you can't modify the save and repack it with this tool, as to what I've understood that it's against the rules of this site.
You will need khuxdecrypt. Link to the tool on my GitHub Here.
Note that you can't modify the save and repack it with this tool, as to what I've understood that it's against the rules of this site.
You will need khuxdecrypt. Link to the tool on my GitHub Here.
-
- advanced
- Posts: 61
- Joined: Wed Jun 23, 2010 10:12 pm
- Has thanked: 23 times
- Been thanked: 3 times
Re: [Mobile] Kingdom Hearts Unchained file archives
Thanks for the tool thethiny, being able to back up your savedata manually is always nice.
In other news reddit user ebaroni83 found out how the so-called PNG files are structured: https://www.reddit.com/r/KingdomHearts/ ... ta_in_png/
The custom header contains the image's width at 0x12 and height at 0x16 while the body of the image (starting at 0x26) is compressed with zlib and consists of a "non-compliant bitmap", as he puts it, which has to be flipped horizontally & vertically and the red & blue color channel have to be switched as well to get the correct result.
In other news reddit user ebaroni83 found out how the so-called PNG files are structured: https://www.reddit.com/r/KingdomHearts/ ... ta_in_png/
The custom header contains the image's width at 0x12 and height at 0x16 while the body of the image (starting at 0x26) is compressed with zlib and consists of a "non-compliant bitmap", as he puts it, which has to be flipped horizontally & vertically and the red & blue color channel have to be switched as well to get the correct result.