Analysis of startup failure caused by abnormal Qualcomm msm8k GPT

Source: Internet
Author: User

The Problem Analysis steps are as follows:

I,

GPT probability of the msm8916 platform: after the software is downloaded using the qpst emmc Software Download tool, it cannot be started. For example:

Log analysis indicates that the userdata partition fails to be mounted.



II,

ADB shell ls/dev/block shows that the machine that fails to be started has one fewer partition than the machine that fails to be started: mmcblk0p28, which is the partition where userdata is located!

Refer to my next article, add_partition function learning.

We can see that the/dev/block/mmcblk0pxx partitions are created based on the GPT content. Therefore, we suspect that the GPT content is incorrect and the user partition is not created successfully.

[Email protected]/# cd DEV/block/
[Email protected]:/dev/block # ls

Mmcblk0
Mmcblk0p1
Mmcblk0p10
Mmcblk0p11
Mmcblk0p12
Mmcblk0p13
Mmcblk0p14
Mmcblk0p15
Mmcblk0p16
Mmcblk0p17
Mmcblk0p18
Mmcblk0p19
Mmcblk0p2
Mmcblk0p20
Mmcblk0p21.
Mmcblk0p22
Mmcblk0p23
Mmcblk0p24
Mmcblk0p25
Mmcblk0p26
Mmcblk0p2
// Mmcblk0p28 The p28 partition is available for normal boot.
Mmcblk0p3
Mmcblk0p4
Mmcblk0p5
Mmcblk0p6
Mmcblk0p7
Mmcblk0p8
Mmcblk0p9
Mmcblk0rpmb


III,

Run the DD command to read the GPT data from the mmcblk0 of the MMC device, and read the GPT data when the device is started normally or cannot be started.


4. Use the binary comparison tool hexcmp to compare the two GPTS. There are two major exceptions:



We can see that GPT headergpt header CRC and partition array CRC are different, and first LBA and last LBA are different.

For example:


Is a comparison of partiton array content. We can see that the end lba of the userdata partition is different.

The content of the GPT that cannot be started is compared with the gpt_main0.bin created by default. It is found that the end lba of the userdata partition is equal to that of the build.

The userdata partition is the last partition of the entire emmc. The end LBA of the last partition of different emmc sizes is unknown in the build phase, so building is only a default value.

The LBA value must be automatically updated by the download tool.



IV,

From the above analysis, we can know that the qpst emmc Software Download tool does not update userdata end LBA, or the update fails.

How can we prove that the tool did not write this LBA? Or write failure? Or is the error message written?

Use the winhex tool to extract the GPT header and GPT partition arrary content from the GPT content that cannot be started.

The AS-CRC32.EXE tool is used to calculate the CRC for the contents of GPT header and GPT partition array respectively. Tools such:


By comparing the CRC, the two CRC values in the GPT header that cannot be started from the computer are equal.


Therefore, it can be proved that the userdata end in GPT is not a write failure or is not written.

It is the incorrect content of the final version of the qpst emmc Software Download tool.

Conclusion: The above analysis proves that it is a problem with the qpst emmc Software Download tool.


V,

Solution suggestions,

Update the software version of qpst. The latest version supports a new download tool using the firehose Protocol: qfil,

Instead of qpst emmc software download, qfil is more stable and easy to use. For example:



Refer:

80-n7350-1_ B _guid_partition_tables_programming.pdf

Uefi_2_4_errata_ B .pdf



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.