LG .paf file format

From Legacy Portable Computing Wiki

PAF, or PDK Animation Format[1] is a proprietary graphics format used on many of LG phones, especially Qualcomm-powered ones.

The file format was created by BNSoft Corp. A PAF file can contain multiple images in one file (e.g. boot animation).

Versions

As of now, the known versions of PAF go from version 1 to version 3.

The version can be identified by the header at the start of a file. PAF2 files for example start with "PAF2" or 50 41 46 32 in hex.

PAF files that are a different version than what the phone expects will not display correctly or not display anything at all (such as replacing a PAF3 boot animation with a PAF1 file).

Another form of PAF is RLA, which is identical aside from header differences (RLA instead of PAF) and the EOF text (RLAED instead of EndOfPAF). As of now, this variation is known to be used in the Lemon GC359 with versions 1 and 2.

Phones that have PAF graphics

Phone PAF version
LG BD2233 PAF1
LG B470 PAF3
LG C395 PAF3
LG CU405 PAF1
LG CU720 Uses both PAF1 and PAF3
LG G8000 PAF1
LG GS390 PAF3
LG KW9200 PAF2
LG KX256 PAF1
LG L704i PAF3
LG LP3800 PAF1
LG LP9200 PAF1
LG MX240 PAF1
LG RD6250 PAF2
LG RD6600 PAF1
LG SH210 PAF2
LG SH400 PAF2
LG SH410 PAF2
LG SH640 PAF2
LG SH650 PAF2
LG SV850 PAF2

Conversion Utilities

There are 2 known PAF image converters to exist, one being PafPxo Converter 4.0 and the other being Crawlerop's paftools library.

PafPxo Converter 4.0 is a standalone program that can convert PAF1 and PAF3 images to .png (although it incorrectly names them as .bmp), and can convert files to the .paf image type. It claims to support embedded images in .pxo application files as well, but this only seems to work correctly on .pxo files found in the LG Shine and LG Vu.

The paftools library is a set of python scripts for working with PAF files. paf_decoder.py can decode PAF files of nearly all types, converting the frames to .png format. Many types of PAF files have been tested, with favorable results over PafPxo Converter. paf_finder.py is a script that searches for PAF files in a firmware dump and exports them to separate files.

At the moment, only paftools can decode all types of PAF files, including 1bpp and 2bpp PAF files.

PafPxo Converter is okay if you want to convert an image to PAF, but if you want to convert PAF files to separate PNG frames, use paftools instead.

References