I wrote someone a guide, and decided someone might make use of it here too. HDR+ is magic, makes your camera so much better than stock.
You don’t need root. You need Nougat though (MIUI 9), but the e.g. RN4 should have that already. Here’s what you need to know:
In MIUI, unfortunately, the camera2api (a thingy which provides a modern interface to the camera) is disabled. The modded google camera needs this, so you need to enable that, this is the only requirement other than running nougat or higher.
Using the following steps will allow you to do this, without losing any data or without having to reinstall anything. It takes only a few minutes. Some of these steps might sound daunting, but it really isn’t, kinda foolproof nowadays:
1. Unlock the bootloader, officially by Xiaomi, following [this guide made by the folks over at /r/xiaomi](https://www.reddit.com/r/Xiaomi/wiki/flashing/unlock). Do not lie on the form, just tell you want to enable the camera2api for hdr+
2. Flash TWRP, following [this guide](https://www.reddit.com/r/Xiaomi/wiki/flashing/flashtwrp). TWRP is a custom recovery. If you want to keep on using MIUI, or you do not want to flash a new OS, use the **cofface** version.
**EDIT: I suggest you just boot into twrp and not flash it with the command, as /u/adrieltan suggested:**
> fastboot boot twrp.img
This way, you won’t need to worry about the version of TWRP (like cofface or not) or later updates.
3. ***optional: only if you flashed TWRP, not just booted into it like the edit said in step2:***
Boot into TWRP. Tap on mount, and mount the System partition.
4. On your PC open your Minimal ADB and fastboot folder (you installed this previously), and open the MAF32 file, that opens up a simple terminal.
5. type the following into this terminal window:
echo ‘persist.camera.HAL3.enabled=1’ >> /system/build.prop
*Note: if this does not work, use [this from step 4, its longer but it works](https://forum.xda-developers.com/redmi-note-4/how-to/guide-enable-camera2-api-root-t3690366)*
6. Reboot to system (from TWRP)
7. Install the google cam from [here](https://www.celsoazevedo.com/files/android/google-camera/). I use [this version, it’s the smoothest and best quality for me](https://www.celsoazevedo.com/files/android/google-camera/f/MGC_5.1.018_7.0+C2API_min_3a_AllinOne.apk) currently. I recommend the MGC versions. You can play around with the settings, but my preference is “Walleye”, jpeg quality 100%, HDR+ set to ‘Super High”, Pixel HDR+ and ZSL on. I use HDR+ enhanced whenever I can (need to turn hdr controls on for that), although its a little slow (but end results are great). Simple HDR+ is also good.
Please note that MIUI OTAs can disable the camera2api back, or sometimes OTA updates fail because of TWRP, but its nothing bad, just reboot and it works again, and if that happens flash MIUI manually.
Is there a way to do step 2 with booting in to TWRP on Redmi Note 5?
As far as I can see there is no cofface version for it, and I got stuck in a bootloop on Redmi Note 3 when I used stock TWRP (easily fixed by booting into the cofface version and restarting)
Li
Tytutyttu r
> restarted to recovery again, wipe to factory reset.
what do you mean by this?
also do you push the build.prop back to your phone?
I mean you should `adb pull /system/build.prop` to get the build.prop file
edit it as you did (edit the file found on your computer, the new one which just got created by the command above, not the file on your phone’s /system/)
then
adb push build.prop /system/
adb shell
cd system
chmod 644 build.prop
reboot to system
I mean this is how you do it if you wanna do it your way, or you could just follow the OP which should work perfectly…Did you try that?
Yes… tried with version 1.1 of MiUnlock, but I get 50% and then asked to update…
Did you request it through the mi website and then enabled it in your phone’s settings?
I tried to unlock my Redmi Note 4 bootloader but it won’t work… I am using a VM with WinXP (I have a Mac).
The problem is that after booting up my phone in fastboot mode, and enabling the USB in the VM, the unlock tool won’t enable the “Unlock” button… Any ideas on any workaround for this?
I am using MiUnlockTool 2.2.406.5. The last version won’t even open for me in XP.
Thanks for the help!
Well if you just boot into TWRP you will still recieve OTA update, normally, nothing changes. If you flash (install) TWRP, depending on the version you might not recieve OTA updates.
Keep in mind that you will most likely have to re-enable the camera2API after every OTA update.
Please help. Tech noob here. Does unlocking the bootloader void warranty or make the OTA updates ineligible or something? Or can I just continue using it like normal?
Hey first of all thanks for your guide! I’ve just got my phone and wanted to install google cam with the help of your guide but unfortunatly I ran into some Problems. I hope you could help me!
Heres what I did so far:
* Unlocked the Bootloader with MI Unlocker
* Downloaded twrp from This Link: https://eu.dl.twrp.me/tissot/twrp-3.2.1-0-tissot.img.html
* Put the Image in the ADB folder and renamed it twrp.img
* Opened up a command window in the ADB folder and checked if the phone is unlocked with fastboot oem device-info
* then i tried booting into twrp with fastboot boot twrp.img
the command window shows:
downloading ‘boot.img’…
OKAY [ O.702s]
booting…
OKAY [ 0.583s]
finished. total time: 1.292s
Here is where my problem comes in because everytime i tried that last step my phone just boots to system and not into twrp. My Question is am I missing something or did i skip some crucial Step?
Thanks for your help!
Put phone into fastboot mode, on fastboot on your computer type
> Fastboot boot insertyourtwrppathhere.img
Run the commands that he said, and then just reboot into system.
> just boot into twrp and not flash it
Care to elaborate more on how to do this?
Yea i’m on MIUI 9. It IS a risk. You should know if you are able to come back from it. If you think you will have to learn a lot, then don’t do it. The better camera is not worth the stress of a first timer.
MIUI 9 8.1.4 Global
Which rom do you have?
There aren’t much settings because it probably is an auto app which sets itself up. About the flickering I’m not sure why it is happening. It works flawlessly on my phone.
Are you on MIUI? Super scared to modify system.prop haha
Hey! Currently using that apk but I miss some settings (seen in other screenshot for the same porting of gcm) and my screen seems to flick a bit to grey when I’m ready to take a photo (RN4 Global)
Did you unlock your bootloader? If yes, did you use the correct twrp for your device?
I really dunno. I at least did not. I got myself in a bootloop when i first tried with the oficial twrp, but when i tried booting on with cofface TWRP i was able to boot on the oficial rom again, dunno what happened.
I also used this method to flash SuperSU on my device and from there i fixed the inverted camera.
If I mount the system partition, do I have to flash lazyflasher to avoid a bootloop? Another comment is suggesting it, I would like to stay as clean as possible with this device
>Note: if this does not work, use this from step 4, its longer but it works
Thanks for clarification, it seems dumb to ask since you stated this but, is there any other method to modify build.prop if echo is not working? I would prefer to maintain my device as clean as possible, without TWRP. Thanks in advance!
I would just to clarify that if i unlock the bootloader officially using mi unlock, i would still have OTA updates regularly?
I tried doing that but instead of booting into twrp phone restarts after some time. When I tried to flash twrp, it shows the error : partition table doesn’t exist
What to do now?
IMPORTANT: you need to flash lazyflasher if you have swiped to allow system modifications or else you cannot boot into official MIUI. Even when you aren’t actually installing TWRP.
Okay, good to know, thank you for your answer.
Ah ok thanks, I just ended up rooting it and added the line.
Works great!
Would you happen to know if I’ll still receive OTA updates if I rooted it but kept the original ROM?
do it like the edited version (step2 and step3 changed), and you will have OTA automatically, you just need to reenable the camera2 api after every update.
It should work with any custom recovery (as long as you can use adb, but that should be no problem). Or just root it and edit the build.prop file and add the line
persist.camera.HAL3.enabled=1
Cofface is mainly needed if you want to keep using MIUI (and even then, its more of a safety measure as other recoveries work with it as well)
There doesn’t seem to be a Cofface TWRP for the MiA1 (tissot)
Any way to go around that?
Oh that explains it. Thanks!
The autofocus doesn’t work, so you need to switch to video, focuse there, and then back to camera.
One question. Does Redmi 3 Pro (not Redmi Note 3) have camera2api support? My google-fu skills are failing me.
Oh. Darn
I imagine you cannot delete/disable the package without root. You can either try to uninstall/delete the existing package, or try to use [App Cloner](https://play.google.com/store/apps/details?id=com.applisto.appcloner&hl=en). I’m not sure if it will work, but worth a try to clone the downloaded APK and rename the app and etc.
You activated a secret function of mine!
By saying upside-down, I will make your text BE upside down! Enjoy!
>uʍop ǝpısdn sı ʇı ʇɐɥʇ os sǝǝɹbǝp pǝʇɐʇoɹ sǝɯoɔǝq ǝbɐɯı ʎɯ ʞdɐ ɹpɥ ǝɥʇ ןןɐʇsuı puɐ sıɥʇ op ı uǝɥʍ uosɐǝɹ ǝɯos ɹoɟ
This bot is made to learn how to use APIs better; please give any feedback you deem fit.
Say hi to me by typing !hibot
Normal use: Type rhyme followed by a word you wish to rhyme!
Secret commands: To hear a Chuck Norris joke, comment !chucknorrisjoke anywhere in this subreddit!
Another secret command: To make your text upside-down, say upside-down anywhere in your text!
For some reason, when I do this and install the HDR+ APK, my image becomes rotated 180 degrees (so that it is upside down).
A1 is quite picky when it comes to OTAs… It may or may not work….
man it works!(mi5)
this is what i did:
* cmd:’adb reboot bootloader’
* cmd:’fastboot boot twrp.img’
* Boot into TWRP. Tap on mount, and mount the System partition.
* cmd:’adb shell’
* cmd:’echo ‘persist.camera.HAL3.enabled=1′ >> /system/build.prop’
* exit and restart phone
With this you get to keep stock recovery and have OTA. That’s great! With my Mi A1 now updated to Oreo, I’ll do this and have HDR+ too!
Every update is a full ota package ( 1GB download almost each time), and you’ll have to re-enable it with every update
While trying to install the APK I get the error “The package conflicts with an existing package by the same name. Any idea what to do?
I am using a RN3 with LineageOS(unrooted).
Thanks for the guide! Really good work.
I only booted not flashed TWRP, I had to take that long route from XDA link and flash lazyflasher (without it the OS was freezing at bootanimation).
Is it possible to re-lock bootloader? Is it wise to even do that (I’m afraid that some problems may occur later, for example when system update will be available, and with locked bootloader I will be screw, but on the other hand, many applications require to have locket bootloader and no root…).
>if you have to unlock the bootloader as the first step you will need to factory reset your phone.
no you don’t? I’m not sure what do you mean but I did this on 3 phones thus far and never had to factory reset
no, it’s not enabled in mi a1.
Yeah, that’s another good option then!
You possibly have camera2api already enabled and just need to install the apk. Check if you do. If not, yes, this works
You don’t even need an app to check, you can do it with ADB:
>adb shell getprop persist.camera.HAL3.enabled
Newer, but different version, try it for yourself. I installed it with app cloner and tried it side by side.
Since you are asking so nicely, Root->xposed->picture2sd
Or foldermount
That’s great, now give me a step by step guide to making it save to SD card.
I always ran stock on my RMN3Pro and my Mi Max 2 and I’ve always booted into twrp instead of flashing it and it worked great… Not sure what’s up. Shouldn’t be any reason why that wouldn’t work…
This is the only way I’ve ever got TWRP working on my RN3P. Every tutorial I’ve followed has always said flash then reboot, but it never works for me… Any ideas what’s up with that?
Excellent post. Well done 🙂
Are there any downsides to this? Like I have to update manually from now on?
Good idea! I will edit my post, thanks!
Can I do this on Mi A1?
Great guide man! I totally forgot about echo to add it into the build.prop easily!
However, I’ll suggest changing Step 2 and 3 to just booting into TWRP without flashing it.
You can do:
> fastboot boot twrp.img
and boot straight into twrp without flashing over stock recovery and run all the typical commands.
The advantage of this is that not every phone out there has a MIUI safe TWRP. So once the command is done, you can reboot into system and everything works great (updates will not fail because of TWRP.)
Additionaly, I’ll recommend you to add on to disable “Install Automatically” in the updater as sometimes it’ll attempt to update overnight and the Camera2API will be disabled.
https://www.xda-developers.com/camera2api-magisk-module-enables/
I’ve tried those as well. No luck so far.
Sorry to hear that. Maybe you could try different settings and different versions of the app. Also check the specific mi6 xda subforum, maybe they have something for your specific model.
On the Mi6 the resulting pictures are very blurry compared to the Miui camera app. :/
Go [here](https://forum.xda-developers.com/redmi-note-3/themes/mod-updated-6-11-17-google-camera-hdr-t3701190). There is one for android 6 which I’m using right now. Just make sure that your camera2api is enabled.
Some people had success with it, you can try. I never needed to do it so unfortunately I have no information on it, sorry about that.
Lineageos 7.0 or higher?
Test if you have camera2api enabled by [this app](https://play.google.com/store/apps/details?id=pl.vipek.camera2_compatibility_test) or the [build.prop editor](https://play.google.com/store/apps/details?id=com.jrummy.apps.build.prop.editor) app.
It should be enabled. But if not, you don’t need to do all this jazz cause lineage comes rooted so you can edit the necessary file on your phone, without PC. Download the [build.prop editor app](https://play.google.com/store/apps/details?id=com.jrummy.apps.build.prop.editor), and add the following line with it:
persist.camera.HAL3.enabled=1
You can now install the modded google camera .apk and it works.
Try the step with enabling the camera2api and then install the apk file from the OP’s post.
If you have root then any file explorer with root access (Solid Explorer, MiXplorer) will let you edit the build.prop file to enable the camera2api.
I’m using lineage os ….. How to get Google camera working on that
There is. I don’t know specifics but this doesn’t even work for me properly with walleye settings, only taimen, and even that is so so. The other is just overall much smoother.
I use this one: https://forum.xda-developers.com/redmi-note-4/themes/google-camerawith-hdr-mido-t3656196
I assume there are no differences, or am i wrong?