yashsingh1/xdaforums huggingface dataset:
[Upgrading, Modifying and Unlocking] Lysdexiaa:
as per the /help function, first I unpacked the fw using

imgRepackerRK path_filename.img

It will create a dump folder of the said img

then, after all my editing (system.img only) I want to repack the whole fw, again based on /help

imgRepackerRK path_filename.img.dump

My last question was, is it really the procedure that after repacked the dump, its folder still remains? I'm sorry, im new on this kind of stuffs.
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Is it right?

What is the folder? If

- yes, this directory should not be deleted
[Upgrading, Modifying and Unlocking] Magendanz:
The most recent RK3328 OEM firmware releases have been getting a "Unknown RKUboot_Hdr.SHAsize = 32." message. Here's the log:

uboot:type=39 (Rockchip uboot image file) processing
"Z28.img.dump\Image\uboot.img" (Rockchip uboot image file) unpacking
Image properties:
Type: Rockchip uboot image file ("LOADER ")
Physical load address: = 0x00200000
Size in bytes: = 359884 (0x00057dcc)
rkCRC: = 0xdc401d93
SHA size: = 32 (0x20)
SHA: = "69caaf123f4433a0a6b775cab8a659a63566e68473c43d73b8e74a310ea3944b"
Sing tag: = 0x00000000
Sing length: = 0x00000000
Sign (RSA): = ""
Unknown RKUboot_Hdr.SHAsize = 32. Please send mail with link to this image to RedScorpio.
Configuration file"Z28.img.dump\Image\uboot.img.cfg" created
"Z28.img.dump\Image\uboot.img" unpacked
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
This is known problem of rkUboot format (SHA256). Will be solved in new version
[Upgrading, Modifying and Unlocking] nofelet:
ImgRePackerRK not working in Ubuntu 16.04.3 x64. How to fix?

bluenote@bluenotepk:~$ sudo chmod a+x imgrepackerrk

[sudo] password for bluenote:

bluenote@bluenotepk:~$ cd /home/bluenote/

bluenote@bluenotepk:~$ cd /home/bluenote/HeadUnit/

bluenote@bluenotepk:~/HeadUnit$ dir /home/bluenote/HeadUnit/

autodel dupdate.img imgrepackerrk nupdate.img sant

bluenote@bluenotepk:~/HeadUnit$ file dupdate.img

dupdate.img: data

bluenote@bluenotepk:~/HeadUnit$ ./imgrepackerrk dupdate.img

bash: ./imgrepackerrk: No such file or directory

bluenote@bluenotepk:~/HeadUnit$ sudo ./imgrepackerrk dupdate.img

sudo: unable to execute ./imgrepackerrk: No such file or directory

Hangup

bluenote@bluenotepk:~/HeadUnit$ file nupdate.img

nupdate.img: data

bluenote@bluenotepk:~/HeadUnit$ sudo ./imgrepackerrk nupdate.img

sudo: unable to execute ./imgrepackerrk: No such file or directory

Hangup

bluenote@bluenotepk:~/HeadUnit$
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
sudo apt-get install ia32-libs

http://pingvinus.ru/note/bit-32-bit-64-linux-ubuntu
[Upgrading, Modifying and Unlocking] nofelet:
Thank you! For Ubuntu 16.04:

sudo apt-get install sni-qt:i386
[Upgrading, Modifying and Unlocking] silo:
Hi I have a problem with extracting `system.img` file

when execute command:

```sudo ./imgrepackerrk ../working/dupdate.img.dump/Image/system.img ```

I get this output:

