12 Commits
Author SHA1 Message Date
probaero 78646fd47d rosemary: Build bluetooth A2DP stack from source 2026-05-09 07:57:15 +00:00
Arianandprobaero 1c48dc5f23 rosemary: Patch a few camera blobs to allocate GraphicBuffer with new size
Commit [1] ("Introduce a dependency monitor for fences") has added new
members to the GraphicBuffer struct, increasing the size from 0x100 to
0xd30. camera.xiaomi.so creates GraphicBuffer in its constructors using
"new GraphicBuffer(..)" which encodes the size to allocate at compile
time. Then, on destruction of the object, the implicit destructor will
try to destruct the new members, but, since this memory was not
allocated for the object, this leads to memory access of unallocated
storage.

F DEBUG   : backtrace:
F DEBUG   :       #00 pc 000000000003ba00  /vendor/lib64/libui.so (__aarch64_ldadd8_acq_rel+16) (BuildId: b577faa139eb3404c7d3a674b147634c)
F DEBUG   :       #01 pc 0000000000051364  /vendor/lib64/libui.so (android::GraphicBuffer::~GraphicBuffer()+248) (BuildId: b577faa139eb3404c7d3a674b147634c)
F DEBUG   :       #02 pc 0000000000051698  /vendor/lib64/libui.so (android::GraphicBuffer::~GraphicBuffer()+20) (BuildId: b577faa139eb3404c7d3a674b147634c)
F DEBUG   :       #03 pc 0000000000011064  /vendor/lib64/libutils.so (android::RefBase::decStrong(void const*) const+164) (BuildId: 99d1ab745e7b73420d8d2b397483ef54)
F DEBUG   :       #04 pc 00000000000cd538  /vendor/lib64/hw/camera.xiaomi.so (mihal::GraBuffer::~GraBuffer()+236) (BuildId: a4c59705588bd26d407f0ab181902baf)

[1]: https://github.com/LineageOS/android_frameworks_native/commit/df868baf2abefbb45341530d20a948ffd6b2c304

