Home Forum Blog Private Support Courses
Our courses are now on YouTube! Start Watching
Hovatek Forum OPERATING SYSTEMS Android [Tutorial] How to create scatter file for Mediatek devices

[Tutorial] How to create scatter file for Mediatek devices

[Tutorial] How to create scatter file for Mediatek devices

Pages (8): Previous 1 2 3 4 5 6 8 Next
20-11-2016, 08:00 PM
#31



(16-04-2016, 09:40 PM)hovatek Creating a scatter file for an MTK Android phone was very easy in older Mediatek phones using the MTK Droid Tools method @ https://www.hovatek.com/forum/thread-2163.html. 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 manually create a scatter file?

As I earlier said, backing up a working phone (running on the newer chipsets) using the MTK Droid Tools method @ https://www.hovatek.com/forum/thread-468.html wont work. To backup such phones, you would need to do an SP flash tool readback using https://www.hovatek.com/forum/thread-526.html 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.

The good news is that you can manually create or modify a scatter file to work for your 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.

Requirements

* MTK Droid tools & PdaNet (see https://www.hovatek.com/forum/thread-468.html)
* Download a scatter file for the phone's chipset (e.g MT65**_Android_scatter) @ https://www.hovatek.com/forum/thread-12724.html
* Notepad++ (Download @ https://notepad-plus-plus.org/)

Procedure

1. Setup MTK Droid Tools on the PC to ensure the phone gets detected
2. If the phone still doesn't get detected despite installing necessary drivers then it must be an ADB clash, fix that using https://www.hovatek.com/forum/thread-10111.html
3. Once the phone gets detected, click on Blocks Map
4. You should see something like in the image below

[Image: how-to-manually-create-a-scatter-file-fo...-phone.jpg]

5. Open the scatter file using Notepad++, its content should look something like

Code:

############################################################################################################ # #  General Setting #     ############################################################################################################ - general: MTK_PLATFORM_CFG  info:    - config_version: V1.1.2      platform: MT6580      project: d5110_infinix      storage: EMMC      boot_channel: MSDC_0      block_size: 0x20000 ############################################################################################################ # #  Layout Setting # ############################################################################################################ - partition_index: SYS0  partition_name: preloader  file_name: preloader_d5110_infinix.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  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: 0x80000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: INVISIBLE  reserve: 0x00 - partition_index: SYS2  partition_name: proinfo  file_name: NONE  is_download: false  type: NORMAL_ROM  linear_start_addr: 0x80000  physical_start_addr: 0x80000  partition_size: 0x300000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: PROTECTED  reserve: 0x00 - partition_index: SYS3  partition_name: nvram  file_name: NONE  is_download: false  type: NORMAL_ROM  linear_start_addr: 0x380000  physical_start_addr: 0x380000  partition_size: 0x500000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: BINREGION  reserve: 0x00 - partition_index: SYS4  partition_name: protect1  file_name: NONE  is_download: false  type: EXT4_IMG  linear_start_addr: 0x880000  physical_start_addr: 0x880000  partition_size: 0xa00000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: PROTECTED  reserve: 0x00 - partition_index: SYS5  partition_name: protect2  file_name: NONE  is_download: false  type: EXT4_IMG  linear_start_addr: 0x1280000  physical_start_addr: 0x1280000  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: seccfg  file_name: NONE  is_download: false  type: NORMAL_ROM  linear_start_addr: 0x1c80000  physical_start_addr: 0x1c80000  partition_size: 0x40000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: INVISIBLE  reserve: 0x00 - partition_index: SYS7  partition_name: lk  file_name: lk.bin  is_download: true  type: NORMAL_ROM  linear_start_addr: 0x1cc0000  physical_start_addr: 0x1cc0000  partition_size: 0x60000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: UPDATE  reserve: 0x00 - partition_index: SYS8  partition_name: boot  file_name: boot.img  is_download: true  type: NORMAL_ROM  linear_start_addr: 0x1d20000  physical_start_addr: 0x1d20000  partition_size: 0x1000000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: UPDATE  reserve: 0x00 - partition_index: SYS9  partition_name: recovery  file_name: recovery.img  is_download: true  type: NORMAL_ROM  linear_start_addr: 0x2d20000  physical_start_addr: 0x2d20000  partition_size: 0x1000000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: UPDATE  reserve: 0x00 - partition_index: SYS10  partition_name: para  file_name: NONE  is_download: false  type: NORMAL_ROM  linear_start_addr: 0x3d20000  physical_start_addr: 0x3d20000  partition_size: 0x80000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: INVISIBLE  reserve: 0x00 - partition_index: SYS11  partition_name: logo  file_name: logo.bin  is_download: true  type: NORMAL_ROM  linear_start_addr: 0x3da0000  physical_start_addr: 0x3da0000  partition_size: 0x800000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: UPDATE  reserve: 0x00 - partition_index: SYS12  partition_name: expdb  file_name: NONE  is_download: false  type: NORMAL_ROM  linear_start_addr: 0x45a0000  physical_start_addr: 0x45a0000  partition_size: 0xa00000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: INVISIBLE  reserve: 0x00 - partition_index: SYS13  partition_name: recovery2  file_name: NONE  is_download: false  type: EXT4_IMG  linear_start_addr: 0x4fa0000  physical_start_addr: 0x4fa0000  partition_size: 0x1000000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: INVISIBLE  reserve: 0x00 - partition_index: SYS14  partition_name: radio  file_name: NONE  is_download: false  type: EXT4_IMG  linear_start_addr: 0x5fa0000  physical_start_addr: 0x5fa0000  partition_size: 0x2000000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: INVISIBLE  reserve: 0x00 - partition_index: SYS15  partition_name: vendor  file_name: NONE  is_download: false  type: EXT4_IMG  linear_start_addr: 0x7fa0000  physical_start_addr: 0x7fa0000  partition_size: 0xa000000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: INVISIBLE  reserve: 0x00 - partition_index: SYS16  partition_name: odm  file_name: NONE  is_download: false  type: EXT4_IMG  linear_start_addr: 0x11fa0000  physical_start_addr: 0x11fa0000  partition_size: 0x4000000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: INVISIBLE  reserve: 0x00 - partition_index: SYS17  partition_name: oem  file_name: NONE  is_download: false  type: EXT4_IMG  linear_start_addr: 0x15fa0000  physical_start_addr: 0x15fa0000  partition_size: 0x4000000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: INVISIBLE  reserve: 0x00 - partition_index: SYS18  partition_name: frp  file_name: NONE  is_download: false  type: NORMAL_ROM  linear_start_addr: 0x19fa0000  physical_start_addr: 0x19fa0000  partition_size: 0x100000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: INVISIBLE  reserve: 0x00 - partition_index: SYS19  partition_name: nvdata  file_name: NONE  is_download: false  type: EXT4_IMG  linear_start_addr: 0x1a0a0000  physical_start_addr: 0x1a0a0000  partition_size: 0x2000000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: INVISIBLE  reserve: 0x00 - partition_index: SYS20  partition_name: metadata  file_name: NONE  is_download: false  type: NORMAL_ROM  linear_start_addr: 0x1c0a0000  physical_start_addr: 0x1c0a0000  partition_size: 0x2760000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: INVISIBLE  reserve: 0x00 - partition_index: SYS21  partition_name: oemkeystore  file_name: NONE  is_download: false  type: NORMAL_ROM  linear_start_addr: 0x1e800000  physical_start_addr: 0x1e800000  partition_size: 0x200000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: INVISIBLE  reserve: 0x00 - partition_index: SYS22  partition_name: secro  file_name: secro.img  is_download: true  type: NORMAL_ROM  linear_start_addr: 0x1ea00000  physical_start_addr: 0x1ea00000  partition_size: 0x600000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: UPDATE  reserve: 0x00 - partition_index: SYS23  partition_name: keystore  file_name: NONE  is_download: false  type: NORMAL_ROM  linear_start_addr: 0x1f000000  physical_start_addr: 0x1f000000  partition_size: 0x800000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: INVISIBLE  reserve: 0x00 - partition_index: SYS24  partition_name: system  file_name: system.img  is_download: true  type: EXT4_IMG  linear_start_addr: 0x1f800000  physical_start_addr: 0x1f800000  partition_size: 0x70800000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: UPDATE  reserve: 0x00 - partition_index: SYS25  partition_name: cache  file_name: cache.img  is_download: true  type: EXT4_IMG  linear_start_addr: 0x90000000  physical_start_addr: 0x90000000  partition_size: 0x10000000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: UPDATE  reserve: 0x00 - partition_index: SYS26  partition_name: userdata  file_name: userdata.img  is_download: true  type: EXT4_IMG  linear_start_addr: 0xa0000000  physical_start_addr: 0xa0000000  partition_size: 0x60000000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: true  is_reserved: false  operation_type: UPDATE  reserve: 0x00 - partition_index: SYS27  partition_name: flashinfo  file_name: NONE  is_download: false  type: NORMAL_ROM  linear_start_addr: 0xFFFF0084  physical_start_addr: 0xFFFF0084  partition_size: 0x1000000  region: EMMC_USER  storage: HW_STORAGE_EMMC  boundary_check: false  is_reserved: true  operation_type: RESERVED  reserve: 0x00 - 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

6. You will be modifying platform, linear_start_addr, physical_start_addr and partition_size
7. 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
8. 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
9. 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
10. Modify the values for each partition in the scatter file using the values from the Blocks Map then save.
11. You can then load the scatter file (click Scatter loading) in SP flash tool @ https://www.hovatek.com/forum/thread-159.html. 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
hovatek
hovatek
hovatek
Administrator
50,906
21-11-2016, 09:08 AM
#32
(20-11-2016, 07:53 PM)rokubag@yahoo.com block devices info.
showing only 1 which is bmtpool
but the create scatter file is not active.
the scatter file i downloaded is showing
1 PRELOADER 0X. with serial no. continuing down

means MTK Droid tools doesn't support your device

Learn MediaTek, Unisoc / Spreadtrum (SPD) and Qualcomm Software Repairs @ https://www.hovatek.com/training
Note!
We have a reply schedule for Forum Support. Please try Private Support if you can't wait.
leventel
leventel
leventel
Enthusiastic Member
6
30-01-2017, 08:27 AM
#33
After I tried the scatter file generation with MTK Droid and MiracleBox without any success, I am trying to create it manually.

Your example scatter file for my MT8127 (https://www.hovatek.com/forum/thread-12724.html) contains a FAT partitions which isn't on my device, OK, I will delete it the entire partition.

But I have a "custpack" partition with ext4 and mountpoint.
As I see there are other ext4 partitions (android,cache,usrdata) with the exact same properties (like type, is_reserved,operation_type, etc)
Can I add a new partition with the proper partition_index?
hovatek
hovatek
hovatek
Administrator
50,906
30-01-2017, 11:55 AM
#34
(30-01-2017, 08:27 AM)leventel After I tried the scatter file generation with MTK Droid and MiracleBox without any success, I am trying to create it manually.

Your example scatter file for my MT8127 (https://www.hovatek.com/forum/thread-12724.html) contains a FAT partitions which isn't on my device, OK, I will delete it the entire partition.

But I have a "custpack" partition with ext4 and mountpoint.
As I see there are other ext4 partitions (android,cache,usrdata) with the exact same properties (like type, is_reserved,operation_type, etc)
Can I add a new partition with the proper partition_index?

remove the FAT from the list.
You can add a new partition so far you get the details right

Learn MediaTek, Unisoc / Spreadtrum (SPD) and Qualcomm Software Repairs @ https://www.hovatek.com/training
Note!
We have a reply schedule for Forum Support. Please try Private Support if you can't wait.
leventel
leventel
leventel
Enthusiastic Member
6
30-01-2017, 03:12 PM
#35

Mediatek Course Mediatek Course


(30-01-2017, 11:55 AM)hovatek
(30-01-2017, 08:27 AM)leventel After I tried the scatter file generation with MTK Droid and MiracleBox without any success, I am trying to create it manually.

Your example scatter file for my MT8127 (https://www.hovatek.com/forum/thread-12724.html) contains a FAT partitions which isn't on my device, OK, I will delete it the entire partition.

remove the FAT from the list.
You can add a new partition so far you get the details right

One last question:
I have a bmtpool partition which start at 0x1500000 and end at 0x2A00000 (the size is 0x1500000)...

https://img42.com/dxARr

but this section contains also the protect_s, seccfg, uboot and part of bootimg partition too. Did I make a mistake in my calculation?
hovatek
hovatek
hovatek
Administrator
50,906
31-01-2017, 09:00 AM
#36
(30-01-2017, 03:12 PM)leventel One last question:
I have a bmtpool partition which start at 0x1500000 and end at 0x2A00000 (the size is 0x1500000)...

https://img42.com/dxARr

but this section contains also the protect_s, seccfg, uboot and part of bootimg partition too. Did I make a mistake in my calculation?

You can skip it

Learn MediaTek, Unisoc / Spreadtrum (SPD) and Qualcomm Software Repairs @ https://www.hovatek.com/training
Note!
We have a reply schedule for Forum Support. Please try Private Support if you can't wait.
amendurance
amendurance
amendurance
Enthusiastic Member
7
31-01-2017, 11:16 AM
#37
Interesting, Pls I need a video on this.

Sent from my TECNO-Y6 using Hovatek mobile
bilal qadir
bilal qadir
bilal qadir
Enthusiastic Member
7
01-03-2017, 07:15 PM
#38
I ported TWRP recovery for my MT6580 ! so when i tried to flash it with SP flash tool ! it gave me an error that "rom Changed FORMAT ALL and try again"
the orignal recovery is Like 4.6 mb but ported one is 10.1 mb ! who can i modify my scatter file for this ??
hovatek
hovatek
hovatek
Administrator
50,906
02-03-2017, 05:30 PM
#39
(01-03-2017, 07:15 PM)bilal qadir I ported TWRP recovery for my MT6580 ! so when i tried to flash it with SP flash tool ! it gave me an error that "rom Changed FORMAT ALL and try again"
the orignal recovery is Like 4.6 mb but ported one is 10.1 mb ! who can i modify my scatter file for this ??

Port CWM, Carliv or Philz recovery instead

Learn MediaTek, Unisoc / Spreadtrum (SPD) and Qualcomm Software Repairs @ https://www.hovatek.com/training
Note!
We have a reply schedule for Forum Support. Please try Private Support if you can't wait.
bilal qadir
bilal qadir
bilal qadir
Enthusiastic Member
7
04-03-2017, 07:44 PM
#40
(02-03-2017, 05:30 PM)hovatek
(01-03-2017, 07:15 PM)bilal qadir I ported TWRP recovery for my MT6580 ! so when i tried to flash it with SP flash tool ! it gave me an error that "rom Changed FORMAT ALL and try again"
the orignal recovery is Like 4.6 mb but ported one is 10.1 mb ! who can i modify my scatter file for this ??

Port CWM, Carliv or Philz recovery instead

thank you Admin Smile
Pages (8): Previous 1 2 3 4 5 6 8 Next
Users browsing this thread:
 1 Guest(s)
Users browsing this thread:
 1 Guest(s)
WhTlYt