```

imgrepackerrk (version 1.06 linux)

Rockchip firmware batch/update images unpacker/packer

(c) RedScorpio, Moscow, 2013-2017

RedScorpio@land.ru

Detected OS:

Ubuntu 16.04.3 LTS \n \l

DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=16.04

DISTRIB_CODENAME=xenial

DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"

NAME="Ubuntu"

VERSION="16.04.3 LTS (Xenial Xerus)"

ID=ubuntu

ID_LIKE=debian

PRETTY_NAME="Ubuntu 16.04.3 LTS"

VERSION_ID="16.04"

HOME_URL="http://www.ubuntu.com/"

SUPPORT_URL="http://help.ubuntu.com/"

BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

VERSION_CODENAME=xenial

UBUNTU_CODENAME=xenial

==========================[ START ]==========================

--- Firmware unpacking ---

2-nd layer file unpacking

ext4 image format detected

Unsupported format (ext4 image)

Unpacking filed

==========================[ STOP ]==========================

```
[Upgrading, Modifying and Unlocking] angelobiz:
hi, i have used rk dumper for extract original stock rom of android tv rk3229... and i need to have original loader too.

rkdumper give me a backup.img where maybe i can founf loader...

but umgrepacker v. 1.06 cannot extract it...

i have this error:

D:\user\Download\imgRePackerRK_106>imgrepackerrk.exe backup.img

imgRepackerRK (version 1.06 windows)

Rockchip firmware batch/update images unpacker/packer

(c) RedScorpio, Moscow, 2013-2017

RedScorpio@land.ru

Detected OS: Windows 8 Pro [build 9200] x64

Real OS: Windows 10 Pro [build 16299] x64

==========================[ START ]==========================

--- Firmware unpacking ---

2-nd layer file unpacking

unknown format detected

Unsupported format (unknown)

Unpacking filed

what can i do?
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Please provide link to this file
[Upgrading, Modifying and Unlocking] angelobiz:
thanks for reply, this is the link of backup.img

https://mega.nz/#!c11jjJTI!d-UaIl4n5Ba8v9Q5ZuDjt7YYnchivmA2YBC8aE15W-w

i give you pictures of rkdumper tool log
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
This is empty (zero's) file
[Upgrading, Modifying and Unlocking] angelobiz:
Mmmm i see the file... Mega always give problems...

I will upload in other space :)

But can only tomorrow

You can try Not copy file, try only clicking on it
[Upgrading, Modifying and Unlocking] Lysdexiaa:
update.img

Hi,

This may be a little of topic, but does this also support extracting/unpacking update.img files then pack it back again? Thank you.
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
If you are talking about RKAF - yes
[Upgrading, Modifying and Unlocking] greg_z:
Hi Guys! Im using 1.06 to unpack modify and pack boot.img It works but after unpacking again i get warning 'Stored and calculated SHA summ are not equal' Should i worry about it or how to fix crc?
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Please provide this both boot
[Upgrading, Modifying and Unlocking] greg_z:
This is full firmware.

https://1drv.ms/u/s!AjrY0uqbW_kBhCr0zB8pj-rIig_U

Thanks
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
I don't need full FW

I need 2 boot.img (I don't know your changes)
[Upgrading, Modifying and Unlocking] greg_z:
I don't know what was the problem but it's ok now.
[Upgrading, Modifying and Unlocking] gtxaspec:
[MENTION=4582467]RedScorpioXDA[/MENTION] trying to use magisk along with your image unpacker and repacker, is there a version of this which can run on the android device itself (arm)? or is your source available so we may compile a tool that runs on the device?

I am trying to use magisk on the rockchip px5... any advice?

The installer zip that magisk is using can't unpack and repack the boot image properly :( but with you toolb it might!
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Several reasons:

1. I've never programmed for Android.

2. I'm not interested in such software for Android (I don't see the point)

I am not a professional programmer and I do not want to show my inability
[Upgrading, Modifying and Unlocking] Lysdexiaa:
Hi, Is the latest version working on Oreo? I'm having problem when mounting the system.img from unpacked img using this tool, says to specify file system type.
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
It is just unpacker/packer. And you can find type in log.
[Upgrading, Modifying and Unlocking] mrleongalaxyum:
2-nd layer file packing failed

Hello,

I have a RK3066 car unit running oreo.

I have acquired update.zip firmware from sendspace.com /pro/dl/2l056f "(new user so not allowed to post links) and i want to edit the boot logo image. using the tool I've managed to extract the bmp file, but i get an error when trying to pack the boot.img using the .dump command

