AnsweredAssumed Answered

What is the "invalid backup GPT header, but valid main header" Message I receive when loading Android to eMMC via the MFGTool

Question asked by Mike Domondon on Jul 17, 2019
Latest reply on Jul 21, 2019 by Dwarakesh Radhakrishnan

When I try to load the android images I have built for our android device, I get this error from the Serial Log:

 

UTP: received command '$ hdparm -z /dev/mmcblk3'
UTP: executing "hdparm -z /dev/mmcblk3"

/dev/mmcblk3:
re-reading partition table
Alternate GPT is invalid, using primary GPT.
mmcblk3: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11
UTP: sending Success to kernel for command $ hdparm -z /dev/mmcblk3.
utp_poll: pass returned.
UTP: received command '$ gdisk -l /dev/mmcblk3 '
UTP: executing "gdisk -l /dev/mmcblk3 "
GPT fdisk (gdisk) version 1.0.1

Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

Warning! One or more CRCs don't match. You should repair the disk!

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: damaged

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Disk /dev/mmcblk3: 14417920 sectors, 6.9 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 6BD25717-74A0-4DC6-9034-3E958FB68FE8
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 14050884
Partitions will be aligned on 2048-sector boundaries
Total free space is 3619 sectors (1.8 MiB)

Number Start (sector) End (sector) Size Code Name
1 2048 67583 32.0 MiB FFFF boot
2 67584 133119 32.0 MiB 8300 recovery
3 133120 3278847 1.5 GiB FFFF system
4 3278848 4327423 512.0 MiB FFFF cache
5 4327424 4343807 8.0 MiB FFFF device
6 4343808 4351999 4.0 MiB FFFF misc
7 4352000 4356095 2.0 MiB FFFF datafooter
8 4356096 4360191 2.0 MiB FFFF metadata
9 4360192 4362239 1024.0 KiB FFFF presistdata
10 4362240 14047231 4.6 GiB FFFF userdata
11 14047232 14049279 1024.0 KiB 0700 fbmisc
UTP: sending Success to kernel for command $ gdisk -l /dev/mmcblk3 .
utp_poll: pass returned.
UTP: received command 'send'
UTP: sending Success to kernel for command send.
UTP: received command '$ echo `gdisk -l /dev/mmcblk3 | grep -w boot | awk '{print $1}'` > /tmp/partIdx'
UTP: executing "echo `gdisk -l /dev/mmcblk3 | grep -w boot | awk '{print $1}'` > /tmp/partIdx"
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

Warning! One or more CRCs don't match. You should repair the disk!

 

Even with the error above, the loading of the images completes successfully, and the Android OS loads properly as well. But I just want to know the cause of the error I am seeing. I am using my own partition-table.img which I modified via the device-partitions.bpt:

 

 

{
"settings": {
"disk_size": "6.7 GiB",
"disk_alignment": 1048576
},
"partitions": [
{
"label": "boot",
"size": "32 MiB",
"guid": "auto",
"offset": 0,
"type_guid": "bb499290-b57e-49f6-bf41-190386693794"
},
{
"label": "recovery",
"size": "32 MiB",
"guid": "auto",
"type_guid": "0fc63daf-8483-4772-8e79-3d69d8477de4"
},
{
"label": "system",
"size": "1536 MiB",
"guid": "auto",
"type_guid": "0f2778c4-5cc1-4300-8670-6c88b7e57ed6"
},
{
"label": "cache",
"size": "512 MiB",
"guid": "auto",
"type_guid": "aa3434b2-ddc3-4065-8b1a-18e99ea15cb7"
},
{
"label": "device",
"size": "8 MiB",
"guid": "auto",
"type_guid": "1fd63daf-8583-4772-8e79-3d69d8477de5"
},
{
"label": "misc",
"size": "4 MiB",
"guid": "auto",
"type_guid": "6b2378b0-0fbc-4aa9-a4f6-4d6e17281c47"
},
{
"label": "datafooter",
"size": "2 MiB",
"guid": "auto",
"type_guid": "314f99d5-b2bf-4883-8d03-e2f2ce507d6a"
},
{
"label": "metadata",
"size": "2 MiB",
"guid": "auto",
"type_guid": "b598858a-5fe3-418e-b8c4-824b41f4adfc"
},
{
"label": "presistdata",
"size": "1 MiB",
"guid": "auto",
"type_guid": "e99d84d7-2c1b-44cf-8c58-effae2dc2558"
},
{
"label": "userdata",
"grow": true,
"guid": "auto",
"type_guid": "0bb7e6ed-4424-49c0-9372-7fbab465ab4c"
},
{
"label": "fbmisc",
"size": "1 MiB",
"guid": "auto",
"type_guid": "ebd0a0a2-b9e5-4433-87c0-68b6b72699c7"
}
]
}

 

 

The user capacity of our eMMC is 6.9 GB

Outcomes