16-04-2016, 09:40 PM
Creating a scatter file for an MTK Android phone was very easy in older Mediatek phones using the MTK Droid Tools method . However, the latest version of MTK Droid Tools as at the time of this post (V 2.5.3) doesn't support the newer MTK Chipsets so the above method wont work.
Why would I want to create a scatter file?
As I earlier said, backing up a working phone (running on the newer chipsets) using the MTK Droid Tools method wont work. To backup such phones (without a box / dongle / root access), you would need to do an SP flash tool readback using and backup one partition at a time (since MTK Droid Tools can't process ROM_0). The problem is you'll need a scatter file to do an SP Flash tool readback; so you're kind of back to square one.
Another use case of a scatter file is bypassing Factory Reset Protection (FRP) by formatting only the frp partition using the technique described here . This would also require a scatter file to pull off.
The good news is that you can manually create or modify a scatter file to work for your MTK device; making a backup via SP Flash Tool readback possible. Now, you know why you might need to modify a scatter file in certain situations.
How to create a scatter file for any Mediatek (MTK) Android device
The procedure below will teach you how to easily build a scatter file from scratch or by modifying an existing one
Method 1: Building a scatter file from scratch using Wwr_MTK tool (For both old and new MTK chips)
Requirements
- Download Wwr_MTK
- Download SP Flash tool
- Download a scatter file for the Mediatek phone's chipset (e.g MT****_Android_scatter)
- Notepad++ (Download @ https://notepad-plus-plus.org/ )
Procedure
Wwr_MTK is a tool for backing up Mediatek Android phones (in scatter format) without root. The tool (in hand with SP Flash Tool) is able to read the phone's partition table then use that information to create a scatter file. To get a scatter file:
- Follow this guide to do a full rom dump which will then contain the scatter file
- Another alternative is to follow this guide to get the start and end addresses for each partition which you can then input into a scatter file for your phone model
Method 2: Modifying an existing scatter file using MTK Droid Tools (For old MTK chips)
Requirements
- Download MTK Droid tools & PdaNet
- Download a scatter file for the phone's chipset (e.g MT65**_Android_scatter)
- Notepad++ (Download @ https://notepad-plus-plus.org/)
Procedure
- Setup MTK Droid Tools on the PC to ensure the phone gets detected
- If the phone still doesn't get detected despite installing necessary drivers then it must be an ADB clash
- Once the phone gets detected, click on Blocks Map
- You should see something like in the image below
- Open the scatter file using Notepad++, its content should look something like
Code:#########################################__WwR_MTK__########################################################
#
# General Setting
#
#########################################__WwR_MTK__########################################################
- general: MTK_PLATFORM_CFG
info:
- config_version: V1.1.2
platform: MT6750
project: rlk6750_65_n
storage: EMMC
boot_channel: MSDC_0
block_size: 0x20000
############################################################################################################
#
# Layout Setting
#
############################################################################################################
- partition_index: SYS0
partition_name: preloader
file_name: preloader_rlk6750_65_n.bin
is_download: true
type: SV5_BL_BIN
linear_start_addr: 0x0
physical_start_addr: 0x0
partition_size: 0x40000
region: EMMC_BOOT_1
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: BOOTLOADERS
is_upgradable: true
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS1
partition_name: pgpt
file_name: NONE
is_download: false
type: NORMAL_ROM
linear_start_addr: 0x0
physical_start_addr: 0x0
partition_size: 0x8000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: INVISIBLE
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS2
partition_name: recovery
file_name: recovery.img
is_download: true
type: NORMAL_ROM
linear_start_addr: 0x8000
physical_start_addr: 0x8000
partition_size: 0x1000000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
is_upgradable: true
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS3
partition_name: para
file_name: NONE
is_download: false
type: NORMAL_ROM
linear_start_addr: 0x1008000
physical_start_addr: 0x1008000
partition_size: 0x80000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: INVISIBLE
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS4
partition_name: expdb
file_name: NONE
is_download: false
type: NORMAL_ROM
linear_start_addr: 0x1088000
physical_start_addr: 0x1088000
partition_size: 0xA00000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: INVISIBLE
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS5
partition_name: frp
file_name: NONE
is_download: false
type: NORMAL_ROM
linear_start_addr: 0x1A88000
physical_start_addr: 0x1A88000
partition_size: 0x100000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: INVISIBLE
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS6
partition_name: ppl
file_name: NONE
is_download: false
type: NORMAL_ROM
linear_start_addr: 0x1B88000
physical_start_addr: 0x1B88000
partition_size: 0x40000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: INVISIBLE
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS7
partition_name: nvdata
file_name: NONE
is_download: false
type: EXT4_IMG
linear_start_addr: 0x1BC8000
physical_start_addr: 0x1BC8000
partition_size: 0x2000000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: INVISIBLE
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS8
partition_name: metadata
file_name: NONE
is_download: false
type: NORMAL_ROM
linear_start_addr: 0x3BC8000
physical_start_addr: 0x3BC8000
partition_size: 0x2000000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: INVISIBLE
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS9
partition_name: protect1
file_name: NONE
is_download: false
type: EXT4_IMG
linear_start_addr: 0x5BC8000
physical_start_addr: 0x5BC8000
partition_size: 0x800000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: PROTECTED
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS10
partition_name: protect2
file_name: NONE
is_download: false
type: EXT4_IMG
linear_start_addr: 0x63C8000
physical_start_addr: 0x63C8000
partition_size: 0xC38000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: PROTECTED
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS11
partition_name: seccfg
file_name: NONE
is_download: false
type: NORMAL_ROM
linear_start_addr: 0x7000000
physical_start_addr: 0x7000000
partition_size: 0x800000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: INVISIBLE
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS12
partition_name: oemkeystore
file_name: NONE
is_download: false
type: NORMAL_ROM
linear_start_addr: 0x7800000
physical_start_addr: 0x7800000
partition_size: 0x800000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: INVISIBLE
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS13
partition_name: proinfo
file_name: NONE
is_download: false
type: NORMAL_ROM
linear_start_addr: 0x8000000
physical_start_addr: 0x8000000
partition_size: 0x300000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: PROTECTED
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS14
partition_name: md1img
file_name: md1rom.img
is_download: true
type: NORMAL_ROM
linear_start_addr: 0x8300000
physical_start_addr: 0x8300000
partition_size: 0x1800000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
is_upgradable: true
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS15
partition_name: md1dsp
file_name: md1dsp.img
is_download: true
type: NORMAL_ROM
linear_start_addr: 0x9B00000
physical_start_addr: 0x9B00000
partition_size: 0x400000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
is_upgradable: true
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS16
partition_name: md1arm7
file_name: md1arm7.img
is_download: true
type: NORMAL_ROM
linear_start_addr: 0x9F00000
physical_start_addr: 0x9F00000
partition_size: 0x300000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
is_upgradable: true
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS17
partition_name: md3img
file_name: NONE
is_download: false
type: NORMAL_ROM
linear_start_addr: 0xA200000
physical_start_addr: 0xA200000
partition_size: 0x500000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: INVISIBLE
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS18
partition_name: nvram
file_name: NONE
is_download: false
type: NORMAL_ROM
linear_start_addr: 0xA700000
physical_start_addr: 0xA700000
partition_size: 0x500000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: BINREGION
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS19
partition_name: lk
file_name: lk.bin
is_download: true
type: NORMAL_ROM
linear_start_addr: 0xAC00000
physical_start_addr: 0xAC00000
partition_size: 0x100000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
is_upgradable: true
empty_boot_needed: true
reserve: 0x00
- partition_index: SYS20
partition_name: lk2
file_name: lk2.bin
is_download: true
type: NORMAL_ROM
linear_start_addr: 0xAD00000
physical_start_addr: 0xAD00000
partition_size: 0x100000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
is_upgradable: true
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS21
partition_name: boot
file_name: boot.img
is_download: true
type: NORMAL_ROM
linear_start_addr: 0xAE00000
physical_start_addr: 0xAE00000
partition_size: 0x1000000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
is_upgradable: true
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS22
partition_name: logo
file_name: logo.bin
is_download: true
type: NORMAL_ROM
linear_start_addr: 0xBE00000
physical_start_addr: 0xBE00000
partition_size: 0x800000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
is_upgradable: false
empty_boot_needed: true
reserve: 0x00
- partition_index: SYS23
partition_name: tee1
file_name: trustzone1.bin
is_download: true
type: NORMAL_ROM
linear_start_addr: 0xC600000
physical_start_addr: 0xC600000
partition_size: 0x500000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
is_upgradable: true
empty_boot_needed: true
reserve: 0x00
- partition_index: SYS24
partition_name: tee2
file_name: trustzone2.bin
is_download: true
type: NORMAL_ROM
linear_start_addr: 0xCB00000
physical_start_addr: 0xCB00000
partition_size: 0x500000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
is_upgradable: true
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS25
partition_name: secro
file_name: secro.bin
is_download: true
type: NORMAL_ROM
linear_start_addr: 0xD000000
physical_start_addr: 0xD000000
partition_size: 0x600000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
is_upgradable: true
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS26
partition_name: keystore
file_name: NONE
is_download: false
type: NORMAL_ROM
linear_start_addr: 0xD600000
physical_start_addr: 0xD600000
partition_size: 0xA00000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: INVISIBLE
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS27
partition_name: system
file_name: system.img
is_download: true
type: NORMAL_ROM
linear_start_addr: 0xE000000
physical_start_addr: 0xE000000
partition_size: 0x100000000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
is_upgradable: true
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS28
partition_name: cache
file_name: cache.img
is_download: true
type: EXT4_IMG
linear_start_addr: 0x10E000000
physical_start_addr: 0x10E000000
partition_size: 0x1B000000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS29
partition_name: userdata
file_name: userdata.img
is_download: true
type: NORMAL_ROM
linear_start_addr: 0x129000000
physical_start_addr: 0x129000000
partition_size: 0x279DFBE00
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: true
is_reserved: false
operation_type: UPDATE
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS30
partition_name: flashinfo
file_name: NONE
is_download: false
type: NORMAL_ROM
linear_start_addr: 0xFFFF0080
physical_start_addr: 0x3A2DFBE00
partition_size: 0x1000000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: false
is_reserved: true
operation_type: RESERVED
is_upgradable: false
empty_boot_needed: false
reserve: 0x00
- partition_index: SYS31
partition_name: sgpt
file_name: NONE
is_download: false
type: NORMAL_ROM
linear_start_addr: 0xFFFF0000
physical_start_addr: 0x3A3DFBE00
partition_size: 0x4200
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: false
is_reserved: true
operation_type: RESERVED
is_upgradable: false
empty_boot_needed: false
reserve: 0x00 - platform: MT65** must be the exact chipset of the phone e.g platform: MT6580 . Note that the scatter file for this example would then be named MT6580_Android_scatter
- linear_start_addr will have the same value as physical_start_addr. To get this value for a given partition, you open the Blocks Map and convert the value under the Scatter column (for that partition) to Hex by replacing all Zeros (0) in front of the first non-Zero character with 0x
For example, in the image above, the Scatter value for recovery is 0002F80000; therefore, linear_start_addr = physical_start_addr = 0x2F80000
For boot, Scatter value = 0002980000 therefore, linear_start_addr = physical_start_addr = 0x2980000
- For partition_size, you do the same as above but with the Size column. Recovery in the image above has a Size value of 0000600000; therefore, partition_size = 0x600000
- Modify the values for each partition in the scatter file using the values from the Blocks Map then save.
- You can then load the scatter file (click Scatter loading) in SP flash tool . If you did all correctly then the scatter file should be loaded without an error
Questions & Answers
Q: There are some partitions in the scatter file but not in my phone's Blocks Map, what values do I enter for such partitions in the scatter file
A: Just delete that whole record from the scatter file. One record is often something like
Code:
- partition_index: SYS28
partition_name: sgpt
file_name: NONE
is_download: false
type: NORMAL_ROM
linear_start_addr: 0xFFFF0004
physical_start_addr: 0xFFFF0004
partition_size: 0x80000
region: EMMC_USER
storage: HW_STORAGE_EMMC
boundary_check: false
is_reserved: true
operation_type: RESERVED
reserve: 0x00
Q: Can I use any scatter file or it must be one for my chipset
A; A scatter file is just a text file so you can use any scatter file provided you name it correctly (to match your chipset) and its content match your phone's partition table. Its just usually best to use a scatter file for your phone's chipset so you have fewer info to edit
Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you can't wait.