(new user so not allowed to post links) ibb.co/ s3H3KKp

I'm new to all this and any help would be appreciated :D
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Please use *.cfg command

imgRePackerRK boot.img.cfg
[Upgrading, Modifying and Unlocking] mrleongalaxyum:
C:\repacker>imgrepackerrk boot.img.cfg

imgRepackerRK (version 1.06 windows)
Rockchip firmware batch/update images unpacker/packer

(c) RedScorpio, Moscow, 2013-2017
RedScorpio@land.ru

Detected OS: Windows 8 Pro [build 9200] x64
Real OS: Windows 10 Pro [build 17763] x64
==========================[ START ]==========================

--- Firmware creating ---

2-nd layer file packing
Configuration file (boot.img.cfg) found
"boot.img" (Android boot image) packing
Kernel (boot.img.dump\kernel) found
Configuration file (boot.img.dump\ramdisk.cfg) found
"boot.img.dump\ramdisk" (gzip/cpio) packing
"acct" (0) found
"bugreports" (50) found
symlink "/data/user_de/0/com.android.shell/files/bugreports" failed
Ramdisk (boot.img.dump\ramdisk) found
Configuration file (boot.img.dump\second.cfg) found
"boot.img.dump\second.dump\rk-kernel.dtb" (60957) found
"boot.img.dump\second.dump\logo.bmp" (385078) found

Image properties:
Type: Rockchip resources image file (RSCE)
RSCE image version = 0x0000
RSCE file table version = 0x0000
Image header size = 0x01 (512)
File table offset = 0x01 (512)
File table record size = 0x01 (512)
File count = 2
"rk-kernel.dtb" injected (format: unknown)
"logo.bmp" injected (format: bitmap image file)
Second file (boot.img.dump\second) found
Kernel (boot.img.dump\kernel) injected
Ramdisk (boot.img.dump\ramdisk) injected
Second file (boot.img.dump\second) injected
SHA check summ injected
Image properties:
Type Android boot image ("ANDROID!")
KernelSize = 0x012b0808
RamdiskSize = 0x001f409c
SecondFSize = 0x0006d800

OK, after I did that I tried .dump, but i get an error:

C:\repacker>imgrepackerrk boot.img.dump

imgRepackerRK (version 1.06 windows)
Rockchip firmware batch/update images unpacker/packer

(c) RedScorpio, Moscow, 2013-2017
RedScorpio@land.ru

Detected OS: Windows 8 Pro [build 9200] x64
Real OS: Windows 10 Pro [build 17763] x64
==========================[ START ]==========================

--- Firmware creating ---

- "image.cfg" configuration file reading -
Can't open file "boot.img.dump\image.cfg" for reading
Can't read image.cfg. Second layer files can't be processed.

contents of the boot.img.dump folder are:

25-Dec-18 19:31 19,597,320 kernel

25-Dec-18 19:31 2,048,156 ramdisk

25-Dec-18 19:31 6,754 ramdisk.cfg

25-Dec-18 19:31 <DIR> ramdisk.dump

25-Dec-18 19:42 448,512 second

25-Dec-18 19:31 448,512 second.bak

25-Dec-18 19:31 73 second.cfg

25-Dec-18 19:31 <DIR> second.dump

6 File(s) 22,549,327 bytes

4 Dir(s) 138,568,855,552 bytes free
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Explain what you are interested in?

I see that the image is created

What for?
[Upgrading, Modifying and Unlocking] mrleongalaxyum:
My understanding is that I need to run .dump command in order to pack all the changed files back in the original boot.img . Please correct me if I'm wrong. I'm trying to change the logo.bmp and pack it back inside boot.img .
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
I already wrote you the right command and (judging by logs) you already all packed (first log)
[Upgrading, Modifying and Unlocking] mrleongalaxyum:
Ok,thank you very much, I hav not noticed it.

Now that I check,the changes are correctly packed and the file is good, but when i pack it back into the original update.zip, the signature of the zip file changes and stock recovery refuses to update. I have a px5 android auto device for which i cant install cwm or twrp as the device is not officialy supported. Any help would be greatly appreciated.

---------- Post added at 11:05 PM ---------- Previous post was at 11:03 PM ----------

I have already tried a few different signing programs to sign the update.zip, but the recovery refuses to cooperate
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Please provide links to original and modified images
[Upgrading, Modifying and Unlocking] mrleongalaxyum:
Can I send the links to you to publish them as I still don't have enough posts to be allowed to post links?

---------- Post added at 06:47 AM ---------- Previous post was at 06:38 AM ----------

post #6
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Yes
[Upgrading, Modifying and Unlocking] thiago_oliv:
I'm trying to assemble a firmware for my TV Android Box (RK3229).

The problem is, in order to downgrade my firmware to Android 6.0, it seems that I need to keep the "loader" from the recent firmware (Android 7.1 package) and try to put it inside the older firmware.

This is because I can note that when I try to use any firmware with previous versions of the "loader", the device will not accept it and fail to flash.

That being said, where can I find examples of usage of this tool? I don't know the format of a configuration file, but I have some parameters: img and bin files, hex addresses, etc.

Thanks
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Please unpack any firmware and you will get samples of all configuration files
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Please unpack any firmware and and you will get samples of all configuration files
[Upgrading, Modifying and Unlocking] GalAbutbul:
RK3399 supported ?
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Did you read the first message?
[Upgrading, Modifying and Unlocking] johnsmith0123:
I Have Note 9 SM-N960f duel sim model which has UK firmware. wanted to run Jio indian sim and flashed Indian firmware. After installation, CSC is still UK and when I look in the system there is no OMC or CSC folder. see screen shot.

I want to extract CSC from Indian firmware and install it. I can't find.

I have tried to extract CSC from firmware but I can't find the folder. see screen shot.

I may be using wrong program or may be doing something wrong.

https://ibb.co/PDck0LF

https://ibb.co/fCHdJd9

https://ibb.co/59PVHmJ

[IMG="screeen shot"]https://imgur.com/a/iupGR91[/IMG]

Many thanks
[Upgrading, Modifying and Unlocking] GalAbutbul:
works for Android Nougat 7.1.2 ?
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Do you have unpacking problems? I do not know the internal structure of Android and can not tell where to look for the СCS.
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
You can try
[Upgrading, Modifying and Unlocking] johnsmith0123:
I have unpacking problems. want to extract CS.zip for Note 9 N960F rom.

Extracting from

CSC_OMC_OXM_N960FOXM2ARK2_CL14366801_QB20490073_REV00_user_low_ship.tar.md5

Could be using wrong tools.

Link to screen shot

https://www.photobox.co.uk/my/photo/full?photo_id=501638739659

Here a link to the guide I am using

https://youtu.be/giD7nP4Oue4
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
N960F uses CPU Samsung Exynos 9810. imgRePackerRK - for RockChip.
[Upgrading, Modifying and Unlocking] johnsmith0123:
Thanks
[Upgrading, Modifying and Unlocking] LinoX:
does not work with rk3328.

imgrepackerrk ..\T9-4_64-RK3328-6255-v9-1228_AndroidPC.img

imgRepackerRK (version 1.06 windows)
Rockchip firmware batch/update images unpacker/packer

(c) RedScorpio, Moscow, 2013-2017
RedScorpio@land.ru

Detected OS: Windows 8 Pro [build 9200] x64
Real OS: Windows 10 Pro [build 17763] x64
==========================[ START ]==========================

--- Firmware unpacking ---

"RKFW" image file detected

Batch image header from "..\T9-4_64-RK3328-6255-v9-1228_AndroidPC.img" was read
Image properties:
Type RockChip batch image ("RKFW")
Version 8.0.0
Date 2018.12.28
Time 20:08:26
ChipID 0x33323248
Code(?) 0x01060005
RKFWtype 0x00000001
Unknown_1 0x00000000

