admin管理员组

文章数量:1531357

2024年3月6日发(作者:)

调整 data . cache system 分区大小

打开线刷 OPPO R831T 刷机包,会看到一些文件

这里说下每个刷机文件对应的文件名

PRELOADER→

MBR→MBR

EBR1→EBR1

UBOOT→

BOOTIMG→

RECOVERY→

SEC_RO→

LOGO→

EBR2→EBR2

ANDROID→

这就是线刷工具能识别到的文件名,一定要改成对应的名称

要打开

MT6572_Android_scatter_emmcTXT

这个时候 就要用到 Notepad++ 了,打开桌面上的 新建文件夹 单机scatter_文件,再用 Notepad++打开

于是看到一下内容

############################################################################################################

#

# General Setting

#

############################################################################################################

- general: MTK_PLATFORM_CFG

info:

- config_version: V1.1.1

platform: MT6572

project: OPPO72_13079

storage: EMMC

boot_channel: MSDC_0

block_size: 0x20000

############################################################################################################

#

# Layout Setting

#

############################################################################################################

- partition_index: SYS0

partition_name: PRELOADER

file_name: preloader_OPPO72_

is_download: true

type: SV5_BL_BIN

linear_start_addr: 0x0

physical_start_addr: 0x0

partition_size: 0xc00000

region: EMMC_BOOT_1

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: BOOTLOADERS

reserve: 0x00

- partition_index: SYS1

partition_name: MBR

file_name: MBR

is_download: true

type: NORMAL_ROM

linear_start_addr: 0xc00000

physical_start_addr: 0x0

partition_size: 0x80000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: UPDATE

reserve: 0x00

- partition_index: SYS2

partition_name: EBR1

file_name: EBR1

is_download: true

type: NORMAL_ROM

linear_start_addr: 0xc80000

physical_start_addr: 0x0

partition_size: 0x80000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: UPDATE

reserve: 0x00

- partition_index: SYS3

partition_name: PRO_INFO

file_name: NONE

is_download: false

type: NONE

linear_start_addr: 0xd00000

physical_start_addr: 0x0

partition_size: 0x300000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: PROTECTED

reserve: 0x00

- partition_index: SYS4

partition_name: NVRAM

file_name: NONE

is_download: false

type: NONE

linear_start_addr: 0x1000000

physical_start_addr: 0x0

partition_size: 0x500000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: BINREGION

reserve: 0x00

- partition_index: SYS5

partition_name: PROTECT_F

file_name: NONE

is_download: false

type: NONE

linear_start_addr: 0x1500000

physical_start_addr: 0x0

partition_size: 0xa00000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: PROTECTED

reserve: 0x00

- partition_index: SYS6

partition_name: PROTECT_S

file_name: NONE

is_download: false

type: NONE

linear_start_addr: 0x1f00000

physical_start_addr: 0x0

partition_size: 0xa00000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: PROTECTED

reserve: 0x00

- partition_index: SYS7

partition_name: SECCFG

file_name: NONE

is_download: false

type: NONE

linear_start_addr: 0x2900000

physical_start_addr: 0x0

partition_size: 0x20000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: INVISIBLE

reserve: 0x00

- partition_index: SYS8

partition_name: UBOOT

file_name:

is_download: true

type: NORMAL_ROM

linear_start_addr: 0x2920000

physical_start_addr: 0x0

partition_size: 0x60000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: UPDATE

reserve: 0x00

- partition_index: SYS9

partition_name: BOOTIMG

file_name:

is_download: true

type: NORMAL_ROM

linear_start_addr: 0x2980000

physical_start_addr: 0x0

partition_size: 0x600000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: UPDATE

reserve: 0x00

- partition_index: SYS10

partition_name: RECOVERY

file_name:

is_download: true

type: NORMAL_ROM

linear_start_addr: 0x2f80000

physical_start_addr: 0x0

partition_size: 0xa00000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: UPDATE

reserve: 0x00

- partition_index: SYS11

partition_name: SEC_RO

file_name:

is_download: true

type: YAFFS_IMG

linear_start_addr: 0x3980000

physical_start_addr: 0x0

partition_size: 0x600000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: UPDATE

reserve: 0x00

- partition_index: SYS12

partition_name: MISC

file_name: NONE

is_download: false

type: NONE

linear_start_addr: 0x3f80000

physical_start_addr: 0x0

partition_size: 0x80000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: INVISIBLE

reserve: 0x00

- partition_index: SYS13

partition_name: LOGO

file_name:

is_download: true

type: NORMAL_ROM

linear_start_addr: 0x4000000

physical_start_addr: 0x0

partition_size: 0x300000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: UPDATE

reserve: 0x00

- partition_index: SYS14

partition_name: EBR2

file_name: EBR2

is_download: true

type: NORMAL_ROM

linear_start_addr: 0x4300000

physical_start_addr: 0x0

partition_size: 0x80000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: UPDATE

reserve: 0x00

- partition_index: SYS15

partition_name: OPPO_CUSTOM

file_name: NONE

is_download: false

type: NONE

linear_start_addr: 0x4380000

physical_start_addr: 0x0

partition_size: 0x100000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: PROTECTED

reserve: 0x00

- partition_index: SYS16

partition_name: RESERVE1

