yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A1 Guides, News, & Discussion] KazuDante:
Treble question.

I will soon receive my Mi A1 next weekend , but my question is after i unlocking the bootloader which twrp do i need to make it perm treble ? and after making it treble if i flash a rom that does not support treble will that screw up the already trebled device ? correct me if im wrong as well but when the device is treble will the a/b partitions be unified under 1 partition ?
[Xiaomi Mi A1 Guides, News, & Discussion] 5i1v3rStorm:
Don't worry. I trebled my A1 today, following this great GREAT guide. If you read closely and follow it step by step you won't have trouble.

You will need the treble recovery from CosmicDan.

After being trebled you can install non-treble ROMs. CosmicDan's recovery does it all for you.

The A/B partitions are not merged! On the contrary. Your device consists of mainly:

- system_a

- system_b

- data

- storage

Treble-enabled devices also need vendor_a and vendor_b - that is why the userdata partition gets shrunken - it needs to make way for these two.

You will still have an A/B device.
[Xiaomi Mi A1 Guides, News, & Discussion] Dior DNA:
You need CosmicDan's TWRP.

Treble just adds vendor a and vendor b partition (taken from data (by default)),

it keeps all a/b existing partitions (boot, system, modem).

Non treble ROM does not have, so does not know about, vendor partitions.

One can flash a nonTreble ROM on a Treble device.

Recall, by flashing a complete ROM it is on the other than currently active a|b slot set.

Read the excellent Guide again and you will understand already better.

Also, effectively doing the process on an actual treble a/b device will make you understand even better.
[Xiaomi Mi A1 Guides, News, & Discussion] bubundas17:
Well, I have a question

After repartitioning my device, will I be able to install stock ROM without moving back to stock partition? and if yes will I be getting updates in stock ROM as expected? or to use stock ROM I have to revert back to stock partition table?
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
Read the whole thread and FAQ on TWRP with Tissot Manager thread.

Short answer is yes, but you're on your own. OTA is no.

If you want stock, stay on stock. I don't know why anybody wants to repartition if they want to use stock....
[Xiaomi Mi A1 Guides, News, & Discussion] bubundas17:
Oh, this means I can infact use stock ROM, just I won't be able to install OTA via the stock system updater. Right?

And speaking of using stock ROM after partitioning the phone.

Well, It is totally relate to stability, we/I just don't want to create any problems after re partitioning the device if I want/had to revert back to stock ROM in case. That's why.
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
Yes, that's what it says.

Indeed, using stock ROM as a fallback makes sense - but since it's not a primary OS then lack of OTA isn't really a big deal.

You can keep a TWRP backup of stock ROM or any non-Treble ROM for emergencies.
[Xiaomi Mi A1 Guides, News, & Discussion] bubundas17:
Well, did you tried to OTA update the stock ROM after repartitioning the device?
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
Not personally because I don't care, but everyone has reported that it doesn't work.
[Xiaomi Mi A1 Guides, News, & Discussion] Coboooo:
I am currently on latest RR AIO ROM. I went through repartioning and installed Gapps and Magisk and everything works fine. However, I am still confused about the slots A/B. No matter which slot I reboot into the system from, it always boots correctly into the RR system. That's where my confusion comes in. If I boot from the slot were my Gapps and Magisk are installed shouldn't I get a bootloop because the RR zip was installed on the opposite zip. Sorry, just trying to work things out
[Xiaomi Mi A1 Guides, News, & Discussion] Dior DNA:
Maybe, in the time line of history, you flashed AIO twice?

---------- Post added at 16:02 ---------- Previous post was at 15:58 ----------

You can dump system_a and system_b partition images to files and inspect their content on a computer.
[Xiaomi Mi A1 Guides, News, & Discussion] kanna4545:
Install tutorial video pls

Pls help
[Xiaomi Mi A1 Guides, News, & Discussion] fachry:
Hi, Until now I still haven't benefited from Treble. Lots of ROMs with the treble label on the forum but to do the update you have to download ROM and Gapps files and even have to reinstall as usual before Treble. if I use ROM with the Treble or GSI label, will I get an automatic update from Google for OS updates without need to wait for the developer to make/porting it?
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
No.
[Xiaomi Mi A1 Guides, News, & Discussion] Xaviers101:
In the world of custom roms, project treble creates a different kind of ecosystem. Developers dont have to create/update roms for each and every device available in the market. Some talented developers build vendor images and treble supported kernels which are device specific, we can simply flash these vendors and kernels and make our phone treble ready to flash treble roms or GSI. The devs just need to build one system (GSI), basically; android system/os in its simplest form and this GSI can be flashed in any treble enabled device as long as it has gsi compatible kernel and vendors installed. For example: current development in pie roms has made many pie GSIs to surface online. One for instance, "pie semi gsi" can be flashed on any device not only in tissot. User just need to get vendor and kernel specific to thier device. We tissot users have an updated vendor from RR development my mountaser halak. And so many kernels are also there to support treble. All we need is swap gsis and experience various roms. This way devs dont have to worry about so many projects/task related to various devices. Instead just focuss on building or improving one specific already available GSI, for ALL. And so faster updates for us.:)
[Xiaomi Mi A1 Guides, News, & Discussion] Premananda_laishram:
Anything

