[MAGISK][P] Stock Camera HAL for custom ROMs - Xiaomi Mi A1 Themes, Apps, and Mods

Description:
This module brings back Xiaomi's proprietary camera HAL and libraries to Pie custom ROMs and disables CDS mode to workaround green artifacts on 4.9 kernel.
It is only necessary for MIUI camera support and you really should avoid using it in other cases.
Disclaimer:
Once again, please don't install this unless you really need MIUI camera. Xiaomi's camera HAL is not as stable as the open source one, it leads to random issues with third-party camera apps and isn't really supported anymore.
And no, this doesn't install MIUI camera by default, you will need to use a separate module for it.
Download:
Stock Camera HAL for custom ROMs v3 (Google Drive)
"Source code":
https://github.com/Flex1911/tissot-stock-camhal

Great man [emoji2956]
Sent from my Mi A1 using Tapatalk

not a memui camera lover but yea i always love Gcam
well as you shifted to Opensource hals which are stable af so in future anytime ? any possibilities that it will fix front portrait on gcam 6.xx?
just wanted to know about this otherwise gcam 5.xx works just perfect and once again great af job ??

Updated both stock Camera apps from A1 & A2 for proper compatibility with this module.
https://forum.xda-developers.com/showpost.php?p=78913134&postcount=369
Just use one module at a time since both apps have the same package names.

Great work. Thanks from camera-addicted like me
We all are lucky to have a master like you working on our device.

The module have been updated:
https://drive.google.com/open?id=1p8jBpzIdTs8s-d5Yop5LUTbCd5pkzOiD
Changelog:
Fixed HAL3 support

While taking portrait its says cant connect camera in both a1 and a2 camera then a2 camera takes black nd white images

aravindhghosh said:
While taking portrait its says cant connect camera in both a1 and a2 camera then a2 camera takes black nd white images
Click to expand...
Click to collapse
As a workaround you can set selinux to permissive for a moment than back again to enforcing. This fixes this bug in my case.

I get black and white images with v2. With v1 works ok though.

sipollo said:
As a workaround you can set selinux to permissive for a moment than back again to enforcing. This fixes this bug in my case.
Click to expand...
Click to collapse
+1

sipollo said:
As a workaround you can set selinux to permissive for a moment than back again to enforcing. This fixes this bug in my case.
Click to expand...
Click to collapse
how to do this please explain

seanmcken said:
how to do this please explain
Click to expand...
Click to collapse
To set Selinux permissive in a terminal with root access type:
Su
Setenforce 0
To re-set Selinux to enforcing type:
Su
Setenforce 1
Or use an app (Selinux mode changer).

sipollo said:
To set Selinux permissive in a terminal with root access type:
Su
Setenforce 0
To re-set Selinux to enforcing type:
Su
Setenforce 1
Or use an app (Selinux mode changer).
Click to expand...
Click to collapse
I tried it, after setting to permissive when i reboot, it sets itself back to enforcing, i am on havoc os 2.2...
Edit : Selinux switch app fixes it..

Kousei Arima said:
I tried it, after setting to permissive when i reboot, it sets itself back to enforcing, i am on havoc os 2.2...
Edit : Selinux switch app fixes it..
Click to expand...
Click to collapse
Can you name that app or give the link for that app, because same happening with me also
Sent from my Mi A1 using Tapatalk

Shubham259 said:
Can you name that app or give the link for that app, because same happening with me also
Click to expand...
Click to collapse
Here:
https://www.google.com/amp/s/forum....d/apps-games/app-selinux-switch-t3656502/amp/
Just reboot after u change the SELinux status, open mi a1/a2 camera when permissive, portrait mode will work but will lag, change back to enforcing, reboot, now camera works fine

Kousei Arima said:
Here:
https://www.google.com/amp/s/forum....d/apps-games/app-selinux-switch-t3656502/amp/
Just reboot after u change the SELinux status, open mi a1/a2 camera when permissive, portrait mode will work but will lag, change back to enforcing, reboot, now camera works fine
Click to expand...
Click to collapse
Still the camera app is force stopping when I tap on Portrait

Shubham259 said:
Still the camera app is force stopping when I tap on Portrait
Click to expand...
Click to collapse
It won't stop, after changing the SELinux status, just check with the "getenforce" command line in terminal emulator, if it is actually changed.. try again

Shubham259 said:
Still the camera app is force stopping when I tap on Portrait
Click to expand...
Click to collapse
Remove any other camera mods and try again.

Is there any method to fix black and white photos taken with mi a2 camera

The camera just force closes right after i capture a photo in portrait mode

Related

Share Google Camera port (I have experienced) for Redmi 5 Plus

Hi everybody,
I have experienced a time of this google camera port and found it quite stable, no crash.
And I decided to share it with everyone
It runs fine on Lineages, Mokee, AOSP Rom and MIUI
Note: ** Your phone has root and activate camera2api.zip file here
Download Google Camera for Redmi 5 Plus (vince): HERE
and HERE
Not working on redmi5 plus with miui9 rom
Sent from my Redmi 5 Plus using Tapatalk
Has root your device and enable camera2api ?
Share Google Camera port (I have experienced) for Redmi 5 Plus with Pure Google Rom
Any recommendation for gcam apk without need for a root? Thanks.
IRoN MaN9 said:
Any recommendation for gcam apk without need for a root? Thanks.
Click to expand...
Click to collapse
In order to use the excellent Google Camera features ( HDR+ and etc.) you need to have Camera2 API Enabled, to do that you need root.
Otherwise you can just install some basic google camera with sub-optimal performance.
Does front camera HDR+ and portrait mode work?
I remember my Redmi 5 plus worked in portrait mode but no front cam HDR+
But now my phone is bricked, so I can't test it
ravemotion said:
Does front camera HDR+ and portrait mode work?
I remember my Redmi 5 plus worked in portrait mode but no front cam HDR+
But now my phone is bricked, so I can't test it
Click to expand...
Click to collapse
Noup, i tried every GCam apk under the sun. No luck.
I can live with that but main reason i keep my stock camera around is because the front flash doesn't work on GCam...
ravemotion said:
Does front camera HDR+ and portrait mode work?
I remember my Redmi 5 plus worked in portrait mode but no front cam HDR+
But now my phone is bricked, so I can't test it
Click to expand...
Click to collapse
yes, but you should turn off hdr mode in portrait mode
There are 2 versions here. If you use the first version, you will use the portrait mode normally. If you use the second version, during use you must turn off the hdr mode in portrait mode
I just checked it thoroughly. The first version is compatible with all roms. The second version is compatible with MIUI
I have no idea why, but Arnova V2 crashes a lot. I'm using latest EU stable rom.
grd549 said:
I have no idea why, but Arnova V2 crashes a lot. I'm using latest EU stable rom.
Click to expand...
Click to collapse
so you should using first file or reinstall camera. I used 2nd file with MIUI Global 9.2.6.0 no crash yet
stole38 said:
In order to use the excellent Google Camera features ( HDR+ and etc.) you need to have Camera2 API Enabled, to do that you need root.
Otherwise you can just install some basic google camera with sub-optimal performance.
Click to expand...
Click to collapse
Wrong. No root needed, just setprop hal3 = 1 in twrp adb shell Mode. Using gcam without root here, miui eu 9.5.4.0
blinking the camera2api.zip the camera stock is uninstalled? If not, how do I remove the camera stock?
Merces said:
Wrong. No root needed, just setprop hal3 = 1 in twrp adb shell Mode. Using gcam without root here, miui eu 9.5.4.0
Click to expand...
Click to collapse
You should mention me since the long time I just saw your comment. Already activated camera2 api without root and it's working but fortunately the portrait in front camera not working. I know it's common problem hope will fixed in future
Sent from my Redmi 5 Plus using Tapatalk
This is outdated and really old version,
Dead-Shot said:
New latest updated Gcam review
Click to expand...
Click to collapse
I've tried it with ROM pixel experience pie, it seems the front camera doesn't work
hapit84 said:
I've tried it with ROM pixel experience pie, it seems the front camera doesn't work
Click to expand...
Click to collapse
Same with me
7i7oVN said:
Hi everybody,
I have experienced a time of this google camera port and found it quite stable, no crash.
And I decided to share it with everyone
It runs fine on Lineages, Mokee, AOSP Rom and MIUI
Note: ** Your phone has root and activate camera2api.zip file here
Download Google Camera for Redmi 5 Plus (vince): HERE
and HERE
Click to expand...
Click to collapse
Hey brother the zip file link is not working
Can you please add a new link thanks
GCamera_Mod_v.5.1.23_R5Plus_fix_crash - I use it for Front Camera | Everything works, requires good config, flash works, no night-sight.
GoogleCamera_5.2.025-Final_fu24-18 - I use It for certain conditions not always so It's not recommended but It's ok to have it!!
MGC_6.1.021_BSG_Arnova-based_v.1.4a_TlnNeun - It's the best GCAM for Vince, Night Sight, HDR+ Enhanced, Portrait on People,
Requires Good Config, has 5 Libraries in order from Google to Xtreme!
Funciona na pixel experiência ?

