-
- Erase the flashing partition first + get hash + check hash
- Flash the partition + get hash + check hash
-
- Unplug in the middle of flashing partitions
- Unplug in the middle of changing slots
- Unplug fast in the beginning when was handshaking with Sahara
-
- edl gpt dump
./edl printgpt --memory=ufs
- Use fastboot to change slot (2 times) and use the above command to dump, should be the same
- edl gpt dump
-
- Recover from stops before updating the header
- Recover from stops after updating the header
- Recover from stops after updating everything but not booted up yet (intended behaviour is backup gpt header updated when the device booted up successfully). This can be recreated using instructions below in
Corrupt gpt header
section.
-
- similar testing method as above
-
No corrupted backup gpt header partition even if the users plug in the device immediately after a fail flash
- The
xbl_$currentslot
is deleted before flashing so it is impossible to do that. Checked by unplug during changing slot and try to turn on the device -> no turn on -> no backup gpt header update -> no corrupted backup gpt header.
- The
# Run this command before flashing to check that the flashing slot partitions don't have the images
# This erases the flashing partitions before the flash and check the data within them
./test_flash before
2. Use bongbui321.github.io/flash to flash the device
- This is for the backup gpt header to be updated to the correct primary header. We check the active slot using the backup gpt header since it is more reliable than the primary gpt header, and based on our implementation, backup gpt header would always in non-corrupted state
# Run this command after flashing to check that the flashing slot partitions are the same as the images
# This reads the flashed partitions and compute the hash + check with the hash of the images
./test_flash after
# This command change the gpt header to the other slot: this emulate the situation
# where the device disconnects during changing slot without finishing the command
# This would also print out the gpt table, the active partitions should be opposite to your actual current active
./test_flash corrupt
2. Uses the web to flash
# print out current gpt header table
# The table should indicate the correct activeslot with correct gpt header since it was recovered by the backup which was still
# holding gpt header before the flash, and not updated until booted up successfully
./test_flash table