yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] easyyu:
Expand /data partiton Pls help!

Hi mate..

I think few things isn't enought clear for me.

I'm the owner of Prestigio PAP4500DUO phone, and using Prescott;s v5.0 ROM.

http://xdaforums.com/showthread.php?t=2146648&highlight=prestigio

In Antutu Benchmark I see that my cpu hardware is MT6577.

I sufferng is low space on INTERNAL STORAGE (504MB) and I want to extend it (expand it) to 1GB or 1,5GB

I see in attachments 3 tools:

1)	MTK6577_Data_Repartition.7z

2)	revert2ori.zip

3) sdcard_@emmc.zip

If I correctly understand the FIRST tool repartitioning /data, /system partition. I read in this thread that is shrink system partition from 76x MB to 504MB and few users complain that if flash to original ROM then they can not put SU because it have not space to do that.

SECND tool revert all to original state what FIRST tool do? I'm I right?

What do THIRD tool?

Is it replace just SD EXTernal card with Internal? Why I need this if My /data partition is still so small that I can only 10-15 bigger apps? What is the logic of this?

As I see in zip file in system/etc it do:

dev_mount sdcard /mnt/sdcard2 emmc@fat /devices/platform/goldfish_mmc.0 /devices/platform/mtk-sd.0/mmc_host
dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.1 /devices/platform/mtk-sd.1/mmc_host

This is the same as you mentioned code in first post..

So my final question is:

Can I use this for my Prestigio PAP4500DUO??

How can I expand /data partiton to 1 or 1,5GB but the /system partition to leave as it is, and the most important question is how can revert it all back to original stage if I must to send my phone to warnity (phone is 4 days old now)??

Thx
[Miscellaneous Android Development] yuweng:
Yeoh bro, any mod/ hack on xda will void your warranty, is known to all & the familiar statement use at your own risk is on almost any thread here.... :cowboy:

If it doesn't take the space from system/ cache/ data/ fat/ sdcard then where do you think those extra 2GB is coming from...

sd-ext (not sd-external ) on the other hand doesn't change anything on your device, you have to partition ext2, 3 or 4 on the 2nd partition on your sd-card & these mods will copy whatever on your /data to sd-ext... :cool: In another simple term, it bluff the android OS into thinking that the sd-ext is that /data partition on your device... If you partition it to 5GB then your internal memory will show 5GB... Having said that, for MT6577, 2GB is the max, if you install more than 2GB of apps then your device will crawl in slow mo...

WARNING : Any mod/ hack might brick your device...

Again use at your own risk :laugh:
[Miscellaneous Android Development] easyyu:
Ok..thx I did it!
[Miscellaneous Android Development] khankll:
for swaping of internal sd card with external on mt6575 based device use this link

http://xdaforums.com/showthread.php?p=43035540#post43035540
[Miscellaneous Android Development] hou$$:
thank you very much

it's work on goophone i5 N2 now I have 2Gb of Ram

byebye lazy link2SD
[Miscellaneous Android Development] Superfebs:
Hello buds,

my phone is rooted but I DON'T have a custom recovery.

Is it still possible to use jaydvn tool, by wiping cache/factory reset from within the running operating system?

I just tried the tool and it ended up in not being able to reboot the phone - I had to reset the firmware.

My unit is a Runbo X5 by the way.

Thanks so much!
[Miscellaneous Android Development] yuweng:
Yeoh man, porting CWM/ TWRP to MTK devices is under my signature & as i always says i put it there for xda member's convenience but nobody take a look at it...

Use my tut here to backup your Factory ROM first before any modding & make a DONATION to Master Shifu to support his work... :cool:

By the way, you have a cool device... :laugh:
[Miscellaneous Android Development] Superfebs:
Thanks bro, I tried to follow a guide using MTK droid tools and SP Flash Tools but I failed unfortunately. I will try to understand and use yours tonight.

Thanks!
[Miscellaneous Android Development] Superfebs:
Hello, I finally managed to install CWM recovery, thanks!

