ilyakurdyukov / spreadtrum_flash

Spreadtrum firmware dumper for Linux
102 stars 33 forks source link

Cannot write super.img with this tool fully #9

Closed CE1CECL closed 8 months ago

CE1CECL commented 8 months ago
BSL_REP_VER: "SPRD3\0"
BSL_REP_VER: "Spreadtrum Boot Block version 1.1\0"
FDL2: incompatible partition
file size : 0x100000
Answer "yes" to confirm the "write partition" command: load_partition: vbmeta, target: 0x100000, written: 0x100000
file size : 0x100000
Answer "yes" to confirm the "write partition" command: load_partition: vbmeta_bak, target: 0x100000, written: 0x100000
file size : 0x100000
Answer "yes" to confirm the "write partition" command: load_partition: vbmeta_system, target: 0x100000, written: 0x100000
file size : 0x100000
Answer "yes" to confirm the "write partition" command: load_partition: vbmeta_vendor, target: 0x100000, written: 0x100000
file size : 0x2300000
Answer "yes" to confirm the "write partition" command: load_partition: boot, target: 0x2300000, written: 0x2300000
file size : 0x2300000
Answer "yes" to confirm the "write partition" command: load_partition: recovery, target: 0x2300000, written: 0x2300000
file size : 0xa8c00000
Answer "yes" to confirm the "write partition" command: unexpected response (0xffffffff)
load_partition: super, target: 0xa8c00000, written: 0x2cec6000
root@LenovoLegionT5:/m/e/VBMetaKeysExtractor/VBMetaKeysExtractor# cat xtx.xtx 
( ( clear ) && ( ( yes yes ) | "./spd_dump" verbose 0 keep_charge 1 fdl "fdl.bin" 0x00005000 fdl "uboot.bin" 0x9EFFFE00 write_part vbmeta "vbmeta.nib" write_part vbmeta_bak "vbmeta_bak.nib" write_part vbmeta_system "vbmeta_system.nib" write_part vbmeta_vendor "vbmeta_vendor.nib" write_part boot "boot.nib" write_part recovery "recovery.nib" write_part super "super.nib" reset ) )
root@LenovoLegionT5:/m/e/VBMetaKeysExtractor/VBMetaKeysExtractor# ./xtx.xtx 

However, writing a blank 00 image works, the log for verbose 2 turned out to be 3.4GB, (it seems from the log verbose 2 it wants more data than sent before a "data section done" command or other), here is verbose 1's log: verbose1.txt

CE1CECL commented 8 months ago

Figured it out, it was escaping, disable_transcode AFTER fdl, else it would say timeout right after

BSL_REP_VER: "SPRD3\0"
BSL_REP_VER: "Spreadtrum Boot Block version 1.1\0"
FDL2: incompatible partition
file size : 0x100000
Answer "yes" to confirm the "write partition" command: load_partition: vbmeta, target: 0x100000, written: 0x100000
file size : 0x100000
Answer "yes" to confirm the "write partition" command: load_partition: vbmeta_bak, target: 0x100000, written: 0x100000
file size : 0x100000
Answer "yes" to confirm the "write partition" command: load_partition: vbmeta_system, target: 0x100000, written: 0x100000
file size : 0x100000
Answer "yes" to confirm the "write partition" command: load_partition: vbmeta_vendor, target: 0x100000, written: 0x100000
file size : 0x2300000
Answer "yes" to confirm the "write partition" command: load_partition: boot, target: 0x2300000, written: 0x2300000
file size : 0x2300000
Answer "yes" to confirm the "write partition" command: load_partition: recovery, target: 0x2300000, written: 0x2300000
file size : 0xa8c00000
Answer "yes" to confirm the "write partition" command: load_partition: super, target: 0xa8c00000, written: 0xa8c00000
root@LenovoLegionT5:/m/e/VBMetaKeysExtractor/VBMetaKeysExtractor# cat xtx.xtx 
( ( clear ) && ( ( yes yes ) | "./spd_dump" keep_charge 1 fdl "fdl.bin" 0x00005000 fdl "uboot.bin" 0x9EFFFE00 disable_transcode write_part vbmeta "vbmeta.nib" write_part vbmeta_bak "vbmeta_bak.nib" write_part vbmeta_system "vbmeta_system.nib" write_part vbmeta_vendor "vbmeta_vendor.nib" write_part boot "boot.nib" write_part recovery "recovery.nib" write_part super "super.nib" reset ) )
root@LenovoLegionT5:/m/e/VBMetaKeysExtractor/VBMetaKeysExtractor# ./xtx.xtx