玩机进阶教程-----高通9008线刷XML脚本修改备份 檫除的操作步骤解析

在高通9008官方固件中我们可以看到刷写需要的脚本rawprogram0.xml和辅助脚本patch0.xml,脚本的作用在于将固件内各个分区对应写入手机内。根据分区地址段。然后判断脚本中那些分区不写入。以下步骤将分析emmc字库为例来讲解如何将默认刷入脚本修改为备份 檫除脚本。并且实例演示具体的步骤。ufs格式的字库修改方法步骤一样

提示:步骤方法用之正则正。请勿用于非法固件修改操作

emmc固件脚本

ufs固件脚本

我们使用文档编辑器来打开xml脚本可以看到一下。可以查看图示了解哪些分区是写入,那些是不写入。不写入的分区包括安全数据类分区例如传感器分区和基带分区类

部分原始脚本

复制代码
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="NON-HLOS.bin" label="modem" num_partition_sectors="172032" physical_partition_number="0" size_in_KB="86016.0" sparse="false" start_byte_hex="0x4000000" start_sector="131072"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="fsc" num_partition_sectors="2" physical_partition_number="0" size_in_KB="1.0" sparse="false" start_byte_hex="0xc000000" start_sector="393216"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="ssd" num_partition_sectors="16" physical_partition_number="0" size_in_KB="8.0" sparse="false" start_byte_hex="0xc000400" start_sector="393218"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="sbl1.mbn" label="sbl1" num_partition_sectors="1024" physical_partition_number="0" size_in_KB="512.0" sparse="false" start_byte_hex="0xc002400" start_sector="393234"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="sbl1.mbn" label="sbl1bak" num_partition_sectors="1024" physical_partition_number="0" size_in_KB="512.0" sparse="false" start_byte_hex="0xc082400" start_sector="394258"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="rpm.mbn" label="rpm" num_partition_sectors="1024" physical_partition_number="0" size_in_KB="512.0" sparse="false" start_byte_hex="0xc102400" start_sector="395282"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="rpm.mbn" label="rpmbak" num_partition_sectors="1024" physical_partition_number="0" size_in_KB="512.0" sparse="false" start_byte_hex="0xc182400" start_sector="396306"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="tz.mbn" label="tz" num_partition_sectors="4096" physical_partition_number="0" size_in_KB="2048.0" sparse="false" start_byte_hex="0xc202400" start_sector="397330"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="tz.mbn" label="tzbak" num_partition_sectors="4096" physical_partition_number="0" size_in_KB="2048.0" sparse="false" start_byte_hex="0xc402400" start_sector="401426"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="devcfg.mbn" label="devcfg" num_partition_sectors="512" physical_partition_number="0" size_in_KB="256.0" sparse="false" start_byte_hex="0xc602400" start_sector="405522"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="devcfg.mbn" label="devcfgbak" num_partition_sectors="512" physical_partition_number="0" size_in_KB="256.0" sparse="false" start_byte_hex="0xc642400" start_sector="406034"/>

修改脚本为读取备份

我们要将默认脚本的program修改为read。意思就是将刷入改为备份分区。可以使用编辑器的替换--全部替换功能来进行操作。那么在操作中记住以下几点。对于前面默认不写入的分区可以修改为备份。具体修改可以参考前后图示 例如

复制代码
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="NON-HLOS.bin" label="modem" num_partition_sectors="172032" physical_partition_number="0" size_in_KB="86016.0" sparse="false" start_byte_hex="0x4000000" start_sector="131072"/>

修改为

复制代码
<read SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="NON-HLOS.bin" label="modem" num_partition_sectors="172032" physical_partition_number="0" size_in_KB="86016.0" sparse="false" start_byte_hex="0x4000000" start_sector="131072"/>

平台可以使用qpst操作。文件调用正常按刷机方式调用即可

完成后看qpst默认存储文件夹。在qpst里就有提示。其中里面就有回读出来的分区

也可以使用其他刷写工具进行尝试

修改脚本为檫除分区

同样的步骤将默认脚本的program修改为erase。意思就是将刷入改为檫除分区。同样使用编辑器的替换--全部替换功能来进行操作。

复制代码
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="NON-HLOS.bin" label="modem" num_partition_sectors="172032" physical_partition_number="0" size_in_KB="86016.0" sparse="false" start_byte_hex="0x4000000" start_sector="131072"/>

修改位

复制代码
<erase SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="NON-HLOS.bin" label="modem" num_partition_sectors="172032" physical_partition_number="0" size_in_KB="86016.0" sparse="false" start_byte_hex="0x4000000" start_sector="131072"/>

如果要全分区修改也是同样的方法。注意这个操作要谨慎。此操作可以用于在脚本中修改为檫除 去除某些账号锁 FRP锁的目的。或者一些回读系统系统中无userdata分区。修改为檫除数据分区来达到恢复出厂清除数据的目的。

其他作用

修改脚本除了以上所说的读取备份和檫除还可以用于某些机型解锁bl的目的。像有些修改oem devinfo分区文件来解锁的机型。

以上此类操作完全可以通过adb脚本来执行。在9008端口模式下进行分区的回读 檫除操作。

在详细的教程都只是拓展你的操作思路。打开你的思维。在操作中并运用分析,感受,联想,思考的一种学习方法.

教程只是本人的一些浅薄分析与实际步骤演示。不到之处请谅解。如果对你有些许帮助,请点个赞赞呗

相关推荐
XiYang-DING11 小时前
【MyBatis】XML方式实现CRUD
xml·mybatis
祭曦念2 天前
ArkUI声明式UI入门:从XML到声明式的思维转变
xml·ui·鸿蒙
Meteors.4 天前
安卓源码阅读——01.grade设置binding为true时,xml如何进行映射
android·xml
程序员buddha4 天前
传统 Spring 框架,XML 配置 Bean 的方式
xml·java·spring
前网易架构师-高司机4 天前
带标注的交警识别数据集,可识别交警和非交警,5587张图,支持yolo,coco json,voc xml,文末有模型训练代码
xml·yolo·json·数据集·交警
波诺波5 天前
最小 SOFA XML 场景结构 0-base.scn
xml·java·前端
夕除7 天前
spring boot 14
xml·spring boot·redis
一拳一个娘娘腔7 天前
【SRC漏洞挖掘系列】第09期:XXE与反序列化 —— 当XML和Java开始“吃”代码
xml·java·安全·web安全·github
Cx330❀7 天前
【Linux网络】从以太网碰撞到 Socket 套接字与网络字节序的深度解析
xml·linux·运维·服务器·开发语言·网络·c++
缘于自然89 天前
高通modem如何确认device_config.xml的使用路径
xml·modem·mbn·mcfg