Hello everyone
UPDATE!!!
Now you can skip all the tutorial, and just install the magisk module:
"GCam enable for XiaomiMi8Lite", then you install the GCam.
Thanks to
@ncandroid84
But if you want to do all the process manually:
I'm doing this post because no one knows how to do this and I have the solution so I want to share it with you.
First of all, I assume you are an advanced user and have rooted your device with the guides of xda forums, so don't ask about it, please.
Also I've seen that many people done magisk modules, scripts and blabla, but also many people said that those methods don't work, so this is the manual method.
So let's do this.
1. Install a build prop editor (search in play store) and add the following lines in "persist" part:
For Oreo:
persist.camera.HAL3.enabled=1
persist.camera.eis.enable=1
persist.vendor.camera.HAL3.enabled=1
For Pie:
Now save and restart your device. Check with the app "Camera2 probe". You should see at hardware support level "LEVEL_3" checked and with green text.
If you see this, now you have Camera2 API enabled.
But... Front camera doesn't work anymore, with any app, so you have to replace a file.
2. Install a file manager with root that let you modify file permissions and access your root folder.
You should download the next file:
Oreo:
https://drive.google.com/file/d/1w2Qw34Pmy0dLmlXRYRSm8JyKgEb2mZ6u/view
Pie:
https://drive.google.com/file/d/1u7AREkr6_QKKdSZw2s_5itYk0xkKYTm2/view
-Copy the file.
-Now, go to to /vendor/lib and paste it. Replace the existing file.
-Now set the following permissions in the new file you pasted:
Owner: Read and write.
Group: Read.
Other: Read.
Or rw- r-- r-- for advanced users
Save and restart.
Now you see that front camera works fine with many apps except stock camera. This is when you install the gcam.
I'm using now the Arnova's Advanced 1.4 version downloadable at Celso Acevedo's page. (Google it).
Also, 4k recording doesn't work but you can use stock camera for this.
That's all and I hope I've helped you.