Skip to content

33tm/QMG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

QMG

Quramsoft Qmage is a proprietary graphics format used in Samsung devices, notably for startup and shutdown animations.

This is my attempt at reversing the codec, it's totally 1009% 1:1 accurate amazing beautiful as you will see in the demo below.


Demo · SM-S901N, SKTelecom

Custom decoder output

SKT.5GX.mp4

...Looks somewhat familar... (It's just the color palette data for every single frame squashed into a video)

Original

5GX.mp4

Sources and Tools

  • MMS Exploit - Project Zero - Basic information on QG images, not QM animations. Still quite applicable.
  • Samsung Theme Designer - Created a bunch of blank QMGs to experiement with. Old and bad software.
  • simg2img and ext2explore - Tools I used to extract QMGs from Samsung firmware.
  • Ghidra - I can't afford IDA. Disassembled libQmageDecoder.so from a random firmware. Not too much information beyond symbols.
  • PixelViewer - Image viewer, opened QMGs in RGB565 mode. Found per-frame color palette data.
  • ImHex - Hex editor, visualized QMG headers/bodies with the pattern below.
import std.mem;
import type.magic;
import type.size;

struct Header {
    u16 magic;
    u32 unknown1;
    u16 width;
    u16 height;
    u48 unknown2;
    u16 total;
    u16 current;
    u32 unknown3;
    u32 bodySize;
    u32 footerSize;
    char body[bodySize - 32];
};

std::mem::MagicSearch<"QM", Header> header @ std::mem::base_address();

Mm have fun I'm not sure if I did

About

Samsung/Quram "Qmage" codec reverse engineering sorta kinda

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published