[Xiaomi Redmi Note 7 Questions & Answers] dannyfe:
Hi everybody!

I installed Xiaomi.eu 12 stable few weeks ago and the device worked perfectly until this morning. When I unlocked the screen and clicked on the toggle wifi to activate it, the device stopped working. Totally freezed.

I tried with a reboot but the device was stuck to the boot logo. So I've tried to enter the recovery mode (Orange Fox in my case) and also it was stuck in the Orangefox logo. The only thing which works is fastboot.

So I decided to try to reset the phone, without success in all the cases. Here all my attempts:

1) Install other recoveries with fastboot (Orangefox, TWRP, Stock recovery) and depite the installation succeed, none of them worked; when I try to enter the recovery mode, it's still stuck into OrangeFox logo (also after I've installed other recoveries).

2) Install MIUI global fastboot rom with MiFlash tool. It reports error xbl.

3) The last thing I tried: several attempts with fastboot and MIUI global fastboot ROMs. In all the cases the reported error was the write protection of xbl.

NB: I used both command prompt of linux and windows without success.

[daniele@daniele-x550ld lavender1]$ sudo ./flash_all.sh
product: lavender
Sending 'antirbpass' (8 KB) OKAY [ 0.005s]
Writing 'antirbpass' OKAY [ 0.000s]
Finished. Total time: 0.013s
Sending 'xbl' (2512 KB) OKAY [ 0.075s]
Writing 'xbl' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'xblbak' (2512 KB) OKAY [ 0.076s]
Writing 'xblbak' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'tz' (1924 KB) OKAY [ 0.061s]
Writing 'tz' OKAY [ 0.013s]
Finished. Total time: 0.082s
Sending 'tzbak' (1924 KB) OKAY [ 0.060s]
Writing 'tzbak' OKAY [ 0.014s]
Finished. Total time: 0.076s
Sending 'rpm' (219 KB) OKAY [ 0.015s]
Writing 'rpm' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'rpmbak' (219 KB) OKAY [ 0.011s]
Writing 'rpmbak' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'hyp' (272 KB) OKAY [ 0.011s]
Writing 'hyp' OKAY [ 0.002s]
Finished. Total time: 0.016s
Sending 'hypbak' (272 KB) OKAY [ 0.011s]
Writing 'hypbak' OKAY [ 0.003s]
Finished. Total time: 0.016s
Sending 'pmic' (38 KB) OKAY [ 0.006s]
Writing 'pmic' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'pmicbak' (38 KB) OKAY [ 0.002s]
Writing 'pmicbak' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'keymaster' (305 KB) OKAY [ 0.012s]
Writing 'keymaster' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'keymasterbak' (305 KB) OKAY [ 0.010s]
Writing 'keymasterbak' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'cmnlib' (216 KB) OKAY [ 0.010s]
Writing 'cmnlib' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'cmnlibbak' (216 KB) OKAY [ 0.011s]
Writing 'cmnlibbak' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'cmnlib64' (267 KB) OKAY [ 0.015s]
Writing 'cmnlib64' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'cmnlib64bak' (267 KB) OKAY [ 0.011s]
Writing 'cmnlib64bak' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'mdtpsecapp' (1053 KB) OKAY [ 0.030s]
Writing 'mdtpsecapp' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'mdtpsecappbak' (1053 KB) OKAY [ 0.035s]
Writing 'mdtpsecappbak' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'modem' (111873 KB) OKAY [ 3.123s]
Writing 'modem' OKAY [ 0.745s]
Finished. Total time: 3.876s
Sending 'dsp' (16384 KB) OKAY [ 0.454s]
Writing 'dsp' OKAY [ 0.110s]
Finished. Total time: 0.571s
Sending 'bluetooth' (556 KB) OKAY [ 0.024s]
Writing 'bluetooth' OKAY [ 0.004s]
Finished. Total time: 0.031s
Sending 'storsec' (48 KB) OKAY [ 0.004s]
Writing 'storsec' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'storsecbak' (48 KB) OKAY [ 0.012s]
Writing 'storsecbak' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'devcfg' (47 KB) OKAY [ 0.011s]
Writing 'devcfg' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'devcfgbak' (47 KB) OKAY [ 0.012s]
Writing 'devcfgbak' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'abl' (148 KB) OKAY [ 0.012s]
Writing 'abl' OKAY [ 0.002s]
Finished. Total time: 0.016s
Sending 'ablbak' (148 KB) OKAY [ 0.012s]
Writing 'ablbak' OKAY [ 0.002s]
Finished. Total time: 0.016s
Sending 'dtbo' (8192 KB) OKAY [ 0.251s]
Writing 'dtbo' OKAY [ 0.055s]
Finished. Total time: 0.310s
Sending 'dtbobak' (8192 KB) OKAY [ 0.228s]
Writing 'dtbobak' OKAY [ 0.055s]
Finished. Total time: 0.286s
Sending 'vbmeta' (4 KB) OKAY [ 0.004s]
Writing 'vbmeta' OKAY [ 0.001s]
Finished. Total time: 0.012s
Sending 'vbmetabak' (4 KB) OKAY [ 0.003s]
Writing 'vbmetabak' OKAY [ 0.001s]
Finished. Total time: 0.006s
Sending 'boot' (65536 KB) OKAY [ 1.860s]
Writing 'boot' OKAY [ 0.437s]
Finished. Total time: 2.301s
Sending 'recovery' (65536 KB) OKAY [ 1.836s]
Writing 'recovery' OKAY [ 0.437s]
Finished. Total time: 2.276s
Sending sparse 'system' 1/5 (786428 KB) OKAY [ 22.248s]
Writing 'system' OKAY [ 0.000s]
Sending sparse 'system' 2/5 (786428 KB) OKAY [ 22.449s]
Writing 'system' OKAY [ 0.000s]
Sending sparse 'system' 3/5 (786428 KB) OKAY [ 21.480s]
Writing 'system' OKAY [ 0.000s]
Sending sparse 'system' 4/5 (786428 KB) OKAY [ 21.680s]
Writing 'system' OKAY [ 0.000s]
Sending sparse 'system' 5/5 (327952 KB) OKAY [ 9.250s]
Writing 'system' OKAY [ 0.000s]
Finished. Total time: 97.119s
Sending sparse 'vendor' 1/2 (786428 KB) OKAY [ 21.900s]
Writing 'vendor' OKAY [ 0.000s]
Sending sparse 'vendor' 2/2 (57832 KB) OKAY [ 5.300s]
Writing 'vendor' OKAY [ 0.000s]
Finished. Total time: 29.298s
Sending 'userdata' (367876 KB) OKAY [ 10.647s]
Writing 'userdata' OKAY [ 0.000s]
Finished. Total time: 10.944s
Sending 'mdtp' (17390 KB) OKAY [ 0.483s]
Writing 'mdtp' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Sending 'cache' (128 KB) OKAY [ 0.005s]
Writing 'cache' OKAY [ 0.002s]
Finished. Total time: 0.017s
Sending 'splash' (26594 KB) OKAY [ 0.760s]
Writing 'splash' FAILED (remote: 'Error flashing partition : Write Protected')
fastboot: error: Command failed
Erasing 'ddr' OKAY [ 0.001s]
Finished. Total time: 0.003s
Erasing 'misc' OKAY [ 0.001s]
Finished. Total time: 0.002s
Erasing 'apdp' OKAY [ 0.001s]
Finished. Total time: 0.003s
Erasing 'msadp' OKAY [ 0.001s]
Finished. Total time: 0.003s
Sending 'cust' (248280 KB) OKAY [ 7.047s]
Writing 'cust' OKAY [ 0.000s]
Finished. Total time: 7.064s
Rebooting OKAY [ 1.574s]

In windows, when I do "flash_all" it stops at write error in xbl; but when I try with linux, the terminal follows all the script, writing down all the errors. As is possible to see in the code above, there are other errors of "write protection";

Any suggest of how to proceed?

[UPDATE]

I tried the test of emmc as suggested below and the result is that the memory is broken. Thanks for the support!