9 Commits
bq2 ... vic

Author SHA1 Message Date
Bruno Martins
0272482e66 venus: Switch to PowerShare AIDL
Change-Id: I97400638493a3b9d5a3b87fa6831c9affc7c3def
2025-05-18 03:08:44 +09:00
Bruno Martins
68d7a4edd0 venus: Set camera override format from reserved via soong config
Change-Id: I6a089e783f26c4515940d74f8e912dffa2789550
Signed-off-by: Fiqri Ardyansyah <fiqri191002@gmail.com>
2025-05-18 02:51:16 +09:00
Joey Huab
6dfee072eb venus: Move camera package name flag to select() 2025-04-30 17:30:43 +09:00
Rohit Sekhar
5639d22095 venus: set TARGET_CAMERA_OVERRIDE_FORMAT_FROM_RESERVED 2025-04-26 18:35:13 +09:00
kamikaonashi
c59e41dd6a venus: remove duplicates from proprietary-files 2025-04-26 18:35:13 +09:00
ralph950412
87b7b9e73f fixup! venus: Patch xiaomi camera libraries
Change-Id: I9b1082497ed97cd6e56af30b9a89144471f7dc78
2025-04-26 18:35:13 +09:00
LuK1337
335cc8d5ba venus: Fix elfchecks for camera libs
Reference: I23190f0b83c9e28aa2624a7575544b0eaf5c83c8
Change-Id: I18b0b07bf3a435dd449106653e3ca458b4f07b69
Signed-off-by: ralph950412 <ralph950412@gmail.com>
2025-04-26 18:35:13 +09:00
pix106
d765ecbcae venus: Migrate to py extract utils 2025-04-26 18:35:13 +09:00
42c04fe499 venus: Initialize for Evolution X 10.x 2025-04-26 18:35:13 +09:00
10 changed files with 137 additions and 103 deletions

View File

@@ -1,10 +0,0 @@
[
{
"repository": "crdroidandroid/android_device_xiaomi_sm8350-common",
"target_path": "device/xiaomi/sm8350-common"
},
{
"repository": "crdroidandroid/proprietary_vendor_xiaomi_venus",
"target_path": "vendor/xiaomi/venus"
}
]

View File

@@ -9,6 +9,8 @@ $(call inherit-product, device/xiaomi/sm8350-common/common.mk)
# Inherit from miuicamera-venus
$(call inherit-product-if-exists, device/xiaomi/miuicamera-venus/device.mk)
$(call soong_config_set,camera,override_format_from_reserved,true)
$(call soong_config_set,camera,package_name,com.android.camera)
# Display Device Config
PRODUCT_COPY_FILES += \
@@ -25,7 +27,7 @@ DEVICE_PACKAGE_OVERLAYS += \
# PowerShare
PRODUCT_PACKAGES += \
vendor.lineage.powershare@1.0-service.default
vendor.lineage.powershare-service.default
# Sensors
PRODUCT_PACKAGES += \

34
evolution.dependencies Normal file
View File

@@ -0,0 +1,34 @@
[
{
"repository": "device_xiaomi_sm8350-common",
"target_path": "device/xiaomi/sm8350-common"
},
{
"repository": "vendor_xiaomi_sm8350-common",
"target_path": "vendor/xiaomi/sm8350-common"
},
{
"repository": "vendor_xiaomi_venus",
"target_path": "vendor/xiaomi/venus"
},
{
"repository": "hardware_xiaomi",
"target_path": "hardware/xiaomi"
},
{
"repository": "device_xiaomi_miuicamera-venus",
"target_path": "device/xiaomi/miuicamera-venus"
},
{
"repository": "vendor_xiaomi_miuicamera-venus",
"target_path": "vendor/xiaomi/miuicamera-venus"
},
{
"repository": "packages_apps_ViPER4AndroidFX",
"target_path": "packages/apps/ViPER4AndroidFX"
},
{
"repository": "kernel_xiaomi_venus",
"target_path": "kernel/xiaomi/sm8350"
}
]

81
extract-files.py Executable file
View File

@@ -0,0 +1,81 @@
#!/usr/bin/env -S PYTHONPATH=../../../tools/extract-utils python3
#
# SPDX-FileCopyrightText: 2024 The LineageOS Project
# SPDX-License-Identifier: Apache-2.0
#
from extract_utils.fixups_blob import (
blob_fixup,
blob_fixups_user_type,
)
from extract_utils.fixups_lib import (
lib_fixups,
lib_fixups_user_type,
)
from extract_utils.main import (
ExtractUtils,
ExtractUtilsModule,
)
namespace_imports = [
'hardware/qcom-caf/sm8350',
'hardware/xiaomi',
'vendor/qcom/opensource/display',
'vendor/xiaomi/sm8350-common',
'vendor/xiaomi/venus',
]
def lib_fixup_vendor_suffix(lib: str, partition: str, *args, **kwargs):
return f'{lib}_{partition}' if partition == 'vendor' else None
lib_fixups: lib_fixups_user_type = {
**lib_fixups,
(
): lib_fixup_vendor_suffix,
}
blob_fixups: blob_fixups_user_type = {
'vendor/etc/camera/pureShot_parameter.xml': blob_fixup()
.regex_replace(r'=(\d+)>', r'="\1">'),
'vendor/etc/libnfc-nxp.conf': blob_fixup()
.regex_replace(r'NXP_T4T_NFCEE_ENABLE=0x01', r'NXP_T4T_NFCEE_ENABLE=0x00'),
'vendor/lib64/hw/camera.qcom.so': blob_fixup()
.binary_regex_replace(b'\x73\x74\x5F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x6C\x69\x63', b'\x63\x61\x6D\x65\x72\x61\x5F\x63\x6E\x66\x2E\x74\x78\x74')
.add_needed('libprocessgroup_shim.so'),
'vendor/lib64/hw/camera.xiaomi.so': blob_fixup()
.sig_replace('AA 06 00 94', '1F 20 03 D5'),
'vendor/lib64/hw/com.qti.chi.override.so': blob_fixup()
.add_needed('libprocessgroup_shim.so'),
('vendor/lib64/libalLDC.so', 'vendor/lib64/libalhLDC.so'): blob_fixup()
.clear_symbol_version('AHardwareBuffer_allocate')
.clear_symbol_version('AHardwareBuffer_describe')
.clear_symbol_version('AHardwareBuffer_lock')
.clear_symbol_version('AHardwareBuffer_release')
.clear_symbol_version('AHardwareBuffer_unlock'),
('vendor/lib64/libarcsoft_hdrplus_hvx_stub.so', 'vendor/lib64/libarcsoft_super_night_raw.so', 'vendor/lib64/libmialgo_rfs.so', 'vendor/lib64/libmiphone_preview_bokeh.so'): blob_fixup()
.clear_symbol_version('remote_handle_close')
.clear_symbol_version('remote_handle_invoke')
.clear_symbol_version('remote_handle_open')
.clear_symbol_version('remote_handle64_close')
.clear_symbol_version('remote_handle64_invoke')
.clear_symbol_version('remote_handle64_open')
.clear_symbol_version('remote_register_buf_attr')
.clear_symbol_version('remote_session_control'),
'vendor/lib64/vendor.qti.hardware.camera.postproc@1.0-service-impl.so': blob_fixup()
.sig_replace('8D 0A 00 94', '1F 20 03 D5'),
'vendor/lib64/vendor.xiaomi.hardware.cameraperf@1.0-impl.so': blob_fixup()
.sig_replace('21 00 80 52 7C 00 00 94', '21 00 80 52 1F 20 03 D5'),
} # fmt: skip
module = ExtractUtilsModule(
'venus',
'xiaomi',
blob_fixups=blob_fixups,
lib_fixups=lib_fixups,
namespace_imports=namespace_imports,
)
if __name__ == '__main__':
utils = ExtractUtils.device(module)
utils.run()

View File

@@ -1,60 +0,0 @@
#!/bin/bash
#
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
# SPDX-License-Identifier: Apache-2.0
#
function blob_fixup() {
case "${1}" in
vendor/etc/camera/pureShot_parameter.xml)
[ "$2" = "" ] && return 0
sed -i 's/=\([0-9]\+\)>/="\1">/g' "${2}"
;;
vendor/etc/libnfc-nxp.conf)
sed -i "s/NXP_T4T_NFCEE_ENABLE=0x01/NXP_T4T_NFCEE_ENABLE=0x00/g"
;;
vendor/lib64/hw/camera.qcom.so)
[ "$2" = "" ] && return 0
sed -i "s/\x73\x74\x5F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x6C\x69\x63/\x63\x61\x6D\x65\x72\x61\x5F\x63\x6E\x66\x2E\x74\x78\x74/g" "${2}"
"${PATCHELF}" --add-needed "libprocessgroup_shim.so" "${2}"
;;
vendor/lib64/hw/camera.xiaomi.so)
[ "$2" = "" ] && return 0
"${SIGSCAN}" -p "AA 06 00 94" -P "1F 20 03 D5" -f "${2}"
;;
vendor/lib64/hw/com.qti.chi.override.so)
[ "$2" = "" ] && return 0
"${PATCHELF}" --add-needed "libprocessgroup_shim.so" "${2}"
;;
vendor/lib64/vendor.qti.hardware.camera.postproc@1.0-service-impl.so)
[ "$2" = "" ] && return 0
"${SIGSCAN}" -p "8D 0A 00 94" -P "1F 20 03 D5" -f "${2}"
;;
vendor/lib64/vendor.xiaomi.hardware.cameraperf@1.0-impl.so)
[ "$2" = "" ] && return 0
"${SIGSCAN}" -p "7C 00 00 94" -P "1F 20 03 D5" -f "${2}"
;;
esac
return 0
}
function blob_fixup_dry() {
blob_fixup "$1" ""
}
# If we're being sourced by the common script that we called,
# stop right here. No need to go down the rabbit hole.
if [ "${BASH_SOURCE[0]}" != "${0}" ]; then
return
fi
set -e
export DEVICE=venus
export DEVICE_COMMON=sm8350-common
export VENDOR=xiaomi
export VENDOR_COMMON=${VENDOR}
"./../../${VENDOR_COMMON}/${DEVICE_COMMON}/extract-files.sh" "$@"

