[Guide][Camera][SD]How to enable Camera2 API

Search This thread

nevelaev

Member
Nov 14, 2008
34
66
Hello guys) How to enable Camera2 API?) Custom ROMs (MIUI, CM, etc)
1) Root!
2) Open build.prop, make string 'persist.camera.HAL3.enabled=1' , save, reboot.
3) Check manual features by Manual Camera Compability utility.
4) Install FV-5, Manual Camera etc and enjoy by manual exposure,focus etc)
It's working on my xiaomi.eu latest MIUI7 and Mookee ROMs)
p.s. I have Snapdragon version, pls test on the MTK who have this devices.
Thanx to Nevio (4pda.ru) )))
BUG! Stock camera in MIUI7 crashed with this feature. MIUI8 is normal.
 
Last edited:

nevelaev

Member
Nov 14, 2008
34
66
SD working. Try if you have MTK version. If this hint will work - I will change head of topic to both versions)
 
Last edited:
  • Like
Reactions: jordandroid64

nevelaev

Member
Nov 14, 2008
34
66
BUG found

BUG found - stock MIUI7 camera will not work with this ftr. Mi8 is normal)
 
Last edited:

Furieuxariel

Member
May 4, 2011
24
7
tested with official RR, working camera fv-5, now will try freedcam and manual camera

edit: tested other 2 apps, all working, very happy, to take all the juice from the camera
 
Last edited:
  • Like
Reactions: macac

mura20

Senior Member
Dec 17, 2012
504
91
I enabled camera 2 api and I am experiencing a crazy battery drain with mokee ROM. Is it normal? The battery drops 10 % in a matter of 10min and the phone gets really hot
 

Cresqo

Senior Member
Mar 18, 2012
211
128
How many of the manual settings stated in the manual camera compatibility app are supported after enabling camera2 api?
 

Try it or die

Senior Member
May 17, 2013
827
552
How many of the manual settings stated in the manual camera compatibility app are supported after enabling camera2 api?

But RAW pictures are buggy on our phone, atleast on my phone

Edit: I had 3 reboots within a short time while opening camera apps since I've edited the build.prop. I'm on official RR, but the camera2 features are working fine (except raw), thanks for sharing!
 

Attachments

  • 1468747394407.jpg
    1468747394407.jpg
    38.3 KB · Views: 4,456
Last edited:

Try it or die

Senior Member
May 17, 2013
827
552
How to know its working? And which camera app to use after editing the build prop?

Camera fv-5, snap cam (from play store), open camera and a lot others, they have to support camera2 api. On some camera apps you have to enable it manually in the settings. Then you can control shutter speed and some other things. I've attached also a picture, on the left side the shutter speed is short and on the right side the shutter speed is a lot longer. So for "normal" pictures you won't need manual controls, but in some cases it can be useful.
 

Attachments

  • 1468772004940.jpg
    1468772004940.jpg
    162.1 KB · Views: 5,060

Sumit Samanta

Senior Member
Jul 9, 2014
745
122
28
Xiaomi Poco F3
Camera fv-5, snap cam (from play store), open camera and a lot others, they have to support camera2 api. On some camera apps you have to enable it manually in the settings. Then you can control shutter speed and some other things. I've attached also a picture, on the left side the shutter speed is short and on the right side the shutter speed is a lot longer. So for "normal" pictures you won't need manual controls, but in some cases it can be useful.
Can u plz show the ss of build prop after the edit? And the settings in any camera app?
 

pravakarthami

Senior Member
Oct 16, 2012
115
38
Darjeeling
Thanks for the guide.....this has solve the problem of reboot while using third party camera apps......google camera is also working without any problem
 

nevelaev

Member
Nov 14, 2008
34
66
Hmm I am using Snap Camera with camera2 API. Best thing) But it's need to activate camera2 in the Snap Camera settings (menu--"other"tab--go down and check Camera2 API string). Nice manual focus and manual settings in the HDR mode) Snap camera may a RAW format. There opens in built-in viewer and (who installed) can be pen into Snapseed editor.
Example of the photo in HDR mode with manual settings) Sorry for my curved hands and academical English)))
BN45nzzz8pg.jpg

My curved hands cannot make good man ual photos yet)) Who knows Russian - you can check 4pda.ru forum--Redmi Note 3 Pro Camera branch. http://4pda.ru/forum/index.php?showtopic=750102&st=860 Many people tested this hint and VEEEEERY pleasured)))
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 57
    Hello guys) How to enable Camera2 API?) Custom ROMs (MIUI, CM, etc)
    1) Root!
    2) Open build.prop, make string 'persist.camera.HAL3.enabled=1' , save, reboot.
    3) Check manual features by Manual Camera Compability utility.
    4) Install FV-5, Manual Camera etc and enjoy by manual exposure,focus etc)
    It's working on my xiaomi.eu latest MIUI7 and Mookee ROMs)
    p.s. I have Snapdragon version, pls test on the MTK who have this devices.
    Thanx to Nevio (4pda.ru) )))
    BUG! Stock camera in MIUI7 crashed with this feature. MIUI8 is normal.
    9
    How to know its working? And which camera app to use after editing the build prop?

    Camera fv-5, snap cam (from play store), open camera and a lot others, they have to support camera2 api. On some camera apps you have to enable it manually in the settings. Then you can control shutter speed and some other things. I've attached also a picture, on the left side the shutter speed is short and on the right side the shutter speed is a lot longer. So for "normal" pictures you won't need manual controls, but in some cases it can be useful.
    7
    100% Working on my Redmi Note 3 Snapdragon
    ROM : RN3 SD Special Edition MIUI7 Ported
    Android Version : 6.0.1 Marshmallow
    TWRP : Alka
    Bootloader : Unofficial Unlock

    Steps to follow on this ROM, else you will face force closes
    1. Go to /system/ & copy build.prop to internal storage for backup
    2. Open the system/build.prop with text editor
    3. Scroll to the last & leave a space after the last line
    4. Add the below lines

    #Camera2 API
    persist.camera.HAL3.enabled=1


    5. Add one more blank line after above line & save the file.
    6. Go to Settings > Installed Apps > Camera > Clear Data > Clear Cache > Force-Stop
    7. Go to Settings > Installed Apps > Gallery > Clear Data > Clear Cache > Force-Stop
    8. Boot into TWRP > Advanced Wipe > Wipe Cache & Dalvik > Reboot to System
    9. Open MIUI Camera > Swipe from Left > Select Manual Mode > Enjoy
    10. If you face bootloops, boot into TWRP > File Manager > Copy build.prop from internal storage to /system/ > Wipe Cache & Dalvik > Reboot to System
    2
    Would it work on other Xiaomi snapdragon devices? (like Mi Note Pro and others)

    Well, my Mi4c passed the Manual Camera Compatibility Test, but camera doesn't work. There is Camera error on stock camera, Camera FV-5 and Snap Camera. I can't run Manual Camera because it crashes too with "Unfortunately, Manual Camera has stopped" error.

    Code:
    java.lang.RuntimeException: CameraAccessException while trying to lock camera opening.
    	at pl.vipek.camera2.controller.p.b(Unknown Source)
    	at pl.vipek.camera2.controller.p.a(Unknown Source)
    	at pl.vipek.camera2.controller.ad.onSurfaceTextureAvailable(Unknown Source)
    	at android.view.TextureView.getHardwareLayer(TextureView.java)
    	at android.view.View.updateDisplayListIfDirty(View.java)
    	at android.view.View.getDisplayList(View.java)
    	at android.view.View.draw(View.java)
    	at android.view.ViewGroup.drawChild(ViewGroup.java)
    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java)
    	at android.view.View.updateDisplayListIfDirty(View.java)
    	at android.view.View.getDisplayList(View.java)
    	at android.view.View.draw(View.java)
    	at android.view.ViewGroup.drawChild(ViewGroup.java)
    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java)
    	at android.view.View.draw(View.java)
    	at android.widget.FrameLayout.draw(FrameLayout.java)
    	at android.view.View.updateDisplayListIfDirty(View.java)
    	at android.view.View.getDisplayList(View.java)
    	at android.view.View.draw(View.java)
    	at android.view.ViewGroup.drawChild(ViewGroup.java)
    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java)
    	at android.view.View.updateDisplayListIfDirty(View.java)
    	at android.view.View.getDisplayList(View.java)
    	at android.view.View.draw(View.java)
    	at android.view.ViewGroup.drawChild(ViewGroup.java)
    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java)
    	at android.view.View.updateDisplayListIfDirty(View.java)
    	at android.view.View.getDisplayList(View.java)
    	at android.view.View.draw(View.java)
    	at android.view.ViewGroup.drawChild(ViewGroup.java)
    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java)
    	at android.view.View.draw(View.java)
    	at android.widget.FrameLayout.draw(FrameLayout.java)
    	at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2653)
    	at android.view.View.updateDisplayListIfDirty(View.java)
    	at android.view.View.getDisplayList(View.java)
    	at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java)
    	at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java)
    	at android.view.ThreadedRenderer.draw(ThreadedRenderer.java)
    	at android.view.ViewRootImpl.draw(ViewRootImpl.java)
    	at android.view.ViewRootImpl.performDraw(ViewRootImpl.java)
    	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java)
    	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java)
    	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java)
    	at android.view.Choreographer$CallbackRecord.run(Choreographer.java)
    	at android.view.Choreographer.doCallbacks(Choreographer.java)
    	at android.view.Choreographer.doFrame(Choreographer.java)
    	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java)
    	at android.os.Handler.handleCallback(Handler.java)
    	at android.os.Handler.dispatchMessage(Handler.java)
    	at android.os.Looper.loop(Looper.java)
    	at android.app.ActivityThread.main(ActivityThread.java)
    	at java.lang.reflect.Method.invoke(Native Method)
    	at java.lang.reflect.Method.invoke(Method.java:372)
    	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
    	at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:163)
    Caused by: android.hardware.camera2.CameraAccessException: The camera device is removable and has been disconnected from the Android device, or the camera service has shut down the connection due to a higher-priority access request for the camera device.
    	at android.hardware.camera2.utils.CameraBinderDecorator.throwOnError(CameraBinderDecorator.java)
    	at android.hardware.camera2.utils.CameraBinderDecorator$CameraBinderDecoratorListener.onAfterInvocation(CameraBinderDecorator.java)
    	at android.hardware.camera2.utils.Decorator.invoke(Decorator.java)
    	at java.lang.reflect.Proxy.invoke(Proxy.java:397)
    	at $Proxy0.connectDevice(Unknown Source)
    	at android.hardware.camera2.CameraManager.openCameraDeviceUserAsync(CameraManager.java)
    	at android.hardware.camera2.CameraManager.openCamera(CameraManager.java)
    	... 57 more

    Let me know if someone want full logs.
    2
    How many of the manual settings stated in the manual camera compatibility app are supported after enabling camera2 api?

    But RAW pictures are buggy on our phone, atleast on my phone

    Edit: I had 3 reboots within a short time while opening camera apps since I've edited the build.prop. I'm on official RR, but the camera2 features are working fine (except raw), thanks for sharing!