what will this code do?

westhealth

n3wb
Joined
Oct 12, 2020
Messages
22
Reaction score
1
Location
Palm Springs, California
I have this file autoexec.sh from well known cctv manufacturer and wondering what this will do if its inserted in DVR during boot
here is the code in autoexec.sh

himd.l 0x20050ee8 | grep "00000035 00000035"

if [ $? = "0" ];then
cd /mnt/usb;
chmod +x update3535;
./update3535 0 all;
else
himd.l 0x20050ee8 |grep "00000020 00000035"
if [ $? = "0" ];then
cd /mnt/usb;
chmod +x update3520;
./update3520 0 all;
fi
fi

also wondering what this update file is for(attached)
thank you
 

Attachments

Last edited:

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,975
Reaction score
6,800
Location
Scotland
wondering what this will do if its inserted in DVR during boot
The code checks what model of SoC (CPU+DSP combo) it's running on, and executes from the USB memory stick either
the 'update3535' program for a Hi3535 or the 'update3520' program for the Hi3520.
Both devices commonly used on NVRs and DVRs.

also wondering what this update file is for(attached)
It's too small for a full firmware update, it's more like a patch.
Just guessing a bit - but it looks like it may be an update to the code that provides HDMI output on a Swann NVR.
 

westhealth

n3wb
Joined
Oct 12, 2020
Messages
22
Reaction score
1
Location
Palm Springs, California
wait, are you saying using this technique, if have a proper firmware, I can stick USB drive during boot and have its firmware flashed without navigating through its main GUI menu kind of like updating with uboot console with ttl adapter?
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,975
Reaction score
6,800
Location
Scotland
I've no basis to claim that - I'm just interpreting the code that you posted.
But it's a fairly common update method.
 
Top