Users browsing this thread: 1 Guest(s)
ripping sprites from apk
#1
I am trying to rip the sprites from an apk game called Hoppenhelm. I changed it to a zip and extracted it but there are no image files only .ogg music files and something called game.DROID. The game seems to have been made with game maker as it has yoyo file types. Am I looking in the wrong place or is this not doable? Any guidance would be appreciated.


Attached Files Thumbnail(s)
       
Reply
Thanked by:
#2
The "game.droid" file holds a secret. If you search for the PNG header (89 50 4E 47 0D 0A 1A 0A) you will find it twice. If you search for the PNG terminator (49 45 4E 44 AE 42 60 82 00) you will find it twice.
Conclusion: there are two hidden PNGs inside this game.droid file.
Extracting them out yields these two images. Is this what you're looking for?

First image:
[Image: u6MbvE5.png]

Second image (white on transparent background, you might not see it in this web view as well as in say photoshop):
[Image: UCXuqhp.png]

EDIT: There appears to be a noticable bleed area around the sprites. The creator of the game has used a postprocessor to "pack" these sprites as tight as possible to a single "texture atlas" and set a bleed setting to two pixels. See image below:
[Image: gzSkoTd.png]

This means that the game, when running, must have a lookup table of all the XYWHs somewhere. Did some searching and they are intact. I will update this post soon.

EDIT: I see now. At 0x73214 there begins an array where each entry is 22 bytes long. One entry defines where the sprite is in the atlas, its size, its hitbox size and something unknown. It's a matter of reading 22 bytes at a time from 0x73214 onwards as eleven unsigned little endian shorts: X Y W H I I I I I I I (I is for Ignore)
Just eyeballing it, looks like there's 0x8694 bytes, so 0x8694/0x16 = 0x61E == 1566 sprites. I am now writing a "cookie cutter" script.

EDIT: I was wrong, there's 1562 sprites. I extracted them now (sorry, no names!) and they're here: https://www.dropbox.com/s/86wgytn3pwuqb9...1.zip?dl=0
Once there was a way to get back homeward
Reply
#3
Wow! I didn't expect such a thoughtful response. You really put a lot of work into this. I feel like I should compensate you. My goal was to reverse engineer the game to learn more about game maker. You even explained some things which is what I was looking for. I am not very familiar with how hex editors work so this might give me a starting point. I have never ripped from a game before. Thanks again!
Reply
Thanked by: Raccoon Sam
#4
It's alright, it was a fun exercise. You should definitely learn to use a Hex Editor, it will help you a lot!
If something looks unusual, it's always a good idea to open it in a Hex Editor. When you see the bytes, you know what's going on.
I'll gladly help if you've got any questions
Once there was a way to get back homeward
Reply
Thanked by:
#5
(08-03-2018, 01:10 AM)Raccoon Sam Wrote: The "game.droid" file holds a secret. If you search for the PNG header (89  50  4E  47  0D  0A  1A  0A) you will find it twice. If you search for the PNG terminator (49 45 4E 44 AE 42 60 82 00) you will find it twice.
Conclusion: there are two hidden PNGs inside this game.droid file.
Extracting them out yields these two images. Is this what you're looking for?

First image:
[Image: u6MbvE5.png]

Second image (white on transparent background, you might not see it in this web view as well as in say photoshop):
[Image: UCXuqhp.png]

EDIT: There appears to be a noticable bleed area around the sprites. The creator of the game has used a postprocessor to "pack" these sprites as tight as possible to a single "texture atlas" and set a bleed setting to two pixels. See image below:
[Image: gzSkoTd.png]

This means that the game, when running, must have a lookup table of all the XYWHs somewhere. Did some searching and they are intact. I will update this post soon.

EDIT: I see now. At 0x73214 there begins an array where each entry is 22 bytes long. One entry defines where the sprite is in the atlas, its size, its hitbox size and something unknown. It's a matter of reading 22 bytes at a time from 0x73214 onwards as eleven unsigned little endian shorts: X Y W H I I I I I I I (I is for Ignore)
Just eyeballing it, looks like there's 0x8694 bytes, so 0x8694/0x16 = 0x61E == 1566 sprites. I am now writing a "cookie cutter" script.

EDIT: I was wrong, there's 1562 sprites. I extracted them now (sorry, no names!) and they're here: https://www.dropbox.com/s/86wgytn3pwuqb9...1.zip?dl=0


Hi,

How to extract this image from droid? i cant understand how you do it. Please help me
Reply
Thanked by:
#6
okay got it. download hxd hex editor, find png header and copy until png footer, copy paste new hex file and save as png
Reply
Thanked by:
#7
(08-02-2018, 10:04 PM)seanbg Wrote: I am trying to rip the sprites from an apk game called Hoppenhelm. I changed it to a zip and extracted it but there are no image files only .ogg music files and something called game.DROID. The game seems to have been made with game maker as it has yoyo file types. Am I looking in the wrong place or is this not doable? Any guidance would be appreciated.
You could use devxunity. Since, it auto detects mesh/ image/ music files you could easily rip with the demo file. Tho asset studio can rip android data to.
Reply
Thanked by:
#8
Hello, don't be tired. I wanted to extract the sprites inside a game made with the libgdx engine, but the images are encrypted and cannot be opened. I would be grateful if you could guide me. The name of the program (diamond quest don't rush)
Reply
Thanked by:


Forum Jump: