yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] baszu:
The working one without touch and reboot issue, for me, is test3. I assume because you update something from EU rom 6.8.25 kernel but unfortunately causing some compatibility with other device? I will stay with test3 until any further update. Let us know if you want us to try anything to get more robust twrp. Understand it is very difficult to do something, especially when we don't have that device's kernel source code.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
There's no EU or CN kernel. Kernel is exactly the same. The thing is that latest kernel seems to support those new(?) panels, but behaves badly on the others. I'll wait for the stable MIUI 8 release to check again if there was any improvement.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] baszu:
Miui8 Stable has already released, both China (last week) and Global (today).
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
Last time I checked, China release had been pulled. Global seems to be out indeed. Downloading it at the moment.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] baszu:
Can't find original post, but I saw China stable 8.0.5 today. And it is available for download in EU website. However, China and Global kernel is not fully compatible. I got wifi issue when trying China kernel with Global rom.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
As I said, kernel is the same. The kernel modules must match the kernel build or else some module may not load and that happens exactly with WLAN module.

See the differences between the unpacked boot.img from stable releases:

[IMG="MIUI V8.02.0 Global vs MIUI V8.0.3.0 China"]http://img.ctrlv.in/img/16/08/29/57c4561fbe834.png[/IMG]
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] Mulham82:
Guys,

The latest test3 of recovery is working without any issues. The mouse cursor is removed too.

Thanks.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] rookey:
I unlocked my MI5 successfully and then flashed cofface_twrp_recovery_gemini.img to recovery. When booting into recovery, I'm now confronted with a screen containing only Chinese letters and a large padlock symbol. Can't do anything, nothing moves. :eek:

(I also tried it with twrp-3.0.2-1-gemini.img, but that only resulted in a frozen splash screen of TWRP).

Furthermore, trying to root the phone with kingroot was not possible ('couldn't find strategy').

Can anyone push me into the right direction, please?
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
Just read the last few pages please. Is it too difficult?
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] shashank957:
stuck on teamwin logo / TWRP boot screen

downloaded

twrp-3.0.2-1-gemini.img for my MI 5 gemini

now stuck on TWRP logo screen, can anyone help :confused::confused:

---------- Post added at 10:04 PM ---------- Previous post was at 09:59 PM ----------

I am on miui8 6.8.25 dev ROM for MI5 Gemini, i downloaded the

twrp-3.0.2-1-gemini.img , and flashed using command --> fastboot flash recovery twrp-3.0.2-1-gemini.img

the flashing was successfull, I immediately booted into TWRP recovery by pressing volUP + power, now frozen into TWRP logo/boot screen ...
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] azazello22:
Read last few pages..or at least second post of this thread.

sent from my Mi5
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] shashank957:
hey, i have already downloaded the test3 image.... thanks for the headsup anyway, will let you know after I flash it :D
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] azazello22:
If that does not work, look for the other one linked in the second post.

sent from my Mi5
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] shashank957:
the 3.0.1 build was working, can't we get the older versions

earlier i was using the 3.0.1 it was working for me, it would be great if we could get older builds as well, thanks for the hard work man.:o:o

---------- Post added at 10:26 PM ---------- Previous post was at 10:23 PM ----------

Edit :- Test3 worked for me. I will be glad to help to figure out the freeze bug in the latest 3.0.2
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
I don't even know what you are talking about. There never was a 3.0.1. Official TWRP builds for Mi 5 started at 3.0.2-0.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] shashank957:
is there a difference between 3.0.2-0 and 3.0.2-1 , because earlier i had a previous version it worked , i cant quite recall the build filename
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
Yes, 3.0.2-1 fixes USB-OTG but doesn't boot on some devices. That's why I released the other unofficial test build afterwards.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] shashank957:
ok , seems 3.0.2-0 works for me but 3.0.2-1 doesn't
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
Just stick with it then. Or flash test2 or test3, one of those builds will work for sure.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
Just updated the second post:
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] marcel112:
stupid question maybe, but how do i know wich panel i have?

And why should i update, besides the ota, when 3.0.2.0 works for me
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
cat /proc/hwinfo

Changes since 3.0.2-0 (4th July): https://github.com/TeamWin/android_device_xiaomi_gemini/commits/android-6.0
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] DetourToNirvana:
Hi, I am mainly interested in usb-otg. I have tried your test3 build. Also tried twrp 3.0.2-1. Otg hasn't worked on either. Is it because I'm on a custom ROM (cm13)?

Thanks for your efforts. It is much appreciated.

Edit: Can confirm that the problem was with the usb otg cable i was using. Ordered a new one and otg now works fine. Again, thank you kindly.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] baszu:
Sudden reboot issue is coming back again :crying:

Don't understand why they are not happen for 2 weeks (with test3 build) but now....

Is the issue only me? Can someone confirm when flashing multiple zips queue?
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] Ramabi77:
It is funny when i try to flash test2 first, my screen not wake at all, so i need to do fastboot install from chinese pc suite to make my screen works again, and then i try to installing 3.0.2.0, at first, everything goes well, but after reboot, i can't touch anything, but screen wake, and then i'm trying to boot test2, and thank god, everything works flawlessly, i've tried several times to install test2 over 3.0.2.0 and everything works just fine, my conclusion is, twrp test2 is works for me, but for some reason my screen isn't awake if i installed it first, but if i install it after 3.0.2.0, it works. no reboot while flashing zip either, oh my panel is LGD
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
The USB-OTG support was confirmed to be working by several users. I have even been using the feature lately, so it is not broken at all. Double check your drive or OTG cable, because you have most likely a problem there. To clarify, the feature is not dependent on the ROM because device is in recovery mode.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] graw2:
I can confirm USB-OTG works well (I am using first test version of this TWRP)

...but why TWRP version depends on panel type (JDI, LGD)?

Will be common, unified TWRP version released later?
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
Ask Xiaomi. :p

Sure, once the kernel source code is available.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] graw2:
Here you are (gemini kernel source code):

https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/gemini-m-oss
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] azazello22:
I can't believe it.

sent from my Mi5
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
Time has come!
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] mr-mauro:
I had almost lost the faith that they would release the sources for real :P

Finally people won't have to try 4 differents TWRP to find the one that fit them more and that works :D

Thank you bgcngm and Xiaomi!
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] graw2:
When can we count common twrp recovery version for Mi5? Thx!
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] azazello22:
Don't ask for ETA, please :). He said he would take a break now.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] FcukBloat:
dear [MENTION=455439]bgcngm[/MENTION]

sorry for bothering, but I have some confusions with many twrp versions... I just got my mi5 and don't understand if I should get it from twrp.me... can see version "twrp-3.0.2-1-gemini.img" but it is from 19/JUL, and in the changelog I see changes from the 30/AUG... where can I find the latest version? in second post (unofficial)? because in mega files I can't see when they were uploaded.... TIA!

ps. if from the second post, the panel I have is the one I can see in LCM information right?

EDIT: nvm... got the one from second post and seems to be working fine so far... :p
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] graw2:
On twrp.me you can find 2 versions of twrp:

twrp-3.0.2-1-gemini.img : it is buggy as hell but USB-OTG works (can be stuck at twrp logo during reboot to twrp recovery)

twrp-3.0.2-0-gemini.img : it is stable but USB-OTG does not work

I recommend to use this twrp release for MIUI8 (stable and USB-OTG works fine): https://mega.nz/#!ekhznQJT!B0cYJ3mVbTYBo58DcmbWSMK-I3-5O_W_NSWID0JHX6Q

Tested with xiaomi.eu MIUI8 weekly releases
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] FcukBloat:
thanks. link doesn't seem to work here, btw i could flash aicp flawlessly with unofficial twrp from second post :o
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] graw2:
Link corrected now.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
That link was just removed. Stick to one of the two test versions found on second post.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] graw2:
What is the problem with that version? It is the first test version by you and it works with all Mi5 device. Pls inform me if there is any known major issue with that version. Thanks.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
With the two newer test versions, touch works right after TWRP boots. That's it.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] graw2:
Thanks. I am happy to read no any major issue with that.

Just for your information:

Your first test version that I have linked, "tested" by more thousand Mi5 users and no any negative feedback yet independently what panel they are using...
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] azazello22:
Are you sure? http://xdaforums.com/showthread.php?p=68304079

sent from my Mi5
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] graw2:
Yeah, that version integrated in xiaomi.eu MIUI ROMs for Mi5 weekly and stable releases. I follow users feedback there....
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] azazello22:
I know, I'm hybris22 there [emoji6]

The point is, as you can see following that link, that there were problems with that release.

sent from my Mi5
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] graw2:
Greetings hybris22,

anyway we can't integrate panel dependent twrp version in our ROM releases. Mentioned first test version of twrp is good enough to survive until official twrp will be released as gemini kernel source has been already released.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] azazello22:
That's right, and so it ships with .eu ROMs. But the few guys who have problems, it's better to send them here, so they can solve them for sure.

