[Xiaomi Redmi Note 5 Pro Guides, News, & Discussion] NaeemBolchhi:
As you all know, flashing MIUI ROMs have become a bit tricky for Whyred users, due to the Anti-roll back issue. But fear not, [MENTION=4648515]AL_IRAQI[/MENTION] has found the solution, and I'll explain here how that goes, and I'll also link to the first Stable MIUI 10 in English by Xiaomi.eu. That ROM will not require this process, as pointed out by [MENTION=2549763]dingdong3000[/MENTION] here.

► Why do you want this?

• Well, right now, the only Stable MIUI 10 for Whyred is Chinese. But Xiaomi.eu is based on the Chinese release, so their Stable ROM is basically the better Global version. Also, all of their ROMs pass the SafetyNet test without any issue, even if you directly modify parts of the system.​

► How can you download?

• Download from official SourceForge link. DOWNLOAD​

► How can you make the modification yourself?

• That's actually the prime purpose of this thread. There are basically 2 things to do when you want to make a MIUI ROM fw-less. Follow this procedure:​

Download your desired ROM.

Open it with WinRAR (No need to extract).

Delete the folder title "firmware-update" from the list.

Go inside META-INF\com\google\android.

Double click on "updater-script".

Select "Notepad++" from the list. (IMPORTANT. Normal Notepad doesn't have a line count. Download it from here.)

We need to remove all the radio update tasks. To do that, remove the red colored lines from the code.

getprop("ro.product.device") == "whyred" || abort("E3004: This package is for \"whyred\" devices; this is a \"" + getprop("ro.product.device") + "\".");
ui_print("Target: xiaomi/whyred/whyred:8.1.0/OPM1.171019.011/V9.5.19.0.OEIMIFA:user/release-keys");
show_progress(0.100000, 5);
show_progress(0.200000, 10);
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
[COLOR="Red"]
# ---- radio update tasks ----

ui_print("Patching firmware images...");
ifelse(msm.boot_update("main"), (
package_extract_file("firmware-update/mdtpsecapp.mbn", "/dev/block/bootdevice/by-name/mdtpsecapp");
package_extract_file("firmware-update/cmnlib64.mbn", "/dev/block/bootdevice/by-name/cmnlib64");
package_extract_file("firmware-update/splash.img", "/dev/block/bootdevice/by-name/splash");
package_extract_file("firmware-update/cmnlib.mbn", "/dev/block/bootdevice/by-name/cmnlib");
package_extract_file("firmware-update/hyp.mbn", "/dev/block/bootdevice/by-name/hyp");
package_extract_file("firmware-update/pmic.elf", "/dev/block/bootdevice/by-name/pmic");
package_extract_file("firmware-update/tz.mbn", "/dev/block/bootdevice/by-name/tz");
package_extract_file("firmware-update/abl.elf", "/dev/block/bootdevice/by-name/abl");
package_extract_file("firmware-update/devcfg.mbn", "/dev/block/bootdevice/by-name/devcfg");
package_extract_file("firmware-update/keymaster.mbn", "/dev/block/bootdevice/by-name/keymaster");
package_extract_file("firmware-update/xbl.elf", "/dev/block/bootdevice/by-name/xbl");
package_extract_file("firmware-update/rpm.mbn", "/dev/block/bootdevice/by-name/rpm");
), "");
ifelse(msm.boot_update("backup"), (
package_extract_file("firmware-update/cmnlib64.mbn", "/dev/block/bootdevice/by-name/cmnlib64bak");
package_extract_file("firmware-update/cmnlib.mbn", "/dev/block/bootdevice/by-name/cmnlibbak");
package_extract_file("firmware-update/hyp.mbn", "/dev/block/bootdevice/by-name/hypbak");
package_extract_file("firmware-update/tz.mbn", "/dev/block/bootdevice/by-name/tzbak");
package_extract_file("firmware-update/abl.elf", "/dev/block/bootdevice/by-name/ablbak");
package_extract_file("firmware-update/devcfg.mbn", "/dev/block/bootdevice/by-name/devcfgbak");
package_extract_file("firmware-update/keymaster.mbn", "/dev/block/bootdevice/by-name/keymasterbak");
package_extract_file("firmware-update/xbl.elf", "/dev/block/bootdevice/by-name/xblbak");
package_extract_file("firmware-update/rpm.mbn", "/dev/block/bootdevice/by-name/rpmbak");
), "");
msm.boot_update("finalize");
package_extract_file("firmware-update/dspso.bin", "/dev/block/bootdevice/by-name/dsp");
package_extract_file("firmware-update/NON-HLOS.bin", "/dev/block/bootdevice/by-name/modem");
package_extract_file("firmware-update/BTFM.bin", "/dev/block/bootdevice/by-name/bluetooth");[/COLOR]
show_progress(0.600000, 250);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
ui_print("Patching vendor image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/vendor", package_extract_file("vendor.transfer.list"), "vendor.new.dat.br", "vendor.patch.dat") ||
abort("E2001: Failed to update vendor image.");
show_progress(0.100000, 2);
set_progress(1.000000);

The final copy should look like this-

getprop("ro.product.device") == "whyred" || abort("E3004: This package is for \"whyred\" devices; this is a \"" + getprop("ro.product.device") + "\".");
ui_print("Target: xiaomi/whyred/whyred:8.1.0/OPM1.171019.011/V9.5.19.0.OEIMIFA:user/release-keys");
show_progress(0.100000, 5);
show_progress(0.200000, 10);
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
show_progress(0.600000, 250);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
ui_print("Patching vendor image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/vendor", package_extract_file("vendor.transfer.list"), "vendor.new.dat.br", "vendor.patch.dat") ||
abort("E2001: Failed to update vendor image.");
show_progress(0.100000, 2);
set_progress(1.000000);

Notice the blank line at the end, don't remove it. Global ROM seems to have 14 lines of code with 1 blank line at the end after this process.

Save the file, WinRAR will ask if you want to update the archive, permit it.

Your ROM is now fw-less. Enjoy.

► You bricked your phone?

Sorry, I can't help you if you messed something up. That's the disclaimer here. You do this with all liability to yourself.​

► Want to learn more?

• Everything About Anti Roll-back [Whyred]

• Redmi Note 5/Pro Miui ROMs without firmware [fw-less]​

► Should you be careful?

• I don't exactly know how far behind you can go, do that research yourself and let me know so I can update it here. But I'd recommend not going too far behind. If you go too far, even after following this process, your phone might end up bricking. Some ROMs are just too old.​