what will this code do?

westhealth

n3wb
Oct 12, 2020
22
1
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:
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.
 
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?