yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi 8 Pro Guides, News, & Discussion] nealed:
Choose WIPE from main screen.

Choose Advanced Wipe from the Wipe screen

Select (tickbox) "System" partition.

Tap on "Repair or Change File System

On "Wipe - Partition Options for: System" screen you will see a button "Resize File System". Tap on that.

If you do not see those options (I believe all compatible TWRP recoveries have this?) then you should use the version "recovery-TWRP-3.3.0-0504-XIAOMI8UD-CN-wzsx150". I have just rebooted into recovery to check this, and can confirm for this particular version. If you cannot find it, PM me and I will upload to OneDrive or similar.

Having re-read yo-less instructions, I am not sure why he put all of the steps that he did.

His steps:

Go back to the main menu in TWRP

Wipe > Advanced Wipe

Select Data

Tap on Repair or Change File System

Tap on Resize File System

Swipe to Resize

Tap on Back

Use the Navbar to go back to Advance Wipe menu

Select System

Tap on Repair or Change File System

Tap on Resize File System

Swipe to Resize

Go back to the main menu

Tap on Mount

Tap on Data

Go back to the main menu, the installation should now be no problem

My steps:

Go back to the main menu in TWRP

Wipe > Advanced Wipe

Select Data

Tap on Repair or Change File System

Tap on Resize File System

Swipe to Resize

Tap on Back

Use the Navbar to go back to Advance Wipe menu

Select System

Tap on Repair or Change File System

Tap on Resize File System

Swipe to Resize

Go back to the main menu

Tap on Mount

Tap on Data

Go back to the main menu, the installation should now be no problem

Tap on reboot - Recovery.

When back in recovery flash gapps and reboot.

The data partition does not need to be resized to allow gapps flashing. However, you should restart TWRP after resizing the system partition (reboot recovery) for the available space to be shown correctly for flashing purposes. Also, the TWRP that is mentioned in the OP is more recent (3.3.1 rather than 3.3.0) and should have the resize options.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
Hey Neale, it's possible that by installing ROMs the way you laid out for HavocOs it may not be necessary - I haven't tried that yet - but I couldn't resize the system partition in the first place if I hadn't shrunk the data partition first, so as far as I can tell it is necessary if you follow the steps of my guide.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] nealed:
NEver had the problem of not having enough space for the system partition, and have done this operation 10s of times. The size of the stock system partition is by default bigger. When you flash the GSI system partition, it effectively resizes (downsizes) the space used. But there is space available and resizing the system partition works. You simply have to reboot recovery for the resized space to be made available. It is not necessary to resize the data partition - not on HavocOS nor on any other GSI I have tried (about 8 different ones that did not have gapps installed that needed the system resized to install gapps

axelgrox - after you managed to resize the system partition following our OM exchanges - can you confirm if you did or did not resize the data partition - and what were your results?
[Xiaomi Mi 8 Pro Guides, News, & Discussion] mateHD:
Thanks man!

Have you tried any android q gsi?
[Xiaomi Mi 8 Pro Guides, News, & Discussion] axelgrox:
Hi man, whats other rom gsi your recomend? with the HavocOS the battery life is great , but you recomend other?
[Xiaomi Mi 8 Pro Guides, News, & Discussion] nealed:
Really, the only one I go back to is HavocOS. However, it's a matter of personal taste. What is important to you in a ROM? Maybe I could advise better based on my experience if you could give me your priorities.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] axelgrox:
Hi I need the best battery life with the stock firmware is bad the battery life 2hs of screen or 3hs... With havecos had 5,6 hs of sceeen.

Thanks
[Xiaomi Mi 8 Pro Guides, News, & Discussion] shkedov:
Man this is amazing! Thank so much for the hard work!
[Xiaomi Mi 8 Pro Guides, News, & Discussion] PCrazee:
Great guide, I really appreciate it. But I ran into some problems. I followed your guide step by step and used all the files you have linked in OP.

I'm certain my device is a equuleus and not a dipper, as TWRP images for dipper didn't work at all. At first I also thought, that my device is a dipper before learning about equuleus.

I was able to flash the TWRP image and boot it, but when I install a custom ROM it keeps cycling the splash screen and won't boot any ROM I install (I tried several different ROMS but started with AOSiP). Furthermore, when I want to boot back to TWRP, it boots the stock recovery instead. I can revert back to the stock ROM with the Xiaomi Flash Tool, so the device is not bricked. I even tried just installing TWRP and then not make any changes to the system. After a reboot, the device boots the stock recovery again. I tried two other TWRP images for equuleus I found, but they have the same problem. My guess is, that whatever prevents me from really installing TWRP also prevents the custom ROM installation. Any idea what my problem is and how to fix it? I tried searching for an answer in this forum but didn't find it.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
Thanks for your nice reply, you're more than welcome :)
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
Thanks for your feedback. Just to be 100% sure: You have followed steps 1 to 3 exactly as I laid them out?

After you have installed TWRP (Step 2) and you reboot into recovery - what happens?
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
What I'm interested in is, if you can "reboot to recovery" from within TWRP straight after installing TWRP and if you end up in TWRP or stock recovery.

If not, it seems like you have a problem with installing the custom recovery, which is maybe what causes the problems that follow.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] PCrazee:
Installed TWRP again. Booted it and rebooted into recovery: TWRP runs again. But I once I boot into MIUI, it's back to stock recovery after a boot to recovery. It seems MIUI is overwriting recovery once it boots.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
What happens if you reboot into TWRP first - just to be on the safe side - so: Install TWRP, reboot into TWRP - then: follow points 2 to 5 as described in step 3?