[gcam]how to get front portrait

Here's how to get front portrait on Cedric :
•Download This https://drive.google.com/file/d/1skMGmQlHOn0pVXh5UD7AS6F6LIQNTF91/view?usp=drivesdk
•Everything has been done for you except front camera black level offset which needs to be set at 12.00 or 16.00
•Dont complain about bugs this is only for front portrait
•Please share your pics
•All credits go to the porter all I did was make the presets
•Use Hal3
•If you don't have hal3 enabled here is a module created by Robson Williams (Flash in twrp)
•Please join our telegram @cedricchat
Can't install. I'm getting this app isn't compatible with your device. I'm on stock 7.0 debloated and optimized, magisk 16 with hal3 module enabled. Gcam custom curve is working but no portrait mode.
Thanks!
gkornaks said:
Can't install. I'm getting this app isn't compatible with your device. I'm on stock 7.0 debloated and optimized, magisk 16 with hal3 module enabled. Gcam custom curve is working but no portrait mode.
Thanks!
Click to expand...
Click to collapse
U reminded me I should state its for Oreo
I have tried this and many other camera apks and nothing is working, all crashing at boot. I'm on the Pixel Experience Rom. I flashed Hal3 too (I tried MOTO Camera before flashing hal3 and it worked, but that doesn't work either)
Any ideas?
OMG ty
friend install the file by magisk but footej camera does not record me videos
infixremix said:
U reminded me I should state its for Oreo
Click to expand...
Click to collapse
I wanted to ask that I have 8.1 stock on Moto g5 Cedric so will this work and also can I download xposed installer from magisk and will it work?? Thank you btw for providing the download option.

Camera MOD [email protected] [email protected] SlowMotion

This zip for magisk. Install this zip with TWRP.
You can record [email protected] slow motion with google cam and [email protected] with stock camera.
But if you enable this mod you cant use portraid mode on stock camera if you want use portraid mode
you can deactive this mod at magisk modules
https://mega.nz/#!ENtVmYpI!zH-UBWKZhX036sXRvCQ9WxLlZa3FCR-8u9FzUA_aGRQ
quote from xiaomi.eu
-------------------------------------------------
Edit : Its works only MIUI 10
Does it work on systems like lineageos?
I don't know bro. I use MIUI 10 and it's working .and I see this only for MIUI 10 You can try if your phone will bootlop try magisk mod uninstall. İf you are not professional don't try
Any chance to see a new version without the portrait mode bug in near future?
Dragonfrog Gamer said:
Any chance to see a new version without the portrait mode bug in near future?
Click to expand...
Click to collapse
i changed my rom im using havoc os i dont know more, use google cam already gcam better than miui cam
MustanG_TR said:
i changed my rom im using havoc os i dont know more, use google cam already gcam better than miui cam
Click to expand...
Click to collapse
But does the Gcam support the second lens ? Or isn't it just blurring the background with software methods?
Dragonfrog Gamer said:
But does the Gcam support the second lens ? Or isn't it just blurring the background with software methods?
Click to expand...
Click to collapse
https://forum.xda-developers.com/mi-6/themes/app-gcam-6-5-miui-10-roundup-t3859007
You can use this version gcam it's support manuel focus and you can select tele or wide cam

Google Camera Port with HDR+ (arm64)

Due to the new arm64 Roms i decided to find the best gcam port that would work for the g5s, so i found it.
GCam Port v1 [8.0-9.0] - [Download]
GCam Port v2 [Better Low Light & Stability] [New] - [Download]
It needs camera2api enabled. Add this to /system/build.prop:
Code:
persist.camera.HAL3.enabled=1
(Optional) To prevent certain applications from using camera2api, add this line to /system/build.prop:
Code:
camera.hal1.packagelist=org.lineageos.snap,com.motorola.cameraone,com.whatsapp,com.instagram.android
For GCam Port v1 you need some application settings to prevent camera crashes:
Go to Gcam Settings > Advanced Settings > Model and select "Nexus 6P"
Go to Gcam Settings > Advanced Settings > Config camera HDR+ and select "Pixel 2017 Zsl Hdr+(new)"
V1 issues:
Some modes do not work
Crash when processing photos taken in sequence with hdr+ enabled
Random Bugs
V2 issues:
Some modes do not work
Video recording broken
HDR+ on portrait mode not work
Random Bugs
Credits to:
@Arnova8G2
How to configure if the app keeps crashing?
Edit: I had to install Pix3lify to get it working even after enabling camera2api.
JarlPenguin said:
How to configure if the app keeps crashing?
Edit: I had to install Pix3lify to get it working even after enabling camera2api.
Click to expand...
Click to collapse
The camera has to be opened only after putting the "persist.camera.HAL3.enabled" in the build.prop and restart the device, because it will crash for not detecting the camera2api
samuelrafo said:
The camera has to be opened only after putting the "persist.camera.HAL3.enabled" in the build.prop and restart the device, because it will crash for not detecting the camera2api
Click to expand...
Click to collapse
I did put it and restart, but I don't think the file saved properly. So I installed Pix3lify and it works now. Also if you install Pix3lify instead of editing the build.prop
---------- Post added at 02:34 PM ---------- Previous post was at 02:33 PM ----------
samuelrafo said:
The camera has to be opened only after putting the "persist.camera.HAL3.enabled" in the build.prop and restart the device, because it will crash for not detecting the camera2api
Click to expand...
Click to collapse
I did put it and restart, but I don't think the file saved properly. So I installed Pix3lify and it works now. Also if you install Pix3lify instead of editing the build.prop you will have to install a GCam mod with the same package name as the original Google camera app.
Update: New Experimental GCam
I have download this apk on Android 9 : https://f.celsoazevedo.com/file/gcamera/MGC_6.1.021_MI8_V2e.apk
Night mode , portrait mode , superres zoom ans HDR + work perfectly?. But selfie camera and video recording not working?. Can you create a version for moto g5s ??
Arn'oh said:
I have download this apk on Android 9 : https://f.celsoazevedo.com/file/gcamera/MGC_6.1.021_MI8_V2e.apk
Night mode , portrait mode , superres zoom ans HDR + work perfectly?. But selfie camera and video recording not working?. Can you create a version for moto g5s ??
Click to expand...
Click to collapse
Above version in post one is working at g5s with selfie camera too
zahidm said:
Above version in post one is working at g5s with selfie camera too
Click to expand...
Click to collapse
Those are 5.1 ports though. He was talking about a 6.1 port.
JarlPenguin said:
Those are 5.1 ports though. He was talking about a 6.1 port.
Click to expand...
Click to collapse
Yes 6.1 port won't work at selfie Videos and also rear videos in moto g5s, You are right
It's not possible tout create apk of gcam for Android 9 with selfie and vidéo recording ?
Arn'oh said:
It's not possible tout create apk of gcam for Android 9 with selfie and vidéo recording ?
Click to expand...
Click to collapse
To*
Front flash works?
miguegallardo13 said:
Front flash works?
Click to expand...
Click to collapse
No
CamerA2api not enabled after adding this line
persist.camera.HAL3.enabled=1
deepanshu45 said:
CamerA2api not enabled after adding this line
persist.camera.HAL3.enabled=1
Click to expand...
Click to collapse
Which ROM ?
deepanshu45 said:
CamerA2api not enabled after adding this line
persist.camera.HAL3.enabled=1
Click to expand...
Click to collapse
Install cemera api 2 enabler in play store ?
Stock oreo 8.1
deepanshu45 said:
Stock oreo 8.1
Click to expand...
Click to collapse
Edit' comments deleted
zahidm said:
Yes your Bootloader is Locked and now there is only one way, to restore via 9008 mode
Click to expand...
Click to collapse
How
deepanshu45 said:
How
Click to expand...
Click to collapse
It's a wrong Tread comments ignore it, Thanks

Camera STOCK for custom ROM (Portrait mode work)

Friends we can finally use dual camera in any custom rom.
Install using Magisk.
If it does not work at the first attempt it is recommended to return to the stock rom and then install the custom rom.
That way everything will work without problem.
Venezolano desde Argentina.
Hmmm... Portrait mode on rear camera not working... It fc app.. Aosip
Works
I am on RR
adag1 said:
Hmmm... Portrait mode on rear camera not working... It fc app.. Aosip
Click to expand...
Click to collapse
Work on PE and EvolutionX
Portrait mode no work in RR
Force Close
leechgid said:
Portrait mode no work in RR
Force Close
Click to expand...
Click to collapse
Strange. I am on the latest build, with DragonHeart Kernel. All seems to work fine.
Portrait mode no work in Bootleggers 4.2
Force Close
Does this cam crashes frequently? I know cameras have been always the most difficult part o custom roms, I am still on stock only for the camera, other roms I tried (with a mi a1, to be honest) crashed when I need to take a quick picture... Also tried the GCam, it has better quality but it was worse at the end, it broke the whatsapp camera taking green pictures and random crashes were common. I would really like to install RR or any other rom, but the camera is dragging me back.
I wish there would be a debloated stock rom (no GAPS and the few xiaomi extras) just for keeping the camera working normally, but noone has done it (and I am far for been able to )
DARKEASC said:
Does this cam crashes frequently? I know cameras have been always the most difficult part o custom roms, I am still on stock only for the camera, other roms I tried (with a mi a1, to be honest) crashed when I need to take a quick picture... Also tried the GCam, it has better quality but it was worse at the end, it broke the whatsapp camera taking green pictures and random crashes were common. I would really like to install RR or any other rom, but the camera is dragging me back.
I wish there would be a debloated stock rom (no GAPS and the few xiaomi extras) just for keeping the camera working normally, but noone has done it (and I am far for been able to )
Click to expand...
Click to collapse
I get green tinted photos when I zoom in this camera app. Otherwise, I encounter no crashes or other problems.
Fix for the color bug:
Set the HDR mode to "live".
Portrait Mode is absent on AOSiP ROM
Portrait mode does not work on back camera.
Front camera has color bug. But, if hdr turn on or in portrait mode it works fine.
On superior OS
I got bootloop after flash this module in magisk 19.4 on (AEX) AOSP Extended v6.7 Is working only on LineageOS based roms?
lars00 said:
I got bootloop after flash this module in magisk 19.4 on (AEX) AOSP Extended v6.7 Is working only on LineageOS based roms?
Click to expand...
Click to collapse
Miui camera works with almost every custom rom : Superior , crdroid , POSP , RR (I've tested on them )
Portrait mode crashing with back camera is fixable , you'll need some file explorer with root permissions . The problem is with vendor mismatch , and you'll need to make some changes , here is the walkthrough:
How to solve vendor mismatch bug:
Find string ro.vendor.build.fingerprint in the file /vendor/build.prop, copy the value from it and replace this value to ro.build.fingerprint in the file /system/build.prop ,reboot and portrait mode has to be working , it works for me all the time
Unfortunately I don't know where is the problem. After install this module and restart device, then stuck on AEX boot animation. After uninstall module in Magisk Mnanager 4 Recovery boots again normally For me also not working MI A2 camera port in generic Magisk modules, respectively not all functions, no live image filters, crashing etc. Can't it cause the custom Vendor of AEX rom?
Base lineageos.snap camera and GCam 6.2.030 works fine. I use both of them, it is not the conflict in there?
Thank you for your tips...
lars00 said:
Unfortunately I don't know where is the problem. After install this module and restart device, then stuck on AEX boot animation. After uninstall module in Magisk Mnanager 4 Recovery boots again normally For me also not working MI A2 camera port in generic Magisk modules, respectively not all functions, no live image filters, crashing etc. Can't it cause the custom Vendor of AEX rom?
Base lineageos.snap camera and GCam 6.2.030 works fine. I use both of them, it is not the conflict in there?
Thank you for your tips...
Click to expand...
Click to collapse
Try using this magisk module:
https://drive.google.com/file/d/1po2DDLUifIEJe_zMJvpVXuWch8jffZzw/view?usp=drivesdk
This is stock Daisy camera ,uninstall miui camera from magisk ,then install this zip,reboot and try again
nikoman1987 said:
Try using this magisk module:
.......
This is stock Daisy camera ,uninstall miui camera from magisk ,then install this zip,reboot and try again
Click to expand...
Click to collapse
This link doesn't contain any magisk zip module, this is nova launcher backup file(?). I'm using Lawnchair on Aex.
I have all Magisk modules unistalled before flash MiuiCamera.zip of course, but stuck on AEX screen persist.
I have tried more versions of miui camera, but no satisfying success.
nikoman1987 said:
Try using this magisk module:
https://drive.google.com/file/d/1aSX4odE5fAqtl4ImEwRrDxdkWuABbX_J/view?usp=drivesdk
This is stock Daisy camera ,uninstall miui camera from magisk ,then install this zip,reboot and try again
Click to expand...
Click to collapse
wrong link bro
lars00 said:
This link doesn't contain any magisk zip module, this is nova launcher backup file(?). I'm using Lawnchair on Aex.
I have all Magisk modules unistalled before flash MiuiCamera.zip of course, but stuck on AEX screen persist.
I have tried more versions of miui camera, but no satisfying success.
Click to expand...
Click to collapse
Sorry , copied the wrong link , the link is fixed now
can this work on 10 GSI maybe? i would rather not bootloop

Categories

Resources