Compare commits

...

10 commits

Author SHA1 Message Date
Aaron Kling
250739971e compat: Provide libstagefright_foundation-v33
Copied from prebuilts/vndk/v33/arm64/*/shared/vndk-core@d79ad87
and changed SONAME using the following command:
* patchelf-0_9 --set-soname libstagefright_foundation-v33.so libstagefright_foundation-v33.so

Change-Id: I0e86c254f7ab0040e8b4a383fe46006ce6f7c111
2024-08-22 17:57:17 -05:00
Aaron Kling
de40ec9a0c compat: Provide libbase-v33
Copied from prebuilts/vndk/v33/arm64/*/shared/vndk-sp@d79ad87
and changed SONAME using the following command:
* patchelf-0_9 --set-soname libbase-v33.so libbase-v33.so

Change-Id: If82d4ef5620073237ffe3785df72df6d5d28a159
2024-08-22 17:57:17 -05:00
Giovanni Ricca
c69c85fcad
libui: Add GraphicBufferMapper::unlock shims
* Commit Ib4590b7a3b839a993f6c747c5f09a6312f7ab329 modified
  GraphicBufferMapper::unlock overload. Create a shim to provide the old
  symbol for blobs that need it

Change-Id: I0e90ac0b383b05904df83076d990ad9335a40664
2024-06-16 20:08:59 +02:00
R0rt1z2
5206a0f0a5
libui: Re-add android::GraphicBufferMapper::lock shims
* Commit Ib4590b7a3b839a993f6c747c5f09a6312f7ab329 restored
  GraphicBufferMapper::lock old overload, but some libs still require
  the new one.

Change-Id: Ie1435961dc43f7750a80b9986977194835d916f3
2024-06-16 20:08:17 +02:00
Chirayu Desai
a723dd3d79
Revert "libui: Add android::GraphicBufferMapper::lock shims"
This reverts commit efa7303881.

Reason: No longer needed after 14QPR3 / 24Q2, commit 434bc98a0f
"Move PlaneLayout lookup to GraphicBuffer"

Change-Id: Ib4590b7a3b839a993f6c747c5f09a6312f7ab329
2024-06-15 22:50:48 +03:00
Sebastiano Barezzi
543ade588a compat: interfaces: backend: radio: config: Use a macro to declare the libs
Change-Id: I03251612315270d15474b740078ada17e17e522d
2024-05-06 18:05:22 +00:00
R0rt1z2
00551f44d6
compat: Add camera provider shim
* Namespace V1_0::helper has been deprecated in [1]. Wrap old symbols to
  accommodate this change.

[1] I8c3160497c1e2fe7a0a7155641f0e1f5e47ec32e

Change-Id: I4c9094add5c2484fd00b04e6236ba86ac693dbfd
2024-05-04 19:12:07 +02:00
Yumi Yukimura
201615cf7c compat: Add android.hardware.radio.c_shim@1.{0..3}
* They're copied from `android.hardware.radio.config@1.{0..3}.so`,
  renamed to `android.hardware.radio.c_shim@1.{0..3}.so`, and
  hexedited hidl interface descriptor to
  `lineage.hardware.radio.config@1.{0..3}::IRadioConfig`
* For making stock RIL service register radio.config service to
  `lineage.hardware.radio.config` interface instead, so that we can
  add a wrapper that registers to `android.hardware.radio.config`
* Example usage on extract-files.sh:
```
        vendor/lib64/libril-qc-hal-qmi.so)
            for v in 1.{0..2}; do
                sed -i "s|android.hardware.radio.config@${v}.so|android.hardware.radio.c_shim@${v}.so|g" "${2}"
            done
            ;;
```

Change-Id: Ie8c48c0164c1787c851d4b3c0ccd334e0d405cd4
2024-03-28 06:12:21 +08:00
basamaryan
1522a475d9
compat: Drop libprotobuf-cpp-lite-3.9.1-vendorcompat
The prebuilt exists in prebuilts/misc as of QPR2 e50c7362ef

