[Android Software Development] p0isk:
From K700 update log:

open File = /mnt/usb_0/upgrade_loader.pkg
Header encrypt by AES
Header :
35 b3 67 73 08 b5 82 c3 7e d0 9c 0c 40 1c b9 ee 5.gs....~...@...
6e 0f be 55 cf 6e 7d 7c c9 e4 16 f6 00 9a f5 cc n..U.n}|........
17 2b 9f a0 45 eb 66 bf 10 ba a0 bc 55 79 bf 27 .+..E.f.....Uy.'
09 a6 98 a5 b0 02 42 1a dd ac 39 21 c2 0b 36 5d ......B...9!..6]
10 f6 dc c0 8e d7 1e 3a 11 92 83 d1 94 1c bd 73 .......:.......s
a9 51 6d 87 b4 5c 17 99 80 fd 3a c5 50 75 37 3b .Qm..\....:.Pu7;
38 b9 d6 10 84 03 94 b2 c3 60 14 9b ed 0b 63 73 8........`....cs

Header :
68 69 73 65 23 44 48 40 46 69 52 6d 49 44 54 56 hise#DH@FiRmIDTV
31 34 30 31 5f 30 30 32 33 30 36 5f 31 32 5f 30 1401_002306_12_0
30 31 5f 33 37 5f 30 30 37 5f 31 39 34 00 00 00 01_37_007_194...
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 7b d6 9b 45 00 00 00 00 ........{..E....
6d 74 35 38 39 30 5f 65 75 5f 6c 69 6e 75 78 00 mt5890_eu_linux.
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

Validate codefile HMAC
open File = /mnt/usb_0/upgrade_loader.pkg
Encrypted digest:
ea bb 1e c9 9f ff ec ce 4c f2 ed 74 e6 b1 e9 d4 ........L..t....
9c f4 dd 7b 1b cc d9 f3 7e 0e 00 2d 80 00 77 cb ...{....~..-..w.

Download digest
2c cc 0d fd 58 74 a2 38 4d 16 f6 4c f4 b4 1e a8 ,...Xt.8M..L....
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

.....................................................................................................................................................................................................................................................................................................................................New MTK Signature
2c cc 0d fd 58 74 a2 38 4d 16 f6 4c f4 b4 1e a8 ,...Xt.8M..L....
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

MTK Signature matched

From K390 update log:

open File = /mnt/usb_0/upgrade_loader.pkg
Encrypted header:
40 6d dd 9b 2c ef fd 9b 58 17 38 02 68 e8 97 ed @m..,...X.8.h...
06 d3 ff f7 29 28 87 66 28 ba 8a 87 fb 55 ec b4 ....)(.f(....U..
b4 57 c8 bf 79 7b 6f af 3d ab 2d 51 3d e7 a6 dc .W..y{o.=.-Q=...
88 f0 89 5a 51 a1 0a 9b 30 cd b0 0d 4b dc 03 03 ...ZQ...0...K...
c9 71 b2 09 c5 e3 30 52 5c 7b 3a ba 71 ca fc 36 .q....0R\{:.q..6
78 e9 05 51 b5 6d d3 a2 72 1f a2 69 c5 83 b2 1d x..Q.m..r..i....
a8 ad 33 16 f3 e5 ce 0c f7 b2 82 eb 8f 11 2e dd ..3.............
79 95 6b 54 9e e9 b3 29
Header:
48 69 73 65 23 44 48 40 46 69 52 6d 49 44 54 56 Hise#DH@FiRmIDTV
30 38 30 31 5f 30 30 32 31 37 39 5f 32 36 5f 30 0801_002179_26_0
30 31 5f 36 5f 30 30 33 5f 39 30 5f 30 30 32 5f 01_6_003_90_002_
32 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 24..............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
3c c7 7c 0c 00 00 00 00 6d 74 35 38 38 30 5f 65 <.|.....mt5880_e
75 5f 74 32 5f 6c 69 6e 75 78 00 00 00 00 00 00 u_t2_linux......
00 00 00 00 00 00 00 00
open File = /mnt/usb_0/upgrade_loader.pkg
Validate codefile HMAC
open File = /mnt/usb_0/upgrade_loader.pkg
Encrypted digest:
0c fe d2 d7 d5 0c 8d a2 d7 bc 2b a9 01 e5 82 d7 ..........+.....
db 09 0a 8c 8d 04 9a 93 b2 80 49 0c 7e 79 47 71 ..........I.~yGq

Download digest
31 4d 1c 57 d6 bb c5 4f 40 92 6e b8 4b df b1 a8 1M.W...O@.n.K...
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

New HMAC
31 4d 1c 57 d6 bb c5 4f 40 92 6e b8 4b df b1 a8 1M.W...O@.n.K...
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

Signature matched

So UPG_HEADER contain:

Header: 0x70 or 0x78 //where length saved - i don't know now

Digest: 0x20