file_name: NONE

is_download: false

type: NONE

linear_start_addr: 0x4480000

physical_start_addr: 0x0

partition_size: 0x2000000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: INVISIBLE

reserve: 0x00

- partition_index: SYS17

partition_name: RESERVE2

file_name: NONE

is_download: false

type: NONE

linear_start_addr: 0x6480000

physical_start_addr: 0x0

partition_size: 0x1000000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: PROTECTED

reserve: 0x00

- partition_index: SYS18

partition_name: EXPDB

file_name: NONE

is_download: false

type: NONE

linear_start_addr: 0x7480000

physical_start_addr: 0x0

partition_size: 0xa00000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: INVISIBLE

reserve: 0x00

ANDROID

是一个YAFFS2文件系统,android系统镜像,对应。

- partition_index: SYS19

partition_name: ANDROID

file_name:

is_download: true

type: YAFFS_IMG

linear_start_addr起始地址: 0x7e80000

physical_start_addr: 0x0

partition_size

分区大小: 0x40000000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: UPDATE

reserve: 0x00

- partition_index: SYS20

partition_name: CACHE

file_name:

CACHE

是一个YAFFS2文件系统,它将挂载到/cache目录下,Android系统内部系统,这里主要用于升级的缓存,比如保存android内部缓存数据(cache data)或是web缓存数据,内容由运行时来定。

is_download: true

type: YAFFS_IMG

linear_start_addr: 0x47e80000

physical_start_addr: 0x0

partition_size: 0x7e00000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: UPDATE

reserve: 0x00

- partition_index: SYS21

partition_name: USRDATA

file_name:

is_download: true

type: YAFFS_IMG

linear_start_addr: 0x4fc80000

physical_start_addr: 0x0

partition_size: 0x40000000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: UPDATE

reserve: 0x00

- partition_index: SYS22

partition_name: FAT

FAT应该是指FAT文件系统,用户的数据就保存在这个区域,也是最大的分区。

file_name: fat_

is_download: true

type: YAFFS_IMG

linear_start_addr: 0x8fc80000

physical_start_addr: 0x0

partition_size: 0x0

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: UPDATE

reserve: 0x00

- partition_index: SYS23

partition_name: BMTPOOL

BMTPOOL BM表示坏块管理(Bad block Manage)

file_name: NONE

is_download: false

type: NONE

linear_start_addr: 0xFFFF00a8 4095

physical_start_addr: 0x0

partition_size: 0x1500000 21M

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: false

is_reserved: true

operation_type: RESERVED

reserve: 0x00

以上是原文件的内容

打开电脑自带的计算器

我用的是win7 所以点击 开始菜单→所有程序→附件→计算器

XP的好像是 开始→程序→附件→计算器

打开计算器 点击左上角的 查看→选择 程序员 再点击十六进制

XP的好像是选择科学型然后再选择十六进制

计算回读文件的长度必须要用十六进制计算

长度的计算就是结束地址减开始地址,不必一个一个的输入,只需复制粘贴即可,点击计算器菜单栏的 编辑 选项 即可复制粘贴。

这里特别说明,开始地址和结束地址前面那个0x 是不用输入的,也无法输入到计算器,所以只需复制0x 后面的数

既然MBR结束地址是0xc80000 那么就复制 c80000 再粘贴到计算器,然后再点击计算器上的 — 按钮 之后再把开始地址 c00000 复制粘贴到计算器,之后再点 = 按钮 然后就算出长度了。

每个英文后面的0x 就是开始地址,而下一个英文后面的Ox 就是结束地址

结束地址 减 开始地址 就等于 长度

这里可以看出preloader的开始地址是0x0 结束地址是0xc00000

MBR的开始地址是0xc00000 结束地址是0xc80000

MBR的开始地址就是preloader的结束地址

也就是说,下一个文件的开始地址就是上一个文件的结束地址

那么就把 c80000 - c00000 =80000

80000就是长度

计算出长度转换为十进制大小。

计算方法:在计算器“查看”菜单下,将计算器切换到“程序员”,输入对应分区的16进制数值,点“10进制”转化为相应的10进制数值;计算器切换成“科学型”,输入刚转换好的10进制数值(单位是Byte),除两次1024,即可得到分区大小(单位是MB)。

还有 完整的线刷包只需

回读PRELOADER,MBR,EBR1,UBOOT,BOOTIMG,RECOVERY,SEC_RO,LOGO,EBR2,ANDROID 这十个文件,

可以打开scatter_文件来看,在scatter_文件里,

有些地方显示__NODL,意思就是说不下载这些文件,所以不用回读,还有CACHE和USRDATA也不用回读

,它们分别是用户数据和缓存数据,太大并且每什么用。

一个分区的大小修改后,此分区后的分区地址也得修改。

(接下去的分区都是如上更改,一般需要调整的分区大小是CACHE, SYSTEM,

USERDATA, OEM分区,分区起始地址要修改的是SYSTEM,USERDATA, OEM,PERSIST分区)

总之,具体情况具体分析!

上面所说的仅仅只是用我的手机做比例,计算内容不同,计算方法是相同的,不同手机的回读地址和结束地址都不同,要根据自己手机的scatter_文件计算

本文标签: 地址计算器分区文件开始