
Google Camera Mod for OnePlus 5 (cheeseburger) and 5T (dumpling)
1. Camera HAL Confusion
a. Camera HAL Basics
- First, let's understand what a camera HAL is. A camera HAL is what allows a ROM to "talk to" the camera hardware; without it, the camera would be non-functional. Think of the camera HAL as the steering wheel and pedals of a car. The steering wheel/pedals allow for control of the internal components of the vehicle by providing an external interface for the driver (the ROM) to make use of the internal components.
- At present, the source code of the camera HAL included in OxygenOS has not been released by OnePlus. Instead, OnePlus has compiled that source code and shipped it on the OnePlus 5/5T as a BLOB (Binary Large OBject). This has been a major setback for custom ROM developers because having access to the camera HAL source would make porting the stock OnePlus Camera to a custom ROM a much easier endeavour.
- The latest releases of the mod require you to be rooted (as you mandatorily need to install DotFix, which contains a modified camera HAL compatible with the latest releases) or the pictures that you click will come out with pink/purple/green tint on them, or will have a dotted pattern on them, or the camera might not work at all. So if you're rooted, then you're good to go. However, if you're unrooted (and prefer staying that way), then you can still use an specific version of the mod which works fine (with a few issues/restrictions, of course). All the downloads for rooted as well as non-rooted users are in the next post in the thread (post # 2).
[Unrooted Only] Dotted Pattern Overlay
- Issue - A dotted pattern overlay is visible in the HDR+ pictures (when completely zoomed in)
- Resolution - You have to root, install DotFix as well as the recommended version for rooted users from point 3
- Issue - Front camera captures distorted pink/purple/green lines while using HDR+ or Portrait Mode
- Resolution - You have to root, install DotFix as well as the recommended version for rooted users from point 3
- Issue - HDR+ pictures that are clicked with the front camera are restricted to 4.0 megapixels, even though the maximum resolution of 15.9 megapixels is selected for the front camera under settings
- Resolution - None available yet; details of why this is the case are mentioned in this post
- Issue - Zero Shutter Lag (ZSL) doesn't work
- Resolution - None available yet
- Issue - Some audio mods interfere with the DotFix Magisk module due to which they don't work as intended
- Resolution - Uninstall the audio mods or try setting SELinux to permissive using SELinux Switch from this post of mine.
a. Important Notes
- Everytime you change a settings, make sure you force-close and swipe it away from recents, and then restart the app so that the new settings are applied correctly. A sure shot way to make sure the settings have applied is to restart your phone.
a. Post Update Information
- Last Updated: 23rd June 2021
- @B-S-G, for doing the initial port and bring us Google Camera's HDR+ to multiple devices
- @Arnova8G2, for all the work he's done and still continues to do to bring us these ports
- @defcomg, for the front camera Portrait Mode fix
- @MrAimenify, for fixing viewfinder lag and updating libraries
- @Urnyx05, for creating his own versions of the mod for everyone on OP5/T
- @Nikita, for creating his own versions of the mod for everyone on OP5/T
- @S4turno, for unknowingly inspiring me to make this post, hosting all the Google Camera Mod ports on his server, and for helping the community with updated information regarding the mod
- @Zackptg5, for the MMT-Ex Template
- @Adam Conway, for this great XDA article on how cameras work in custom ROMs
- @Rohit jat, for originally creating the thread and Telegram discussion group
- All of you guys for viewing this post
Last edited: