[Miscellaneous Android Development] MtwStark:
TV's firmwares?

Hello,

may it works also for TV's firmwares?

I have an Hisense TV, the chip should me a MediaTek MT8222, the firmware file is USBUpgrade.bin, it has a readable header part:

nand erase

dynpart edb64M-nand:0x40000(NPT),0x40000(KL_BP),0x500000(KL),0x1F580000(UBI),-(NA)

saveenv

ubi part UBI

set UBI

saveenv

ubi create RFS 0x700000

ubi create MSLIB 0x3C00000

ubi create CONFIG 0xA00000

ubi create customer 0xC00000

ubi create customerbackup 0xC00000

ubi create APP 0xB000000

ubi create oad 0xB400000

ubi create certificate 0x300000

saveenv

filepartload 81100000 USBUpgrade.bin 2000 1892c6

mscompress7 d 0 81100000 1892c6 80100000

nand erase KL

nand write.e 80100000 KL 48b0d0

nand read.e 80100000 KL 48b0d0

crc32 80100000 48b0d0 81100000

mw 81100004 85055c99 4

cmp.b 81100000 81100004 4

filepartload 81100000 USBUpgrade.bin 192000 3449fd

mscompress7 d 0 81100000 3449fd 80100000

ubi write 80100000 RFS 60e000 60e000

ubi partial_read 80100000 RFS 60e000 0

crc32 80100000 60e000 81100000

mw 81100004 4cce8f29 4

cmp.b 81100000 81100004 4

filepartload 81100000 USBUpgrade.bin 4e2000 92ab50

mscompress7 d 0 81100000 92ab50 80100000

ubi write 80100000 MSLIB 1000000 231e000

filepartload 81100000 USBUpgrade.bin e12000 b47f95

mscompress7 d 0 81100000 b47f95 80100000

ubi write_cont 80100000 MSLIB 1000000

filepartload 81100000 USBUpgrade.bin 1962000 17e747

mscompress7 d 0 81100000 17e747 80100000

ubi write_cont 80100000 MSLIB 31e000

ubi partial_read 80100000 MSLIB 1000000 0

crc32 80100000 1000000 81100000

mw 81100004 a9f82272 4

cmp.b 81100000 81100004 4

ubi partial_read 80100000 MSLIB 1000000 1000000

crc32 80100000 1000000 81100000

mw 81100004 59b4b669 4

cmp.b 81100000 81100004 4

ubi partial_read 80100000 MSLIB 31e000 2000000

crc32 80100000 31e000 81100000

mw 81100004 5c53a2dc 4

cmp.b 81100000 81100004 4

filepartload 81100000 USBUpgrade.bin 1ae2000 277a5f

mscompress7 d 0 81100000 277a5f 80100000

ubi write 80100000 CONFIG 535000 535000

ubi partial_read 80100000 CONFIG 535000 0

crc32 80100000 535000 81100000

mw 81100004 674dfc56 4

cmp.b 81100000 81100004 4

filepartload 81100000 USBUpgrade.bin 1d62000 a9a3ff

mscompress7 d 0 81100000 a9a3ff 80100000

ubi write 80100000 APP 1000000 66b0000

filepartload 81100000 USBUpgrade.bin 2802000 ca686c

mscompress7 d 0 81100000 ca686c 80100000

ubi write_cont 80100000 APP 1000000

filepartload 81100000 USBUpgrade.bin 34b2000 c16954

mscompress7 d 0 81100000 c16954 80100000

ubi write_cont 80100000 APP 1000000

filepartload 81100000 USBUpgrade.bin 40d2000 b55bf6

mscompress7 d 0 81100000 b55bf6 80100000

ubi write_cont 80100000 APP 1000000

filepartload 81100000 USBUpgrade.bin 4c32000 b66075

mscompress7 d 0 81100000 b66075 80100000

ubi write_cont 80100000 APP 1000000

filepartload 81100000 USBUpgrade.bin 57a2000 cc99ee

mscompress7 d 0 81100000 cc99ee 80100000

