Reprinted please indicate the source and the author contact: http://blog.csdn.net/mimepp
Contact information: Yu Tao <yut616 at Sohu dot com>
Here, we will record the analysis of the firmware of huaxinfei hxf chinachip and open the source code as an open source project for your reference. Please leave a message.
[Open Source]
Open Source Project TRAC wiki address:
Http://trac.assembla.com/mimepp/wiki
[Environment]
Ubuntu Linux
[Analysis]
Generally, firmare contains a header, and hxf is no exception.
Typedef struct _ fw_header {<br/> char magic_number [8];/* e.g.: wadf0100 */<br/> char date [12];/* e.g.: 200902111654 */<br/> int package_size;/* Fw total size */<br/> int CRC; /* This is an unknown item */<br/> int reserved;/* always 0 */<br/> char version [32];/* e.g.: chinachip PMP firmware V1.0 */<br/>} fw_header;
It contains the firmware build date and time, the complete size of the firmware package, and the 32-bit firmware version tag.
The total length is 64 bytes.
The following files are followed by the firmware header.
Typedef struct _ fw_file_info {<br/> int name_len; <br/> char * Name; <br/> char space [1];/* This is a space flag? */<Br/> int size; <br/> void * content; <br/>} fw_file_info;
Generally, the file name and length are included, and the length and content of the file are connected.
Space is not completely determined. The general value is 0x20.
If name_len is 0, it indicates that no file is available.
For details, you can view the source code.
It can be compiled, executed, and decompiled with firmware.
[Todo]
Unimplemented parts include:
* Processing of Chinese Characters
* Processing of input parameters
* Process the output target directory
* How can I calculate CRC in detail?
* Package program
[Experience]
During the analysis process, a lot of content needs to be guessed and tested. This is not a one-stop process. It feels a bit like feeling over the river.
I have never seen a complete open source project to track the analysis of hxf firmware, So I established a project to discuss and develop together, hoping to serve as a reference for interested friends.
You are also welcome to join us for development.
You can send a mail to contact yut616 _ AT _ sohu.com.