[Xiaomi Mi 5 Questions & Answers] JRC1995:
Follow the 2nd link : "http://en.miui.com/thread-309122-1-1.html"

They have done a good job arranging the possible options along with links to other threads and tutorials necessary for this process.

Sorry, I am not too experienced myself regarding removal of a fake rom. I can help you with specific things like how to unlock bootloader or stuffs but totally getting rid of fake rom can be a complex process and many options and method may be needed to be tried.

First just try to do the simplest possible thing:

0) Backup all data if you need to. Pics, contacts stuffs....

1) Go to miui forum and download the latest China Dev Recovery rom. (It should have english language as an option but no

gapps). ("http://en.miui.com/download-299.html#435") (you may also try the Global beta\stable roms)

2) Rename the downloaded rom to "update.zip" and put it in your phone.

3) Open updater app. Go to menu (three dots or something...) ->choose update package -> then choose the update.zip.

4) The app should try to verify the package and update to it.

5) If update is successfully done check about and see if the version number looks real.

If you happen to have successful then you have removed the fake rom. At this stage you may already have RAW support and more. But if you used the China Dev Rom, you may want to use the Global rom or custom roms for which you have to unlock bootloader. If you have somehow successfully updated to the official global beta\stable rom and don't want to root or try custom rom then no need to do anything.

Note you may first try the above steps using the latest global dev\stable rom and then if it fails, next try to us china dev\stable rom. I think there is a higher chance for china dev\stable rom to work successfully because fake roms are usually based on the china rom.

To unlock bootloader.

1) Make sure you have an MI account at miui forum...and also you must sign in with the same account in your phone. Your account and device should be connected. ALso make sure your MI\MIUI account has proper details like Name, Phone Number etc.

(Also it's better if you keep your name free of spaces).

2) Unlock developer mode. Search google on how to unlock developer settings in miui if you need to.

3) Go to developer settings (probably it will appear inside additional settings)> enable usb debugging and other usb related settings)

4) Enable "allow OEM bootloader unlock" (may not be exactly written like that, currently not in miui so I can't mention the option in exact terms) if the option is there.

5) I think in developer settings there was an option to check lock status of phone....and inside the option there is a button to associate the phone with mi account..do it. (may not be necessary, but just to be safe).

6) Then apply for unlock permission here: http://en.miui.com/unlock/

Note: Your name should be without spaces while filling up.

If you encounter warnings in chinese , use google translate or something. I was warned in chinese about my image verfiication

captcha error.

There you have to explain why you need to unlock bootloader. Clearly explain your need regarding why (it may be because you are still stuck in fake rom and you want to remove it or if you are already in official china rom you can explain that you want to shift to global rom).

7) Wait for the msg. They (Xiaomi) should message to your phone (the no. which is registered to your mi account) regarding if they have accepted your request and granted you unlock permission. After that they will provide the link to download the unlock tool and a code.

8) Connect your phone to computer after entering fastboot mode (power off your phone then hold volumn down+power button until you see the fastboot screen). Then just use the mi unlock tool that you will recieve and follow the instructions to unlock the phone. (for more details you may google on how to use mi unlock tool to unlock bootloader or something).

Once you have unlocked bootloader:

You can have several options. You may shift to global dev rom (download the fastboot rom for your device and use the mi flashing tool. "http://en.miui.com/a-234.html". Google for more details)

NOTE: Be careful following this steps. I won't be responsible if your device is bricked. I may have overlooked certain things so consider my instructions merely as a summary. Do check the links for details. Also even if the miui thread about unlocking bootloader suggest one to use china dev rom for unlocking, I have unlocked my bootloader from global beta rom and global stable rom may work too.

You may install twrp and then flash Xiaomi.eu (China versions of MIUI made bloatfree with more languages and necessary gapps like google play store and services) or you can try custom roms like Resurrection Remix, Lineage OS etc. All of them should have camera 2 api support, at least.

---------- Post added at 06:08 PM ---------- Previous post was at 06:05 PM ----------

Apparently yes, you might be able to attempt EDL. However, I have no experience in that regards. You have to google it.