Unfortunately I add to the list of people that despite reading all thread still did not understood everything, sorry :(

I used CWM to repartition my SD.

Is it now safe to use the MTK6577_Data_Repartition script or shouldn't I since I already created an /ext-sd partition from within CWM?

Thanks so much and sorry if the questions are still lame.
[Miscellaneous Android Development] Superfebs:
Self-update. I tried and it did not worked. I got my SD card formatted (it became unreadable and android had to format it back), internal SD was reduced to 500MB, but internal memory is still 500 MB.
[Miscellaneous Android Development] Superfebs:
Update on the update. I hope others will benefit from this.

I re-run the script after wiping /data and /cache, but this time I did not recovered the backup. It worked!

But, now the system looks less responsive and slower to me.

I actually expected this to a certain extent but not that much. Do you feel that YOUR system is noticeably slower as well?

THANKS!
[Miscellaneous Android Development] xylu:
Very useful post! which is better repartition or swap?
[Miscellaneous Android Development] Panneer Selvam:
Hi yuweng..

Very Nice Guide....

Keep Rocking With Your new Works and Guide's...
[Miscellaneous Android Development] gmann1:
Hi,

does anyone know if is this tool functional also for MTK6589 (Prestigio 5044) ?

I had Prestigio 4500 Duo and there was this tool very successful :)
[Miscellaneous Android Development] yuweng:
Its been mentioned that its NOT compatible for MT6589 & i've shared a mod here but nobody finds it...

Added on 8 Nov 2013

Hmm, found this app from my Master Shifu carliv's thread, ONLY meant for MT6589 ONLY, me still using MT6577... :o
[Miscellaneous Android Development] gmann1:
My apologies for (not only) my blindness :o

