Sunday, September 21, 2014

Tutorial #2: Increase MTK6572 Data/Application Storage- Editing MTK6572 Scatter.txt

Part Two - Editing Scatter File and Increasing Phone/Tablet Speed

In the first tutorial you learned how to partition your EBR1 to increase your application data storage, in this section I will explain how to edit your MTK6572_Scatter.txt.  If the EBR1 is repartitioned and loaded to the phone/tablet, the mod will work, with a few bugs.  First off, certain application notifications will not work properly, secondly, the speed of the phone/tablet will decrease considerably.  After editing the scatter file, you will notice, even before the repartition, a significant increase in the performance and speed of the phone/tablet.

NOTE:  After taking a look at different partition schemes on different MTK6572 phone/tablet, found that the partitioning is not exact, after partitioning you have values hanging around, as stated in the last tutorial, you can either leave a decent amount of internal storage or format the remaining amount as ext4 so that the phone/tablet does not show it in a file manager or settings.

Here is a section of my own scatter file, notice the highlighted parts, these two numbers are what we need to modify.

partition_index: SYS17
partition_name: USRDATA
file_name: nvram.bin
is_download: true
type: NONE
linear_start_addr: 0x43F40000
physical_start_addr: 0x43940000
region: EMMC_USER
boundary_check: true
is_reserved: false
operation_type: UPDATE
reserve: 0x00

partition_index: SYS18
partition_name: FAT
file_name: NONE
is_download: false
type: NONE
linear_start_addr: 0x63F40000
physical_start_addr: 0x63940000
partition_size: 0x87040000
region: EMMC_USER
boundary_check: true
is_reserved: false
operation_type: INVISIBLE
reserve: 0x00

To get the decimal value for the usrdata/application partition, 0x20000000, it has to be converted to the decimal value, here is a website that will do the conversion if you do not have the appropriate calculator handy:

The decimal value is 536870912.

There are two ways to check and see if the value is correct, the first way is by checking in a terminal shell under Linux.

sudo disktype EBR1

--- EBR1
Regular file, size 1 KiB (1024 bytes)
DOS/MBR partition map
Partition 1: 376 MiB (394264576 bytes, 770048 sectors from 1443328)
  Type 0x83 (Linux)
Partition 2: 512 MiB (536870912 bytes, 1048576 sectors from 2213376)
  Type 0x83 (Linux)
Partition 3: 1.998 TiB (2197353135616 bytes, 4291705343 sectors from 3261952)
  Type 0x83 (Linux)

The value of Partition 2, 536870912 is the size of USRDATA, now lets do the same thing with the partition size for the FAT, 0x87040000, here is the link for the online hexadecimal to decimal calculator again, the decimal value is 2265186304.  The second way to check both the two values for USRDATA and FAT partitions can also be done is SPFLASH Tools.


Now lets add those two values together, you can do it in a Google search engine, here is one provided for you:


Google Search

The two partitions added together lets you see that the total of your FAT and USRDATA is 2802057216, but, before taking that value and converting it to a hexadecimal value, we need to subtract that little floating value that was left over from the partitioning.  Lets go back into the terminal shell and take a look now at the new EBR1 file that was created in PART ONE:

sudo disktype 2.5gb-EBR1

--- 2.5gb-EBR1
Regular file, size 1 KiB (1024 bytes)
DOS/MBR partition map
Partition 1: 376 MiB (394264576 bytes, 770048 sectors from 1443328)
  Type 0x83 (Linux)
Partition 2: 2.594 GiB (2785017856 bytes, 5439488 sectors from 2213376)
  Type 0x83 (Linux)

Partition 3: 1.993 TiB (2191011479040 bytes, 4279319295 sectors from 7652864)
  Type 0x83 (Linux)

The newly repartitioned EBR1 file's partition 2 is
2785017856, this now has to be converted to a hexadecimal value, than changed in the scatter.txt.   Here is the same website with the decimal to hexadecimal conversion option, the partition size's hexadecimal value, 0x87040000, is now going to be replaced with 0x10999999.