I' d be surprised to have you end up with stock recovery after that as MIUI gets wiped in step 3.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] PCrazee:
You mean points 1 to 5 in step 3, right? Can't do point 4 (install custom rom) without pushing the rom to the device.

---------- Post added at 11:46 PM ---------- Previous post was at 11:41 PM ----------

I did point 2 and 3 from step 3. Wipe > Factory Reset and Advanced Wipe > System.

No ROM installed.

Stuck in the TWRP splash again.

adb logcat looks the same as I posted before.

I will try a dirty flash now.

EDIT: I did reboot into recovery from TWRP. It didn't help with the problem. So it seems as long as I don't boot MIUI, TWRP is fine. Booting MIUI resets to stock recovery. But wiping seems to break TWRP.

---------- Post added 24th March 2020 at 12:09 AM ---------- Previous post was 23rd March 2020 at 11:46 PM ----------

OK, tried a dirty flash. (No system wipe, but factory reset and cache wipe, then install the ROM). Same behavior. Stuck at the MI Splash screen looping. And when I boot into TWRP, I'm stuck at the splash screen there with the same errors in logcat as posted previous.

Lucky this isn't my first Xiaomi device and I didn't have to wait for the unlock. If I don't get a custom ROM running in the next days, I will just lock it again with stock ROM and return it.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
True that :D. If I understand you correctly, you managed to get TWRP up and running, it even survives a reboot to recovery from TWRP.

Not sure if adb commands are the culprit here, but I always transferred the system images using Windows Explorer, so I never resorted to shell commands.

Also, you:

- did choose the "System Image" partition for the system image you were trying to install

- made sure you had a proper GSI 64 arm a-only ROM downloaded

What GSI ROMs did you try?

And what does your device look like? It seems like Xiaomi have a crazy way of selling different phones using pretty much the same names. My phone is a Mi 8 Pro which is also sold as as the Mi 8 Pro "Explorer Edition" with a transparent back and red power button.

Apart from that - this is my first Xiaomi phone and I think it will be the last one as well, I have never had such trouble getting a custon ROM to run as I did here.

Also, my display seems to be on the fritz already, I'm getting weird flashes and black screens, using it with Vysor at the moment and will send it back for repairs as soon as I can.

Other than that, great device at a pretty competitive price.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] PCrazee:
I've always used adb for those things. I had several phones customized before. adb shouldn't be the problem.

So far I only used ROMs you linked in your OP. My first goal was to get it running, so I didn't do any experiments using other ROMs.

It says Mi 8 Pro on the box. It also has a transparent back and a red power button. Not sure about the "Explorer Edition".

Xiaomi always has great prices for good hardware. I was annoyed from the unlock process with my last phone, but other than that I ran fine for many years... until I dropped it. I will try some other things the next couple of days. But I fear I will just return it and get a different phone. Kind of sad, I like the looks of the device.

EDIT: I just checked again. On the back it says "Model: M1807E8A"
[Xiaomi Mi 8 Pro Guides, News, & Discussion] eremeya:
Have you tried setting se-linux to permissive before booting your newly installed rom?

I have had many problems trying to get a gsi booting on my phone. Finally I pretty much gave up and flashed Lineage OS and have stayed with it since Sept.