Is there any possibility of reversing partition change of userdata partition through EDLmode.

Phone cannot enter TWRP or boot normally after it hung during normal usuage.

Running Android P port by Joeyhuab
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
Of course there is, just flash stock ROM in EDL mode (use MiFlash). I thought I said this somewhere....
[Xiaomi Mi A1 Guides, News, & Discussion] Premananda_laishram:
No hope

Then I guess my flash memory is busted. EDL Flash always fails with readback error.
[Xiaomi Mi A1 Guides, News, & Discussion] mitunz:
please help

im stuck with treble rom a and b

dont have any recovery file

now my A1 using twrp with tissot manager with instaled RR Treble Experimental ROM,

sucsess booting booting but i can do anything there nothing work , No sim , baseband ,imei. wifi worked but

if i flash magisk alwasy fail with error "META-INF /com/goolge/adnroid/update-binary'

trying flash image vendor or boot in TWRP " updated process ended with error : 255

what should i do to fix my problem thanks.
[Xiaomi Mi A1 Guides, News, & Discussion] Coboooo:
Ralf:

I'm currently on latest Havoc with 6.1 Moun. Does someone have a link to a guide that shows what gets installed where. Still confused about the A/B slots. I have TWRP 3.2.1 with Tissot manager 2.5 installed and when I boot into it the default Slot is A. When I updated from the previous Havoc version I was in slot A but it would NOT let me install any GAPPS until I wiped System and Vendor in both slots. Does this make sense to anyone. Q1: Should the default slot be A. Q2 Does IMG file and Vendor install on the opposite slot? Q3: When I then reboot and am back in slot A where do kernel, gapps and Magist get installed. Sorry about the lengthy post. I didn't know where else to put it. Please someone enlighten me
[Xiaomi Mi A1 Guides, News, & Discussion] victorsv:
My cell came into bootloop during the process of treble...

https://imgur.com/Ig0Hkuc
[Xiaomi Mi A1 Guides, News, & Discussion] KuGeSch:
Maybe you find here what you are looking for...

https://www.xda-developers.com/how-...ess-updates-affect-custom-development-on-xda/
[Xiaomi Mi A1 Guides, News, & Discussion] Coboooo:
Exactly what I was looking for. Great article
[Xiaomi Mi A1 Guides, News, & Discussion] theincognito:
[MENTION=1844875]CosmicDan[/MENTION]

I used to be on non-treble roms and what I did was, I would install the rom in, say slot A, and flash the update of the rom in slot B, then the next update on slot A and so on.

Now, I have done treble partitioning using your twrp and flashed a pie rom (system image + vendor image + gapps + magisk) to slot A and everything is working fine.

But, to update, should I flash the new system image to slot B? I am talking about the GSI roms, here.

If yes, what's the proper flashing steps for updating? If no, what do I have to do?

Much help would be appreciated.
[Xiaomi Mi A1 Guides, News, & Discussion] Typhus_:
No need to change Slots. img files are flashed on the same slot.
[Xiaomi Mi A1 Guides, News, & Discussion] theincognito:
I know I can do that, mate. That would essentially be using only 1 slot. I mean, can't we use both slots, like google intended to? For example, september update in slot A and october update in slot B, and if October update borks, we just need to change slot back to the September update. Like that?
[Xiaomi Mi A1 Guides, News, & Discussion] Typhus_:
Oh, that. Not really sure. But I think it's ok.

Enviado do meu Mi A1 através do Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] theincognito:
Your thoughts really would be appreciated. :)

https://xdaforums.com/showpost.php?p=77846249&postcount=241
[Xiaomi Mi A1 Guides, News, & Discussion] fachry:
Deleted!
[Xiaomi Mi A1 Guides, News, & Discussion] cherryb8844:
Guy can I flash any GSI ROM from here.

https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list

Or I can only flash GSI ROM that provide on XDA for my device.

Or what about vendor can I able to flash any one vendor with different GSI like we flash google apps on ROMs. or need to flash only vendor that is provided by my device specific GSI. their is three vendor provided by different developers sooti and ghpranav I searched for our mi A1. ?

Sorry if it ot
[Xiaomi Mi A1 Guides, News, & Discussion] Dior DNA:
I agree that it is not trivial to always find best vendor per device/version. I have MiA1 too. Developer mountaser also has a vendor partitions (Oreo Resurrection Remix and Pie HavocOS). In theory it should not matter which one to use (which is what actually makes Treble cool) . But I would prefer no not have to choose, could developers agree upon, or converge towards, one vendor choice per device/version.
[Xiaomi Mi A1 Guides, News, & Discussion] akash5333:
I partitioned my device and also used treble ROM. But for some reason I decreapted my device. And now I can't boot treble ROM.all process for flashing treble ROM were did without errors but still can't boot. But I can boot normal ROM , I mean non-treble. Plz help me solve this problem
[Xiaomi Mi A1 Guides, News, & Discussion] Dior DNA:
any Pie AIO ?

From OP I seem to (mis?)understand, to go treble, one needs to flash an AIO after "treblize".

Is [MENTION=5393309]ghpranav[/MENTION]'s RR AIO (Oreo) only choice? Is there a Pie AIO Treble ROM alternative?

I did seach but could not find.

Alternatively: instead of AIO, can one just flash system vendor and kernel separately manually ?

e.g. on other slot ?

Have a nice day

---------- Post added at 01:21 ---------- Previous post was at 00:30 ----------

you might need Disable_Dm-Verity_ForceEncrypt

see https://xdaforums.com/mi-a1/help/one-unencrypt-stock-rooted-pie-losing-t3892332
[Xiaomi Mi A1 Guides, News, & Discussion] Dior DNA:
Basically I think one can be as creative as one wishes with a/b.

Like: if one runs a ROM from x (a|b) and one is very happy, one can (I use dd) clone all x partitions to y partitions.

e.g.: clone vendor_x to vendor_y and so on [the block device names you can figure out]

In fact I also clone partitions 'p' to 'p'bak if such bak exists.

e.g.: tz to tzbak and so on

That is, recall: once I am very happy with current ROM (and firmware).

Now a and b are equal. One can boot from either slot...

If next an update comes, then it does not matter where you update, the previous is always in the other one you choose.

PS: this procedure is perhaps not for faint of heart.

In practice I keep a record of each and every partition and where it's content came from.

And, of course, I backup them all, and keep also some older versions.
[Xiaomi Mi A1 Guides, News, & Discussion] akash5333:
How to disable it?
[Xiaomi Mi A1 Guides, News, & Discussion] Dior DNA:
You speak about a 'treble' and a 'non-treble' ROM. Which ROMs are that? Are both installed right now?

Which one does or does not require, support or does not support encryption?

Some ROMs (e.g. stock) automatically encrypt your data when booting,

Other (often custom) ROMs (e.g. Phh AOSP if I am right) do not work with encrypted data.

So you may need to make a choice.

If you flash Disable_Dm-Verity_ForceEncrypt one thing it will do is prevent the ROM in that slot to encrypt data.

Some people however prefer to stay encrypted. But then one cannot have both.

Personally I decided for now to go decrypted. This is why I referred to the post.

One flashes Disable_Dm-Verity_ForceEncrypt after ROM (and e.g. gapps) but before Magisk.

see, for more details:

https://xdaforums.com/android/software/universal-dm-verity-forceencrypt-t3817389
[Xiaomi Mi A1 Guides, News, & Discussion] akash5333:
Right now I m on non-treble /custom rom, it is decreapted and I can only boot non-treble ROM

I decreapted my device when I was on 'treble pixel dust' . I backed up that rom that time in twrp but it is not booting while restoring.

I tried havoc latest test build and sootie's pixel experience but failed
[Xiaomi Mi A1 Guides, News, & Discussion] Dior DNA:
Thanks for details. So TWRP restored 'treble pixel dust' does not boot. Is that the problem? Or did restore itself fail?

Just a guess: perhaps current slot is wrong? Recall: installing a (custom) ROM usually does change slot.
[Xiaomi Mi A1 Guides, News, & Discussion] akash5333:
I tried to install treble rom in both slot but both the time failed.

The problem is treble rom is not booting for me. even I have working system backup which booting before but now fails. And can't boot new treble rom.

I observed that while flashing system.img , it taking just a second to complete process and gets successful. Which takes almost half minutes to complete

