How to Enable Camera2 API on Redmi Note 5 Pro/Global

How to Enable Camera2 API on Redmi Note 5 Pro/Global 1

There are 3 methods to activate MIUI Camera2 API you can follow easily on Redmi Note 5 codename Whyred (Pro/Global/China/AI). The first and second methods require no root. The third method, however, is the ultimate trick that requires rooting your phone.

Either with root or without root, enabling Camera2 API on your Xiaomi device requires an unlocked bootloader. Any method you try will just fail if your phone bootloader is not unlocked officially. Unlocking bootloader is utterly easy. We have wrapped up the complete steps to obtain bootloader unlock permission here.

Before we proceed, make sure you have created a backup of all your important files and data. Despite this method is perfectly safe, we cannot guarantee anything. We have no responsibilities of any damage that might happen to your device.

Requirements

You will need the following stuff:

1. No Root, No TWRP Flashing

This method requires TWRP custom recovery but we are not going to install it. We need it only for booting into custom recovery. Again, you will have no TWRP installed at the end of this process.

  1. Disable Windows Driver Signature Enforcement on your computer.
  2. Install ADB Fastboot Driver or Android Platform Tools on your computer. You may install it on drive C:\adb\.
  3. Enable USB Debugging on your phone. Go to Settings >> Additional Settings >> Developer Options >> USB Debugging.
  4. Download and copy the TWRP image file to your ADB folder. Rename the file to twrp.img.
  5. Download ARB Bypasser and extract the zip file. You will get a dummy.img file. Copy that file to the adb folder as well.
  6. Hold down the “Shift” button your keyboard and right-click anywhere inside the ADB folder.
  7. Choose “Open Command Prompt Window here” or “Open Windows PowerShell Window here”.
  8. Now connect your phone to your computer using the prepared USB cable. Make sure the connection type is “MTP” and is NOT “Charging”.
  9. In the Command Prompt window, type “adb devices” (without quotes) and hit Enter key. This asks the computer to recognize your device and to establish ADB connection.
  10. Next, type “adb reboot bootloader“. This will reboot your phone into fastboot mode.
  11. If your device has ARB index 4 or greater, type “fastboot flash antirbpass dummy.img” and hit Enter. The command order your computer to flash dummy.img file to your device through the Fastboot interface. Otherwise, skip this step and go to the next step below. Recommended reading: How to check for ARB index.
  12. Now issue the following command: fastboot boot twrp.img. This tells your computer to boot your phone using TWRP image.
  13. Your phone should now display the TWRP main menu but you may need to allow system modification at first.
  14. Next, type “adb pull /system/build.prop” and hit Enter. The command asks the system to download “build.prop” file from our device to your computer.
  15. Open the “build.prop” file using a text editor of your choice (Notepad, Notepad++, or Sublime).
  16. Add the following text inside that file “persist.camera.HAL3.enabled=1” – you can copy-paste it, without quotes.
  17. Save the file (Control+S) and close the text editor.
  18. Finally, issue the following command lines:

Type and hit Enter on your keyboard.

adb push build.prop /system/
adb shell
cd system
chmod 644 build.prop
adb reboot

Credit: Sahil4518 on XDA.

Alternative method:

  1. Follow Steps 1 until Steps 12 above.
  2. Then issue the following command:
adb devices
adb shell
setprop persist.camera.HAL3.enabled 1
exit
adb reboot

Your phone will reboot into normal mode but this time the Camera2 API has been enabled.

Credit: RSubha on XDA.

As for us, this alternative method that really works.

How to Enable Camera2 API on Redmi Note 5 Pro/Global 2

2. No Root, with TWRP

  1. Disable Windows Driver Signature Enforcement on your computer.
  2. Install ADB Fastboot Driver or Android Platform Tools on your computer. You may install it on drive C:\adb\.
  3. Enable USB Debugging on your phone. Go to Settings >> Additional Settings >> Developer Options >> USB Debugging.
  4. Download and copy the TWRP image file to your ADB folder. Rename the file to twrp.img.
  5. Download ARB Bypasser and extract the zip file. You will get a dummy.img file. Copy that file to the adb folder as well.
  6. Download the Camera2 API Enabler (zip) and DM-Verity No Encrypt (zip) to your phone directly. Do not need to extract the zip file.
  7. Hold down the “Shift” button your keyboard and right-click anywhere inside the ADB folder.
  8. Choose “Open Command Prompt Window here” or “Open Windows PowerShell Window here”.
  9. Now connect your phone to your computer using the prepared USB cable. Make sure the connection type is “MTP” and is NOT “Charging”.
  10. In the Command Prompt window, type “adb devices” (without quotes) and hit Enter key. This asks the computer to recognize your device and to establish ADB connection.
  11. Next, type “adb reboot bootloader“. This will reboot your phone into fastboot mode.
  12. If your device has ARB index 4 or greater, type “fastboot flash antirbpass dummy.img” and hit Enter. The command order your computer to flash dummy.img file to your device through the Fastboot interface. Otherwise, skip this step and go to the next step below. Recommended reading: How to check for ARB index.
  13. Now flash TWRP using this command: fastboot flash recovery twrp.img
  14. This instructs the computer to flash TWRP image file to the phone through the fastboot interface. The process should finish within seconds.
  15. Type “fastboot reboot recovery” and hit Enter. This will boot your device into TWRP.
  16. Your phone will now reboot into TWRP recovery mode.
  17. Slide to allow system modification. By doing this, it will trigger the MIUI DM-Verity security check.
  18. Choose “Install” from the main menu.
  19. Locate and choose the Camera2 API .zip file. Tap on it to choose it.
  20. Swipe to confirm flashing. Wait few seconds until the process complete.
  21. Go back to the main and tap “Install” again.
  22. Locate and choose the DM-Verity Disabler .zip file.
  23. Tap on it to choose it.
  24. Swipe to confirm flashing. Wait few seconds until the process complete.
  25. Once done, tap “Reboot”

3. With Root, with TWRP and Magisk

  1. Follow our comprehensive guide on how to root Redmi Note 5 Whyred.
  2. Open up Magisk Manager app.
  3. Tap the menu icon at the top left corner of the screen.
  4. Choose “Downloads”.
  5. Tap the Search icon.
  6. Search for “Camera2 API“.
  7. Tap the Download icon to start downloading.
  8. Tap “Install” then reboot.

How to Enable Camera2 API on Redmi Note 5 Pro/Global 3

How to Enable Camera2 API on Redmi Note 5 Pro/Global 4

How to Enable Camera2 API on Redmi Note 5 Pro/Global 5

What’s next? You can confirm whether your attempt is a success or not. Simply download the “Manual Camera Compatibility Test” app or “Camera2 Probe” app from the Play Store. You should get something like this:

How to Enable Camera2 API on Redmi Note 5 Pro/Global 6

Credits: jhangyu on XDA.

UPDATE:

Users running MIUI 10 based on Android 9.0 Pie should follow our latest guide:

How to enable Camera2 API on Redmi Note 5 MIUI 10 Android 9.0 Pie.

Do not hesitate to post a comment below.

44 Comments

  1. Digvijay February 7, 2019
  2. MadK9 March 19, 2019
    • Fariez Nurkholiq March 19, 2019
  3. MadK9 March 20, 2019
  4. MadK9 March 22, 2019
    • Fandi A. Fiki March 22, 2019
  5. MadK9 March 22, 2019
  6. Jas March 23, 2019
    • Fandi A. Fiki March 23, 2019
  7. MadK9 March 23, 2019
  8. MadK9 March 23, 2019
  9. MadK9 March 23, 2019
  10. MadK9 March 23, 2019
  11. MadK9 March 23, 2019
  12. MadK9 March 25, 2019
    • DMK May 17, 2019
  13. dtf April 8, 2019
    • Fariez Nurkholiq April 9, 2019
  14. dtf April 9, 2019
  15. dtf April 9, 2019
    • Fandi A. Fiki April 14, 2019
  16. Edvan Setiawan April 10, 2019
    • Fandi A. Fiki April 14, 2019
  17. Justin River May 3, 2019
  18. vassemo May 6, 2019
  19. vassemo May 6, 2019
    • MadK9 May 24, 2019
  20. peace May 15, 2019
  21. Adarsh May 16, 2019
  22. Waqas Qammar May 18, 2019
    • Fariez Nurkholiq May 19, 2019
      • Waqas Qammar May 25, 2019
  23. Waqas Qammar May 25, 2019
    • Fariez Nurkholiq May 25, 2019
      • Waqas Qammar May 27, 2019
  24. Austinople May 31, 2019
  25. Bohdan June 8, 2019
    • Fariez Nurkholiq June 8, 2019

Leave a Reply