Change-Id: Ia5fbb4b41ccae255f2de3230bb84a0a3fcccdf20
2024-03-20 01:26:59 -04:00
LuK1337
353e696c1b
compat: Provide libcrypto-v33
Copied from prebuilts/vndk/v33/arm64/*/shared/vndk-core and changed
SONAME using the following command:
* patchelf-0_9 --set-soname libcrypto-v33.so libcrypto-v33.so

Change-Id: I545f58b4119f735385fa0f389ef87c6e9d2c100e
2024-03-18 18:21:01 +01:00
10 changed files with 212 additions and 20 deletions

View file

@ -263,6 +263,24 @@ cc_library {
vendor: true
}
cc_prebuilt_library_shared {
name: "libbase-v33",
vendor: true,
strip: {
none: true,
},
target: {
android_arm: {
srcs: ["vndk/v33/arm/libbase-v33.so"],
},
android_arm64: {
srcs: ["vndk/v33/arm64/libbase-v33.so"],
},
},
compile_multilib: "both",
check_elf_files: false,
}
cc_library {
name: "libbinder_shim",
shared_libs: ["libbinder", "libutils"],
@ -296,6 +314,42 @@ cc_library {
vendor: true
}
cc_library_shared {
name: "libcamera_provider_shim",
shared_libs: [
"camera.device@1.0-impl",
"camera.device@3.2-impl",
"camera.device@3.3-impl",
"camera.device@3.4-impl",
"camera.device@3.5-impl",
"libcamera_metadata",
],
include_dirs: [
"hardware/interfaces/camera/common/default/include/",
"hardware/libhardware/include",
],
srcs: ["libcamera_provider/camera_provider.cpp"],
vendor: true,
}
cc_prebuilt_library_shared {
name: "libcrypto-v33",
vendor: true,
strip: {
none: true,
},
target: {
android_arm: {
srcs: ["vndk/v33/arm/libcrypto-v33.so"],
},
android_arm64: {
srcs: ["vndk/v33/arm64/libcrypto-v33.so"],
},
},
compile_multilib: "both",
check_elf_files: false,
}
cc_library {
name: "libcutils_shim",
shared_libs: [
@ -356,24 +410,11 @@ cc_library_shared {
vendor: true,
}
cc_library_shared {
name: "libprotobuf-cpp-lite-3.9.1-vendorcompat",
stem: "libprotobuf-cpp-lite-3.9.1",
target: {
android_arm: {
shared_libs: ["libprotobuf-cpp-full-3.9.1-vendorcompat"],
},
android_arm64: {
shared_libs: ["libprotobuf-cpp-full-3.9.1-vendorcompat"],
},
},
vendor: true,
}
cc_library_shared {
name: "libui_shim",
shared_libs: [
"libui",
"libsync",
"libutils",
],
srcs: [
@ -467,3 +508,21 @@ cc_prebuilt_library_shared {
compile_multilib: "both",
check_elf_files: false,
}
cc_prebuilt_library_shared {
name: "libstagefright_foundation-v33",
vendor: true,
strip: {
none: true,
},
target: {
android_arm: {
srcs: ["vndk/v33/arm/libstagefright_foundation-v33.so"],
},
android_arm64: {
srcs: ["vndk/v33/arm64/libstagefright_foundation-v33.so"],
},
},
compile_multilib: "both",
check_elf_files: false,
}

View file

@ -0,0 +1,42 @@
#
# Copyright (C) 2024 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
LOCAL_PATH := $(call my-dir)
_shim_hidl_library_name := android.hardware.radio.c_shim
_frontend_hidl_package_name := android.hardware.radio.config
_backend_hidl_package_name := lineage.hardware.radio.config
_frontend_hidl_interface_name := IRadioConfig
_backend_hidl_interface_name := $(_frontend_hidl_interface_name)
ifeq ($(TARGET_IS_64_BIT),true)
_lib_dir := lib64
else
_lib_dir := lib
endif
define _shim_hidl_library_template
_version := $(1)
_sed_pattern := "s|$$(_frontend_hidl_package_name)@$$(_version)::$$(_frontend_hidl_interface_name)|$$(_backend_hidl_package_name)@$$(_version)::$$(_backend_hidl_interface_name)|g;s|$$(_frontend_hidl_package_name)(@[0-9]+\.[0-9]+\.so)|$$(_shim_hidl_library_name)\1|g"
include $$(CLEAR_VARS)
LOCAL_MODULE := $$(_shim_hidl_library_name)@$$(_version)
LOCAL_MODULE_STEM := $$(LOCAL_MODULE).so
LOCAL_MODULE_CLASS := DATA
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $$(TARGET_OUT_VENDOR)/$$(_lib_dir)
LOCAL_REQUIRED_MODULES := $$(_frontend_hidl_package_name)@$$(_version).vendor
LOCAL_PREBUILT_MODULE_FILE := $$(TARGET_OUT_VENDOR)/$$(_lib_dir)/$$(_frontend_hidl_package_name)@$$(_version).so
LOCAL_POST_INSTALL_CMD := /usr/bin/sed -E -i $$(_sed_pattern) $$(LOCAL_MODULE_PATH)/$$(LOCAL_MODULE_STEM)
include $$(BUILD_PREBUILT)
endef
$(eval $(call _shim_hidl_library_template,1.0))
$(eval $(call _shim_hidl_library_template,1.1))
$(eval $(call _shim_hidl_library_template,1.2))
$(eval $(call _shim_hidl_library_template,1.3))

View file

@ -0,0 +1,81 @@
/*
* Copyright (C) 2024 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "CameraModule.h"
using android::SortedVector;
using android::sp;
using android::hardware::camera::common::helper::CameraModule;
// android::hardare::camera::device::V1_0
extern "C" void*
_ZN7android8hardware6camera6device4V1_014implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector);
extern "C" void*
_ZN7android8hardware6camera6device4V1_014implementation12CameraDeviceC1ENS_2spINS1_6common4V1_06helper12CameraModuleEEERKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEERKNS_12SortedVectorINSC_4pairISI_SI_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector) {
return _ZN7android8hardware6camera6device4V1_014implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
thisptr, cameraModule, str, sortedVector);
}
// android::hardware::camera::device::V3_2
extern "C" void*
_ZN7android8hardware6camera6device4V3_214implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector);
extern "C" void*
_ZN7android8hardware6camera6device4V3_214implementation12CameraDeviceC1ENS_2spINS1_6common4V1_06helper12CameraModuleEEERKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEERKNS_12SortedVectorINSC_4pairISI_SI_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector) {
return _ZN7android8hardware6camera6device4V3_214implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
thisptr, cameraModule, str, sortedVector);
}
// android::hardware::camera::device::V3_3
extern "C" void*
_ZN7android8hardware6camera6device4V3_314implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector);
extern "C" void*
_ZN7android8hardware6camera6device4V3_314implementation12CameraDeviceC1ENS_2spINS1_6common4V1_06helper12CameraModuleEEERKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEERKNS_12SortedVectorINSC_4pairISI_SI_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector) {
return _ZN7android8hardware6camera6device4V3_314implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
thisptr, cameraModule, str, sortedVector);
}
// android::hardware::camera::device::V3_4
extern "C" void*
_ZN7android8hardware6camera6device4V3_414implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector);
extern "C" void*
_ZN7android8hardware6camera6device4V3_414implementation12CameraDeviceC1ENS_2spINS1_6common4V1_06helper12CameraModuleEEERKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEERKNS_12SortedVectorINSC_4pairISI_SI_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector) {
return _ZN7android8hardware6camera6device4V3_414implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
thisptr, cameraModule, str, sortedVector);
}
// android::hardware::camera::device::V3_5
extern "C" void*
_ZN7android8hardware6camera6device4V3_514implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector);
extern "C" void*
_ZN7android8hardware6camera6device4V3_514implementation12CameraDeviceC1ENS_2spINS1_6common4V1_06helper12CameraModuleEEERKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEERKNS_12SortedVectorINSC_4pairISI_SI_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector) {
return _ZN7android8hardware6camera6device4V3_514implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
thisptr, cameraModule, str, sortedVector);
}

View file

@ -1,10 +1,11 @@
/*
* Copyright (C) 2023 The LineageOS Project
* Copyright (C) 2024 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdint.h>
#include <sync/sync.h>
#include <ui/GraphicBufferMapper.h>
#include <ui/Rect.h>
#include <utils/Errors.h>
@ -15,11 +16,20 @@ using android::status_t;
extern "C" {
status_t _ZN7android19GraphicBufferMapper4lockEPK13native_handlejRKNS_4RectEPPvPiS9_(
void* thisptr, buffer_handle_t handle, uint32_t usage, const Rect& bounds, void** vaddr,
int32_t* outBytesPerPixel, int32_t* outBytesPerStride);
int32_t* /*outBytesPerPixel*/, int32_t* /*outBytesPerStride*/) {
auto* gpm = static_cast<android::GraphicBufferMapper*>(thisptr);
return gpm->lock(handle, usage, bounds, vaddr);
}
status_t _ZN7android19GraphicBufferMapper4lockEPK13native_handlejRKNS_4RectEPPv(
void* thisptr, buffer_handle_t handle, uint32_t usage, const Rect& bounds, void** vaddr) {
return _ZN7android19GraphicBufferMapper4lockEPK13native_handlejRKNS_4RectEPPvPiS9_(
thisptr, handle, usage, bounds, vaddr, nullptr, nullptr);
status_t _ZN7android19GraphicBufferMapper6unlockEPK13native_handle(void* thisptr,
buffer_handle_t handle) {
android::base::unique_fd outFence;
auto* gpm = static_cast<android::GraphicBufferMapper*>(thisptr);
status_t status = gpm->unlock(handle, &outFence);
if (status == android::OK && outFence.get() >= 0) {
sync_wait(outFence.get(), -1);
outFence.reset();
}
return status;
}
}

BIN
vndk/v33/arm/libbase-v33.so Executable file

Binary file not shown.

BIN
vndk/v33/arm/libcrypto-v33.so Executable file

Binary file not shown.

Binary file not shown.

BIN
vndk/v33/arm64/libbase-v33.so Executable file

Binary file not shown.

BIN
vndk/v33/arm64/libcrypto-v33.so Executable file

Binary file not shown.

Binary file not shown.