---------- Post added at 08:03 PM ---------- Previous post was at 08:02 PM ----------

I tried to install treble rom in both slot but both the time failed.

The problem is treble rom is not booting for me. even I have working system backup which booting before but now fails. And can't boot new treble rom.

I observed that while flashing system.img , it taking just a second to complete process and gets successful. Which takes almost half minutes to complete
[Xiaomi Mi A1 Guides, News, & Discussion] Dior DNA:
Perhaps it is best to go back to stock ROM first in MiFlash.
[Xiaomi Mi A1 Guides, News, & Discussion] akash5333:
I managed to boot treble rom. I flashed treble ROM by mounteaser halak's havoc ROM. But I can't boot latest aosp extended and latest havoc test built. Any solution for it.

I m unencrypted now. I didn't tried sooti 's pixel experience due to the forced encryption
[Xiaomi Mi A1 Guides, News, & Discussion] deolux2:
Thank you for this rich thread!

I am using Xiaomi Redmi Note 4 (mido) [A-device] and have successfully flashed all kinds of Treble ROMs whether LOS-based or AOSP- based using Treble compatible Custom Recoveries. However whenever I make a backup of any of these ROMs so as to flash another one, I discovered that I am not able to restore that backup most of the time. Could anyone advise what partitions that must be backuped so as to guarantee the restoration of the backup. Kind regards. ?*♂️
[Xiaomi Mi A1 Guides, News, & Discussion] prorooter007:
Ask in respective thread.

This thread is for Mi A1.
[Xiaomi Mi A1 Guides, News, & Discussion] deolux2:
Sorry :eek:
[Xiaomi Mi A1 Guides, News, & Discussion] blade22:
Good explanation :)

But I flashed Treble ROM long back and I forgot the slot A/B in which I flashed the ROM earlier. so I rebooted to recovery today and found that current active slot is A, which means the ROM was installed in Slot A right ?
[Xiaomi Mi A1 Guides, News, & Discussion] ismaelct:
When i get to "Reboot Recovery, NOT SYSTEM." my phone said "The system has been destroyed" some help please?
[Xiaomi Mi A1 Guides, News, & Discussion] cahsobo:
I'm on stock pie 10.0.4.0. Do I have to downgrade to get TWRP working on my device?

I've tried many TWRP. None of them worked. Please help
[Xiaomi Mi A1 Guides, News, & Discussion] :
It's because Twrp isn't compatible with stock pie
[Xiaomi Mi A1 Guides, News, & Discussion] mobilizmo:
Hi! I am on Havoc-OS v2.3 (with CosmicDan twrp). Am i starting from 2. "Treblize" (repartition) the device (of course after i made a nandroid backup)?
[Xiaomi Mi A1 Guides, News, & Discussion] iSEKAI:
same issues .. i can't get to find any possible way to install twrp recovery.. which is so frustating!
[Xiaomi Mi A1 Guides, News, & Discussion] timotej011:
You have to flash magisk.
[Xiaomi Mi A1 Guides, News, & Discussion] iSEKAI:
i did flash magisk after the twrp recovery installer..

then reboot to system . and when i wanna boot to recovery by pressing volume up + power button

the goddamn message appear
[Xiaomi Mi A1 Guides, News, & Discussion] Shinigami_sama:
boy oh boy i did it

after a lot of frustation and head scratching it all worked out.

These issues with slot A and slot B ****ed me over, bootlooped over and over, each time flashing stock rom and ****, even bricked phone once, had to unbrcik via testing pins and flash via COM port in MiFlsh tool.

But now it's fine, rocking RR with magisk and opengapps :laugh:

ask me for if you need help, peace out
[Xiaomi Mi A1 Guides, News, & Discussion] andheartman:
[MENTION=1844875]CosmicDan[/MENTION] We missed you, can you come? You are one of the biggest developers for TWRP. There are lots of bugs, no updates and we need your help. :crying:
[Xiaomi Mi A1 Guides, News, & Discussion] JOSEPH_1889:
Hi, i already trebleized my device in order to flash miui 12. I didnt read that was necesary back to stock before trebeizing process so i did It while using paranoid android. The rom seem to work well but i dont know if could be underhood problem after flashing from custom rom... You recommend back to stock and do It again or if there were problems i would already noticed them? And other question is if i want to go back to paranoid should flash stock before or use the option to go back non treble in twrp?
[Xiaomi Mi A1 Guides, News, & Discussion] Cyberavater:
I have a different device, How can I separate the vendor image from the system image?

