Redmi 5A Bypass UBL | Unofficial Unlock Bootloader For Riva Tested!

Tutorial updated : Dec 2025 

Tutorial how to bypass your xiaomi 5a (riva) lock bootloader, the unofficial way. You can root and custom rom your phone with this tools withiut using the official xiaomi unlock Tested on work on all redmi 5a version

Credit goes to xaacnz and saurabh6377

Things You should Know

  • Use at your own risk! I am not responsible for your actions
  • Tested  and work on all Xiaomi Redmi 5A android nougat 7 and android oreo 8 stock ROM
  • You can boot into recovery from adb, adb reboot recovery
  • Everytime you boot into recovery and make a change you must flash Appender.zip otherwise it will brick
  • If you got brick because forgot to flash Appender.zip, simply just repeat the Bypass Unlock Bootloader again
  • You can use this tutorial to bypass UBL your phone although locked bootloader

This tutorial will fix this error when doing unlock bootloader

  • Fix Error 20091
  • Solved Error Code “Couldn’t unlock. Can’t Get Info, connect again”
  • Progress Stop on 50% “Couldn’t verify Device”
  • Current account is not bound to this device
  • Error Code 10008: 参数错误、 请参考API文档
  • Error Code 86023 : hardwareId 异常
  • Error Code 86006 : 参数组合非法
  • Error Code 86012 曼备不存在

Video Tutorial

Files Needed

How To Unlock The Bootloader (Bypass)

This step also include the flash custom recovery
  • Extract MiFlash
  • create a folder called tmp
  • extract bypass file to tmp folder
  • Connect your device in EDL (download mode) using test point
  • rename the custom recovery into recovery.img
  • run this command using power shell/ terminal
  • .\QSaharaServer.exe -p \\.\COM8 -s 13:prog_emmc_firehose_8917_ddr.mbn -b tmp\
  • .\fh_loader.exe --search_path=tmp --port=\\.\COM8 --sendxml=twrp.xml

    Replace COM8 with COM Port of your device, find it using device manager

After this you can boot into custom recovery

How To Boot Into Recovery Mode

After bypass UBL riva you should NOT use reboot to recovery using recovery menu, it will broke the bootloader unlock. If you want to reboot to recovery follow this step
  • Unplug cable plugin
  • Plug it again
  • Use combination key : vol up + power
  • or 3 button : vol up + down + power
  • Now you should boot into recovery
Using the defult custom recovery you can flash old custom such as Android 9 PixelExperience,  Android 10 Havoc-OS-v3.12,  Android 11 Rova NusantaraOS

What Should NOT Do



If you do this it will brick your devices, because it will broke the bootloader (offcourse you can unbrick again and start from the start again)
  • Dont reboot to recovery using menu from custom recovery
  • Dont Update magisk from magisk menu 

How To Replace Custom Recovery

If you want to use latest custom ROM you should replace the recovery using
Unified Mi8937 custom recovery. After finish you can flash Android 16, 15, 14, 13, 12, 11 custom ROM
  • "Install" > "Install Image" > select mi8937.img
  • Flash appender-v4-rec.zip
  • When it finish, unplug power source and plug it again
  • press 3 button to boot into custom recovery again 
  • Now it using mi8937 recovery

Flashing Custom ROM

Make sure u’r in android 7 stock ROM if you want use custom recovery. Android 8 stock WONT work
  • boot to custom recovery
  • Flash Appender-rec.zip
  • Flash custom ROM
  • flash Nikgapps
  • flash Appender.zip
  • format data
  • Reboot system

How To Root

You should NOT flash magisk apk/ zip from recovery and update it!
  • extract boot from cusrom rom
  • patch boot using magisk apk
  • boot to custom recovery
  • install > install image > select magisk_patch.img
  • flash Appender.zip
  • Reboot system

For Stock ROM

  • Flash custom recovery (select android 7 or 8)
  • fastboot flash recovery.img
  • fastboot boot recovery.img
  • Flash magisk
  • Flash Appender.zip
  • reboot system

Post a Comment for "Redmi 5A Bypass UBL | Unofficial Unlock Bootloader For Riva Tested! "