I combined the header from an older firmware with the new one just to look what will happen. The error "Firmware mismatch" doesn't show up. The DVR reads the firmware file till the end and then shows the error "Upgrading failed, execute program error"
So there must be another cheksum stored...
That is the reason i exracted header, cramfs and new_20.bin with a hex editor. In the new_20.bin there is a timestamp (2017 Jan 03 20:44:22). Just fo fun i added one second and the update fails. Could it be that i have to change the Version number which is stored in the update? Maybe the DVR...
I will tell you exactly what i did (maybe you can figure out my mistake):
1. decrypt whole untouched digicap.dav
2. open decrypted digicap.dav (from point 1) with hex editor and just changed the md5 value with the one from the cramfs.img and saved
3. encrypted the dav file again
5. opened...
I tried it with hikpack. Put every unmodified file in a folder (just used 7zip to extract the files from the original dav file)
- dav_header
- gui_res.tar.lzma
- payler.zip
- start.sh
- sys_app.tar.lzma
- uImage
- WebComponents.exe
- webs.tar.lzma
- new_20.bin
User the command ./hikpack -t k41...
Because the dav file hikpack creates doesn't work. The DVR shows the error Firmware mismatch at the beginning. it doesn't fully read the file till the end. I think Hikpack can't handle the header. I tested this with unmodified files. Hikpack can't even extract the dav file correctly. because it...
The firmware i want to modify consists of 3 parts. 3 times Header + cramfs.img + new_20.bin. Just the last one worked on the DVR. So i will continue with the last one
Decrypting and encrypting is working because md5 values of the files are the same.
Following steps done:
Extracting cramfs.img...
I want to change the Picture which is shown if no camera is connected.
It is true that i have used a HEX editor just a couple of times. But i want to learn that. And i think with a little help I could do it
Hi There,
if i just extract and pack the dav file again (without modifying) i cant use it anymore. the DVR doen't accept the File. "Missmatch" error.
It is an ANNKE DVR. Maybe the firmware isn't supported?
-
test@ubuntu:~/Desktop/1$ ./hikpack -t k41 -x annke.dav -o dav
Magic : 484b5753...