Change-Id: I239c31b6ea5a7813abc3e9cfbefb6d2bdcc1a9e0
Signed-off-by: therealmharc <therealmharc@gmail.com>
Signed-off-by: Ido <dev.xyzuniverse@gmail.com>
2026-05-09 07:57:15 +00:00
probaero 7ab31b8576 rosemary: drop lfs config 2026-05-09 07:57:15 +00:00
MashopyandMatsvei Niaverau 85a4817f28 rosemary: Track MediaTek GbaService implementation 2026-04-16 11:09:42 +02:00
Nolen JohnsonandMatsvei Niaverau 6daf40fe3a rosemary: Build mediatek-common JAR from source 2026-04-16 09:48:04 +02:00
Giovanni RiccaandMatsvei Niaverau bf8ffae10c rosemary: Move mediatek ims boot jar declaration to vendor 2026-04-16 09:44:14 +02:00
Giovanni RiccaandMatsvei Niaverau ee17e546d8 Revert "rosemary: Switch to shared libs to mtk frameworks for ImsService"
This reverts commit a4c0e9184a.
2026-04-16 09:17:59 +02:00
claxten10andMatsvei Niaverau 18ad9bee4c rosemary: Switch to AOSP remote submix 2026-04-16 09:16:58 +02:00
Matsvei Niaverau 3c12d72bbf Revert "rosemary: Remove references to TelephonyMetrics"
This reverts commit 62626d0c8c.
2026-04-16 09:16:25 +02:00
MashopyandMatsvei Niaverau 25d99366a5 rosemary: Let's go full prebuilt for C2 vendor stack 2026-04-16 09:15:24 +02:00
MashopyandMatsvei Niaverau e60c946f91 rosemary: Properly patch blobs related to Stagefright 2026-04-16 09:14:53 +02:00
MashopyandMatsvei Niaverau 4eb9e9b85a rosemary: Declare the correct HIDL version for C2 service 2026-04-16 09:14:23 +02:00
28 changed files with 361 additions and 80 deletions
+342 -75
View File
@@ -2186,36 +2186,6 @@ cc_prebuilt_library_shared {
soc_specific: true,
}
cc_prebuilt_library_shared {
name: "audio.r_submix.mt6785",
owner: "xiaomi",
strip: {
none: true,
},
target: {
android_arm: {
srcs: [
"proprietary/vendor/lib/hw/audio.r_submix.mt6785.so",
],
shared_libs: [
"liblog",
"libcutils",
"libmedia_helper",
"libutils",
"libnbaio_mono",
"libc++",
"libc",
"libm",
"libdl",
],
},
},
compile_multilib: "32",
relative_install_path: "hw",
prefer: true,
soc_specific: true,
}
cc_prebuilt_library_shared {
name: "sound_trigger.primary.default",
owner: "xiaomi",
@@ -19691,6 +19661,170 @@ cc_prebuilt_library_shared {
soc_specific: true,
}
cc_prebuilt_library_shared {
name: "libcodec2_hidl@1.0-v31",
owner: "xiaomi",
strip: {
none: true,
},
target: {
android_arm64: {
srcs: [
"proprietary/vendor/lib64/libcodec2_hidl@1.0-v31.so",
],
shared_libs: [
"libbase_shim",
"android.hardware.graphics.bufferqueue@1.0",
"android.hardware.graphics.bufferqueue@2.0",
"android.hardware.graphics.common@1.0",
"android.hardware.media@1.0",
"android.hardware.media.bufferpool@2.0",
"android.hardware.media.c2@1.0",
"android.hardware.media.omx@1.0",
"libbase",
"libcodec2",
"libcodec2_vndk-v31",
"libcutils",
"libhidlbase",
"liblog",
"libstagefright_bufferpool@2.0.1",
"libui-v34",
"libutils",
"libstagefright_bufferqueue_helper-v33",
"libcodec2_hidl_plugin-v31",
"libc++",
"libc",
"libm",
"libdl",
],
},
},
compile_multilib: "64",
prefer: true,
soc_specific: true,
}
cc_prebuilt_library_shared {
name: "libcodec2_hidl@1.1-v31",
owner: "xiaomi",
strip: {
none: true,
},
target: {
android_arm64: {
srcs: [
"proprietary/vendor/lib64/libcodec2_hidl@1.1-v31.so",
],
shared_libs: [
"libbase_shim",
"android.hardware.graphics.bufferqueue@1.0",
"android.hardware.graphics.bufferqueue@2.0",
"android.hardware.graphics.common@1.0",
"android.hardware.media@1.0",
"android.hardware.media.bufferpool@2.0",
"android.hardware.media.c2@1.0",
"android.hardware.media.c2@1.1",
"android.hardware.media.omx@1.0",
"libbase",
"libcodec2",
"libcodec2_hidl@1.0-v31",
"libcodec2_vndk-v31",
"libcutils",
"libhidlbase",
"liblog",
"libstagefright_bufferpool@2.0.1",
"libui-v34",
"libutils",
"libstagefright_bufferqueue_helper-v33",
"libcodec2_hidl_plugin-v31",
"libc++",
"libc",
"libm",
"libdl",
],
},
},
compile_multilib: "64",
prefer: true,
soc_specific: true,
}
cc_prebuilt_library_shared {
name: "libcodec2_hidl@1.2-v31",
owner: "xiaomi",
strip: {
none: true,
},
target: {
android_arm64: {
srcs: [
"proprietary/vendor/lib64/libcodec2_hidl@1.2-v31.so",
],
shared_libs: [
"libbase_shim",
"android.hardware.graphics.bufferqueue@1.0",
"android.hardware.graphics.bufferqueue@2.0",
"android.hardware.graphics.common@1.0",
"android.hardware.media@1.0",
"android.hardware.media.bufferpool@2.0",
"android.hardware.media.c2@1.0",
"android.hardware.media.c2@1.1",
"android.hardware.media.c2@1.2",
"android.hardware.media.omx@1.0",
"libbase",
"libcodec2",
"libcodec2_hidl@1.0-v31",
"libcodec2_hidl@1.1-v31",
"libcodec2_vndk-v31",
"libcutils",
"libhidlbase",
"liblog",
"libstagefright_bufferpool@2.0.1",
"libui-v34",
"libutils",
"libstagefright_bufferqueue_helper-v33",
"libcodec2_hidl_plugin-v31",
"libc++",
"libc",
"libm",
"libdl",
],
},
},
compile_multilib: "64",
prefer: true,
soc_specific: true,
}
cc_prebuilt_library_shared {
name: "libcodec2_hidl_plugin-v31",
owner: "xiaomi",
strip: {
none: true,
},
target: {
android_arm64: {
srcs: [
"proprietary/vendor/lib64/libcodec2_hidl_plugin-v31.so",
],
shared_libs: [
"libbase",
"libcodec2",
"libcodec2_vndk-v31",
"liblog",
"libutils",
"libc++",
"libc",
"libm",
"libdl",
],
},
},
compile_multilib: "64",
prefer: true,
soc_specific: true,
}
cc_prebuilt_library_shared {
name: "libcodec2_mtk_c2store",
owner: "xiaomi",
@@ -19703,14 +19837,14 @@ cc_prebuilt_library_shared {
"proprietary/vendor/lib64/libcodec2_mtk_c2store.so",
],
shared_libs: [
"libcodec2_soft_common",
"libcodec2_soft_common-v31",
"libcutils",
"liblog",
"libsfplugin_ccodec_utils",
"libstagefright_foundation",
"libsfplugin_ccodec_utils-v31",
"libstagefright_foundation-v33",
"libbase",
"libcodec2",
"libcodec2_vndk",
"libcodec2_vndk-v31",
"libutils",
"libion",
"libion_mtk",
@@ -19742,21 +19876,21 @@ cc_prebuilt_library_shared {
"libformatter",
"libdpframework",
"android.hardware.graphics.bufferqueue@2.0",
"libui",
"libui-v34",
"libgralloc_extra",
"libexpat",
"libsync",
"libhidlbase",
"libhwbinder",
"libged",
"libcodec2_soft_common",
"libcodec2_soft_common-v31",
"libcutils",
"liblog",
"libsfplugin_ccodec_utils",
"libstagefright_foundation",
"libsfplugin_ccodec_utils-v31",
"libstagefright_foundation-v33",
"libbase",
"libcodec2",
"libcodec2_vndk",
"libcodec2_vndk-v31",
"libutils",
"libion",
"libdmabufheap",
@@ -19791,21 +19925,21 @@ cc_prebuilt_library_shared {
"libformatter",
"libdpframework",
"android.hardware.graphics.bufferqueue@2.0",
"libui",
"libui-v34",
"libgralloc_extra",
"libexpat",
"libsync",
"libhidlbase",
"libhwbinder",
"libged",
"libcodec2_soft_common",
"libcodec2_soft_common-v31",
"libcutils",
"liblog",
"libsfplugin_ccodec_utils",
"libstagefright_foundation",
"libsfplugin_ccodec_utils-v31",
"libstagefright_foundation-v33",
"libbase",
"libcodec2",
"libcodec2_vndk",
"libcodec2_vndk-v31",
"libutils",
"libion",
"libdmabufheap",
@@ -19823,6 +19957,38 @@ cc_prebuilt_library_shared {
soc_specific: true,
}
cc_prebuilt_library_shared {
name: "libcodec2_soft_common-v31",
owner: "xiaomi",
strip: {
none: true,
},
target: {
android_arm64: {
srcs: [
"proprietary/vendor/lib64/libcodec2_soft_common-v31.so",
],
shared_libs: [
"libbase",
"libcodec2",
"libcodec2_vndk-v31",
"libutils",
"libcutils",
"liblog",
"libsfplugin_ccodec_utils-v31",
"libstagefright_foundation-v33",
"libc++",
"libc",
"libm",
"libdl",
],
},
},
compile_multilib: "64",
prefer: true,
soc_specific: true,
}
cc_prebuilt_library_shared {
name: "libcodec2_soft_mtk_alacdec",
owner: "xiaomi",
@@ -19995,6 +20161,46 @@ cc_prebuilt_library_shared {
soc_specific: true,
}
cc_prebuilt_library_shared {
name: "libcodec2_vndk-v31",
owner: "xiaomi",
strip: {
none: true,
},
target: {
android_arm64: {
srcs: [
"proprietary/vendor/lib64/libcodec2_vndk-v31.so",
],
shared_libs: [
"android.hardware.graphics.bufferqueue@2.0",
"android.hardware.graphics.common@1.2",
"android.hardware.media.bufferpool@2.0",
"libbase",
"libcutils",
"libhardware",
"libhidlbase",
"libion",
"libdmabufheap",
"libfmq",
"liblog",
"libnativewindow",
"libstagefright_foundation-v33",
"libstagefright_bufferpool@2.0.1",
"libui-v34",
"libutils",
"libc++",
"libc",
"libm",
"libdl",
],
},
},
compile_multilib: "64",
prefer: true,
soc_specific: true,
}
cc_prebuilt_library_shared {
name: "libcodec2_vpp_qt_plugin",
owner: "xiaomi",
@@ -20007,11 +20213,11 @@ cc_prebuilt_library_shared {
"proprietary/vendor/lib64/libcodec2_vpp_qt_plugin.so",
],
shared_libs: [
"libcodec2_soft_common",
"libsfplugin_ccodec_utils",
"libstagefright_foundation",
"libcodec2_soft_common-v31",
"libsfplugin_ccodec_utils-v31",
"libstagefright_foundation-v33",
"libcodec2",
"libcodec2_vndk",
"libcodec2_vndk-v31",
"liblog",
"libbase",
"libutils",
@@ -20040,11 +20246,11 @@ cc_prebuilt_library_shared {
"proprietary/vendor/lib64/libcodec2_vpp_rs_plugin.so",
],
shared_libs: [
"libcodec2_soft_common",
"libsfplugin_ccodec_utils",
"libstagefright_foundation",
"libcodec2_soft_common-v31",
"libsfplugin_ccodec_utils-v31",
"libstagefright_foundation-v33",
"libcodec2",
"libcodec2_vndk",
"libcodec2_vndk-v31",
"liblog",
"libbase",
"libutils",
@@ -25255,6 +25461,38 @@ cc_prebuilt_library_shared {
soc_specific: true,
}
cc_prebuilt_library_shared {
name: "libsfplugin_ccodec_utils-v31",
owner: "xiaomi",
strip: {
none: true,
},
target: {
android_arm64: {
srcs: [
"proprietary/vendor/lib64/libsfplugin_ccodec_utils-v31.so",
],
shared_libs: [
"libbase",
"libcodec2",
"libcodec2_vndk-v31",
"libcutils",
"liblog",
"libnativewindow",
"libstagefright_foundation",
"libutils",
"libc++",
"libc",
"libm",
"libdl",
],
},
},
compile_multilib: "64",
prefer: true,
soc_specific: true,
}
cc_prebuilt_library_shared {
name: "libsimaka",
owner: "xiaomi",
@@ -25358,6 +25596,41 @@ cc_prebuilt_library_shared {
soc_specific: true,
}
cc_prebuilt_library_shared {
name: "libstagefright_bufferqueue_helper-v33",
owner: "xiaomi",
strip: {
none: true,
},
target: {
android_arm64: {
srcs: [
"proprietary/vendor/lib64/libstagefright_bufferqueue_helper-v33.so",
],
shared_libs: [
"libbase",
"libcutils",
"libhidlbase",
"libhidlmemory",
"liblog",
"libstagefright_foundation",
"libui",
"libutils",
"android.hardware.graphics.bufferqueue@1.0",
"android.hardware.graphics.bufferqueue@2.0",
"libgui",
"libc++",
"libc",
"libm",
"libdl",
],
},
},
compile_multilib: "64",
prefer: true,
soc_specific: true,
}
cc_prebuilt_library_shared {
name: "libstereoinfoaccessor_vsdof",
owner: "xiaomi",
@@ -29086,6 +29359,17 @@ android_app_import {
privileged: true,
}
android_app_import {
name: "MtkGbaService",
owner: "xiaomi",
apk: "proprietary/system/priv-app/MtkGbaService/MtkGbaService.apk",
certificate: "platform",
dex_preopt: {
enabled: false,
},
privileged: true,
}
android_app_import {
name: "HotwordEnrollmentOKGoogleCORTEXM4",
owner: "xiaomi",
@@ -29110,22 +29394,6 @@ android_app_import {
product_specific: true,
}
dex_import {
name: "mediatek-common",
owner: "xiaomi",
jars: [
"proprietary/system/framework/mediatek-common.jar",
],
}
dex_import {
name: "mediatek-framework",
owner: "xiaomi",
jars: [
"proprietary/system/framework/mediatek-framework.jar",
],
}
dex_import {
name: "mediatek-ims-base",
owner: "xiaomi",
@@ -29238,9 +29506,9 @@ prebuilt_etc_xml {
}
prebuilt_etc_xml {
name: "manifest_media_c2_V1_1_default.xml",
name: "manifest_media_c2_V1_2_default.xml",
owner: "xiaomi",
src: "proprietary/vendor/etc/vintf/manifest/manifest_media_c2_V1_1_default.xml",
src: "proprietary/vendor/etc/vintf/manifest/manifest_media_c2_V1_2_default.xml",
filename_from_src: true,
sub_dir: "vintf/manifest",
soc_specific: true,
@@ -29740,7 +30008,6 @@ cc_prebuilt_binary {
"proprietary/vendor/bin/hw/android.hardware.media.c2@1.2-mediatek-64b",
],
shared_libs: [
"libstagefright_foundation-v33",
"libbase",
"liblog",
"libcodec2",
@@ -29748,10 +30015,10 @@ cc_prebuilt_binary {
"android.hardware.media.c2@1.0",
"android.hardware.media.c2@1.1",
"android.hardware.media.c2@1.2",
"libcodec2_hidl@1.0",
"libcodec2_hidl@1.1",
"libcodec2_hidl@1.2",
"libcodec2_vndk",
"libcodec2_hidl@1.0-v31",
"libcodec2_hidl@1.1-v31",
"libcodec2_hidl@1.2-v31",
"libcodec2_vndk-v31",
"libhidlbase",
"libavservices_minijail",
"libbinder",
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,7 +2,7 @@
<hal>
<name>android.hardware.media.c2</name>
<transport>hwbinder</transport>
<version>1.1</version>
<version>1.2</version>
<interface>
<name>IComponentStore</name>
<instance>default</instance>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+18 -4
View File
@@ -613,7 +613,6 @@ PRODUCT_PACKAGES += \
vendor.mediatek.hardware.nvram@1.0 \
vendor.mediatek.hardware.nvram@1.1 \
audio.primary.mt6785 \
audio.r_submix.mt6785 \
sound_trigger.primary.default \
libHEVCdec_sa.ca7.android \
libMtkSpeechEnh \
@@ -1280,14 +1279,20 @@ PRODUCT_PACKAGES += \
libccci_util \
libcharon-ss \
libchromanr \
libcodec2_hidl@1.0-v31 \
libcodec2_hidl@1.1-v31 \
libcodec2_hidl@1.2-v31 \
libcodec2_hidl_plugin-v31 \
libcodec2_mtk_c2store \
libcodec2_mtk_vdec \
libcodec2_mtk_venc \
libcodec2_soft_common-v31 \
libcodec2_soft_mtk_alacdec \
libcodec2_soft_mtk_apedec \
libcodec2_soft_mtk_imaadpcmdec \
libcodec2_soft_mtk_mp3dec \
libcodec2_soft_mtk_msadpcmdec \
libcodec2_vndk-v31 \
libcodec2_vpp_qt_plugin \
libcodec2_vpp_rs_plugin \
libcomposer_ext \
@@ -1447,10 +1452,12 @@ PRODUCT_PACKAGES += \
librpc \
libsdk_sr \
libsensor_custom \
libsfplugin_ccodec_utils-v31 \
libsimaka \
libsimlock \
libsimmelock \
libssl-md \
libstagefright_bufferqueue_helper-v33 \
libstereoinfoaccessor_vsdof \
libstorage_otp \
libstrongswan \
@@ -1568,10 +1575,9 @@ PRODUCT_PACKAGES += \
vendor.mediatek.hardware.videotelephony-V1-ndk \
vendor.mediatek.hardware.videotelephony@1.0 \
ImsService \
MtkGbaService \
HotwordEnrollmentOKGoogleCORTEXM4 \
HotwordEnrollmentXGoogleCORTEXM4 \
mediatek-common \
mediatek-framework \
mediatek-ims-base \
mediatek-ims-common \
mediatek-ims-extension-plugin \
@@ -1585,7 +1591,7 @@ PRODUCT_PACKAGES += \
lbs_hidl_service@1.0.xml \
manifest_android.hardware.drm@1.4-service.widevine.xml \
manifest_hwcomposer.xml \
manifest_media_c2_V1_1_default.xml \
manifest_media_c2_V1_2_default.xml \
SoterProvisioningTool \
batterysecret \
bip \
@@ -1661,3 +1667,11 @@ PRODUCT_PACKAGES += \
vendor_lib64_libneuron_runtime_so \
vendor_lib64_libnir_neon_driver_so \
vendor_lib64_libpq_prot_so
PRODUCT_BOOT_JARS += \
mediatek-ims-base \
mediatek-ims-common \
mediatek-ims-extension-plugin \
mediatek-telecom-common \
mediatek-telephony-base \
mediatek-telephony-common