I'll try it, but (maybe stupid question) can I use it with rooted original firmware ? or it's necessary use it with unofficial ROM (smaller size, ....examp.: my older phone Prestigio4500+ (smaller) prescot's ROM)

edit:

So I'm little bit disappointed, I awaited android app - something than "Mt657xRepartition_EN.apk", program which switches/repartitions phone's internal partitions.

But when we haven't another way .... thanks anyway :)
[Miscellaneous Android Development] gerstavros:
meteos repartition tool, google it
[Miscellaneous Android Development] nightcraw:
Word of Caution for new users

Can someone point me to this modded EBR1? Also, do you know what is the use of MBR? why some repatriation package include them?

A Word of Caution for new users. use the MTK tools to check your scatter files and MBR and EBR1 image before you do this. If your CACHE start at 0x33fe8000 then that mean the system is 768MB in size. So if you install repartition in this thread it will reduce your system to 512MB and make your phone not bootable, (not technically bricked, since you still have access to recovery). If you system is less than 512MB in size, you can restore from recovery. If your system is more than 512MB then you are out of luck, you will need to either get this modded EBR1 that start the cache partition at right location or strip down your system image (i.e. remove some apps)
[Miscellaneous Android Development] yuweng:
Not much info on modding MTK EBR & MBR available... :o

You can extract EBR1 from the repartition apk via 7zip & use this Hexeditor to compare the differences between your stock EBR1... :cowboy:
[Miscellaneous Android Development] nightcraw:
I figure it out, Thanks to your link to this thread and post #566 here

MBR contains the first 4 partitions. 1. EBR1, 2. sec_ro, 3 system, 4 cache. EBR1 contains last two partitions 5 data, 6 internal SD.

So to change the size of cache actually require flashing the MBR image, these are example from system with 792MB size system (i.e. cache start at 0x33fe8000).

partition 3 (system) starting address 0x00010740 size 0x0018C000 (792MB),

you can see the starting address for partition 4 (cache) = 0x00010740 + 0x0018C000 + 0x0800 (fix offset?) = 0x0019CF40 size 0x00100000 (512MB)

then starting address for partition 5 (data) = 0x0019CF40 + 0x00100000 + 0x0800 = 0x0029D740 (0x0029D720)

Also notice there is a 0x40 offset in MBR and 0x20 offset in EBR1

So the problem is if you flash with the EBR1 provided here for 2GB data, the Starting address is 0x00211720 for data is overlapping the with the cache partition so if you format the cache partition, you will also kill /data. The fix is to reduce the cache size, since 512MB is way to big anyway, My Galaxy have 16GB internal memory and it's cache is only 100MB. So keeping the size of system, I just reduce to cache to 0x074000 (232MB). this way I can use the EBR1 that float around the web with more common staring address for data.
[Miscellaneous Android Development] yuweng:
Haha, i have completely no idea at all what those Hex code means & they said only those with linux background only can figure that out... :laugh:

Latest TWRP is way over 6Mb while my 7Mb recovery mod got mix response... :cowboy:

After modding the scatter.txt the OS can boot & the recovery size increase to 7Mb but some couldn't get the recovery to boots up... :confused:

However when they use the old recovery that is less than 6Mb it boots... :silly:

Hmm, then you can help me out what should be done for the MBR, EBR1 & EBR2 to make it work... :o

MT6589 scatter.txt

PRELOADER 0x0
{
}
MBR 0x600000
{
}
EBR1 0x680000
{
}
__NODL_PMT 0x700000
{
}
__NODL_PRO_INFO 0xb00000
{
}
__NODL_NVRAM 0xe00000
{
}
__NODL_PROTECT_F 0x1300000
{
}
__NODL_PROTECT_S 0x1d00000
{
}
__NODL_SECCFG 0x2700000
{
}
UBOOT 0x2720000
{
}
BOOTIMG 0x2780000
{
}
RECOVERY 0x2d80000
{
}
SEC_RO 0x3380000 [COLOR="Blue"]<- Change to 0x3[B][SIZE="4"]4[/SIZE][/B]80000 to increase recovery to 7Mb[/COLOR]
{
}
__NODL_MISC 0x3980000
{
}
LOGO 0x3a00000
{
}
EBR2 0x3d00000
{
}
__NODL_EXPDB 0x3d80000
{
}
ANDROID 0x4780000
{
}
CACHE 0x36780000
{
}
USRDATA 0x3e580000
{
}
__NODL_FAT 0x7e580000
{
}
__NODL_BMTPOOL 0xFFFF00a8
{
}

Found some interesting info from china-iphone.ru

MBR

00 00 05 00 00 00 [COLOR="Red"]00 04 00 00 FF FF FF FF[/COLOR] 00 00 [COLOR="Blue"]<- EBR1 (mmcblk0p1) [/COLOR]
00 00 83 00 00 00 [COLOR="red"]00 68 00 00 00 50 00 00[/COLOR] 00 00 [COLOR="blue"]<- protect_f (mmcblk0p2)[/COLOR]
00 00 83 00 00 00 [COLOR="red"]00 B8 00 00 00 50 00 00[/COLOR] 00 00 [COLOR="blue"]<- protect_s (mmcblk0p3)[/COLOR]
00 00 83 00 00 00 [COLOR="red"]00 6C 01 00 00 30 00 00[/COLOR] 55 AA [COLOR="blue"]<- sec_ro (mmcblk0p4)[/COLOR]

EBR1

00 00 83 00 00 00 [COLOR="red"]00 08 02 00 00 00 19 00[/COLOR] 00 00 [COLOR="blue"]<- android (mmcblk0p5)[/COLOR]
00 00 83 00 00 00 [COLOR="red"]00 08 1B 00 00 F0 03 00[/COLOR] 00 00 [COLOR="blue"]<- cache (mmcblk0p6)[/COLOR]
00 00 83 00 00 00 [COLOR="red"]00 F8 1E 00 00 00 20 00[/COLOR] 00 00 [COLOR="blue"]<- usrdata (mmcblk0p7)[/COLOR]
00 00 05 00 00 00 [COLOR="red"]00 B4 01 00 FF FF FF FF[/COLOR] 55 AA [COLOR="blue"]<- fat (mmcblk0p8)[/COLOR]

EBR2

00 00 83 00 00 00 [COLOR="Red"]00 44 3D 00 FF 07 C1 FF[/COLOR] 00 00 [COLOR="blue"]<- [/COLOR] ???
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA
[Miscellaneous Android Development] nightcraw:
How much bigger is the recovery? if 0x3400000 address works than it is better since the __NODL_MISC is empty anyway (it is for MT6577 not sure if it is still true for MT6589) you can remove the __NODL_MISC from scatter and not have to resize sec_ro.

0x3400000 is 0x017000 in MBR Calculated from [0x3400000 / 0x200 - 0x3000 (offset for address in MBR?)]

Option 1: added 0x80000 to recovery, move sec_ro and no resize recovery will be 6815744 Byte in size

1. Change address for sec_ro in MBR from 00 6C 01 00 to 00 70 01 00

2. Change SEC_RO from 0x3380000 to 0x3400000 in scatter.txt

3. remove __NODL_MISC section.

Option 2: added 0x100000 to recovery, move sec_ro and reduce it to 0x2C00 (5767168 Byte)

1. Change address for sec_ro in MBR from 00 6C 01 00 00 30 00 00 to 00 74 01 00 00 2C 00 00

2. Change SEC_RO from 0x3380000 to 0x3480000 in scatter.txt

3. remove __NODL_MISC section.

4. you need to take care of resize sec_ro image

Your Option: added 0x100000 to recovery, move sec_ro and reduce it to 0x2800 (5242880 Byte)

1. Change address for sec_ro in MBR from 00 6C 01 00 00 30 00 00 to 00 74 01 00 00 28 00 00

2. Change SEC_RO from 0x3380000 to 0x3480000 in scatter.txt

3. you need to take care of resize sec_ro image

PS. the forth entry of EBR1 05 00 00 00 00 B4 01 00 FF FF FF FF point to address of EBR2 the entry in EBR2 is the FAT partition.
[Miscellaneous Android Development] yuweng:
Thank you so much for sharing these valuable info, my friend... On MT6589 with 1080x1920 res, TWRP can even exceed 7Mb... :eek:

For SEC_RO partition, i can't really recall the actual steps, extracted was only a few files uses few Kb only while on some its empty but MTK allocate 6Mb for it...

As for MISC partition, cat /proc/dumchar_info shows that it was use & most MTK custom recoveries has /misc	emmc	/dev/misc however TWRP backup doesn't backup this MISC partition & TWRP has this BOARD_HAS_NO_MISC_PARTITION: = true flag that makes me wonder if its really use... :o

Thanks again for confirming its redundant on MT6577, i'll get some beta tester to test it on MT6589 to confirmed it, as i myself is skipping MT6589 for the yet to be launch MT6592 Octa Core... :D
[Miscellaneous Android Development] h3n7a1:
Thank you for this tutotrial..

finally I have more internal space for my good old Freelander PD10 3G MT6575.

After combine the Swap SDcard so I got:

Internal Storage 8.0G

USB Storage 23.0G (externalSD)

SD Card 5.7G (internal SD)

:good::cool:
[Miscellaneous Android Development] hitman72:
I have a mtk6577 Brondy Luxory 2, with the usual 500mb of data partition and 2gb of sd partition. I have tried all possible methods to partition it. From recovery, flashing ebr with SPFlashTool, using apps like Mt657xRepartition.apk etc. but nothing. The sd partition become 512mb from 2gb but partition data remains always 512mb, even after repeated wipes from recovey... with meteos I have partitioned a lot of MTK6589 and always everything has gone perfect. any idea? thank you and sorry for my poor english

ok, I solved it by changing MTK6575_2gb_for apps_512_internal memory.zip/MTK6575-2.5G_for App_Angelobiz.zip ("vold.fstab" and "vold.fstab.nand" inside system/etc)

thank you
[Miscellaneous Android Development] bigrammy:
As usual I am always many steps behind everyone else it seems :laugh: :laugh:

Maybe this is a more appropriate place to continue to try resolve the recovery partition issue rather than on [MENTION=4223648]Rula1[/MENTION] mtkdroid tools thread.
[Miscellaneous Android Development] yuweng:
Bro, you're a semi-pro so go ahead & do Firmware->Upgrade i'm sure the 7Mb mod will work on your device... ;)

