5.2.X Modified Firmware: Increased line/intrusion/ROI limit to 4

DemonicHawk

Young grasshopper
Joined
Sep 8, 2015
Messages
78
Reaction score
37
Location
Canada
2015/10/04 UPDATE: The ROI region limit has also been increased to 4, although I have only been able to get 3 regions working simultaneously. I've also added update-able zips for each version/region so you don't have to tinker with manually replacing the davinci binaries unless you actually want to.

First off, I'd like to say that I am disappointed that this wasn't shared earlier and was instead only shared to those whom were willing to pay money for it - I won't point fingers since I know there's more than a few people who have successfully modified firmware. I have noticed a lot of bright people in this community and we would all benefit from a greater amount of knowledge sharing.

So after spending a few days staring at code, I figured out the changes that needed to be made in order to increase the line crossing and intrusion detection limit. See the bottom of the post for downloads, I recommend flashing the modified firmware through the web-interface or tftp. EN/CH represents your camera region, NOT the language you want. For the technically inclined though, you can manually replace the davinci binary..

Before replacing the davinci binary, I highly recommend looking at the differences between your davinci binary and the corresponding one I've posted. You can do this with a tool called "VBinDiff" on Windows, just remember to extract the binary, don't compare the .tar.gz files. What you should see a total of 12 hex changes - see the attached 525-diff.png for what it should look like. If you see more changes than that, it will probably "brick" your camera when you upload it. I say "brick" because its not really bricked, you just have to tftp to reload the firmware.

I should also note here that if you're manually replacing the binary, my .tar.gz is NOT LZMA compressed, I cannot for the life of me create an lzma archive that the camera will extract properly (If you know how to do this, I would love to know). Thus, you will need to modify the initrun.sh to tell it that the archive is gzip formatted which can be done by running this command on your camera:
Code:
sed -i 's/axf davinci/zxf davinci/' /dav/initrun.sh
If you decide to restore your original davinci archive, you can swap 'axf' and 'zxf' to reverse the operation. Having the extraction parameters incorrectly paired with the archive format will also "brick" your camera.

If none of the attached files work for you and you have a Hikvision 2-series camera on 5.2.x firmware, post your firmware or davinci file with some info and I will take a look when I get the chance. If you're on 5.3.0 or up, you will not be able to use modified firmware until someone finds a way around the increased integrity checks Hikivision has implemented.





DOWNLOAD LINKS
V5.2.5
DS-2xx2_v5.2.5_141201_CH_4_line_intrusion_roi.zip
https://mega.nz/#!t4FhiKbQ!6tpEciLkUgLzQJ8uAnfQ1tnJXn3U6AaXzeMVylnxGds
DS-2xx2_v5.2.5_141201_EN_4_line_intrusion_roi.zip
https://mega.nz/#!IxFxRILK!LZa5q5Mn7RbLHOSNcqUG685AJ6456lLpr1qnCcIKEEA
v5.2.3
IPC_R0_CH_STD_5.2.3_141024_4_line_intrusion_roi.zip
https://mega.nz/#!lpFyybqD!kGrdmn6Evm4mYL4QZhStPt1roztqSdPJvVW19O9_Zss
IPC_R0_EN_STD_5.2.3_141024_4_line_intrusion_roi.zip
https://mega.nz/#!d00RQYaS!bD0uFGJv9_3hqTYRf40PmXhpLESC4pfqGoCx4sWTMS4
v5.2.0
DS-2xx2_v5.2.0_140721_CH_4_line_intrusion_roi.zip
https://mega.nz/#!hosmEACJ!r2EOG-1Lh9pys8FgM2JKJO_G_EWmws_3pftOun3fhPY
DS-2xx2_v5.2.0_140721_EN_4_line_intrusion_roi.zip
https://mega.nz/#!Rw01BaSQ!7rIb-ecd4-ZT4CPwC1qikp2FSOb_JS82QUlV9k0Rh8Q

davinci binaries
davinci-525-patched.tar.gz
https://mega.nz/#!cg1G3AzJ!lq_0Wgk3N6Zki6d_HlW8EqJ377qh_rPDc7YA__XwITw
davinci-523-patched.tar.gz
https://mega.nz/#!ttNQyKxC!bjydy7d71qQ1-TqJnGJu8xcPLRDl9SgR-ZfHiaeUifo
davinci-520-patched.tar.gz
https://mega.nz/#!s0MywaKA!8GDIdPWJEvARZ1rE65no0KJivwmynVUxe57hjJDepT0
 

Attachments

Last edited by a moderator:

djangel

Pulling my weight
Joined
Aug 30, 2014
Messages
336
Reaction score
149
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

Thanks for sharing! Just recently updated my NVR's firmware and started playing with line crossing with my cameras, but having one 1 line option was forcing me to keep motion detection too. I'll definitely try this in one of my cameras for now and see how it works.
 

djangel

Pulling my weight
Joined
Aug 30, 2014
Messages
336
Reaction score
149
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

I downloaded DS-2xx2_v5.2.5_141201_4_line_intrusion.zip file, but I'm getting an archive is corrupt error. Even after re-download.
 

DemonicHawk

Young grasshopper
Joined
Sep 8, 2015
Messages
78
Reaction score
37
Location
Canada
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

I downloaded DS-2xx2_v5.2.5_141201_4_line_intrusion.zip file, but I'm getting an archive is corrupt error. Even after re-download.
Thanks, you're right, I tried re-uploading a few times but still got the same thing, I've added a mirror to the first post instead.
 

djangel

Pulling my weight
Joined
Aug 30, 2014
Messages
336
Reaction score
149
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

OK, mirror link worked. Was able to download and extract the digicap.dav without errors. Thanks!
 

whoslooking

IPCT Contributor
Joined
Oct 3, 2014
Messages
1,524
Reaction score
548
Location
London
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

I will be looking to adding this into the downgrader if possible.

UPDATE, NOW INCLUDED IN THE 5.30 DOWNGRADER

The things I would like to get working are people counting and face capture.

Unfortunately there are people in this and other forums that want to profit from the knowledge shared here, I could name quite a few.
I'm proud not to be one of them....

Thank you for sharing your find.


Note: 5.2.8 was never released due to and error in the firmware, it was a limited production line only.
 
Last edited by a moderator:

Del Boy

Getting comfortable
Joined
Mar 19, 2015
Messages
2,727
Reaction score
294
Location
UK - England
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

Unfortunately there are people in this and other forums that want to profit from the knowledge shared here, I could name quite a few.
I'm proud not to be one of them....
I will happily buy you a pint any time you want. Your attitude is one of the reasons this place is great and I hope many others see this and decide to do the same.

I'm proud to join you, but I'm not quite as helpful!

@DemonicHawk, thanks for your great attitude and contribution! Free pint for you when you are in London too!
 

whoslooking

IPCT Contributor
Joined
Oct 3, 2014
Messages
1,524
Reaction score
548
Location
London
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

South London and Proud of it, ( but still not aloud to fly Flag of St George ) lol
 

ct23857ip

n3wb
Joined
Mar 8, 2015
Messages
7
Reaction score
0
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

So after spending a few days staring at code, I figured out the changes that needed to be made in order to increase the line crossing and intrusion detection limit. I hope to post a tutorial/guide of some sort eventually on how to modify the davinci binary, but for now you will find a few files attached below
Great appreciate the time you have spent on this. What would be a great addition is if this could be the start of a firnware that includes other fixes. If it could include the fix to make nas's work better that would be great - I have never managed to get the nas working properly due to this bug? Thanks
 

whoslooking

IPCT Contributor
Joined
Oct 3, 2014
Messages
1,524
Reaction score
548
Location
London
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

Great appreciate the time you have spent on this. What would be a great addition is if this could be the start of a firnware that includes other fixes. If it could include the fix to make nas's work better that would be great - I have never managed to get the nas working properly due to this bug? Thanks
Not quite in the same area, but would handy if fixed to work right.
 