Unsupported ChipID
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Please use cid option
[Upgrading, Modifying and Unlocking] osm0sis:
Duplicate post. Remove please
[Upgrading, Modifying and Unlocking] osm0sis:
[MENTION=4582467]RedScorpioXDA[/MENTION] I'm interested in supporting this format in my Android Image Kitchen and AnyKernel2 projects. Have you published any source or at least documentation of the differences from the standard AOSP bootimg format?

Thanks! :)
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
I haven't any information about AOSP bootimg format (so I don't know differences)
[Upgrading, Modifying and Unlocking] osm0sis:
Hmm okay! Well the normal AOSP bootimg format is as described here in the source: https://github.com/osm0sis/mkbootimg/blob/master/bootimg.h

And I took a brief look at the RK variant before I knew about your thread and tools and here's what I found to be the broad differences: https://xdaforums.com/showthread.php?p=79170666#post79170666

So my main questions are can you explain the changed/added checksums and I'm curious to know where the second you found with images, etc. was hiding.

And since you're already the expert on this format would you be willing to just update mkbootimg/unpackbootimg to the "AOSP-RK" variant? I've done something similar with the Marvell PXA devices, making "AOSP-PXA": https://github.com/osm0sis/pxa-mkbootimg

Feel free to fork that or my mainline mkbootimg repo and fix it up if you like, and I'd be happy to collaborate and work on it together with you if you're willing or would prefer. :)

Thanks for your time and consideration!
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Wow, that's very interesting.

I use simple configuration (which obtained as a result of research):

typedef struct {
char Magic[8];	// ABOOT_HEADER_MAGIC	"ANDROID!" length=8
unsigned long int KernelSize;
unsigned long int KernelAddr;
unsigned long int RamdiskSize;
unsigned long int RamdiskAddr;
unsigned long int SecondFSize;
unsigned long int SecondFAddr;
unsigned long int TagsAddr;
unsigned long int PageSize;
unsigned long int Unknown_1;
unsigned long int Unknown_2;
char Name[16];
char CmdLine[512];
unsigned char SHAdigest[20];	// SHA1 (20 bytes)
unsigned long int Unknown_3;
unsigned long int Unknown_4;
unsigned long int Unknown_5;
} sABootimg_Hdr;
[Upgrading, Modifying and Unlocking] drizzle123:
How would one use this if they had an update.img file generated for a Tinkerboard and they wanted to create the data.bin file that the Tinkerboard uses?
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Sorry, I don't know what "data.bin for Tinkerboard" is
[Upgrading, Modifying and Unlocking] drizzle123:
I think it is just a binary file. I am trying to use this as a replacement of the SPI Image Tool that is below and am wondering if that is possible

https://github.com/rockchip-linux/tools/blob/master/windows/SpiImageTools_v1.41.zip
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
I have no idea what this utility does and therefore can't say anything
[Upgrading, Modifying and Unlocking] tryingtohack:
Great tool! Thank you very much. Everything works for my RK3318 firmware :)
[Upgrading, Modifying and Unlocking] deadlock9x:
Hello, can you let me know how can you success with RK3318 firmware? I also find the method to unpack/repack this firmware but I'm still not success :(

---------- Post added at 05:26 PM ---------- Previous post was at 05:05 PM ----------

[MENTION=4582467]RedScorpioXDA[/MENTION] it show Unsupported chip ID when I unpack RK3318
[Upgrading, Modifying and Unlocking] tryingtohack:
Grabbed firmware from: https://www.h96tvbox.com/content/6-Firmware-upgrade (H96 max rk3318 No Root 《Downlod》)

1. Unpack image file (on windows 10):

imgRePackerRK.exe /cid RK3318_DC_H96_Max_RK3318_noroot_HS2734C_9_20190715.1834.img "

2. Unpack system.img from the created *.dump/Image directory:

imgRePackerRK.exe system.img

3. Copied the system.img.iso file to my raspberry pi and mounted it as a rw filesystem.

4. Deleted /your_mount_point/system/su to fully unroot but you may do whatever you want to do with your image.