If it complain about oversize secro then use this 11Kb generic one here... :cool:
[Miscellaneous Android Development] a.marduk:
I use this tool bootice to edit my mbr ebr1 and ebr2, just change the MBR to MBR.img and u can open them with that tool ("disk image" tab in the program). Just explore the program. :D

Prepare some MBR, EBR1, and EBR2 from different partition setting (i was taking the MBR , EBR1 andn EBR2 files from different devices) and make a table in excel. Once the table sets up, it'd give you guidelines for creating your own partition table. Also change the scatter file so that u can flash any rom (firmware) with custom size partition. ( i use my modded scatter, mbr, ebr1, and ebr2 for flashing with flashtool)

And here is another guide for partition table

PS : Already tried the 10 mb recovery, but recovery bigger than 6 mb won't boot on my device (or maybe i didn't have the right configuration when i built the recovery (thanks [MENTION=4478781]yuweng[/MENTION] for the tutor to built the recovery :D) )

I bricked my device for the first time when playing with partition tables :o
[Miscellaneous Android Development] m@nish123:
hope my post may work for otherhttp://xdaforums.com/showthread.php?t=2596030
[Miscellaneous Android Development] iZLeeP:
Is this hack possible to MT6577? My lenovo phone doesn't have EBR2 file. I've already partitioned my device using the apk provided in this thread. Though, I would like to do my own partitioning to whatever size i want by following your guide.
[Miscellaneous Android Development] bigrammy:
Nice work and Very Informative thanks bro :highfive:
[Miscellaneous Android Development] tirta.agung:
Yes, of course, but remember to change your scatter file as well. Here is an excel file that you can use as a base for you for your device.
[Miscellaneous Android Development] iZLeeP:
Copy mate, will give this a go and report back. Thanks!
[Miscellaneous Android Development] pierangelof:
tirta.agung,