Now for the FAT we need to find the floating value so that the partition size can be decreased.  Although the phone/tablet is showing a one size as pictured, the actual size can correctly be shown by turning on USB storage and looking at it on the PC file manager.  Since android does not read partitions the same as Linux or windows, we need to find the actual sizes to be able to configure the scatter text correctly.

In this case, my tablet's real value is 17mb, I needed to find the hex value of that number and change it in the FAT partition of the scatter text.  There is no way of finding that actual value when looking in MTK Droid Tools, SPFLASH tools or using the disktype command in a terminal shellWhat actually has to be done is you have to take the new partition size and subtract it from the old partition size.

So now we know that, taking the USRDATA and FAT partitions and adding them together gave us 2802057216, now we need to subtract the new partition size from that, which you saw when typing sudo disktype 2.5gb-EBR1Now in the below  search engine you can subtract those two values:


Google Search

The new value now is 1703936 (17.03936mb), which has to now be converted to a hex value and replaced with the old FAT partition value.  Here is the link again for that nifty online decimal to hexadecimal calculator and there is the new value for the FAT partition, 0x10400000.  Just a note, I had added one 0 to the end since the scatter file shows eight digits after the 0x for all hexadecimal values.

When you load edited scatter file, make sure to backup the original, SPFlash tools may import all the partitions, there is no need to worry, just make sure to load the appropriate sections when flashing.  If you downloaded a nandroid backup, I found it easier to flash everything except for my system, usrdata and cache.  Those were reflashed in recovery using the custom clockwork mod that was created in MTK Droid Tools.

After repartitioning and reflashing, MTK Droid tools still reads the old partition schemes.  Not really sure where it finds the values yet, working on finding that, possibly hardcoded somewhere in the tablets file system, and fixing it to read correctly, if possible. 

The company where I purchased the tablet from had the actual kernel hidden on their download section with another EBR1 that worked when flashed.  It increased my usrdata from 512mb to 1.27mb.  What was really odd though is that when trying to repartition that EBR1, which nearly used every bit of the FAT partition up, except for about 3-4mb.  The repartitioned 1.27gb EBR1 to 2.6gb would not load, just left the tablet frozen in the boot logo.  So far have looked at three different MTK6572 partition schemes and cannot figure out how they makeup the values, there has to be some easy EBR tweaker that is used.  Unless a bunch of underpaid, overworked nine year old laborors are actually sitting there  manually repartitioning Android Tablet MBR/EBR.


  1. Will at this Vehicle storage in Brisbane is awesome – he especially helped me on a few occasions. And to top it off, their prices are competitive if you're looking to have your stuff stored in the city.

  2. Wow, Excellent post. This article is really very interesting and effective. I think its must be helpful for us. Thanks for sharing your informative.
    Clipping Path Service

  3. Hello, some how Cube has done a different variation of MTK Rom. I purchased a Cube T7, However they didnt use the EBR files/formats as done with all other MTK roms. They only other way I know to edit the partitions is the edit the scatter.txt. How ever, how would we be able to do this without EBR? Thanks.

  4. hi
    I tried everything
    I could not
    Do you make ? and send me files ?
    scatter and ebr1 ,ebr2
    thank you

    pls helpp

    2 gb system
    3 gb userdata
    1.8 gb fat
    2,5 gb system
    4 gb userdata
    300 mb fat

    how i do it?

    1. rom gionee v4s lollipop 5.0
      device general mobile discovery 2 mini

  5. All your posts were helpfull for me.. You helped me a lot to understand how this work and I was able to convert a 1.5gb/4.5gb partitions phone in a 3gb/3gb partitions phone.
    Only you miss a thing... In sys17 partition_size increase, soo in sys18 linear_start_addr must increase to :D
    Thanks a Lot


My Blog List