该方案基于个人理解,已修复一砖,不过不保证一定适合所有情况
主要使用QPST中的eMMC Software Download工具进行修复
这里使用的版本主要是QPST_2.7_374,也可以下其他更新的版本(366等旧版本不支持8660的hex,会报错)
此时QPST的主要用处就是将手机重新分区,并写入bootloader等底层,最终实现将手机启动到S/W刷机模式或fastboot模式来进行刷机。
需要的文件主要有MPRG8660.hex,8660_msimage.mbn,还有根据对应手机编写的的rawprogram0.xml
MPRG8660.hex的生成可以参考http://www.anyclub.org/2012/04/how-to-build-emmc-flash-programmer.html
不过显然我们是无法得到那些文件的,所以这里就只能借用小米手机fastboot包中的MPRG8660.hex
不过这个hex文件是个刷机程序(flash programmer),在我看来应该就是一个让cpu知道如何把数据写入到ROM中并启动bootloader的程序,所以它应该是相同的cpu之间通用的
而8660_msimage.mbn应该就是bootloader了,小米的8660_msimage.mbn的作用就是让手机启动到U盘模式(此时手机的emmc作为磁盘接到电脑上进行操作,方便进行重新分区并写入正确的底层)
这个文件的生成可以参考http://www.anyclub.org/2012/05/how-to-generate-8660msimagembn.html
需要相应手机的sbl1.mbn,sbl2.mbn,sbl3.mbn,rpm.mbn,tz.mbn和partition_boot.xml来生成(注意,并不推荐这样做,这样生成的文件A820L不能使用,会造成手机无法再进入QHSUSB_DLOAD模式,只能使用JTAG进行恢复)
下面的partition_boot.xml格式在374及更新版本中已经不再使用了,这里附上仅供参考
partition_boot.xml
<?xml version="1.0"?>
<image>
<physical_partition number="0">
<primary order="1" type="4d" bootable="true" label="SBL1" size="1000" readonly="false">
<file name="sbl1.mbn" offset="0"/>
</primary>
<primary order="2" type="51" bootable="false" label="SBL2" size="3000" readonly="false">
<file name="sbl2.mbn" offset="0"/>
</primary>
<primary order="3" type="45" bootable="false" label="SBL3" size="1500" readonly="false">
<file name="sbl3.mbn" offset="0"/>
</primary>
<primary order="4" type="5" bootable="false" label="EXT" size="1000000">
<extended order="1" type="47" label="RPM" size="1000" readonly="false">
<file name="rpm.mbn" offset="0"/>
</extended>
<extended order="2" type="46" label="TZ" size="1000" readonly="false">
<file name="tz.mbn" offset="0"/>
</extended>
</primary>
</physical_partition>
</image>
需要用到eMMC Software Download工具来生成8660_msimage.mbn(版本366)
emmcswdownload.exe -f 8660_msimage.mbn -x partition_boot.xml -s 1G -g 4M
这里再给出用374生成正确8660_msimage.mbn的方法
需要制作一个partition_boot.xml,还要有提取的分区表partition0.bin
partition_boot.xml(不保证该文件的正确性,仅供参考,后果自负)
<?xml version="1.0" ?>
<data>
<!--NOTE: Sector size is 512bytes-->
<program file_sector_offset="0" filename="" label="MODEM" num_partition_sectors="65536" physical_partition_number="0" size_in_KB="32768.0" start_sector="1"/>
<program file_sector_offset="0" filename="sbl1.mbn" label="SBL1" num_partition_sectors="1000" physical_partition_number="0" size_in_KB="500.0" start_sector="65537"/>
<program file_sector_offset="0" filename="sbl2.mbn" label="SBL2" num_partition_sectors="3000" physical_partition_number="0" size_in_KB="1500.0" start_sector="66537"/>
<program file_sector_offset="0" filename="rpm.mbn" label="RPM" num_partition_sectors="1000" physical_partition_number="0" size_in_KB="500.0" start_sector="69559"/>
<program file_sector_offset="0" filename="sbl3.mbn" label="SBL3" num_partition_sectors="4096" physical_partition_number="0" size_in_KB="2048.0" start_sector="70559"/>
<program file_sector_offset="0" filename="emmc_appsboot.mbn" label="ABOOT" num_partition_sectors="5000" physical_partition_number="0" size_in_KB="2500.0" start_sector="74655"/>
<program file_sector_offset="0" filename="" label="BOOT" num_partition_sectors="20480" physical_partition_number="0" size_in_KB="10240.0" start_sector="79655"/>
<program file_sector_offset="0" filename="tz.mbn" label="TZ" num_partition_sectors="1000&