[Huawei Ascend Mate 2] xordos:
OK, good to know now we probably have better way to bring CC to OEM version, so we don't need test this repartition thing. :)

******* expired info below, we don't need to test the repartition method as another 100% convert method is found, see first post for the link ******

OK, tester needed :)

Holiday is good, so I can have chunk time to flashing my phone repeatedly.

I have tested the script after I downgraded my vanilla MT2L03, worked fine. so now I think I need some brave CC user to test this first.

Pleas read following carefully before PM me.

1) Re-org partition on twrp itself or before ( partition number 1-19 ) is dangrous, I don't want to touch them if not required. at least for now we don't need.

Number Start End Size File system Name Flags

1 17408B 541695B 524288B sbl1

2 541696B 574463B 32768B sdi

3 4194304B 4227071B 32768B DDR

4 8388608B 8900607B 512000B rpm

5 8900608B 9412607B 512000B tz

6 9412608B 15138815B 5726208B aboot

7 15138816B 16187391B 1048576B pad

8 16187392B 83296255B 67108864B oeminfo

9 83296256B 87490559B 4194304B modemst1

10 87490560B 91684863B 4194304B modemst2

11 92274688B 192937983B 100663296B fat16 modem

12 192937984B 197132287B 4194304B fsg

13 197132288B 197133311B 1024B fsc

14 197133312B 197141503B 8192B ssd

15 197141504B 230695935B 33554432B ext4 log

16 234881024B 301989887B 67108864B bkbootup

17 301989888B 310378495B 8388608B ext4 persist

18 310378496B 322961407B 12582912B boot

19 322961408B 339738623B 16777216B recovery

20 339738624B 608174079B 268435456B ext4 cust

21 608174080B 809500671B 201326592B ext4 cache

22 809500672B 813694975B 4194304B misc

23 813694976B 1887436799B 1073741824B ext4 system

24 1887436800B 8329887743B 6442450944B ext4 userdata

25 8329887744B 15634251263B 7304363520B fat32 grow

So, I only delete partition 23 to 25, and re-create with 1.8GB system.

The official B148 partition map is

# ------ START ------- END ---------- Size ------- fs ---- Name

23 813694976B 1887436799B 1073741824B ext4 system

24 1887436800B 8329887743B 6442450944B ext4 userdata

25 8329887744B 15634251263B 7304363520B fat32 grow

The official B309 partition map is (it has different start because some boot/recover partition size increase)

23 952107008B 2831155199B 1879048192B ext4 system (1.8GB)

24 2831155200B 15634251263B 12803096064B ext4 userdata (12.8G) data plus fused internal storage

But for CC manual re-partition, I am using following

23 813694976B 2692743167B 1879048192B ext4 system (1.8GB)

24 2692743168B 14560526335B 11867783168B ext4 userdata (11.8GB) data plus (for 5.1) fused internal storage

25 14560526336B 15634251263B 1073724928B fat32 grow ( 1GB) (for 4.3) internal storage

I left extra 1GB size at the end (#25) compare to B309, for following advantage:

. The new partition map is not inline with official B309 anyway due to boot/recovery size different.

. The 1GB will be wasted in 5.1, but it can be used to flash 4.3 without restore the partition. It just have a very small internal storage.

Right, I think this new partition map will allow you to flash B148 and B309 images (System partition only) without error of missing partition.

2) So, after resize System to 1.8G, ideally you should not need to resize again since it will support both OS. We should avoid constantly use this re-partition tool. More time you work on partition table, more risk you have.

Still I have provide the restore script to flash partition back to stock when you want to restore to complete stock.

3) Risk. If you want to test my script, please PM me. Please note that you should know how to (and should already have) backup your current CC boot, recovery partition, and of course System/Data partition. And be able to and feel comfortable to use ADB/dd/parted under twrp. The tools is twrp flashable zip, but these knowledge will help a lot in case something go wrong.

[MENTION=2667067]ArkAngel06[/MENTION]