ubi write_cont 80100000 APP 1000000

filepartload 81100000 USBUpgrade.bin 6472000 3ad580

mscompress7 d 0 81100000 3ad580 80100000

ubi write_cont 80100000 APP 6b0000

ubi partial_read 80100000 APP 1000000 0

crc32 80100000 1000000 81100000

mw 81100004 4a9ce6be 4

cmp.b 81100000 81100004 4

ubi partial_read 80100000 APP 1000000 1000000

crc32 80100000 1000000 81100000

mw 81100004 6fb65345 4

cmp.b 81100000 81100004 4

ubi partial_read 80100000 APP 1000000 2000000

crc32 80100000 1000000 81100000

mw 81100004 9d6af55a 4

cmp.b 81100000 81100004 4

ubi partial_read 80100000 APP 1000000 3000000

crc32 80100000 1000000 81100000

mw 81100004 52344963 4

cmp.b 81100000 81100004 4

ubi partial_read 80100000 APP 1000000 4000000

crc32 80100000 1000000 81100000

mw 81100004 6bcfbfe9 4

cmp.b 81100000 81100004 4

ubi partial_read 80100000 APP 1000000 5000000

crc32 80100000 1000000 81100000

mw 81100004 faefbf8d 4

cmp.b 81100000 81100004 4

ubi partial_read 80100000 APP 6b0000 6000000

crc32 80100000 6b0000 81100000

mw 81100004 9a7b47e 4

cmp.b 81100000 81100004 4

filepartload 81100000 USBUpgrade.bin 6822000 de950

mscompress7 d 0 81100000 de950 80100000

ubi write 80100000 customer 2e8000 2e8000

ubi partial_read 80100000 customer 2e8000 0

crc32 80100000 2e8000 81100000

mw 81100004 55e30aa4 4

cmp.b 81100000 81100004 4

filepartload 81100000 USBUpgrade.bin 6902000 2a7

mscompress7 d 0 81100000 2a7 80100000

ubi write 80100000 customerbackup 193000 193000

ubi partial_read 80100000 customerbackup 193000 0

crc32 80100000 193000 81100000

mw 81100004 284787ec 4

cmp.b 81100000 81100004 4

filepartload 81100000 USBUpgrade.bin 6912000 2c2

mscompress7 d 0 81100000 2c2 80100000

ubi write 80100000 oad 1b2000 1b2000

ubi partial_read 80100000 oad 1b2000 0

crc32 80100000 1b2000 81100000

mw 81100004 cd1793b 4

cmp.b 81100000 81100004 4

ubi part UBI

ubi part UBI

filepartload 81100000 USBUpgrade.bin 6922000 1ad0

mscompress7 d 0 81100000 1ad0 80100000

ubi part UBI

ubi write 80100000 certificate 193000 193000

ubi partial_read 80100000 certificate 193000 0

crc32 80100000 193000 81100000

mw 81100004 c9c67c77 4

cmp.b 81100000 81100004 4

setenv MS_MEM LX_MEM=0x4345000 EMAC_MEM=0x28000 DRAM_LEN=0x18000000 LX_MEM2=0x66500000,0x8C00000 BB_ADDR=0xF1C1000

setenv MS_RFS ubi.mtd=3,2048 root=ubi:RFS rootfstype=ubifs ro

setenv bootargs quiet console=ttyS0,115200 $(MS_RFS) $(MS_MEM) $(mtdparts)

setenv verify n

saveenv

setenv filesize 48b0d0

setenv bootcmd nand read.e 803FFFC0 KL $(filesize)\; bootm 803FFFC0

saveenv

setenv MIU0_GROUP_PRIORITY 1:0:2:3

setenv MIU1_GROUP_PRIORITY 1:0:2:3

setenv MIU0_GROUP_SELMIU 1140:01E8:0000:0016

setenv MIU1_GROUP_SELMIU 4000:0000:0400:0800

saveenv

printenv

setenv MstarUpgrade_complete 1

saveenv

printenv

reset

followed by binary data.

Is it possible tu unpack, modify and repack this?

thank you