5. Transferred back system.img.iso to Windows and packed the system.img.iso back to system.img:

imgRePackerRK.exe system.img.cfg

6. Put back system.img to *.dump/Image and pack updated image file:

imgRePackerRK.exe RK3318_DC_H96_Max_RK3318_noroot_HS2734C_9_20190715.1834.img.dump

Unfortunately, I cannot flash this updated image file right away, because the flash tool complaines about an id mismatch.

So first I flash the original img file and reflash the system partition with the updated system.img. I use AndroidTool_Release_v2.52 to flash, start address is 0x000e7000 (copied from *.dump\Image\parameter.txt).

Hope this helps!
[Upgrading, Modifying and Unlocking] deadlock9x:
Hi, I was try your way but still not success, this is my step by step:

1. Unpack image file (on windows 10) to get system.img file:

imgRePackerRK.exe /cid RK3318_D.img

2. Updated system.img (without any change). I use AndroidTool_Release_v2.52 to flash, start address is 0x000e7000 (copied from *.dump\Image\parameter.txt)

I just want to try reflash the system.img only (which I copy from *dump\Image\) to know it work or not? But after reflash system.img completed, I put the power adapter and it don't see the Blue LED on H96 MAX RK3318, nothing on the TV screen to, may be it have been soft bricked. I need use Factory tool v6.4 to flash the stock firmware for it again.

I don't know what I was wrong? Please see my picture bellow

---------- Post added at 06:10 AM ---------- Previous post was at 05:41 AM ----------

I see this firmware have 3 files .cfg, so which file we should import for AndroidTool?

---------- Post added at 06:18 AM ---------- Previous post was at 06:10 AM ----------

I don't see AndroidTool have file config for RK3318: https://github.com/rockchip-linux/tools/tree/master/windows/AndroidTool/AndroidTool_Release

So I don't know what I was wrong, I also want to unroot this box like you
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Sorry, I don't understand what the question refers to imgRePackerRK
[Upgrading, Modifying and Unlocking] tryingtohack:
Please uncheck parameters.txt, I do only flash system.img.
[Upgrading, Modifying and Unlocking] tryingtohack:
firmware version mismatch

When I unpack/repack an image file the firmare versions do not match. Because of this I cannot flash the repacked image to my device.

Steps to reproduce:

1. download image from https://www.h96tvbox.com/content/6-Firmware-upgrade

(Select/Get img file H96 max rk3318 No Root)

Firmware version before: 9.0.00

2. Unpack image file (on windows 10):

imgRePackerRK.exe /cid RK3318_DC_H96_Max_RK3318_noroot_HS2734C_9_20190715 .1834.img

3. Repack image file

imgRePackerRK.exe RK3318_DC_H96_Max_RK3318_noroot_HS2734C_9_20190715 .1834.img.dump

Firmware version after: 9.40.1b

How can I solve this?
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
http://ge.tt/9ZbfbCy2
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Do you happen to know the correct SHA counting algorithm for bootimg V1 and V2?
[Upgrading, Modifying and Unlocking] osm0sis:
It's sha1 for the header "id" checksum, but I've seen some weird variant images which were sha256 as well on Huawei.

https://github.com/osm0sis/mkbootimg
[Upgrading, Modifying and Unlocking] tryingtohack:
Works great! thanks a ton!
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Thanks so much.

Note that this algorithm (SHA1) does not match RockChip in V. 0. For it you need to add

SHA_update(&ctx, &hdr->tags_addr, sizeof(hdr->tags_addr));
SHA_update(&ctx, &hdr->page_size, sizeof(hdr->page_size));
SHA_update(&ctx, &hdr->header_version, sizeof(hdr->header_version));
SHA_update(&ctx, &hdr->os_version, sizeof(hdr->os_version));
SHA_update(&ctx, &hdr->name, sizeof(hdr->name));
SHA_update(&ctx, &hdr->cmdline, sizeof(hdr->cmdline));
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
New test version http://ge.tt/4XBA1Ky2