On another note, has anyone managed to change the device name in a regular Mi 8 rom and flash it on our device?
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
That's exactly the device I have as well. Maybe don't give up right away, it took me about two weeks to get it running. However, I triple-checked the way I got my ROMs to run and I can completely reproduce the way I've laid out here, so maybe there is some additional step that might be necessary and that I took in the two weeks before everything started falling into place (I'm at a complete loss as to what that step might be as I end up with a stock MIUI device when I start out with step 1).

Has anyone else successfully followed my guide here and could give us some clue as to what else might be missing?
[Xiaomi Mi 8 Pro Guides, News, & Discussion] PCrazee:
Small progress: TWRP stays intact and boots up when I start recovery.

This time I also did:

fastboot erase recovery

And in TWRP Format Data plus Advanced Wipe > Data, Dalvik, Cache, System

The ROM (AOSiP from OP) still isn't booting, but it's a step forward.

I will try different ROMs now.

No. Where do I find this option? I checked all the settings in TWRP but didn't find this option.

---------- Post added at 05:41 PM ---------- Previous post was at 05:30 PM ----------

VICTORY! AOSiP just booted! :D

I downloaded the ROM again and compared checksums of the two files: they were different. I guess the download must have been faulty or such.

Now it's time to test some different ROMs to find the one I like.

Thanks so much for all the help and support!
[Xiaomi Mi 8 Pro Guides, News, & Discussion] eremeya:
It would be a separate zip to flash
[Xiaomi Mi 8 Pro Guides, News, & Discussion] PCrazee:
After testing several ROMs I ended up with /e/ since I didn't plan to use anything google anyways.

XDA, ROM, website
[Xiaomi Mi 8 Pro Guides, News, & Discussion] eremeya:
What Roms did you try?
[Xiaomi Mi 8 Pro Guides, News, & Discussion] PCrazee:
I tried AOSiP, FlokoROM and Zirconium AOSP. All linked in OP. They all worked fine as far as I could tell.

Then I saw that there are GSI images for Android 10 from phhusson, so I tried installing that, but it didn't work. I flashed MIUI 11 (Android 10) on my device, hoping that it would help getting a new ROM to to run. But when I installed TWRP it wouldn't start, so went back to the Android 9 ROMs, tried /e/ and liked what I saw.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] Laurisss:
Hey man, can we maybe get on discord or something? I would like to ask some questions about gsi roms, if I wouldn't bother you.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
I'm really glad it worked out, thanks for the feedback. So you're saying the method I've described here is working for you?

Also, you're now running /e/ GSI? Can you let me know the exact file / download link, so I can put that into the list of working ROMs?
[Xiaomi Mi 8 Pro Guides, News, & Discussion] Laurisss:
Did you try any android 10 gsi's because recently I got an update miui with android 10. You need to be on the miui version of which the gsi is right? Like if I'm on android 9 miui I flash only android 9 gsi's and the same for android 10? Also, can you downgrade from 10 to 9 miui without bricking?
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
I did not, if there were any available at the time I ran my tests, I didn't come across them.

This is why you need to do step 1 first, there is some kind of firmware that comes with the MIUI ROMs that is needed to install the custom GSI ROMs on top of. So, yes, you need to have an Android 9 MIUI installed first before you can install an Android 9 GSI ROM.

Downgrading is no problem, as everything gets completely wiped by MiFlash (step 1). And that is everything, so you better backup any data you have on the phone before you start.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] Laurisss:
Thanks for the help. I guess I will have to try Android 10 gsi's for myself, I just wonder if I need different twrp for 10.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
Try it out and let us know how it worked out.

EDIT: A different TWRP is needed for Android 10 / Q. I have added a link to a version that is reported to be working in the OP
[Xiaomi Mi 8 Pro Guides, News, & Discussion] Laurisss:
and if I dont boot, how do I flash miui again? fastboot?
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
A bricked device should become completely unbricked by following step 1, afterwards you have a stock MIUI device. However, whatever you do, do it at your own risk :p.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] Laurisss:
So I tried aosp gsi android 10 rom, it flashes in like 4 seconds(way too quick?) and after reboot it just boots into fastboot.. it doesnt even try to boot.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
If it flashes in 4 seconds, you can sure that something was wrong.

I can tell you from experience that it takes a lot of time and energy to figure out a way to install a custom ROM on the Mi 8 Pro. It took me two weeks of my spare time to find a way that reliably works. If you do find a way to get it working for Android 10 ROMs (and that should be possible), please let us know.