Can I repartition with regular TWRP available for my device?
[Xiaomi Mi A1 Guides, News, & Discussion] Yang Yuan 649:
Hello,but I don't not how to build a project treble (vendor.img),and how to build a new treble rom for my device which is mtk soc and run on Android 7.

unfortunately, OEM didn't support my device now,can you talk about this so that I can update my device by myself
[Xiaomi Mi A1 Guides, News, & Discussion] jamu08:
Same problem here. Please help.
[Xiaomi Mi A1 Guides, News, & Discussion] JOSE_1889:
i have a question. with a treble partitioned devices i can use the roms that already are here? and is there a way to do it safely with a zip installer or something like this? and it can make any damage the device? i am really noob at it so i want to know that things
[Xiaomi Mi A1 Guides, News, & Discussion] Yudhz®:
when I came from custom rom ,should I go back to flash stock and then repartition and install treble rom ??
[Xiaomi Mi A1 Guides, News, & Discussion] berezker:
The OP literally had to make a thread, twice just to oversimplify everything for you guys and all you do is ask questions that are already in the first post.

Please, read the entire post first and make sure you understand it fully, if your question is not already answered in the first post, chances are, someone already asked the same question and OP replied to him/her.
[Xiaomi Mi A1 Guides, News, & Discussion] squallbayu:
I mean this : play store > settings > scroll to the bottom, it shows the device certification. (See attachment)
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
You sound scared. You probably shouldn't be here.

Sure. You can skip the flash to stock stuff or even backing up. Just don't blame anyone if it doesn't work.

Dunno. Never checked. Does it matter? Probably needs Magisk.
[Xiaomi Mi A1 Guides, News, & Discussion] squallbayu:
Well not really matter, Im using RR and it certified by google play. Really helpful to install banking apps. Just wonder if treble rom is still certified or not.
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
Guide has been overhauled. Hopefully it answers even more questions.

But still, keep them coming. As long as you have read everything.
[Xiaomi Mi A1 Guides, News, & Discussion] deveshgupta69:
After going to stock rom with MiTool, wifi still not there after flashing persist, also cant flash recovery as it says something wrong with my partition table,I partitioned my table earlier for treble. How do I get it to full stock?
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
Flash with MiFlash IN EDL MODE, as the guide says.
[Xiaomi Mi A1 Guides, News, & Discussion] deveshgupta69:
wifi not working on RR AIO, Any fix?
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
You can try Persist Resurrector.

You can also flash the stock persist.img, if you can't use the Resurrector because you already flashed someone else's.
[Xiaomi Mi A1 Guides, News, & Discussion] speedunderx:
I have a doubt about all this, do I have to make some modification of the kernel before doing any installation of ROM or GSI?
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
Does it say you have to make some modification to the kernel in the guide?

The AIO contains a kernel.

Go back and read the guide again.
[Xiaomi Mi A1 Guides, News, & Discussion] speedunderx:
Thanks dear, my main language is Spanish, and my English is not very good, so some texts I do not understand very well.
[Xiaomi Mi A1 Guides, News, & Discussion] ekistece:
If MiFlash restores persist in EDL mode, may be that flash_factory.bat is meant to be used in EDL mode? If that's true, a lot of bricked A1's without IMEI/MAC could be restored! I hope someone can test and confirm that.
[Xiaomi Mi A1 Guides, News, & Discussion] Ahmed Al-Sayed:
Anyone tried the "flahsing stock persist" part ??

Does it really work ??
[Xiaomi Mi A1 Guides, News, & Discussion] mariosepsy:
Thanks! i'll follow this project
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
No, that's only for fastboot. And it doesn't work, it references files that don't exist. Look at the bat file, theyre all fastboot commands.

Flashing persist is impossible in Fastboot, must be EDL.

Stock firmware will never flash persist, it's always excluded. That's why the custom ZIP I made is needed.

Best way to get persist back properly is still to use Persist Resurrector on your own persist. The stock persist is just there as a work-around.
[Xiaomi Mi A1 Guides, News, & Discussion] mariosepsy:
Thanks bro, very excellent guide and explanation
[Xiaomi Mi A1 Guides, News, & Discussion] aveejnasv:
Did you flash this persist? Did it solved your wifi mac address?
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
Flashing stock persist solved wifi in stock but it didn't solve it for official latest RR. It did however work in the RR Treble Experimental and GSI.

The only solution to get Wifi working in *every* ROM is to use Persist Resurrector. I don't know if the tool works with stock persist.img.
[Xiaomi Mi A1 Guides, News, & Discussion] parasnarkhede:
i used this and it worked like a charm.

Make sure you enable usb debugging while using this tool.