DemonicHawk

Young grasshopper
Joined
Sep 8, 2015
Messages
78
Reaction score
37
Location
Canada
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

I will be looking to adding this into the downgrader if possible.

The things I would like to get working are people counting and face capture.

Unfortunately there are people in this and other forums that want to profit from the knowledge shared here, I could name quite a few.
I'm proud not to be one of them....

Thank you for sharing your find.


Note: 5.2.8 was never released due to and error in the firmware, it was a limited production line only.
I would be honored if you added it to your downgrader :D. If you haven't made any changes to the davinci binary, you could just swap them out. Otherwise, I did include a picture in the first post with all of the hex changes that you'd have to make.

I will probably be looking into enabling some other feature in the future, hopefully it won't be too difficult. Just curious though, do you know which cameras officially support all the other "smart" features?

Great appreciate the time you have spent on this. What would be a great addition is if this could be the start of a firnware that includes other fixes. If it could include the fix to make nas's work better that would be great - I have never managed to get the nas working properly due to this bug? Thanks
I'm not familiar with the issues with NAS, but if it has to do with the functionality itself, it would probably require significant changes (and therefore extremely difficult)
 

whoslooking

IPCT Contributor
Joined
Oct 3, 2014
Messages
1,524
Reaction score
548
Location
London
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

I will mod the binaries over the weekend, well done on this.
The 5.16 firmware was another error release as the some of Smart features were part enabled, these were meant to be just for the 4 series models.
 
Last edited by a moderator:

ardsar

n3wb
Joined
Sep 15, 2015
Messages
16
Reaction score
3
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

Hi all I'm fairly new to hikvision cameras. I've purchased European cams running 5.3 firmware. How would I go about flashing this modified firmware. Sorry for the noob question.


Sent from my iPad using Tapatalk
 

whoslooking

IPCT Contributor
Joined
Oct 3, 2014
Messages
1,524
Reaction score
548
Location
London
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

I have updated the 5.30 downgrader with the add on @DemonicHawk and have made note to give you credit for it.

I never look at that .text file before now, it's interesting to take a look at the firmware on the 4 series to compare that file.
 
Last edited by a moderator:

whoslooking

IPCT Contributor
Joined
Oct 3, 2014
Messages
1,524
Reaction score
548
Location
London
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

Hi all I'm fairly new to hikvision cameras. I've purchased European cams running 5.3 firmware. How would I go about flashing this modified firmware. Sorry for the noob question.


Sent from my iPad using Tapatalk
This add on is now added to the downgrader in the sticky section using hiktools change the region flag to 1 then just follow the instructions with the updater
 

normel

Getting the hang of it
Joined
Dec 1, 2014
Messages
288
Reaction score
22
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

As delboy also wrote ''I'm not quite as helpful"" i also feel very guilty somehow because dont have the knowledge otherways would help too. So actually what we are doing is just eating.. So with this message i , at least want to thank you.
 

ardsar

n3wb
Joined
Sep 15, 2015
Messages
16
Reaction score
3
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

This add on is now added to the downgrader in the sticky section using hiktools change the region flag to 1 then just follow the instructions with the updater
I need to change the region flag for non chinese cameras?
 

iTuneDVR

Pulling my weight
Joined
Aug 23, 2014
Messages
846
Reaction score
153
Location
Россия
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

Good research Hawk!
At last!!
But database can contain 8!!! ;)
 

whoslooking

IPCT Contributor
Joined
Oct 3, 2014
Messages
1,524
Reaction score
548
Location
London
Re: 5.2.X Modified Firmware: Increased line/intrusion limit to 4

I have updated the 5.30 downgrader with the add on @DemonicHawk and have made note to give you credit for it.

I never look at that .text file before now, it's interesting to take a look at the firmware on the 4 series to compare that file.
I need to change the region flag for non chinese cameras?
Yes as the firmware is set for chinese models, don't worry it won't change the region of your camera, just the header in the firmware allowing it to load to your camera that is all.
 
Last edited by a moderator:
Top