[GUIDE] Partitioning the flash in a MediaTek

gerhardo

Senior Member
Aug 23, 2013
294
91
0
The /data partition with apps quickly gets full for me. For instance Minuum requires 120MB with two languages. 1.3GB is not enough then.
This could be enhanced with Link2SD as well, but I would prefer to not rely on the SD card. Not so much because of speed, but reliability.

The descriptions I followed.
http://elizabethswikis.blogspot.se/search/label/edit MBR/EBR1
http://forum.xda-developers.com/showthread.php?t=1914184&page=10

However, I believe the process can be described better and made an attempt, also tuned for the Umeox x201. The same should apply for both JellyBean and KitKat ROMs.

Disclaimer: If you believe it was difficult to upgrade to KitKat, this is definitely not for you. Umeox (or MediaTek) is seriously flaky when flashing, it takes ages to test this out.


0. Backup
Make backups if you want to restore the current setup.
TWRP backups are always handy.
Copy internal sdcard contents.

You need a complete backup to start from. That can be a "generic delivery" or a backup of your current ROM.

You can make a 1:1 backup using SPTF and MtkDroid:
http://forum.xda-developers.com/showthread.php?t=2730031
http://pinoyscreencast.net/how-to/g...-smartphones-using-spft-mtk-droid-root-tools/
You will not need the extra restore step for user data by using 1:1 backups.
* Create scatter in MTD (optional, but less to edit)
* Readback in SPFT from 0 to FAT start address (__NODL_FAT in scatter).
* Process ROM_0 in MTD (I had to use 2.5.3)
For the package to flash you may also base it on MtkDroid backups unless you want to start from scratch.


1. Set the size
The referenced guides makes it all too complicated.
* Define what size you want in bytes, divided by 512 (probably rounded to even 256 bytes), put in address 0x01da in EBR1. Add the difference from old value in 0x01da to the value in address 0x01e6, subtract from 0x01ea.
* Take address in 0x01e6, multiply with 512 to get address for __NODL_FAT

I used HxDen to edit EBR1.

Other notes:
* The format in EBR1 is little endian.
* The same EBR1 is used in JellyBean and KitKat.
* You cannot use all of the flash for /data, some minimal part seem to have to exist.

Original:
000001C0 00 00 83 00 00 00 00 B6 1A 00 00 10 07 00 00 00 ..ƒ....¶........
000001D0 00 00 83 00 00 00 00 C6 21 00 00 60 29 00 00 00 ..ƒ....Æ!..`)...
000001E0 00 00 83 00 00 00 00 26 4B 00 FF D9 B4 FF 00 00 ..ƒ....&K.ÿÙ´ÿ..

__NODL_FAT 0x96dc0000

Doubled data partition:
(not possible for 4GB units).

000001C0 00 00 83 00 00 00 00 B6 1A 00 00 10 07 00 00 00 ..ƒ....¶........
000001D0 00 00 83 00 00 00 00 C6 21 00 00 C0 52 00 00 00 ..ƒ....Æ!..ÀR...
000001E0 00 00 83 00 00 00 00 86 74 00 FF 79 8B FF 00 00 ..ƒ....†t.ÿy‹ÿ..

__NODL_FAT 0xe90c0000


2. Flash with SPFT
Firmware Upgrade for KitKat, all disks must be provided.
Use the new scatter file + the new EBR1.

It may not be needed to flash more than EBR1, but the device did not start for me then. SPFT refuses to flash too "PMT changed".
Same hassle as always when flshing. I had to go back to stock JellyBean once to get it working, should not be necessary. I also had to wipe Internal storage+cache +data in recovery to start once, should also not be required. Next time KitKat to KitKat worked. However, none of the flashes has given any errors when flashing, first KitKat upgrade gave me more problems.


3. Restore data (optional) or wipe in recovery
Start in recovery. Wipe cache. Format internal storage (FAT, used to be internal SD card).
Try mounting the partitions, make sure they are OK (to verify the flash is OK).
Optionally copy back files to internal SD card.

If you did not flash a 1:1 backup: Restore /data partition in TWRP, otherwise wipe /data (Factory reset) (after starting up, probably restore NVRAM too).
 
Last edited:
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone