Firmware unpack tools

From Openlgtv
Jump to: navigation, search

EPK v1 unpackers/decompressors

E-Pack Decompressor v2.00 (c) 2009 by tester13

In Windows environment, unpacks epk, pak, mtd with different content (cramfs, jffs2, squashfs, lzo).

http://www.lg-hack.info/download/unpack/lg_unpack.zip

Usage: decomp.exe primer.[epk][img][lzo][cramfs][jffs2][squashfs]

epak.py by luca

Extract pak's content from epk.

http://ventoso.org/luca/lghacks/epak.py

un_epk.py by Arno1

Modified luca's python script to extract epk to header, pak file, pak headers and mtd content.

Example with LGMOD142.epk:

arno1@VM4 :> ll 
total 1276 
drwxr-xr-x 3 arno1 users 4096 2010-09-20 12:32 epak 
-rw-r--r-- 1 arno1 users 1286484 2010-09-07 04:58 LGMOD142.epk 
-rwxr-xr-x 1 arno1 users 6281 2010-09-20 12:30 un_epk.py 
arno1@VM4 :> ./un_epk.py LGMOD142.epk 
pak 0 starts at 0x000000d0, length: 0x0013a084 
EPK file: LGMOD142.epk, type: epak, size of packs: 0x0013a084, version: 00031400, contains 1 paks, tv model: HE_DTV_GP_M_AAAAABAA 
saving root.pak, version: 00010402, date: 20100609, mode: 0, modelname: DVB-SATURN6 
arno1@VM4 :> ll 
total 3808 
drwxr-xr-x 3 arno1 users 4096 2010-09-20 12:32 epak 
-rw-r--r-- 1 arno1 users 1286484 2010-09-07 04:58 LGMOD142.epk 
-rw-r--r-- 1 arno1 users 208 2010-09-20 12:33 LGMOD142.epk_header 
-rw-r--r-- 1 arno1 users 1286144 2010-09-20 12:33 LGMOD142.epk_root.mtd 
-rw-r--r-- 1 arno1 users 1286276 2010-09-20 12:33 LGMOD142.epk_root.pak 
-rw-r--r-- 1 arno1 users 128 2010-09-20 12:33 LGMOD142.epk_root.pak_header 
-rwxr-xr-x 1 arno1 users 6281 2010-09-20 12:30 un_epk.py 
arno1@VM4 :> ./un_epk.py 
Usage: un_epk 

EPK v2 unpackers/decompressors

epk2extract by sirius

Firmware extraction tool that can handle older unsecured EPK v1 as well as the new secured EPK v2 firmware packages.


Download latest binary version for linux here: File:Epk2extract.zip


Sources: http://openlgtv.org.ru/websvn/listing.php?repname=Repositary


Forum: http://openlgtv.org.ru/forum/viewtopic.php?f=10&t=13


Known Problems / Limitations
  • Currently the tool can't extract 'patc' ('patch') partitions from epaks for 2011 year SmartTV models completely under some circumstances. The 'patc' partition is logically coupled with the 'base' partition and acts as an overlay to store differences via unionfs only. So for extraction of squashfs formatted 'patc' partition a unionfs with mounted 'base' partition is needed as target filesystem to make it work properly. This process is out of the scope of epk2extract tool and must be done manually if needed.
Installation

The executable is compiled with dynamic linking, so it has some shared library dependencies that you can check by calling

ldd epk2extract

You have to consider that the required shared libraries are installed on your system. In the case you can't install the required versions of the libs you should try to create symlinks for the required version that points to your installed library version.

After you have considered that epk2extract runs successfully than you should setup your PATH environment variable to point to the epk2extract installation directory. This way you can use it from everywhere in your local file system. The extraction is done into the same directory as the input file per default. You can change it to be the current directory by adding the command line switch '-c'.

To run epk2extract on Ubuntu
apt-get install openssl libssl-dev lzop squashfs-tools
cd /lib
ln libcrypto.so.0.9.8 libcrypto.so.1.0.0