Magnificent! Then feel free to comment if you wish to improve the unbricking tutorial for the next one to come!
By the way, if you are experimenting a lot it is a good idea to save all of your partitions, with dd
, just as I suggested here: FP3 custom rom development based on released source code - #301 by calvofl0. The reason is that some partitions are specific to each individual phone, and you will not be able to restore those from the stock images if they get corrupted.
We are close to the point where, provided one makes the correct backups before starting experimenting, the FP3 is essentially unbrickable. Yet, I can imagine at least one way of getting into even bigger troubles than we have been till now: we could corrupt the GPT table. But even then, if we take good note of what is inside, it should be possible to restore it with the programmer in EDL mode.
Here is the GPT table, for future reference:
modem_a: Offset 0x0000000004000000, Length 0x0000000005800000, Flags 0x00004410, Type EFI_BASIC_DATA
modem_b: Offset 0x0000000009800000, Length 0x0000000005800000, Flags 0x0000c010, Type 0x77036cd4
fsc: Offset 0x0000000010000000, Length 0x0000000000000400, Flags 0x00000000, Type 0x57b90a16
ssd: Offset 0x0000000010001000, Length 0x0000000000002000, Flags 0x00000000, Type 0x2c86e742
sbl1_a: Offset 0x0000000010003000, Length 0x0000000000080000, Flags 0x00004400, Type 0xdea0ba2c
sbl1_b: Offset 0x0000000010083000, Length 0x0000000000080000, Flags 0x0000c000, Type 0x77036cd4
rpm_a: Offset 0x0000000010103000, Length 0x0000000000080000, Flags 0x00004400, Type 0x98df793
rpm_b: Offset 0x0000000010183000, Length 0x0000000000080000, Flags 0x0000c000, Type 0x77036cd4
tz_a: Offset 0x0000000010203000, Length 0x0000000000200000, Flags 0x00004400, Type 0xa053aa7f
tz_b: Offset 0x0000000010403000, Length 0x0000000000200000, Flags 0x0000c000, Type 0x77036cd4
devcfg_a: Offset 0x0000000010603000, Length 0x0000000000040000, Flags 0x00004400, Type 0xf65d4b16
devcfg_b: Offset 0x0000000010643000, Length 0x0000000000040000, Flags 0x0000c000, Type 0x77036cd4
dsp_a: Offset 0x0000000010683000, Length 0x0000000001000000, Flags 0x00004400, Type EFI_BASIC_DATA
dsp_b: Offset 0x0000000011683000, Length 0x0000000001000000, Flags 0x0000c000, Type 0x77036cd4
modemst1: Offset 0x0000000012683000, Length 0x0000000000180000, Flags 0x00000000, Type 0xebbeadaf
modemst2: Offset 0x0000000012803000, Length 0x0000000000180000, Flags 0x00000000, Type 0xa288b1f
DDR: Offset 0x0000000014000000, Length 0x0000000000008000, Flags 0x00000010, Type 0x20a0c19c
fsg: Offset 0x0000000014008000, Length 0x0000000000180000, Flags 0x00000010, Type 0x638ff8e2
sec: Offset 0x0000000014188000, Length 0x0000000000004000, Flags 0x00000010, Type 0x303e6ac3
splash: Offset 0x0000000018000000, Length 0x0000000000b00000, Flags 0x00000000, Type 0x20117f86
aboot_a: Offset 0x000000001c000000, Length 0x0000000000300000, Flags 0x00004410, Type 0x400ffdcd
aboot_b: Offset 0x000000001c300000, Length 0x0000000000300000, Flags 0x0000c010, Type 0x77036cd4
dtbo_a: Offset 0x000000001c600000, Length 0x0000000000800000, Flags 0x00004410, Type 0x24d0d418
dtbo_b: Offset 0x000000001ce00000, Length 0x0000000000800000, Flags 0x0000c010, Type 0x77036cd4
vbmeta_a: Offset 0x000000001d600000, Length 0x0000000000010000, Flags 0x00004410, Type 0x4b7a15d6
vbmeta_b: Offset 0x000000001d610000, Length 0x0000000000010000, Flags 0x0000c010, Type 0x77036cd4
boot_a: Offset 0x000000001d620000, Length 0x0000000004000000, Flags 0x00002710, Type 0x20117f86
boot_b: Offset 0x0000000021620000, Length 0x0000000004000000, Flags 0x00003b10, Type 0x77036cd4
devinfo: Offset 0x0000000025620000, Length 0x0000000000100000, Flags 0x00000010, Type 0x1b81e7e6
system_a: Offset 0x0000000025720000, Length 0x00000000c0000000, Flags 0x00004410, Type 0x97d7b011
system_b: Offset 0x00000000e5720000, Length 0x00000000c0000000, Flags 0x0000c010, Type 0x77036cd4
vendor_a: Offset 0x00000001a5720000, Length 0x0000000040000000, Flags 0x00004410, Type 0x97d7b011
vendor_b: Offset 0x00000001e5720000, Length 0x0000000040000000, Flags 0x0000c010, Type 0x77036cd4
persist: Offset 0x0000000228000000, Length 0x0000000002000000, Flags 0x00000000, Type 0x6c95e238
misc: Offset 0x000000022a000000, Length 0x0000000000100000, Flags 0x00000000, Type 0x82acc91f
keystore: Offset 0x000000022a100000, Length 0x0000000000080000, Flags 0x00000000, Type 0xde7d4029
prodinfo: Offset 0x000000022a180000, Length 0x0000000000200000, Flags 0x00000000, Type 0x21130059
config: Offset 0x000000022a380000, Length 0x0000000000008000, Flags 0x00000000, Type 0x91b72d4d
oem: Offset 0x000000022a388000, Length 0x0000000010000000, Flags 0x00000000, Type 0x7db6ac55
limits: Offset 0x000000023c000000, Length 0x0000000000008000, Flags 0x00000010, Type 0x10a0c19c
mota: Offset 0x0000000240000000, Length 0x0000000000080000, Flags 0x00000000, Type EFI_BASIC_DATA
dip: Offset 0x0000000240080000, Length 0x0000000000100000, Flags 0x00000000, Type 0x4114b077
mdtp_a: Offset 0x0000000240180000, Length 0x0000000002000000, Flags 0x00004400, Type 0x3878408a
mdtp_b: Offset 0x0000000242180000, Length 0x0000000002000000, Flags 0x0000c000, Type 0x77036cd4
syscfg: Offset 0x0000000244180000, Length 0x0000000000080000, Flags 0x00000000, Type 0x98df793
mcfg: Offset 0x0000000244200000, Length 0x0000000000400000, Flags 0x00000000, Type EFI_BASIC_DATA
lksecapp_a: Offset 0x0000000248000000, Length 0x0000000000020000, Flags 0x00004410, Type 0xa11d2a7c
lksecapp_b: Offset 0x0000000248020000, Length 0x0000000000020000, Flags 0x0000c010, Type 0x77036cd4
cmnlib_a: Offset 0x0000000248040000, Length 0x0000000000100000, Flags 0x00004410, Type 0x73471795
cmnlib_b: Offset 0x0000000248140000, Length 0x0000000000100000, Flags 0x0000c010, Type 0x77036cd4
cmnlib64_a: Offset 0x0000000248240000, Length 0x0000000000100000, Flags 0x00004410, Type 0x8ea64893
cmnlib64_b: Offset 0x0000000248340000, Length 0x0000000000100000, Flags 0x0000c010, Type 0x77036cd4
keymaster_a: Offset 0x0000000248440000, Length 0x0000000000100000, Flags 0x00004410, Type 0xe8b7cf6e
keymaster_b: Offset 0x0000000248540000, Length 0x0000000000100000, Flags 0x0000c010, Type 0x77036cd4
apdp: Offset 0x000000024c000000, Length 0x0000000000040000, Flags 0x00000000, Type 0xe6e98da2
msadp: Offset 0x000000024c040000, Length 0x0000000000040000, Flags 0x00000000, Type 0xed9e8101
dpo: Offset 0x000000024c080000, Length 0x0000000000002000, Flags 0x00000000, Type 0x11406f35
logdump: Offset 0x000000024c082000, Length 0x0000000004000000, Flags 0x00000000, Type 0x5af80809
frp: Offset 0x0000000250082000, Length 0x0000000000080000, Flags 0x00000000, Type 0x8fa2ad2c
product_a: Offset 0x0000000250102000, Length 0x0000000008000000, Flags 0x00000400, Type 0x9d72d4e4
product_b: Offset 0x0000000258102000, Length 0x0000000008000000, Flags 0x00000000, Type 0x77036cd4
userdata: Offset 0x0000000260102000, Length 0x0000000c2f6f9e00, Flags 0x00000000, Type 0x1b81e7e6
I will also note that after the partitions modem_b
, fsc
, modemst2
, sec
, splash
, vendor_b
, oem
, limits
, mcfg
and keymaster_b
there is non-allocated space. TODO: check if this space is indeed filled by zeros. In principle one expects partitions to be non-contiguous for alignment reasons, but it is better to check that there is indeed nothing relevant there.
So to keep on the safe side, one should also copy the data before the first partition (from 0x0
to 0x4000000
) and the data after the last partition (after 0xe8f7fbe00
), and possibly any date that could be hidden in between the partitions.