Mi A1 to Mi 5X and versa Repartitioning

KhaledAbdo

Senior Member
Sep 11, 2012
228
37
48
Cairo
forum.xda-developers.com
Hi all ..
I was thinking that the only difference between the 2 devices is the partitions setup .. so, if there were a script to adjust the partitions before flashing the other ROM it should work .. :confused:

Or even a script to make the device has both needed list of partitions available ( with the loss of a few extra space ) :confused::confused:

Steps for Mi A1 should be :
Unlock bootloader
Flash custom recovery
Run Repartitioning from A1 to 5X
Push 5X recovery and Bootloader
Flash 5x Official ROM

Done.

Note: I have done something similar to HTC Desire about 4 years ago and it worked fine
 
  • Like
Reactions: nikkpap

KhaledAbdo

Senior Member
Sep 11, 2012
228
37
48
Cairo
forum.xda-developers.com
Why not install Mi5x ROM on one of the two available partition instead?
This won't work.
Mi 5X official ROM is expecting a certain partition structure that is set for Mi 5X but not for Mi A1. For example, it is expected a "/system" and a "/recovery" partition .. but instead in Mi A1, you have 2 system partitions "/system_a" and "/system_b" .. so you can't just flash it directly .. some modification has to be done ..

First option is customizing: You get the official ROM, and adjust it to work on the A/B structure .. and vice versa, get the stock Mi A1 official ROM and edit it to work on old normal partition structure (which is already done, and is ready for 5X as we speak).

Second option, is the one am asking about above .. if we could repartition the devices itself, and use the Ready software from Xiaomi and Google without customizing ..
Yet am not sure if that is possible and doable or not, hence am asking .. :)

anyways, am hoping it is .. and waiting for a skilled developer to purchase the device and give it a try ..
or for Xiaomi and Google to provide a good solution .. :D :D

Peace
 

nilkanth.marshiwane

Senior Member
Jun 28, 2014
142
42
58
This won't work.
Mi 5X official ROM is expecting a certain partition structure that is set for Mi 5X but not for Mi A1. For example, it is expected a "/system" and a "/recovery" partition .. but instead in Mi A1, you have 2 system partitions "/system_a" and "/system_b" .. so you can't just flash it directly .. some modification has to be done ..

First option is customizing: You get the official ROM, and adjust it to work on the A/B structure .. and vice versa, get the stock Mi A1 official ROM and edit it to work on old normal partition structure (which is already done, and is ready for 5X as we speak).

Second option, is the one am asking about above .. if we could repartition the devices itself, and use the Ready software from Xiaomi and Google without customizing ..
Yet am not sure if that is possible and doable or not, hence am asking .. :)

anyways, am hoping it is .. and waiting for a skilled developer to purchase the device and give it a try ..
or for Xiaomi and Google to provide a good solution .. :D :D

Peace
Will Mi A1 get project treble?
 

CosmicDan

Senior Member
Jun 19, 2009
5,845
7,678
263
34
Sydney
You can repartition the device easily. Just flash the factory image in EDL mode via MiFlash, it will write partition table.

But I do NOT recommend this unless:

1) You first make a FULL BACKUP of ALL partitions with EMMCDL tool. This will backup all the stuff that cannot be recovered with a factory flash (e.g. IMEI)
2) You are willing to disassemble the device to get testpoints access to get device out of diagnostic mode and into QDFlash mode if the device gets a semi-hard brick.

I know this for a fact because I manually repartitioned my device while working on Project Treble, which worked fine, but then when I messed around with GPT table some more I got a hard brick. Upon flashing A1 firmware via EDL mode once I succeeded in testpoints method, I got stock partition table back, then I restored my EMMCDL backup.

So, if anyone is daring enough and has the time, you could just try flashing 5x firmware in EDL mode. But I'm pretty sure someone already tried this and it resulted in the firm-brick I speak of.
 

jaozze

New member
Apr 24, 2009
2
0
0
You can repartition the device easily. Just flash the factory image in EDL mode via MiFlash, it will write partition table.

But I do NOT recommend this unless:

1) You first make a FULL BACKUP of ALL partitions with EMMCDL tool. This will backup all the stuff that cannot be recovered with a factory flash (e.g. IMEI)
2) You are willing to disassemble the device to get testpoints access to get device out of diagnostic mode and into QDFlash mode if the device gets a semi-hard brick.

I know this for a fact because I manually repartitioned my device while working on Project Treble, which worked fine, but then when I messed around with GPT table some more I got a hard brick. Upon flashing A1 firmware via EDL mode once I succeeded in testpoints method, I got stock partition table back, then I restored my EMMCDL backup.

So, if anyone is daring enough and has the time, you could just try flashing 5x firmware in EDL mode. But I'm pretty sure someone already tried this and it resulted in the firm-brick I speak of.
Do you think this could work from mi 5X to mi A1?