sent from my Mi5
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] graw2:
We have a deal ;)
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
That's the goal. Once kernel is bootable when built from source, I will release a new official TWRP version.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] graw2:
Great, thx, we are looking forward...
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] @rmE:
I flashed it using fastboot, but it shows mi pc suite screen when i try to enter recovery mode
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] 33bca:
what command did you use?
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] FcukBloat:
also, did you boot into miui before booting to twrp? if so, twrp has been overwritten by miui recovery at boot (see the note in twrp.me site)

after fastboot flashing twrp, you must go immediately in twrp recovery at first reboot
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] d3xtr0:
Actually you don't, to boot into twrp without fast boot you need to have a modified boot.img.

You can use fast boot to flash and boot into recovery and install xiaomi.eu weekly or stable, which contain that modified boot.img.

Correct me if I'm wrong.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] @rmE:
I flashed 3.0.2-0 using

adb reboot bootloader

fastboot flash recovery twrp.img

fastboot reboot

Then kept pressing the volume up and power until it vibrates (after vibration leave the buttons)
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] FcukBloat:
no need of any modified boot.img... i just fastboot flash twrp, then reboot the phone keeping vol up pressed and i can enter in twrp...
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] azazello22:
Read what he said.

'fastboot boot recovery'

sent from my Mi5
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] PetaByteBoy:
3.0.2-1 doesn't work on my device, unfortunately. 3.0.2-0 does. ADB works though. Can I get you some logs?
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
Check out the second post. One of the two images should work for you.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] thebrainkafka:
How to know which panel type?

Where to check?

Thx
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] azazello22:
Type 'cat proc/hwinfo' in a terminal.

sent from my Mi5
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] thebrainkafka:
Have no terminal.a any other way?
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] 4719:
Download terminal from play store.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] :
it says "No such file or directory"
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] FcukBloat:
you are still on miui? if so i think with service menu *#*#64663#*#* you can see this info ;)
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] azazello22:
Strange. You can also try some apps like AIDA64, Castro and such, probably.

Spoiler content hidden.

sent from my Mi5
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] it00x32:
i would love to use 3.0.2.1 as OTG should be supported - but stuck at boot screen as others (3.0.2.0 is working - but no OTG) will it be updated soon?
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] francyesco:
http://xdaforums.com/showpost.php?p=68897044&postcount=244

wondering why no changelog about 3.0.2-1 on first post neither this info about the 2nd post
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] prince10t:
Hi All,

How Do i keep TWRP and flash MIUI 8 official global stable?

right now, Im stuck at MI logo with no progress dots that we usually see after rebooting to system.

what I did is:

1. from TWRP recovery -> wipe dalvik, cache, system, data

2. install/flash MIUI 8 global rom zip from internal storage

3. reboot to recovery (TWRP)

4. from TWRP, reboot to System (to prevent TWRP recovery from being overwritten by stock recovery as others say)

basically, I want to retain my TWRP and use MIUI 8 Official Global rom. I'm coming from EU rom 8.0.10.0.

what did I miss? hoping someone can help me with this. I had my own reasons going miui global for now.

Thanks in Advance, and will surely hit thanks with any help I can get.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] FcukBloat:
how long did you wait when mi logo was showed?

because in the past i tried miui 8 global and had the same problem, but once i left it at mi logo and when i came back MIUI was booted, so maybe you just have to wait much longer at first boot? not sure because then i immediately reverted to custom rom so couldn't confirm it.. let me know
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] prince10t:
Thanks and Good for you. But I already tried waiting for past an hour now. also tried to reboot it several times to recovery and/or system with no luck and just MI logo without doing nothing.

its kinda confusing because others said, this is what they did and it worked for them. I also used the recovery rom and not the fastboot rom which I think is only for MIFLASH tool.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] FcukBloat:
yes you need recovery rom. only other thing you could try is the miui rom from xiaomi.eu, I'm sure that one boots up fine and is very similar to official global. but if you want official global dunno know what to suggest you.. really strange it happens here also.. often it doesn't boot (even if bl is still unlocked) while the xiaomi.eu one always boot properly... if you understand one please let us know!
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] prince10t:
Ive been using Xiaomi.EU rom eversince I unlock my bootloader, and that 's one of the reason I wanna try Official MIUI global -for the first time.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] FcukBloat:
you could ask in xiaomi.eu forum if they know why official ROM doesn't boot.. probably they know..!!
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] FcukBloat:
[MENTION=5807260]prince10t[/MENTION]

just tried again with 6.9.22 official miui global. starting from aicp, I wiped everything and installed the global rom, than rebooted. it did stay long at the mi logo, but then it booted up fine. this way it overwrited twrp as supposed.

so I did fastboot flash twrp, and tried again (this time I wiped all, flashed miui global, then rebooted immediately to twrp, then rebooted to system). again it stayed a lot at mi logo, but then it booted miui properly. so this way I had miui + twrp both working ;)

so i think that my problem was just that it takes more than I supposed to boot, and in the past when I forced shutdown/reboot while at mi logo actually I could have just waited some more time...?!

now I am already back to aicp :o

bye!
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] Norapapa:
Have the TWRP for MI5 a backup Option to do a EFS Backup?
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
No, but I will check if that can be implemented for this device.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] prince10t:
How long did u wait at MI logo screen? Cause I waited for an hour until I tried force rebooting it again. Atm, im back to EU. Do you think it had something to do with stable vs dev rom?

---------- Post added at 01:49 PM ---------- Previous post was at 01:46 PM ----------

Hello devs/any1,

If I do a Nandroid backup, then modify bands of Mi5, will the nandroid backup good enough to restore my stock bands if something goes wrong? TIA
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] FcukBloat:
dunno exactly but I am speaking of some minutes, for sure not an hour or so ;) so in your case it surely got stuck for some reasons..

I tried with developer rom, never tried a stable version...
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] marcel112:
i will stick with 3.0.2.0 till all is good, no problem

---------- Post added at 11:00 PM ---------- Previous post was at 10:59 PM ----------

Sorry, i dont knw what you mean.

when i am in recovery were do i place the line you mentioned?

Terminal or...:(:(
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
In the shell, connected through adb:

adb shell
cat /proc/cmdline
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] marcel112:
mdss_dsi_jdi_fhd_r63452_cmd

This is the line you're looking for?
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
You were way too late. :p But yeah, based on that you have a JDI panel.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
Can anyone that owns a Mi 5 with a LGD panel (maybe [MENTION=7653268]ivanrsz[/MENTION]) try this one out to see if I finally managed to create a build compatible with all hardware variants? Please note, you must be on 7.x MIUI FW, which means either still running MIUI 7.x ROM (very unlikely) or a custom one like CM with a source-built kernel. :)
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] piranime:
Do this one can work on the mi5s?

Thanks for reading
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] graw2:
LGD panel assembled Mi5 is very rare as a white crow
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] brunek:
I am buying this phone with unlocked bootloader. For me to install a custom ROM first I must install TWRP. Can I install it throught this method? When I instal TWRP then I normaly install any ROM?
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] graw2:
Install TWRP via fastboot mode with ADB commands and then install desired ROM via TWRP
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] brunek:
Is there any step by step tutorial?
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
Step by step tutorial is available on TWRP website. Just follow the download link and you'll find every information you need there.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] piranime:
Mi5s

Do this version support mi5s?

Thanks for reading
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
Do you see any mention to Mi 5S here? That mean no, Mi 5 only.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] poyz:
Which panel do I have?
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] bgcngm:
Ahhhh, I was wondering if the dtsi files related to Sharp panels that Xiaomi included in the kernel source were even used. It seems so, as your Mi 5 was assembled with a Sharp panel. Could you please give the test recovery I posted a few posts back a try?
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] poyz:
Using this guide - http://en.miui.com/thread-297691-1-1.html - I just tried this one - https://www.androidfilehost.com/?fid=24572330218881549 - and it works.

Takes a while for the TWRP screen to show. No issues with the touch screen but I haven't tried USB-OTG (I don't have a cable)

I did a "fastboot flash recovery twrp.img" command followed by "fastboot boot twrp.img" command.

If I didn't run the second command I lost TWRP (looks like stock recovery was over writing it).

After exiting TWRP the first time it asked if I wanted to overwrite stock recovery.

I also tried version 3.0.2.1 from here - https://dl.twrp.me/gemini/ - but it didn't work.

The phone became stuck in a boot loop. The MI screen shows and it gets stuck there. The "Android" and loading dots never appear. Luckily I was still able to get to fastboot mode :)

Now that I have working TWRP, I'm not really keen on trying the version you posted above just in case I get into another boot loop I can't get out of. Sorry.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] azazello22:
Maybe you should try to post that in CM thread.

sent from my Mi5
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] ivanrsz:
Hi,

sorry the delay.

I'm on the MIUI 8.x, so I can't give u the feedback.
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] andy356:
Googling revealed that LGD is LG Display, and JDI is Japan Display Inc. But I couldn't find any info on why the kernel has different code for each. Is it because the panels use different technology to display?
[Xiaomi Mi 5 ROMs, Kernels, Recoveries, & Other Dev] graw2:
Edited:

Sorry, I just noticed he want to tested on MIUI7, I have no idea why MIUI8 would be matter. I am also using TWRP on latest MIUI8...