View File

@@ -14,6 +14,10 @@ $(call inherit-product, device/xiaomi/venus/device.mk)
# Inherit some common Lineage stuff.
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
EVO_BUILD_TYPE := Official
TARGET_HAS_UDFPS := true
# Device identifier. This must come after all inclusions.
PRODUCT_BRAND := Xiaomi
PRODUCT_DEVICE := venus
PRODUCT_MANUFACTURER := Xiaomi

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2019-2024 Evolution X
SPDX-License-Identifier: Apache-2.0
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- About device screen, build maintainer -->
<string name="build_maintainer_summary">Joey Huab</string>
<string name="build_maintainer_donate_url">https://linktr.ee/joeyhuab</string>
</resources>

View File

@@ -192,8 +192,8 @@ vendor/lib64/libSNPE.so
vendor/lib64/libaidenoiser.so
vendor/lib64/libalAILDC.so;DISABLE_CHECKELF
vendor/lib64/libalCFR.so
vendor/lib64/libalLDC.so;DISABLE_CHECKELF
vendor/lib64/libalhLDC.so;DISABLE_CHECKELF
vendor/lib64/libalLDC.so
vendor/lib64/libalhLDC.so
vendor/lib64/libbitmlengine.so
vendor/lib64/libblink.so
vendor/lib64/libc++_shared.so
@@ -230,7 +230,6 @@ vendor/lib64/libmibokeh_mask_dsp.so
vendor/lib64/libmiphone_preview_bokeh.so;DISABLE_CHECKELF
vendor/lib64/libmm-color-convertor.so
vendor/lib64/libmpbase.so
vendor/lib64/libnanopb.so
vendor/lib64/libofflinedump.so
vendor/lib64/libofflinelog.so
vendor/lib64/libopencv.so
@@ -241,13 +240,7 @@ vendor/lib64/libqllengine.so;DISABLE_CHECKELF
vendor/lib64/libremosaic_wrapper.so
vendor/lib64/libremosaiclib.so
vendor/lib64/libsnpe_htp.so
vendor/lib64/libsns_api.so
vendor/lib64/libsns_device_mode_stub.so
vendor/lib64/libsns_fastRPC_util.so
vendor/lib64/libsns_low_lat_stream_stub.so
vendor/lib64/libsns_registry_skel.so
vendor/lib64/libsnsapi.so
vendor/lib64/libsnsdiaglog.so
vendor/lib64/libswregistrationalgo.so
vendor/lib64/libsynx.so
vendor/lib64/libtfestriping.so
@@ -273,10 +266,10 @@ vendor/lib64/libarcsoft_dual_sat.so
vendor/lib64/libarcsoft_dual_zoomtranslator.so
vendor/lib64/libarcsoft_dualcam_refocus_image.so
vendor/lib64/libarcsoft_dualcam_refocus_video.so
vendor/lib64/libarcsoft_hdrplus_hvx_stub.so;DISABLE_CHECKELF
vendor/lib64/libarcsoft_hdrplus_hvx_stub.so
vendor/lib64/libarcsoft_portrait_lighting.so
vendor/lib64/libarcsoft_portrait_lighting_c.so
vendor/lib64/libarcsoft_super_night_raw.so;DISABLE_CHECKELF
vendor/lib64/libarcsoft_super_night_raw.so
vendor/lib64/libarcsoft_triple_sat.so
vendor/lib64/libarcsoft_triple_zoomtranslator.so

1
setup-makefiles.py Executable file
View File

@@ -0,0 +1 @@
#!./extract-files.py --regenerate_makefiles

View File

@@ -1,21 +0,0 @@
#!/bin/bash
#
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
# SPDX-License-Identifier: Apache-2.0
#
# If we're being sourced by the common script that we called,
# stop right here. No need to go down the rabbit hole.
if [ "${BASH_SOURCE[0]}" != "${0}" ]; then
return
fi
set -e
export DEVICE=venus
export DEVICE_COMMON=sm8350-common
export VENDOR=xiaomi
export VENDOR_COMMON=${VENDOR}
"./../../${VENDOR_COMMON}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"