[HTC Desire 526] BigCountry907:
Partiition #1 Board Info.

Partition 1 Board Info

So what we need to do is look at everything.

Figure out what uses board_info.

Decide if we should include a file to flash or not.

KEEP IN MIND / IF WE DON'T WRITE A FILE WE ARE GOING TO END UP ERASING THE PARTITION

This means if we choose none as a file to flash then the partition will be filled with zeros.

If there is data needed in this partition and we flash all zeros.

We need to remember to Either Fastboot Flash the partition or dd copy the partition.

Lets see what we have.

#1 The partition is nor read only ( Read only Flag = false )

#2 The partition is not bootable ( Boot Flag = false )

Check that info in the Partition.xml output section of the generator.

Check the rest of the board_info partition data to the data in the 526-EMMC-read1.txt.

If we search around a little we can find out what board_info possibly is for.

Like here.

http://forum.gsmhosting.com/vbb/f83/htc-codes-1919416/index3.html

Even more interesting.

https://securityresear.ch/2017/01/04/fastboot-oem-sha1sum/

And one more reference.

https://xdaforums.com/showthread.php?p=26516911#post26516911

So it looks like it could be beneficial to change some things in the board_info partition.

It deals with the CID and IMEI. At least it did in one point in time.

This primarily applies to the HTC Devices.

We made a backup of this partition earlier in this thread.

Lets go ahead and dump it with hexdump to a text file.

Then we will review the code and decide if we want to change anything.

If you have followed my directory structure you can do that with these commands.

Otherwise edit the file path.

mkdir ~/Desktop/526-Completed/Partition-Info
hexdump -C -v ~/Desktop/526-Completed/A13-Backup/pull/board_info.bin > ~/Desktop/526-Completed/Partition-Info/board_info.txt

Now open the board_info.txt in a text editor and lets take a look.

The file will be here.

~/Desktop/526-Completed/Partition-Info/board_info.txt

The first few lines from my board_info.txt

Very Interesting, if you did a little research you know what we are looking at now. If not go do some research.

This is from my device that has SUPER CID

We do indeed want super CID.

But you cant just flash the board _info from my device without changing the imei and meid to match your device. (Sticker under Battery) :good:

Considering we want to share this rom with other people who can't have our imei / meid on there device we better not include it in the image.

The filename for this partition will be "none" in the xml it will be ("") <---2 quotes

We will want board_info flashed before we can boot the system.

So we will have to use fastboot or adb to get it on the device

But we will have to come up with a patch to patch board_info for the other users.

Lets look at the board_info dump from a different device.

Standard device Locked.

Notice the bytes are all located in the same exact address.

The Cid is the same number of bytes. always 8 bytes

And the IMEI / MID are also in the same exact place.

Since we know the starting address of the partition we can calculate the address of each byte.

Later we will make a script to change the CID and backup the devices board_info.

This way we can flash the partition after we flash the rom.

WHAT WE NOW FIGURED OUT

#1 The partition is not read only ( Read only Flag = false )

#2 The partition is not bootable ( Boot Flag = false )

#3 The partition will not have a filename in the partition.xml

Lets go adjust the Generator Spreadsheet For Partition 1

Set the boot flag

Set the read only flag

set the filename to ""

All the cells for board_info I have highlighted green.

So I know I checked all that data and set the flags.

This group of cells is the same data that will come out in the generated partition.xml. :cool:

WERE NOT QUITE DONE YET

We know that the CID and Imei and Meid are important.

We should search all the partitions for this data. (You never know)

CHANGE THE VALUES BELOW TO MATCH YOUR DEVICE VALUES

THIS IS AN EXAMPLE OF THE DATA FROM MY BACKUP

#1 search for the CID 11111111

11111111

<-------Your CID

METRO001

<-------Your alternate CID

The hex 2 digit format of the IMEI.

#2 search for the IMEI 30 30 30 36 33 30 32 30 31 37 32 38 39 00 00 00 00 00 <-------Your IMEI

30 30 30 36 33 30 32 30 31 37 32 38 39 00 00 00 00 00

And reverse the bytes of the IMEI.

#2 search for the IMEI 00 00 00 00 00 39 38 32 37 31 30 32 30 33 36 30 30 30 <-------Your IMEI Reversed

00 00 00 00 00 39 38 32 37 31 30 32 30 33 36 30 30 30

As we go through the rest of the partitions we want to check for this data as well.

Since we need to flash this as a secondary flash lets create a folder and store those type of partitions there.

mkdir ~/Desktop/526-Completed/Post-Flash
cp -rf ~/Desktop/526-Completed/A13-Backup/pull/board_info.bin ~/Desktop/526-Completed/Post-Flash/board_info.bin

<<<<-----( Board Info Pulled From your Device " EDIT ONLY THE CID" )

1 partition down 64 to go.