camera: restore legacy pre-Treble camera HAL1 vendor support - #3
Open
deepsidhu1313 wants to merge 7 commits into
Open
camera: restore legacy pre-Treble camera HAL1 vendor support#3deepsidhu1313 wants to merge 7 commits into
deepsidhu1313 wants to merge 7 commits into
Conversation
added 7 commits
September 7, 2026 20:29
device/asus/flo camera/QCamera2/HAL{,3} link libcamera_client directly
(Camera.h, CameraMetadata.h, CameraParameters.h, ICamera.h) -- a real,
structural dependency from this old pre-Treble camera HAL architecture,
not a small shimmable one. Additive change: creates a vendor-visible
variant alongside the existing platform one, does not remove anything.
…_available Continuing the vendor_available cascade from libcamera_client (needed by the legacy device/asus/flo camera HAL). libcamera_parameters has no dependencies of its own. camera_platform_flags_c_lib is an aconfig- generated flags library; its container:system setting is about runtime flag-storage placement, a separate concern from the build-time Soong vendor-variant this fixes.
libmediandk (NDK-facing) also links libcamera_client, requiring it be safe to load into both vendor and platform process address spaces simultaneously.
Continuing the double_loadable cascade from libcamera_client.
…amera_parameters utils/Log.h is a deprecated compatibility shim that just includes log/log.h internally (its own header says as much). Switched to the direct, vendor-safe log/log.h include and added the header_libs dependency (liblog_headers, itself vendor_available) needed to resolve it -- this library previously relied on implicit default include paths that do not extend to the vendor build variant now that it is vendor_available (for the legacy device/asus/flo camera HAL).
CameraParameters.h uses utils/KeyedVector.h and utils/String8.h -- real libutils types (unlike Log.h, not a deprecated shim). libutils is VNDK-core (vndk.enabled = true), so vendor code can link it directly; libcamera_client already declares this same shared_libs dependency, libcamera_parameters was simply missing it entirely (it previously had no shared_libs/header_libs at all, relying only on implicit default include paths that don't extend to its new vendor build variant). Checked both files' full include lists for any other similarly-missing dependency before committing, to avoid another round-trip.
ICameraClient.cpp, ICameraRecordingProxy.cpp, and ICamera.cpp all include media/hardware/HardwareAPI.h, exported by frameworks/native/headers' media_plugin_headers module. On the platform variant this include path was reaching the compiler transitively (through some other shared_lib's own export chain); that transitive path doesn't extend to libcamera_client's new vendor_available variant. media_plugin_headers is already vendor_available, so declaring the real header_libs dependency directly on libcamera_client fixes both variants without depending on what another module happens to re-export.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found while building lineage-21.0 for flo/flox (Nexus 7 2013) via LineageOS-UL, a 32-bit-only pre-Treble device relying on the legacy Camera HAL1 vendor path.
This is a 7-commit cascade: marking libcamera_client, libcamera_parameters, and camera_platform_flags_c_lib vendor_available (and double_loadable where also used from platform/NDK-facing process space, e.g. via libmediandk) to produce the vendor variant these devices' legacy camera HALs link directly -- plus the two follow-on compile fixes each vendor_available marking surfaced once libcamera_parameters had to actually build standalone for the vendor variant (utils/Log.h isn't available there -- swapped for the vendor-safe log/log.h equivalent; utils/KeyedVector.h and utils/String8.h are real libutils types needing an explicit shared_libs dependency, since libutils is VNDK-core and safe for vendor code to link directly) and one more on libcamera_client itself (media/hardware/HardwareAPI.h, needing media_plugin_headers, already vendor_available).