EDL Flash for Redmi 4A

Right now I am a Xiaomi Redmi 4A owner. I was using a custom Android ROM, named crDroid, mantained by muralivijay (XDA thread). This week the ROM had an official update but only for Treble, so I decided to give it a try and switch to Treble.

But things didn’t went okay. First compass was broken (I fixed by deleting
/persist/sensors/sns.reg), then proximity sensor was broken (screen wouldn’t turn off when in call), and then calls were unstable (noisy when on speaker, and the other party couldn’t hear me well). All those problems were not happening on previous non-treble crDroid.

To fix it, people suggested me to do EDL. I had no idea what it was, googling didn’t explained very much, and frankly I still don’t know what it is precisely. If I understood correctly, it is a way to restore your phone to the factory default by formatting the internal memory and redefining all partition scheme et cetera. Here I’ll try to reproduce the steps I took to do it (on Windows 7).

edl flash picture
The famous EDL mode

DISCLAIMER: Your warranty is now void. I am not responsible for bricked devices et cetera. Follow these steps at your own risk. They worked for me.

  1. Download and install Minimal ADB and Fastboot, and Qualcomm Drivers.
  2. Download a MIUI Fastboot ROM. This was a problem, because right now MIUI download page is offline. Luckily, I found a mirror, although with an old version. After downloading, extract it.
  3. Download and install Mi Flash.
  4. Make sure USB debugging is enabled on your phone. Connect your phone to your PC and enter fastboot mode: adb reboot bootloader
  5. Then, enter EDL mode: fastboot oem edl
  6. Some drivers will be installed (Qualcomm). You may need to disable Driver Signature Enforcement (tutorial)
  7. Open Mi Flash, select the folder you extracted the ROM, then click Refresh. You should see your phone appear as a COMx device. Click Flash. It should take 4–5 minutes to complete.
  8. Reboot by holding Power+VolUp+VolDown until the phone vibrates.
  9. After boot, your phone will be recognized as an adb device. Run adb reboot bootloader.
  10. Now you should flash TWRP (preferentially with vendor support). Place the img file on the same folder as adb/fastboot binaries, and run fastboot flash recovery twrp-3.2.1-2-vendor-rolex.img (example). After complete, run fastboot reboot.
  11. Enter recovery mode: hold Power+VolUp until the Mi logo appears. You should now be on TWRP.
  12. TWRP will ask for a password to decrypt. Tap Cancel, then tap Wipe, Slide to Wipe, then reboot to recovery again (hold Power+VolUp). You should be back to TWRP without the encryption warning.

From now on, your Redmi 4A is a clean slate. If you use an old ROM, the first thing you should do is to install a new firmware. Then you can install the ROM of your choice, GApps, et cetera.

That’s it. I hope this tutorial was objective enough.

Resources

Leave a comment