I have just tried to find a newer TWRP version that can be used with MIUI 11 (Android 10) and have found one, I've linked it in the OP. Try it out and let us know how it goes.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] PCrazee:
As I said, I did a couple of extra steps. I'm not sure which of those did the trick. Either it's the "fastboot erase recovery" or the data wipe in twrp.

ROM taken from this post: https://xdaforums.com/project-treble/trebleenabled-device-development/e-rom-t3960376

Link to ROM: https://ovh.phie.ovh/e/e-pie-20190827-UNOFFICIAL-treble_arm64_aeN.img.zip

I did also try to install Android 10 ROMs. I flashed the Android 10 MIUI and then installed TWRP, but I wasn't able to boot into recovery afterwards. And flashing Android 10 ROMs from a Android 9 base + TWRP didn't boot the system. My guess is that it needs a newer TWRP. But I only found even older TWRP builds for equuleus, no newer one.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
Thanks, man, appreciated, I will add this to the list of working Android 9 ROMs

It seems you need to start out differently to get Android 10 ROMs to work. First, you need to flash MIUI 11, then you need a different TWRP - I have linked a new version of TWRP that is said to be working with our devices in the OP.

I can't test the whole setup procedure with my phone at the moment, but will give it a try when it comes back with a new display. Maybe you want to have a go at Android 10 again if you're interested in some more experimenting ;).
[Xiaomi Mi 8 Pro Guides, News, & Discussion] PCrazee:
I did flash the newest Android 10 MIUI (MIUI 11.0.3.0.QECMIXM). I will give the new TWRP a shot and test it now. I wasn't too happy with /e/ after all and was going to wipe it and try different ROMs anyways. If I could a new Android 10 working it would be great.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
Excellent, keep us posted.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] PCrazee:
Installed miui_MI8UDGlobal_V11.0.3.0.QECMIXM_f26257a956_10.0.zip (with equuleus_global_images_V11.0.3.0.QECMIXM_20200212.0000.00_10.0_global_ac057ea706.tgz)

Booted into fastboot

# fastboot erase recovery
# fastboot flash recovery TWRP-3.3.1-1031-DX-equuleus-piekas.img
# fastboot boot TWRP-3.3.1-1031-DX-equuleus-piekas.img

Phone boots MIUI instead of TWRP.

Power Down. Vol Up + Power: MI-recovery 3.0 boots instead of TWRP.

---------- Post added at 06:24 PM ---------- Previous post was at 05:55 PM ----------

Installed the previous "working" MIUI 10. Flashed the new TWRP. It didn't boot into recovery with the fastboot commands.

VolUp + Power: Mi-Recovery 3.0

I just can't get the new TWRP to start. Even with the old MIUI version that worked with the older TWRP version.

---------- Post added at 06:32 PM ---------- Previous post was at 06:24 PM ----------

Flashed the "old" TWRP from OP. There I wiped all the stuff, booted back to fastboot and then flashed the new TWRP. Recovery wouldn't boot. Had to boot back to fastboot and flash the old TWRP again.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
Can you give this TWRP a shot?
[Xiaomi Mi 8 Pro Guides, News, & Discussion] PCrazee:
Won't boot. Neither with the MIUI10 or MIUI11 base ROM.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] Laurisss:
Damn :/ I was using TWRP-3.3.1-1031-DX from mi room.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
I've come across one more TWRP that I can confirm is working with MIUI 11, my phone just gave me a rare window in which I could see the screen, it's pretty much hit or miss now... .

Here it is :)

EDIT: Link removed, there's a better version - see the next post
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
This one is even better as it can actually decrypt your internal storage once you've set a PIN: TWRP 3.2.3-0214 for Android 10. I have updated the link for step 2. It's Chinese, but you can change the language right after installing it.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] PCrazee:
Flashed MIUI11. Flashed this TWRP. It "loads", but I won't go past the splash screen. "adb logcat" is looping this again:

03-27 03:11:00.273 574 574 W /sbin/recovery: Waited one second for android.hardware.keymaster@3.0::IKeymasterDevice/default. Waiting another...
03-27 03:11:01.108 676 676 E cutils-trace: Error opening trace file: No such file or directory (2)
03-27 03:11:01.109 569 569 W /sbin/hwservicemanager: Cannot open /system/manifest.xml
03-27 03:11:01.109 676 676 D vndksupport: Loading /usr/lib64/hw/android.hardware.keymaster@3.0-impl-qti.so from current namespace instead of sphal namespace.
03-27 03:11:01.112 676 676 D QSEECOMAPI: QSEECom_get_handle sb_length = 0xa000
03-27 03:11:01.112 676 676 D QSEECOMAPI: App is already loaded QSEE and app id = 1
03-27 03:11:01.116 676 676 E KeymasterUtils: TA API Major Verion: 3
03-27 03:11:01.116 676 676 E KeymasterUtils: TA API Minor Verion: 0
03-27 03:11:01.116 676 676 E KeymasterUtils: TA Major Verion: 3
03-27 03:11:01.116 676 676 E KeymasterUtils: TA Minor Verion: 132
03-27 03:11:01.122 676 676 E KeyMasterHalDevice: configure
03-27 03:11:01.122 676 676 E KeyMasterHalDevice: ret: 0
03-27 03:11:01.122 676 676 E KeyMasterHalDevice: resp->status: -38
03-27 03:11:01.122 676 676 F android.hardware.keymaster@3.0-impl: Configure failed
03-27 03:11:01.122 676 676 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 676 (android.hardwar), pid 676 (android.hardwar)
03-27 03:11:01.124 676 676 F libc : crash_dump helper failed to exec
03-27 03:11:01.124 676 676 F libc : failed to wait for crash_dump helper: No child processes
03-27 03:11:01.273 574 574 W /sbin/recovery: Waited one second for android.hardware.keymaster@3.0::IKeymasterDevice/default. Waiting another...
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
It was working for me after having flashed equuleus_global_images_V11.0.5.0.PECMIXM_20191021.0000.00_9.0_global, however I have now added a link to a better version that can also decrypt your phone storage after you've set a PIN.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] PCrazee:
Ahh, that might have been the problem. I always did set a PIN. Will try the new TWRP now.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
Even if you set a PIN, TWRP should still have started up normally, it would only complain that it couldn't decrypt your storage and then you'd see weird combinations of letters and numbers instead of file names in the TWRP file manager. I'm hoping the new TWRP will nevertheless fix all your issues.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] PCrazee:
This TWRP booted! I installed Lineage 17.1 and AOSP 10.0 which I both got from here: https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list

lineage-17.1-20200309-UNOFFICIAL-treble_arm64_avN.img

AOSP-10.0-system-quack-arm64-aonly-vanilla.img (EDIT: the file to download is only called "system-quack-arm64-aonly-vanilla.img". I added the AOSP-10-0 to the filename so I know what it is)

Sadly they are not booting. I will try some other ROMs I got already downloaded.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
Well, that sounds promising at least, you've managed to overcome the first obstacle.

I came across far more ROMs that wouldn't boot than ROMs that would. It would be excellent if you could keep a log of all the ROMs you've tried that didn't work (file names and links), so I could add them to the ROMs-post later.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] PCrazee:
I'm going back one step. Flashing MIUI11 again, then the new TWRP. I might have wiped too much this time.. at least TWRP keeps telling me there is no OS installed, no matter which ROM I install. Also tried Havoc after Lineage and AOSP.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] yo-less:
You should always start with a clean wipe, i.e. installing MIUI via MiFlash (fastboot-links) , that's what I did - it takes time but it ensures you're getting reliable outcomes.
[Xiaomi Mi 8 Pro Guides, News, & Discussion] PCrazee:
A list of ROMs I've tried. None of them worked:

AOSP-10.0-system-quack-arm64-aonly-vanilla.img

lineage-17.1-20200309-UNOFFICIAL-treble_arm64_avN.img

HavocOS-3.2-ARM64-Aonly-vanilla.img

Descendant-X-arm64-aonly.img

POSP-Aonly-10-20190910-ErfanGSI.img

caos-v214-arm64a-200315-vanilla.img

PixelExperience_ARM64A-10.0-20200118-2023-GSI.img

ExtendedUI_1.0.2_ARM64A-10.0-20200207-1114-GSI.img

All ROMs are either from https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list or from https://xdaforums.com/project-trebl...iscussion/gsi-expressluke-built-gsis-t4003457

I have some more ROMs in my download queue, but sorceforge is going slow on on me right now.

I did the same procedure as I did with the Android 9 builds. But I'm not so sure if it's the right approach. Every time TWRP tells me there is no OS installed. So my problem might be somewhere else.