Skip to content

camera: restore legacy pre-Treble camera HAL1 vendor support - #3

Open
deepsidhu1313 wants to merge 7 commits into
LineageOS-UL:lineage-21.0from
deepsidhu1313:fix-legacy-camera-hal-vendor-cascade
Open

camera: restore legacy pre-Treble camera HAL1 vendor support#3
deepsidhu1313 wants to merge 7 commits into
LineageOS-UL:lineage-21.0from
deepsidhu1313:fix-legacy-camera-hal-vendor-cascade

Conversation

@deepsidhu1313

Copy link
Copy Markdown

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).

aosp-builder 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant