fwtool is a package written by oz_paulb in november 2012 which integrated the findings known to that date.
This tool is expanded to integrate repacking and encryption of a modified firmware by kenan, as Paul has planned then.
last released executable - fwtool_exe.zip (actual v07b12)
Complete Repack from level3 to loadable firmware update file. Be carefully: fwtool v0.6final contains a bug in auto increment of version number! Do NOT use this function but deliver version number using command line option. This will not be fixed, as work on v0.7 is ongoing and the bug may be circumvented easily
Allows for repacking of level3 *.mod.* files into FDAT.repack. Header update is NOT ready for now!
Allows for extraction of LZTP version 0x11 found in EA50 and FS700.
-c now re encrypts an FDAT.dec file to FDAT.reenc and rebuilds 'FirmwareData_NexHack.dat”. This is a valid firmware update file and running 'FirmwareUpdater.exe' will update the device with this firmware. Needs manually set up 'FDAT_repack.dat' in '<updaterdir>/nexhack/level2' for repacking. Encrypts and repacks 1.gen SHA1 and 2.gen AES FDAT.repack files correctly. To set up the needed files unpack with -x, this is ready for the needs of the upcoming complete repack and later modify mode of fwtool.
The unpacking structure and naming is changed for ease of repacking, code is restructured for GUI implementation with 'fwtool.c' now containing only the console gui, 'fwt_util' with helpers and 'fwd_pack.c' doing the main work, any hard coded names are now in 'fwt_names.h'. Dropped support for old style unpacking of already extracted single 'FirmwareData*.dat' as this not allows repacking.
To date it has a new mode -x, which eXtracts the whole updater from the autorun sfx exe and unpacks to nexhack inside this package and adds nflasha9 (android app package and webkit webserver) and nflashb1 (android resources) extraction, if these exist like in NEX-6 or NEX-5R. Executed without any argument it prints short usage or the mode option -h (Help) it gives extended hints how to use, mode option -t list the future steps (TODO).
Future v0.7 includes repack tar including checksums structure and repack lzpt images. first tar repacking works, changed attr saving at unpack stage
Planned v0.8 will handle cramfs and fat fs.
oz_paulb's original package may be found here: Firmware encryption
Complete source - see VCS: source-control
Executable only - fwtool_exe.zip (actual v07b12)
It is ready to compile in Code::Blocks http://www.codeblocks.org/downloads/26 (get codeblocks-12.11mingw-setup.exe), so anyone can join quickly.