Hi Mi Fans!
Many of you may know the HDR+ & portrait mode results with Google Camera app in Pixel devices and some developers have ported that camera app to work with many devices, but a main reason that still many are unable to use it is, the app needs Camera2api enabled in your device.
Most of the tutorials on internet or youtube are by rooting your device and installing magisk/magisk modules or by editing the build.prop using file explorers which also needs root access for your device, due to which many users who doesn’t want to root their device aren’t able use the Google Camera app.
Today by using this guide you can enable Camera2api and use Google Camera in your device without rooting your device.
Please proceed with caution, as I don’t take any responsibility if you do anything wrong in this process or for breaking any exisiting features of your camera app.
I am showing this tutorial from Redmi Note 5 Pro device running on MIUI version 22.214.171.124 with an unrooted device.
Let’s quickly jump into the guide now.
1. To unlock bootloader for your device please follow this guide. Learn how to unlock the Bootloader of your Mi Phone
2. Download TWRP for your device and place the img file in the same folder where you have saved the adb files and rename it to twrp.img
( Redmi Note 5 Pro users can download this TWRP Redmi Note 5 Pro twrp.img credits: Shahan_mik3, vasishath )
3. Configure adb in your PC download adb from here adb.zip and extract it to any folder in your PC.
2018-05-04 13:44:12 UploadClick on the file to download the attachment
How to Enable Camera2API:
1. Now connect your device to your PC using the USB cable and change the connection mode to Transfer files.
2. Go to Settings - About Phone - Tap 7 consecutive times on MIUI Version to enable developer options, and go to Settings - Additional Settings - Developer options and enable USB debugging option.
3. Open the folder of adb in your PC, hold the shift key on your PC keyboard and right your mouse on the empty space in the adb folder and select “Open command window here”
4. Now enter the following command in the command window/PowerShell window which will show the serial number of your device and status of connection.
Keep your phone screen unlocked as it may ask for USB debugging authorization, as shown in step 2, 2nd screenshot.
5. Once your device is detected as shown in above screenshot, you can boot into fastboot mode in your device by using the Volume down+Power key simultaneously in power off mode of your device or by using the following command in cmd.
adb reboot bootloader
This will boot your device into fastboot mode as shown in image at 2nd step.
6. Now we need to boot into TWRP recovery for your device temporarily, it will not affect your device.
To do this enter the following command and hit enter key, make sure recovery name is twrp.img and it is placed in the adb folder.
fastboot boot twrp.img
7. Once you hit enter your device will temporarily boot TWRP recovery like this.
You will see the screen like on left screenshot, swipe the blue colour arrow bar to right side too enter into the TWRP recovery options.
(We don’t need to do anything from the recovery, keep the device connected to PC and rest it aside)
8. Now once again enter the “adb devices” command and hit enter to check the connection of device with PC.
It will show your device serial number and recovery as status.
9. Now we need to edit the build prop to add a line which enables Camera2API for that we will need to start adb shell using the following command.
6.png (15.06 KB, Downloads: 24)
2018-05-04 14:25:52 Upload
After entering the command hit enter key
10. Once the adb shell opens up you need to add a line for enabling Camera2api, copy paste the below command and hit enter
setprop persist.camera.HAL3.enabled 1
11. After that we need to exit the adb shell using the exit command, enter the command as shown below and hit enter.
12. Now you need to reboot the device, you can do that from the recovery or just by using the following command.
enter the command as shown and hit enter key.
13. That’s it once your device boots up it will have Camera2api enabled and the TWRP which we booted above will be removed (if followed the steps)
Redmi Note 5 Pro, MIUI Stable 126.96.36.199 update without rooting or any issue for updates.
14. Now you can install the Google Camera mods available for your device and install it.
15. This edit may not be lost with incremental OTA updates, but it will be lost incase of full rom updates, factory data reset or by installing fastboot rom, even if it is disabled you can enable it easily by following the above steps again.
Redmi Note 5 Pro updated from MIUI stable version 188.8.131.52 to 184.108.40.206 update and Camera2api is still enabled.
1. It may break some features of your camera in few devices like video calls from dialer app you will need to disable camera2api to bring it back, please proceed with caution.
2. If anything goes wrong you may need to flash fastboot rom so please take full backup of your data before trying out.
3. This process doesn't void your warranty, but still proceed on your own risk.
4. This process may work in any device running on Android Lollipop and above.
5. To disable Camera2api change the step 10 command to setprop persist.camera.HAL3.enabled 0 and follow all the proccess said here and everything will be normal as before enabling.
Hope this helps the few users who doesn't want to root but like to use Google Camera Mods.
In order to fulfill the basic functions of our service, the user hereby agrees to allow Xiaomi to collect, process and use personal information which shall include but not be limited to written threads, pictures, comments, replies in the Mi Community, and relevant data types listed in Xiaomi's Private Policy. By selecting "Agree", you agree to Xiaomi's Private Policy and Content Policy .