thank you very much for your tutorial!
[Miscellaneous Android Development] louis xv:
HELP

helllo every one

i've used this mod to repartition my mt6577 note 2 clone

and it worked but when i tried to revert it the phone wasnt

able to access the internal memory any more, and data part

still 2gb, i tried flashing a full firmware but, the phone became

bricked, no boot, not charging, but still detected by pc ,

also i checked battery drain, there is 50 mA current when pressing

power btn, and voltage is near 4V , what should i do

HELP please
[Miscellaneous Android Development] iZLeeP:
Flashing full firmware should have solved the problem. Try flashing again, but this time format it first using sp flash tool before you proceed with the download.
[Miscellaneous Android Development] keanu_ritz:
need a little advice

no worries , figured it out myself.
[Miscellaneous Android Development] Byte_Me:
This thread makes me feel like an idiot :')

I have a ZTE V965. It has 3GB internal storage, which is divided in 2 1.5 GB partitions. One is called phone storage and the other one internal (usually). Apparently it's possible to have just one partition. Which should resolve my storage full problems. I can't figure out how to do it though :(

Which files need to be edited? vold.fstab? the scatter file for flashing?
[Miscellaneous Android Development] KunalKene1797:
I Need Help Please!

Can you take a look ?

MT Device is MT6572 with EBR1 and MBR Files only...this is the Link to my stock MBR and EBR1....i would be very thankful if someone can help or atleast guide me! :silly:

Thanks in Advance:good:​

I want to increase the Primary Internal Data Partition size from 500MB to 2GB! :silly:

MBR and EBR1 : http://xdaforums.com/attachment.php?attachmentid=2869849&d=1406289303

Scatter[MT6572] : http://xdaforums.com/attachment.php?attachmentid=2869848&d=1406289178
[Miscellaneous Android Development] bethnesbitt:
MTK6572 repartitioning

Now here is a funny story :P

I came across a tool on irulu.net's download for a tablet similar to mine, funny thing is, they named it IMEI tool, which was the IMEI tool, but it was like finding gold at the end of the rainbow, also had the kernel for a MTK6572 tablet. I asked them about it but they replied with it wasn't for mine, they didn't know what it was.

I had somewhat of an idea and decided to play with it, did a dd against the kernel in linux it it actually showed that it was android 4.6 pre-release, hmmm now I had to see what would happen and flashed it using SPflash, brick, wouldn't even turn on. So I reflashed back to my original firmware that, of course was backed up from MTKDroid Tools.

Not sure why but SPFlash flashed everything back to the phone, it turned on but I was stuck in some kind of limbo between the old kernel and the new kernel. Seemed to update it by keeping the newer firmware but didn't reflash the old firmware. Worked, just some Apps were not compatible and the screen rotation was backwards. When I tried opening some apps the screen just went blank and froze.

What was cool is that the EBR1 and MBR from their kernel actually extended my internal storage from 504mb to 1.2gb, sweet, and decreased my phone storage from 2.11gb to 1.32gb. Luckily I had another nandroid backup that was done and saved to my PC using nandroid from the play store, you can never have to many backups. The backup restored my system, userdata etc but still have that shiney new EBR1 and MBR.

When I try to do file cynwig nothing happens and linux just shows x86 boot sector with no values.

Something else that is baffeling is, how is it that the original was 502mb internal meory with 2.11 internal storage, doesn't make sense. Now the new files give me 1.2gb with the 1.32gb internal storage. Makes me wonder if I could just jack somebody else's EBR1 and MBR from a 6589 devices.

Something else I was wondering, what I I partitioned a usb stick or sdcard the way I wanted my internal storage for apps to be, the way my phone storage is already configured, duplicated that MTKDroid tools is showing. Next in HXD, opened extras and selected the disk to read as hex, then saved it as a new EBR and MBR. Next flashed it, wouldn't that be easier if possible?

Did compared it against the tablet's original EBR1 and MBR and found the differance, both are attached. Just cannot seem to grasp how it is done.

If anybody want''s to use the new MBR and EBR1 on their mtk6572, go ahead, it will probably work on their china mtk6572 tablet, that is if you have less then 1.02gb of internal storage.
[Miscellaneous Android Development] KunalKene1797:
[MOD](Repartition Internal) Mediatek MT6572 Internal 2.4GB Repartition

MT6572 User's This Might Be Helpful!

http://xdaforums.com/android/development/mod-repartition-internal-mediatek-t2861061
[Miscellaneous Android Development] bresjanacp:
Thank you very much for this explenation.

I have just one question more.

In Partition 7, last four Hex, they are not size of partition, right? What is that?

Thanks
[Miscellaneous Android Development] tirta.agung:
They are the size of how many sectors your phone can read an external SDCard.
[Miscellaneous Android Development] bresjanacp:
I'm not sure that I understand. Maximal size, in sectors, of ExtSD that I can use in my phone? (32GB in sectors?)
[Miscellaneous Android Development] a.marduk:
i think it's just some kind of way to include all emmc (including there unmapped bootimg , recovery, nvram, pmt, uboot, etc) and unknown size of fat into mbr and ebr....

Means that the remining space in emmc from start sector of fat till the end of the space in emmc will be fat partition. So it doesn't matter if your phone's rom are 4 gigs, 8 , 16 or 32 gigs.

see MBR , first partition (blue one)

- 05 = partition type = extended partition

- 04 00 = start sector (in hex) = partition start at sector 1024

- FF FF FF FF = sector size (in hex) = sector size = 4294967295 sectors = 4294967295 x 512 bytes/sector = approximately 2 TB

now see EBR1 third partition (purple one = fat partition = phone storage)

- 83 = partition type = Linux native file systems (ext2/3/4, JFS, Reiser, xiafs, and others).

- 1BD400 = start sector of the partition = the sum of previous partition (yellow one) size + start sector of the previous partition = 03F000 + 17E400 = 1BD400

- FFE42BFF = the size of partition = the size of extended partition - ( the size of previous partition + start sector of previous partition ) = FFFFFFFF - ( 03F000 + 17E400 ) = FFE42BFF = approximately 2 TB
[Miscellaneous Android Development] bresjanacp:
Sorry, but I don't think so, that FFE42BFF is partition size.

It doesn't make sence.
[Miscellaneous Android Development] jbliz:
mmcblk0p4

00 BA 01 00 - 0001BA00 (hex) 113152 (dec)

00 50 14 00 - 00145000 (hex) 1331200 (dec)

113151 + 1331200 = 2662400

1331200 x 512 = 681574400 Megabytes

how to make correct address in scatter? even I mode EBR to reduce system partition. MTK Droid Tools still read actual bite size. here my scattter.

- partition_index: SYS15

partition_name: ANDROID

file_name: system.img

is_download: true

type: YAFFS_IMG

linear_start_addr: 0x3D40000

physical_start_addr: 0x3740000

partition_size: 0x28A00000

region: EMMC_USER

storage: HW_STORAGE_EMMC

boundary_check: true

is_reserved: false

operation_type: UPDATE

reserve: 0x00