Jump to content
Sign in to follow this  
resurs

Russian language in Dahua NVR 4416 - unpacking firmware

Recommended Posts

I rcvd Dahua NVR 4416 in English.

I need to make it Russian.

 

usings ubuntu 16.10 as virtual machine.

 

Unziping current firmware

 

DH_NVR4xxx_Eng_P_V3.201.0000.1.R.20160409.bin

https://cloud.mail.ru/public/N63A/oe5BPRqYB

 

we have files:

 

-rwxrwxrwx  1 adminka adminka     8908 апр  9  2016 Install.lua
-rwxrwxrwx  1 adminka adminka    36928 май 31 21:59 logo-x.cramfs.img
-rwxrwxrwx  1 adminka adminka 12877888 окт 22 12:19 romfs-x.cramfs.img
-rwxrwxrwx  1 adminka adminka   259076 май 31 21:59 u-boot.bin.img
-rwxrwxrwx  1 adminka adminka  1568832 май 31 21:59 web-x.cramfs.img

 

Install.lua is a installing script which says how to flash images inside bin firmware.

romfs-x - is a image which contains linux OS

 

no we have squashed cram filesystem images, turning them into real files:

 

first removing first 64bit of the files

# dd bs=1 skip=64 if=romfs-x.cramfs.img of=romfs-x.cramfs

 

now unsquashing them:

(if dont have unsquashfs just "apt-get install" them in ubuntu)

 

sudo mkdir romfs
sudo unsquashfs -f -d ./romfs romfs-x.cramfs

 

now we have

$ ls -la
drwxrwxrwx 20 root    root    4096 ноя  3 15:37 .
drwxr-xr-x  6 adminka adminka 4096 ноя  7 10:04 ..
drwxrwxrwx  2 root    root    4096 янв  3  2014 bin
drwxrwxrwx  2 root    root    4096 сен  6  2012 boot
drwxr-xr-x  2 adminka adminka 4096 ноя  3 15:38 custom
drwxrwxrwx  2 root    root    4096 сен  4  2012 dev
drwxrwxrwx  6 root    root    4096 дек 18  2013 etc
drwxrwxrwx  2 root    root    4096 сен  4  2012 home
lrwxrwxrwx  1 root    root       9 ноя  3 15:07 init -> sbin/init
drwxrwxrwx  2 root    root    4096 дек  8  2012 lib
lrwxrwxrwx  1 root    root      11 ноя  3 15:07 linuxrc -> bin/busybox
drwxrwxrwx  8 root    root    4096 сен 11  2012 mnt
drwxrwxrwx  2 root    root    4096 ноя  6  2012 nfs
drwxrwxrwx  3 root    root    4096 янв 31  2013 proc
drwxrwxrwx  2 root    root    4096 дек 18  2013 root
drwxrwxrwx  2 root    root    4096 июл 30  2014 sbin
drwxrwxrwx  2 root    root    4096 ноя  6  2012 share
drwxrwxrwx  2 root    root    4096 апр  9  2016 slave
drwxrwxrwx  2 root    root    4096 сен  4  2012 sys
drwxrwxrwx  2 root    root    4096 сен  4  2012 tmp
drwxrwxrwx  7 root    root    4096 май 31 15:59 usr
drwxrwxrwx  2 root    root    4096 сен  4  2012 var

 

inside "custom" directory we have

custom$ ls -la
-rw-r--r--  1 adminka adminka 1674 янв  1  1970 custom.lua
-rwxr--r-x  1 adminka adminka 1268 янв  1  1970 ProductDefinition

 

 

 

inside custom.lua script we have different custom parameters for our NVR 4416

local custom =
{
-- All, English, SimpChinese, TradChinese, Italian, Spanish, Japanese, Russian, French, German,Turkey,Hungarian,Finnish,Estonian,
SupportedLanguage = "English",
SupportedLanguageDefault = "English",


DefaultDahuaddns = ".quickddns.com",
DahuaddnsType = "QUICK DDNS",
--All, PAL , NTSC
SupportedVideoStand = "PAL|NTSC",
SupportedVideoStandDefault = "PAL",


ShowLogo = 1,


DefaultNatProxySvrAddr = "www.easy4ipcloud.com",
DefaultNatProxySvrPort = 8800,
DefaultNatProxySvrKey = "YXQ3Mahe-5H-R1Z_",
DefaultCloudDdnsSvrAddr = "www.easy4ip.com",
DefaultCloudDdnsSvrPort = 12366,

MaxStreams = 2,

SupportedSmartIPC = "YES",

DVR_VENDOR_ID = "General",

DefaultClientWebsite = "http://mobile.easy4ipcloud.com/detect/detect.html",

       DefaultIpv6HostIp = "",
DefaultIpv6HostIp0 = "",
DefaultIpv6HostIp1 = "",
DefaultIpv6HostIp2 = "",

   DefaultIpv6Gateway = "",
   DefaultIpv6Gateway0 = "",
   DefaultIpv6Gateway1 = "",
   DefaultIpv6Gateway2 = "",

DefaultIpv6PriFix = 1,
DefaultIpv6PriFix0 = 1,
DefaultIpv6PriFix1 = 1,
DefaultIpv6PriFix2 = 1,

DefaultAutoGet = 0,
DefaultAutoGet0 = 0,
DefaultAutoGet1 = 0,
DefaultAutoGet2 = 0,


DefaultPrimaryDns = "8.8.8.8",
DefaultSecondDns = "8.8.4.4",


DefaultNatProxySvrEnable = 1,
}

 

and also ProductDefinition file

$ cat ProductDefinition 
{
  "3G" : false,
  "AllLanguages" : [
     "English",
     "SimpChinese",
     "TradChinese",
     "Italian",
     "Spanish",
     "Japanese",
     "Russian",
     "French",
     "German",
     "Portugal",
     "Turkey",
     "Poland",
     "Romanian",
     "Hungarian",
     "Finnish",
     "Estonian",
     "Korean",
     "Farsi",
     "Dansk",
     "Czechish",
     "Bulgaria",
     "Slovakian",
     "Slovenia",
     "Croatian",
     "Dutch",
     "Greek",
     "Ukrainian",
     "Swedish",
     "Serbian",
     "Vietnamese",
     "Lithuanian",
     "Filipino",
     "Arabic",
     "Catalan",
     "Latvian"
  ],
  "DevStringFiles" : [ "StringsCn.txt" ],
  "RemoteDecodeChannels" : 16,
  "RemoteRecordChannels" : 16,
  "Device" : "DVR",
  "Languages" : [ "SimpChinese" , "English" ],
  "DefaultLanguage" : "SimpChinese",
  "MajorVersion" : 3,
  "MaxExtraStream" : 1,
  "MinorVersion" : 0,
  "OEMVersion" : 0,
  "Revision" : 0,
  "TypeVersion" : "R",
  "VSP" : "None",
  "Vendor" : "General",
  "VendorAbbr" : "00",
  "VideoStandards" : [ "PAL", "NTSC" ],
  "WebStringFiles" : [ "webCN.lang" ],
  "webSpec" : "NVR3.200",
  "webSubVer" : "1"

}

 

Changing evr. to Russian here

SupportedLanguage = "English",

SupportedLanguageDefault = "English",

and here

 

"DevStringFiles" : [ "StringsCn.txt" ],

to StringsRu.txt

and

"WebStringFiles" : [ "webCN.lang" ],

to webRU.lang

 

etc etc

 

 

now packing evr back

sudo mkcramfs romfs-x romfs-x.cramfs

 

then making img with adding first 64b block that we removed before

mkimage -A arm -O linux -T ramdisk -n "linux" -e 0x00580000 -a 0x00080000 -d romfs-x.cramfs romfs-x.cramfs.img

 

last thing packing back firmware

# zip -D -X fupdate.bin *

 

 

after flashing this firmware we still see no Russian, but variables in the buttons.

 

Can somebody share the thoughts or tell solution?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×