Camera2api module not compatible with GSI ROMs - Xiaomi Mi A2 Lite Questions & Answers

Hello everyone, I have perhaps the biggest doubt. Why can i easily install the Gcam in the Stock version of the firmware by enabling the module; but if I install a GSI Rom and try to enable the module, does the default camera stop working? And even the possible Gcam to install does not work. Someone could tell me why? Truly I would be infinitely grateful!:fingers-crossed::fingers-crossed:

There are a couple of apps on google store that you can use to check if camera2 API is available/enabled on your phone, testing with gcam is questionable. I use ArrowOS and camera2 API is fully implemented. Try for example OpenCamera which definitely does camera2. Or FreeDcam on github.

celrau said:
There are a couple of apps on google store that you can use to check if camera2 API is available/enabled on your phone, testing with gcam is questionable. I use ArrowOS and camera2 API is fully implemented. Try for example OpenCamera which definitely does camera2. Or FreeDcam on github.
Click to expand...
Click to collapse
Thanks for your reply celrau, after installing the module, i checked if it was enabled with for example "manual camera compatibily test", and each string was enabled. but as i said, stock cam not work more, and neither any gcam. So i don't understand why. Have u ArrowOS in mi a2 lite mate?

YouKnowAirborne said:
Thanks for your reply celrau, after installing the module, i checked if it was enabled with for example "manual camera compatibily test", and each string was enabled. but as i said, stock cam not work more, and neither any gcam. So i don't understand why. Have u ArrowOS in mi a2 lite mate?
Click to expand...
Click to collapse
Yeah, MiA2 lite with ArrowOS. Most likely gcam not running has nothing to do with camera2, maybe it needs some libraries specific to stock or something. See if you can find some magisk module with gcam, maybe it helps.

celrau said:
Yeah, MiA2 lite with ArrowOS. Most likely gcam not running has nothing to do with camera2, maybe it needs some libraries specific to stock or something. See if you can find some magisk module with gcam, maybe it helps.
Click to expand...
Click to collapse
compatible modules unfortunately I have not found, maybe there will be something that does not go with the libraries as you say. But unfortunately about this, I understand little and nothing. unless someone tells me directly what I have to implement

Try searching miui 10 camera 2api, it has a full set of libs , but also has media files for ringtone ,user interface, maybe download and remove the media folder or replace the .oggs with your stock ones then magisk flash it

boe323 said:
Try searching miui 10 camera 2api, it has a full set of libs , but also has media files for ringtone ,user interface, maybe download and remove the media folder or replace the .oggs with your stock ones then magisk flash it
Click to expand...
Click to collapse
Thanks mate, i'll try it!

You can try editing your build.prop and add this line with the name of the app that you want to use the old API:
camera.hal1.packagelist=INSERT_YOUR_APP_PACKAGE_NAME HERE
ie.:
camera.hal1.packagelist=com.android.camera
I'm using the stock ROM now but I've used that method before on my old REDMI 4 PRIME Ressurection Remix ROM for some apps that wouldn't work with CAMERA2API.
EDITED TO ADD: You can also use the same ADB method to change the properties (root needed):
ie.:
adb shell
su
setprop camera.hal1.packagelist com.google.camera,com.skype.raider
Hope that helps!

BJumperBR said:
You can try editing your build.prop and add this line with the name of the app that you want to use the old API:
camera.hal1.packagelist=INSERT_YOUR_APP_PACKAGE_NAME HERE
ie.:
camera.hal1.packagelist=com.android.camera
I'm using the stock ROM now but I've used that method before on my old REDMI 4 PRIME Ressurection Remix ROM for some apps that wouldn't work with CAMERA2API.
EDITED TO ADD: You can also use the same ADB method to change the properties (root needed):
ie.:
adb shell
su
setprop camera.hal1.packagelist com.google.camera,com.skype.raider
Hope that helps!
Click to expand...
Click to collapse
Thanks a lot mate, i'll try this solution too!!

Related

Enable camera 2 API on Moto g4 plus??

Rooted device is required
1) open build prop editor.
2) type persist.camera.HAL3.enabled=1
3) save and reboot.
4) it's done now you can use full professional mode on Moto g4 plus.
Try AZ camera manual premium app for best result better than manual camera app.
Download link
http://www59.zippyshare.com/v/dfvcgii1/file.html
Camera 2 probe check camera 2 api hal and support
That allows you to do this?
Yes this tweak is working
And what is this tweak for?
Persist.camera.HAL3.enabled=1 enables camera2 api functionality.
Aby lad said:
Persist.camera.HAL3.enabled=1 enables camera2 api functionality.
Click to expand...
Click to collapse
I have done the way you have stated but it isn't working please help.. Please
Soham Biswas said:
I have done the way you have stated but it isn't working please help.. Please
Click to expand...
Click to collapse
Am really sorry for one wrong screen shot. Please forgive me ..1st screen shot is right but 2nd screen shot was uploaded by mistake am extremely sorry.. Please forgive me .. Please.
Check again, if you write HAL in small letter it wouldn't work camera2api is implemented but not enabled by default.
Thank you. I was looking for this.
Edit: isn't working here. I am on Invicta OS 4.2 Android 7.1.2, @Aby lad are you on stock rom?
I tried with the AZ camera but it's crashing when i try to open the app, i tried with Open Camera (API 2 support) and it automaticly hangs.
Please provide more info about in which ROM this tweak is working.
Aby lad said:
Check again if you write HAL in small letter it wouldn't work camera2api is implemented but not enabled .
Click to expand...
Click to collapse
I actually copy pasted the command you had mentioned..so the HAL was in capital letters only.. Any solution.? And im.on RR 5.8.3
I am using stock rom az camera it hangs when i capture raw image approx 30mb size. Try manual or proshot camera if they works.
moonlightdrive said:
Thank you. I was looking for this.
Edit: isn't working here. I am on Invicta OS 4.2 Android 7.1.2, @Aby lad are you on stock rom?
I tried with the AZ camera but it's crashing when i try to open the app, i tried with Open Camera (API 2 support) and it automaticly hangs.
Please provide more info about in which ROM this tweak is working.
Click to expand...
Click to collapse
Is camera fv 5 is working
Aby lad said:
Is camera fv 5 is working
Click to expand...
Click to collapse
I ended installing last stock firmware, works perfectly here. By the way very nice camera (AZ).
Thanks.:good:
Didn't work for me too. I'm on RR 5.8.3 latest build
Kickass1415 said:
Didn't work for me too. I'm on RR 5.8.3 latest build
Click to expand...
Click to collapse
On custom rom there is problem with camera2 api
so how can I enable the camera 2 API on the latest version of Cosmic OS which I currently have installed on my phone? Should I flash the Motocamera zip to enable those libs? I'm a completely inexperienced person in understanding these things. So, please don't mind if I have said something wrong.
can anyone open captured RAW image? I'm on stock rooted nougat november security patch and after taking photo with AZ camera, I cannot open the 30mb file not in the phone and not in picasa, photoshop...
​
Tirthyawarmachine said:
so how can I enable the camera 2 API on the latest version of Cosmic OS which I currently have installed on my phone? Should I flash the Motocamera zip to enable those libs? I'm a completely inexperienced person in understanding these things. So, please don't mind if I have said something wrong.
Click to expand...
Click to collapse
Replace camera2 libs from system >vendor of cosmic os from stock nougat
Flashing Motocamera zip will allow to use Moto camera app on custom rom.
Thank you so much for helping out. Will surely look into the matter.
Aby lad said:
​Change all camera libs from system >vendor of cosmic os from stock nougat
And moto camera can work on camera 1 api
Click to expand...
Click to collapse
As per your directions I tried to replace the libs, but failed to do so. I flashed the motocamera zip file which the devs have provided specifically for custom roms. Will that do?

Which Google Camera port should I use?

I have level 3 hardware support for camera2.
The problem is, the apk in the guide seems like an old version, but there are about 100 different APKs here
https://www.celsoazevedo.com/files/android/google-camera/dev-arnova8G2/#apk411
Which one should I use? Would be nice to know what to look for for future updates too
Thanks
Id like to know as well, the sheer amount of links on the GCam page is really confusing.
I'm using the MiMax version which works well but sadly the portrait mode doesn't and you need to turn off HDR+ to get the fron cam working
Try the cstark27 one of the best fit this device, front facing camera is about the only thing not working but don't do selfies so I am ok with that
Hass31's port was made for Daisy and is the most functional port available at the moment.
Hakkinan said:
Hass31's port was made for Daisy and is the most functional port available at the moment.
Click to expand...
Click to collapse
Yes but it is version 5 and has no night sight mode
Yet it still is the most functional one, lacking a gimmick feature that doesn't even work that well on this device isn't a huge deal.
Hi! I've update my MiA2Lite to Android 9 but now I don't find right version of GCam.. I tried many apk but everyone crashed when I start camera
IO13 said:
Hi! I've update my MiA2Lite to Android 9 but now I don't find right version of GCam.. I tried many apk but everyone crashed when I start camera
Click to expand...
Click to collapse
you must unlock bootloader and enable camera2api or simpy root with magisk and install "camera2api enabler" module from the download section!!
Hakkinan said:
Yet it still is the most functional one, lacking a gimmick feature that doesn't even work that well on this device isn't a huge deal.
Click to expand...
Click to collapse
Is that still the case after the Pie update?
I'm getting weird green artifacting sometimes
Now in pie i use arthur's latest version.
Everything is working and 5.3.15
There is no cera2api enabler in magisk download page. May be they removed it or what should i do to enable camera2 api?
mms047 said:
There is no cera2api enabler in magisk download page. May be they removed it or what should i do to enable camera2 api?
Click to expand...
Click to collapse
After you've installed magisk
Download Root browser from play store
Open the Root browser
Go to the folder named "system" and open it
Scroll down to build.prop and click on it, open with Root browser text editor.
Scroll to the last line after the empty row press enter to start another row
Type 'persist.camera.HAL3.enabled=1' without the quotations.
Press enter to move to another empty row
Them, press back and save changes
Now reboot your phone, you're good to go
Download pixelfy something like that

Anyone got ARCore working on this phone?

As we already know our phone doesn't support ARCore but there's a way to enable it on unsupported phones here: https://www.celsoazevedo.com/files/android/google-camera/ar/
Even tho I did what it said there I couldn't get it to work and every time I open an AR App or I try to open the Playground the app crashes. Did anyone manage to get this work on our device? If yes how?
Might work on custom ROMs but I'm interested in the stock PIE ROM.
Thanks!
Have the same problem. Did everything they said on the site. AR+ option enabled on pokemon go, but whenever I tried to use it, the screen went dark and crashes.
Would be nice if someone says that is able to use arcore right now in this phone. I wonder if it got patched
I know you said that you're interested in stock ROM, but that's the thread that pops up when people google anything related to ARCore and Mi A2 Lite, so I'm here to let everybody know that I got ARCore working on this phone using custom ROM called Pixel Experience. Every AR app I tried works except for Playgound. You can find it here on xda-developers. I couldn't reproduce these effects on stock ROM.
arcore enabler on magisk and voilá! (i recommend use the 1.5v zip file, the 1.6v crashes safety net!)
It doesn't work. Every time i open Playground app or any other AR app it crashes.
I did everything - Magisk+ arcoreenabler(both version 1.5 and 1.6) and installing Arcore and Playground app.
I'm on Pie stock.
Any help?
+1
I'm also trying to get ARCore working on my A2 Lite but still nothing... I want to install the Measure app, which needs ARCore, but every time I try to open, it crashes. Has anyone found a solution?
For a while I was able to run ARcore following these institutions, but at the time my device was on Android 8 but now after I have upgraded to Android 9 it doesn't work at all.
antonioaz23 said:
I'm also trying to get ARCore working on my A2 Lite but still nothing... I want to install the Measure app, which needs ARCore, but every time I try to open, it crashes. Has anyone found a solution?
Click to expand...
Click to collapse
Have you flashed via magisk the ArCore fix?
nikoman1987 said:
Have you flashed via magisk the ArCore fix?
Click to expand...
Click to collapse
Yes, I already tried that
antonioaz23 said:
Yes, I already tried that
Click to expand...
Click to collapse
Right now I'm using an GSI version of android 10 for our device and all AR apps including gcam playground are working fine(maybe a little bit laggy in playground camera, but maybe it depends on which version of gcam you are using) Maybe these days if i have some free time ,i'll reflash stock rom and look for a solution
nikoman1987 said:
Right now I'm using an GSI version of android 10 for our device and all AR apps including gcam playground are working fine(maybe a little bit laggy in playground camera, but maybe it depends on which version of gcam you are using) Maybe these days if i have some free time ,i'll reflash stock rom and look for a solution
Click to expand...
Click to collapse
I can confirm it
ax333l said:
I know you said that you're interested in stock ROM, but that's the thread that pops up when people google anything related to ARCore and Mi A2 Lite, so I'm here to let everybody know that I got ARCore working on this phone using custom ROM called Pixel Experience. Every AR app I tried works except for Playgound. You can find it here on xda-developers. I couldn't reproduce these effects on stock ROM.
Click to expand...
Click to collapse
I installed the pixel experience rom but it still didn't work.
Guys, I made it work at june 19. I forgot to share here. Everything relationed to ARcore was working, even playground. My response is in this thread for whoever got the same issue:
https://forum.xda-developers.com/mi-a2/help/arcore-support-mi-a2-t3900879
Hey there, I remember I had got ARCore working A2 Lite. After flashing the module through Magisk, you need to install the ARCore app from PlayStore from here : https://play.google.com/store/apps/details?id=com.google.ar.core
It should work afterwards, but Pokemon might not work, as they check for rooted/unlocked devices to prevent cheating.
marstonpear said:
Hey there, I remember I had got ARCore working A2 Lite. After flashing the module through Magisk, you need to install the ARCore app from PlayStore from here : https://play.google.com/store/apps/details?id=com.google.ar.core
It should work afterwards, but Pokemon might not work, as they check for rooted/unlocked devices to prevent cheating.
Click to expand...
Click to collapse
You just have to go to "magisk hide" inside magisk app and add pokemon go in there
Arcore is working!!!!!!!!
SnoopDoggyStyleDogg said:
As we already know our phone doesn't support ARCore but there's a way to enable it on unsupported phones here: https://www.celsoazevedo.com/files/android/google-camera/ar/
Even tho I did what it said there I couldn't get it to work and every time I open an AR App or I try to open the Playground the app crashes. Did anyone manage to get this work on our device? If yes how?
Might work on custom ROMs but I'm interested in the stock PIE ROM.
Thanks!
Click to expand...
Click to collapse
I installed ARCore on my mi a2 lite on my stock rom! Reply if you want to know how.
2 Konnie said:
I installed ARCore on my mi a2 lite on my stock rom! Reply if you want to know how.
Click to expand...
Click to collapse
"Reply if you want to know how." How?
Explaination
Fast Eagle said:
"Reply if you want to know how." How?
Click to expand...
Click to collapse
Ok, I'll explain it to you very simple. Tell me if you don't understand me or if you want an explaination with detail.
(Continue at your own risk. I don't have any responsibility for bricked devices in case you don't know what you are doing!!!)
1: Downgrate your android device to the latest version of android oreo(8.1.0).
2: Root your android.
3: Install Magisk Manager.
4: Download and install the magisk module "ArCore/Playground Patcher".
5: Use a terminal emulator to enable camera2 api.
6: Install google camera port for mi a2 lite (or mi a2 if your device is a mi a2).
Done! Now you can play any ar game or install ArStickers for Google Camera(Ar Stickers is an older version of Playground for android 8)
Warning: Google Camera may crash when you are in Video mode or Photo mode but everything else works (including ArStickers)
Also let me know if it worked.

[HOW TO] Enable Camera2API and install GCam

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:
Batpope said:
For Pie you need the following settings in order to enable Camera2API correctly:
persist.vendor.camera.HAL3.enabled=1
persist.camera.HAL3.enabled=1
persist.camera.eis.enable=1
Click to expand...
Click to collapse
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.
Hi! I did these steps into the build.prop but Camera API shows me the support level "LEVEL_3" in red
I have downloaded the apk from this link: https://www.celsoazevedo.com/files/android/google-camera/f/changelog380/ and not work.
pls help
hi dear pls help
the front camera doesn't work.
camera2 open
please take a video.how do I do it?
ugurmutlu21 said:
hi dear pls help
the front camera doesn't work.
camera2 open
please take a video.how do I do it?
Click to expand...
Click to collapse
Read this:
https://forum.xda-developers.com/showpost.php?p=79237524&postcount=2
Import config:
https://www.celsoazevedo.com/files/android/google-camera/f/settings09/
kennethstarr said:
Read this:
https://forum.xda-developers.com/showpost.php?p=79237524&postcount=2
Import config:
https://www.celsoazevedo.com/files/android/google-camera/f/settings09/
Click to expand...
Click to collapse
I've uploaded the files.
he front camera doesn't work.
For Pie you need the following settings in order to enable Camera2API correctly:
persist.vendor.camera.HAL3.enabled=1
persist.camera.HAL3.enabled=1
persist.camera.eis.enable=1
The front camera fix works like a charm, thanks!
front camera does not work
no work
ugurmutlu21 said:
no work
Click to expand...
Click to collapse
You need to download the libmmcamera_platina_imx576_sunny.so file posted above. Once you overwrite it, change the permissions and it should work.
Remember, after this fix the front camera won't work with the stock camera app, but it will work on all other apps, including gcam
Batpope said:
You need to download the libmmcamera_platina_imx576_sunny.so file posted above. Once you overwrite it, change the permissions and it should work.
Remember, after this fix the front camera won't work with the stock camera app, but it will work on all other apps, including gcam
Click to expand...
Click to collapse
yeah, I did, but no, it's not working.
vagoybostero said:
Hi! I did these steps into the build.prop but Camera API shows me the support level "LEVEL_3" in red
Click to expand...
Click to collapse
Make sure you have edited the build.prop correctly.
I thought the API would be enable in the latest update to Pie. Or they will enable it in the next miui update?
Thank alot..
It worked for MI8 Lite Havoc-OS-v2.4..:good:
Hoping for getting a official update ?
Hello I have enable camera2api and installed gcam but my front camera doesn't work
my file explorer doesn't let me to paste and replace the fix file into root /vendor/lib i try to do it with other file explorer but i have the same problem.
Replacing the libs broke the instragam front cam.... Any solution?
Sometimes Gcam stops taking photos and i need to reboot the phone. It is normal? Any fix? I use latest Pixel Experience rom.
Do you have the same problem using Gcam in Miui?
GuGor said:
Sometimes Gcam stops taking photos and i need to reboot the phone. It is normal? Any fix? I use latest Pixel Experience rom.
Do you have the same problem using Gcam in Miui?
Click to expand...
Click to collapse
I am on pixel experience too. I have noticed that the camera doesnt take pictures not only on gcam, but on every app that uses the camera. I have tried both caf and aosp versions of PE and i had this issue
How much better is quality of the photos from GCam over stock MIUI camera on this phone? Is it worth doing and loosing front camera in stock app (and have it just as 6 Mpx in other apps) over using just stock camera?
lapist said:
How much better is quality of the photos from GCam over stock MIUI camera on this phone? Is it worth doing and loosing front camera in stock app (and have it just as 6 Mpx in other apps) over using just stock camera?
Click to expand...
Click to collapse
Honestly, I did not see that difference, so, no, definitely not worth it.

Modded Stock(miui) Camera for Stock and Custom Roms

Hi. recently I'm ported (and modded) Stock rom's camara app for custom roms and stock Q rom
Manuel shutter speed (32s)
4K Enabled
AI Mode
Installation:
Open Magisk manager
go "modules"
tap "+" icon
Select Zip file
Reboot
Info: Sometimes you need to give app permisions manually
another info: If you get "USB "USB storage is running out of space" error, Try GSI version
Download Here
Changelog
* Added meizu 16th support (I'm not kidding)
* Fixed manual opitons
* Fixed portraid mode on some roms
* Added more bugs to fix later
Camera2API
If you want to enable Camera2API. Use This module
Source
Thanks. I cant install it on Stock Q (v11.0.4 Non-Rooted)
Is it possible to add HEVC video recording and HEIF image capture?
No matter what I do it just says "USB storage is running out of space" any ideas how to fix it? I'm using newest POSP with Chunchunmaru rc4
perfect_ said:
Thanks. I cant install it on Stock Q (v11.0.4 Non-Rooted)
Is it possible to add HEVC video recording and HEIF image capture?
Click to expand...
Click to collapse
You don't know read, is a magisk module, need root to have magisk lol, wth with people
Divolka said:
No matter what I do it just says "USB storage is running out of space" any ideas how to fix it? I'm using newest POSP with Chunchunmaru rc4
Click to expand...
Click to collapse
I am sorry for my late answer. I am not very active in xda. try GSI verison some users reported GSI version works better on some roms
perfect_ said:
Thanks. I cant install it on Stock Q (v11.0.4 Non-Rooted)
Is it possible to add HEVC video recording and HEIF image capture?
Click to expand...
Click to collapse
you can't install on stock rom without root (due to app signature).
TheDoop said:
you can't install on stock rom without root (due to app signature).
Click to expand...
Click to collapse
Is it possible to add HEVC video recording and HEIF image capture?
Bootlooping in AEX
Cam2Api enabled.
@TheDoop Thanks for your work. I have flashed on my A2Lite (BlissOS Android 10 Rom). Pictures taking but not saving on storage, nor visible in gallery. Any solution?
ammaralidj said:
@TheDoop Thanks for your work. I have flashed on my A2Lite (BlissOS Android 10 Rom). Pictures taking but not saving on storage, nor visible in gallery. Any solution?
Click to expand...
Click to collapse
try GSI version. works better for now.
How to replace stock camera
Not Working on Miui 12 port in Mi a2 Lite.
Not installing over the stock camera.
How to replace stock camera with this version.
shak33l said:
Not Working on Miui 12 port in Mi a2 Lite.
Not installing over the stock camera.
How to replace stock camera with this version.
Click to expand...
Click to collapse
This is for AOSP Q based roms. Not for MIUI.

Categories

Resources