Sunday, September 21, 2014

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

partition_size:0x20000000

region: EMMC_USER

storage: HW_STORAGE_EMMC

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

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: INVISIBLE

reserve: 0x00To 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.

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.

USRDATA & FAT PARTITIONS

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

The two partitions added together lets you see that the total of your FAT and USRDATA is2802057216, 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:

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'sreal 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 shell. What 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-EBR1. Now in the below search engine you can subtract those two values:2802057216-2785017856

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 calculatorand 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 appropriatesections 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 itto 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.

7 comments
:

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.

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.

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 :DThanks a Lot :