yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A1 Guides, News, & Discussion] Typhus_:
Hello!

[MENTION=1844875]CosmicDan[/MENTION]

Today I've decided to go forth and "Trebelize" my device. Since I didn't want to report false issues, I've decided to do it all "by the book", that means, I've followed your every instruction (from going back to stock in EDL mode to completely backup my device...that has 64GB internal...so you know how many time I've waited for the backup to finish).

Anyway, there seems to exist an issue with the TWRP installer. I had that exact same issue when using [MENTION=7471004]mohancm[/MENTION] installer on his TWRP thread OP.

The installer runs but something's wrong with data partition. Both on your "TWRP Treble capable" installer (and also on mohancm's installer...I've tried this earlier on, when I wanted to first install TWRP on my device 15 days ago) the Data partition can't be wiped and the device still remains encrypted, which doesn't allow it to boot properly after flashing a ROM. I've tried to wipe it but TWRP becomes berserk with a lot of errors regarding not being able to mount data.

Anyway, now I was able to do everything good since the installer present on THIS post, actually works to properly install TWRP, Format Data (which removes encryption) and, of course, installing your "TWRP Trebele capable" installer.

After being able to use your modified TWRP, I've managed to install RR Experimental Treble ROM, as well as Gapps and Magisk (beta 16.4).

The Slot change was made automatically with no need to reboot to fastboot after installing stuff this way

:

Boot to TWRP through fastboot

Install TWRP using the zip on that post

Reboot to that TWRP

Format data (to remove encryption)

Factory Reset (the "normal" wipe TWRP has...)

Install the Treble capable TWRP zip (v1.2)

Reboot to the Treble capable TWRP

Format data (again...just to check if it was ok...it was...)

Apply the repartition using Treble Manager (I've used userdata partition)

Reboot to Treble Capable TWRP

Install RR Experimental

Install Treble Capable TWRP (again...followed your guide by the book...)

Reboot to Treble Capable TWRP (again...)

Install Gapps (Nano, 8.1, arm64)

Install Magisk (beta 16.4)

Wipe Cache/Dalvik (don't think it's needed but I've done it anyway...)

Reboot phone

Done!

Just wanted to report this so you could look further into it since I believe you've based your zip on mohancm's zip installer.

Thank you for all your work.

Cheers!
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
So you're saying that Mohan's original TWRP and my one both can't format your data? It stays encrypted?

But then you said it all works... What's the problem exactly?

And you say you didn't need to fix the slot change, but your instructions are exactly as I described - I don't see any difference. So I don't know how you worked around it.

Did you skip flashing a stock ROM first?
[Xiaomi Mi A1 Guides, News, & Discussion] Typhus_:
I know you must be really busy lately...

I'm sorry to bother.

Please read my post again when you feel ready to pay real attention for what was written.

Enviado do meu Mi A1 através do Tapatalk
[Xiaomi Mi A1 Guides, News, & Discussion] :
Skipped flashing stock rom (not recommended) since I was on untouched stock.

Everything went well (did not expect that I wouldn't screw up any of the steps) and I got AOSP GSI working fine.

Only thing to note, when installing the image and rebooting right after, TWRP said I had no system image installed but I did. I'm guessing this has to do with the A/B partitions?

Not sure, but anyways, amazing work on this! Helps making the phone a lot more futureproof than it already is!
[Xiaomi Mi A1 Guides, News, & Discussion] N1ck474:
After 2 days of fails and like 6h on my PC i've flashed successfully A GSI ?

When i try to install Magisk or any other thing (like Gapps) my phone just stuck at Mi Logo and reboot again to logo (loop)...

TWRP doesn't really change my slots and show me some errors on "bootctrl" so i need to switch it from fastboot or i just receive another "Mi Logo loop"

But at least i'm pretty excited for this GSI (RR One), it works good with latest Vendor and Boot.img ;)

Good job
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
I did. I still don't understand what your problem is. I also asked for additional information which you didn't answer. So intead of "paying real attention", I think I will choose to just ignore the rudeness. Good luck.

Both sound like the slot bug, yes - as already mentioned in the guide. Once you get around that it shouldn't happen again.

I'm compiling my own TWRP with the hopes of fixing this issue.
[Xiaomi Mi A1 Guides, News, & Discussion] JaadiBooti:
Maybe you could find and flash the redmi note 5 pro's gsi since it also has project treble support in the 8.1 version.
[Xiaomi Mi A1 Guides, News, & Discussion] sauru.660:
There is no MIUI GSI AFAIK....PLS STOP SPREADING MISINFORMATION...??
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
That won't work, it's not a seamless device. And even if it was, it's not a GSI.
[Xiaomi Mi A1 Guides, News, & Discussion] Typhus_:
The problem is that the Treble Capable TWRP zip installer didn't work. I've tested it and I could not format data partition nor install RR Experimental. With it I was only able to repartition my device. Since it didn't work, I've again returned to sotck using MiFlash in EDL mode (again) and decided to install TWRP using the other TWRP Installer Zip, I've mentioned in my post.

With that Zip, TWRP was able to Format Data partition (to remove encryption) and, afterwards, I've installed your Treble Capable TWRP zip.

Only then I could perform all operations needed.

I don't know what is causing this but I suspect it could be somehow related with the "slot change bug" you've already mentioned.

That's why I've said for you to look into it because I think that bug could be solved if you understand what's different on both zips.

I wasn't asking for help. I was just trying to help both you and all others that could face the same problem I've faced and that I've solved.

I think I wasn't rude. I even apologized for bothering you.

Either you didn't read the post with attention or I didn't make myself clear.

Guess it was the second choice.

Do you understand now?
[Xiaomi Mi A1 Guides, News, & Discussion] eddy_nugroz:
Can someone explain whats going on

1. I can't set active b slot, have try couple times on fastboot

2. Flashing vendor and system in twrp manualy in every slot because it can't auto change slot after flash reboot recovery, always in slot a

3. Flash all magisk and gapps on slot a

And i got this
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
It must be something wrong with your device because many people have followed the guide yet you're the first to report this.

The rude part was accusing me of not paying attention because I couldn't figure out what was actually wrong in the novel you wrote. Please try to be more concise next time - "I can't Wipe Data in your Recovery bit it works in original TWRP" would have been 100% satisfactory.

Anyway, nothing I can do about it as I cannot reproduce and neither can anyone else.

You must of done something wrong.

Screenshots are not relevant. If we ever actually get a seamless updater for custom ROM's, then we'll look into it.
[Xiaomi Mi A1 Guides, News, & Discussion] N1ck474:
I had same problems, i can't install RR Experimental at all but i can flash all GSI, i've followed the guide step by step but after the reboot to recovery i had some errors when flashing Gapps (like "download Gapps for Android 7.1.2)

And i can't really fix the slots bugs...
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
I have heard about this bug but I have no idea how to reproduce it. So I'm afraid I can't help beyond "make sure you follow the guide exactly".
[Xiaomi Mi A1 Guides, News, & Discussion] datasource:
Just flashed RR experimental after using your partition manager tool and everything is working as expected. Thank you [MENTION=1844875]CosmicDan[/MENTION] for your hard work.
[Xiaomi Mi A1 Guides, News, & Discussion] Typhus_:
Correction:

I can't Wipe Data, nor change slots, in both

your Recovery

and

on original TWRP

.

I could only do it after installing TWRP using the Zip I've found on THIS post that, if I'm not mistaken,

was created since several users reported issues while trying to permanent install TWRP on their devices.

Your Zip was created having the original one as base right?

Cheers and thank you for everything.
[Xiaomi Mi A1 Guides, News, & Discussion] mardrest:
I've had that bug when i first installed the rr experimental zip after reducing the system partition, i wanted to install gapps and magisk and i get error that i have system 7.1.2. This is something about the opposite system is not formatted, because i solved it by switching the slots with fastboot and formatting the other slot and installing rr. After that i could install gapps and magisk with no errors.
[Xiaomi Mi A1 Guides, News, & Discussion] JaadiBooti:
Damn, thanks for clearing that?
[Xiaomi Mi A1 Guides, News, & Discussion] N1ck474:
Thank you, i'll try this solution :)
[Xiaomi Mi A1 Guides, News, & Discussion] mariosepsy:
If my reble slot is A, for installing 8.1 TWRP stock rom, the process i should follow is just reboot to recovery, wipe , then flash the rom?
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
Oh I see.

If you have time to try the Mohan recovery sometime again, saving a recovery log after the error and sharing it might shed some light on it. Cheers.
[Xiaomi Mi A1 Guides, News, & Discussion] đonghô:
I'm in step 1.3.2, wifi was broken, status is can not found file flash_all_lock.bat when i try to flash persits.img with miflash

Can u help me ?
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
You're in Fastboot mode. Persist can only be flashed in EDL mode.

Make sure you backup your old persist. Repairing your original with Persist Resurrector is the only way to get a fully working persist again.
[Xiaomi Mi A1 Guides, News, & Discussion] Hunk97:
Saying, the work is phenomenal would be an understatement. Kudos to the team!

As feedback i would say in the RR rom i found minor glitches here and there but then i tried the LineageOS GSI, it is just perfect!
[Xiaomi Mi A1 Guides, News, & Discussion] jashancheema:
Ota section will work fine after installing gsi??

Or need to flash again full gsi for updating rom??
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
There is no such thing as OTA for GSI. Yet. GSI is still a very new thing. If you need OTA, don't use GSI.
[Xiaomi Mi A1 Guides, News, & Discussion] Hunk97:
Mobile Signal Instability Issue

I tried all the GSIs, which are currently available, while most of them are quite good and stable, all of them have this very troubling issue of Mobile Signal Instability...

On stock Android One ROM, I have at least 80% signal strength all the time.... never had any issues with it...

But on Treble GSIs, signal strength is highly unstable, sometimes its full or 80% or 30% or sometimes even without any signal, I cant receive or make calls during that period..

But then signal gets restored in 10 seconds or so, and then after sometime, it drops again...

I dont know whats causing the issue, but i feel the issue must be in the vendor image files... the drivers may not be working properly..

I had to restore back to Android One ROM, because of this issue...
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
That's a problem with all custom ROM's, have you not noticed?

I don't know who to report this to. Someone high up though. It's not a problem with Treble/Vendor but our device trees that every custom ROM uses.
[Xiaomi Mi A1 Guides, News, & Discussion] yasars:
I have one question...

When i flash treblized RR rom... After install all my apps.. and after change to dotos must i wipe data or can i move (dirty) with no problem , only install GSI and ready??

I see no advantave to stock/basic flashing method...
[Xiaomi Mi A1 Guides, News, & Discussion] Hunk97:
I see, I did not try out custom roms but when i saw someone was working out project treble on mi a1, I couldnt stop myself :D

As for the issue in mobile network instability, [MENTION=5393309]ghpranav[/MENTION] can you help in fixing the bug in the device tree?

It would be of great help to the community...
[Xiaomi Mi A1 Guides, News, & Discussion] mariosepsy:
Mind if i ask you the process of flashing GSIs? I can't manage to boot many of them :crying: I only succesfully booted LOS
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
No. You are changing ROMs. Can you dirty flash from RR to dotOS? Of course not. Treble does not change that. I don't know why people think it would be different here.

You didn't follow the guide properly.

Or you probably didn't factory reset after changing ROMs...
[Xiaomi Mi A1 Guides, News, & Discussion] Hunk97:
Procedure for Booting GSIs

Well if you followed the original guide correctly, now you must have re-partitioned your device for treble using the modded TWRP with Treble Manager v1 2

Now, for booting a GSI, you must have 3 things in place

1) Boot Image

2) Vender Image

3) GSI

You can have GSI of your choice but you must get, boot image and the vender image from 2nd post in this thread

Then store all three in your sd card and flash all the images in TWRP using the image option, in their respective partitions.

Reflash TWRP again.( just in case, i dont remember if its required or not )

All the images will be flashed in your current slot only so no need to worry about switching the A/B slot as it is still bugged.

Also you should format your data and back it up elsewhere as it might cause bootloop issues.

Well thats it, now you should be able to boot your GSI if you did not make any mistake.

Now if, you want to try another GSI, you can do that by simply flashing only the GSI, but you might need to format data again, im not sure though.
[Xiaomi Mi A1 Guides, News, & Discussion] drozo8o8:
So I reinstalled newest stock (tissot_images_V9.5.11.0.ODHMIFA) under EDL and noticed my wifi is broken. Can I use tissot_images_V.9.5.10.0.ODHMIFA___persist-only.zip to restore my wifi, can you maybe post the new one or can I just go ahead with the installation process and use persist ressurector afterwards ?

/edit It works aswell.
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
Restore your original persist and use Persist Resurrecter. The stock persist.img is only a temporary fix.
[Xiaomi Mi A1 Guides, News, & Discussion] Ahmed Al-Sayed:
This stock persist method doesn't work

I tried it in in edl mode but mi flash keep saying error in the second 87
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
87 seconds? It shouldn't take that long. It takes like 4 seconds. You did something wrong.
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
Guide has been updated for my latest TWRP with Tissot Manager v1.3 in mind which solves the slot bug. Should help a lot of people.
[Xiaomi Mi A1 Guides, News, & Discussion] iH8Rain:
Thank you! Followed the OP and everything worked out for me quite well! I'm on PE's GSI right now :D
[Xiaomi Mi A1 Guides, News, & Discussion] Custom rom 243:
Sorry for noobie question

Pls explain me more clearly what term "factory reset" means in that case particularly ? Wiping internal storage ?? Again sorry for noob like question
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
Factory Reset is the main option in wipe, the slider.

You should probably read the stuff that TWRP says.
[Xiaomi Mi A1 Guides, News, & Discussion] Tuneer:
[MENTION=1844875]CosmicDan[/MENTION]

When going from RR 25th May build to stock oreo, can I use fastboot to flash via Miflash? or do I have necessarily use EDL mode.

Also, which option should I choose in mi flash:

save user data, clean all and lock etc
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
I don't know.

You don't use any option in EDL mode.

Using EDL mode is the only way I support for restoring stock *properly*.
[Xiaomi Mi A1 Guides, News, & Discussion] Custom rom 243:
Oh thanx for replying .
[Xiaomi Mi A1 Guides, News, & Discussion] ashokmor007:
Could you tel me all the step you followed to install treble...

Thanks
[Xiaomi Mi A1 Guides, News, & Discussion] eddy_nugroz:
Read OP

All u need is there
[Xiaomi Mi A1 Guides, News, & Discussion] ashokmor007:
could make it work.. that why asking...
[Xiaomi Mi A1 Guides, News, & Discussion] t0per666:
To return to fully stock device from being a treble enabled device. I will just flash the stock rom via edl/fastboot mode? Thanks!
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
EDL mode, yes. As the guide already says. That's the quickest way.
[Xiaomi Mi A1 Guides, News, & Discussion] t0per666:
Where can i download the modern fastboot binaries? --set-active doesnt work on my current fastboot.

And do i need to extract the fastboot image before flashing in miflash? Thanks!
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
What are you using --set-active for? You don't need that.

EDIT: Forgot to remove it from requirements. Ignore it, it's fine.

Yes you need to unpack the firmware download.
[Xiaomi Mi A1 Guides, News, & Discussion] yaduvanshiii:
How to restore. Because will u tell me. , But worried for device stock partition. When I type fastboot OEM edl my device restart automatically:rolleyes:

---------- Post added at 02:49 PM ---------- Previous post was at 02:39 PM ----------

[MENTION=1844875]CosmicDan[/MENTION] bro. Which file I choose. Flash_all.bat. Or something else
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
EDL needs usb connected. And unlocked bootloader.

You don't use any bat file. Just boot into EDL mode, load the folder in miflash, refresh. It's not that complicated.
[Xiaomi Mi A1 Guides, News, & Discussion] am2000:
[MENTION=1844875]CosmicDan[/MENTION]

can use this method for xiaomi mi 5x?

---------- Post added at 07:57 PM ---------- Previous post was at 07:56 PM ----------

[/COLOR [MENTION=1844875]CosmicDan[/MENTION]

can use this method for xiaomi mi 5x?
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
No. Bootloader does not support Seamless.

Maybe. I don't know. Not without changes.

Not my problem.
[Xiaomi Mi A1 Guides, News, & Discussion] exodius48:
[MENTION=1844875]CosmicDan[/MENTION] I reflahsed my rom to RR AIO again with Magisk 16.0 & vendor installed ( I don't install patched boot.img kernel because as of my experience it will replace tissot manager), i want to flash PE GSI correctly, what should i do? :crying:

Do i need ro format system before install PE GSI? :confused:
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
What patched boot.img?

Can you try without magisk?

Can you please just follow this guide step by step? You have left out too many details and steps.
[Xiaomi Mi A1 Guides, News, & Discussion] exodius48:
Patched boot image from here

Already tried out w/o magisk, but same i get. I'll try again. :good:
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
The patched boot image is only if you don't want the AIO.

AIO = System + Boot + Vendor. You can ignore Vendor + Boot if you use the AIO. Refer to the chart I drew.

I also uploaded a new TWRP with Tissot Manager v1.5 which might have caused you problems.

Please just take the time to start over from scratch, restore to stock via EDL and follow the guide step by step. At least read it all so you understand how all this Treble stuff works.

Then if you have a specific problem or question, ask. I can't do anything with "I did the x stuff but I get bootloop". Check TWRP log for errors and share Log if there are any. Detail every step you took, exactly - take notes as you go.

Good luck.
[Xiaomi Mi A1 Guides, News, & Discussion] exodius48:
I give up. My phone wont boot after flash GSI PE. I also have select correct A/B type.

My order:

1. Flash stock rom using mi flash

2. Repartition using tissot manager

3. Flash RR AIO+Gapps (after this my phone boot normally)

4. Factory reset, flash PE GSI in system

But i always bootloop into PE bootanimation with error "Process system isn't responding". :crying:
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
Anybody else have advice? Does PE work for anyone?

Maybe just try AOSP GSI, make sure that works? Process of elimination.
[Xiaomi Mi A1 Guides, News, & Discussion] N1ck474:
Try to reinstall Vendor&boot with PE GSI.

In this order:

TWRP>Wipe>swipe to perform a normal factory reset

Install GSI

Install Vendor in /Vendor (TWRP option, flash Image, like GSI)

Install boot in /boot (same as Vendor and GSI).

Reboot.

Vendor&Boot available on OP Thread AIO RR Treble.
[Xiaomi Mi A1 Guides, News, & Discussion] Ahmed Kassem:
I have a question for you [MENTION=1844875]CosmicDan[/MENTION]. What is the point of EDL mode to restore to stock when you have a built in repartition to stock in the TWRP Treble manager? I mean it would be much easier/faster to restore using that, I see no mention in the guide for doing so. Isn't it stable or something?

Edit: I have another concern also, are our binerized HALS inside vendor partition all from xiaomi? I mean there are no custom HALS being used, if that's the case, we should have a stock-like camera,signal and etc.. is that the case? and how does that compare to custom roms experience, are they using the same HALS or they have custom HALS and drivers?

Thanks.
[Xiaomi Mi A1 Guides, News, & Discussion] iXsero:
indian Redmi note 5 update to MIUI 9.5 and oreo 8.1 with treble support.

How to take Treble System image from redmi note 5 for our device?

Or its imposible?
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
EDL is just useful for flashing back to a clean stock ROM. Since that is really the only reason to go back to stock, it might save time. It also ensures a clean stock situation - technically the repartition back to stock isn't a "pure" stock partition map, just as close as it can be.

Yes all the hardware blobs are from stock. But there is more to 100% hardware compatibility than just blobs.

Doesn't help. 6x is already the same, and some others AFAIK.

Please keep the random MIUI advice away, unless it's specifically about development and porting. The roadblock is because all MIUI devices are not seamless nor generic, I can't even get past init in my initial work so im shooting in the dark to try and get it going.
[Xiaomi Mi A1 Guides, News, & Discussion] exodius48:
I also have tried it, still no luck, phone only bootloop to PE bootanimation :confused:
[Xiaomi Mi A1 Guides, News, & Discussion] N1ck474:
Mh maybe it's a PE GSI issue...

I don't know, currently i'm running stock...

RR AIO booted at least once for you?

Try to re-try the guide
[Xiaomi Mi A1 Guides, News, & Discussion] Hunk97:
I can confirm PE GSI works without any issues.

I can confirm PE GSI works without any issues.

Format data partition to remove encryption, if any.

Make sure its an A/B arm64 GSI

Make sure you arent flashing gapps package with PE GSI.

and follow the guide
[Xiaomi Mi A1 Guides, News, & Discussion] driss931:
https://www.youtube.com/watch?v=k0-qhQ_PteI
[Xiaomi Mi A1 Guides, News, & Discussion] eddy_nugroz:
So usb tethering work ?

And WA cam switch front and back multiple times no freez?
[Xiaomi Mi A1 Guides, News, & Discussion] exodius48:
Nah... I think so. Not yet tried other GSI

RR AIO booting fine here, only after install PE GSI it only loop to bootanimation.

Tried many times the guide but still no luck for me. :laugh:
[Xiaomi Mi A1 Guides, News, & Discussion] Hunk97:
I didn't test all the features in detail, because I found the standard ROM more feature packed so I switched to that one instead.
[Xiaomi Mi A1 Guides, News, & Discussion] sksadh:
how revert back to stock non treble state ?
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
By reading the guide, it's right there - a giant heading "Restoring to Stock" :rolleyes:

You should probably not try anything to do with Treble if you can't even figure that out.
[Xiaomi Mi A1 Guides, News, & Discussion] t0per666:
Off topic.

[MENTION=1844875]CosmicDan[/MENTION] any plan on MIUI 10 Treble? Thanks!
[Xiaomi Mi A1 Guides, News, & Discussion] CosmicDan:
As soon as xiaomi.eu releases a build for the 5x then I'll shift my research to it. But not before then. Shouldn't be too different to MIUI 9 anyway.