mirror of
https://github.com/pjgowtham/android_device_realme_ferrarri.git
synced 2026-02-16 02:30:41 +00:00
lemonadep: Switch to py extract utils
Change-Id: I5618bf10c107df579a540e2393b222128961e670
This commit is contained in:
51
extract-files.py
Executable file
51
extract-files.py
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/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.main import (
|
||||
ExtractUtils,
|
||||
ExtractUtilsModule,
|
||||
)
|
||||
|
||||
namespace_imports = [
|
||||
'vendor/oneplus/sm8350-common',
|
||||
]
|
||||
|
||||
blob_fixups: blob_fixups_user_type = {
|
||||
'odm/etc/camera/CameraHWConfiguration.config': blob_fixup()
|
||||
.regex_replace('SystemCamera = 0; 0; 1; 1; 1; 1', 'SystemCamera = 0; 0; 0; 0; 0; 1'),
|
||||
('odm/lib/liblvimfs_wrapper.so', 'odm/lib64/libCOppLceTonemapAPI.so', 'odm/lib64/libaps_frame_registration.so', 'vendor/lib64/libalsc.so'): blob_fixup()
|
||||
.replace_needed('libstdc++.so', 'libstdc++_vendor.so'),
|
||||
'vendor/etc/libnfc-nci.conf': blob_fixup()
|
||||
.regex_replace('NFC_DEBUG_ENABLED=1', 'NFC_DEBUG_ENABLED=0'),
|
||||
'vendor/etc/libnfc-nxp.conf': blob_fixup()
|
||||
.regex_replace('(NXPLOG_.*_LOGLEVEL)=0x03', '\\1=0x02')
|
||||
.regex_replace('NFC_DEBUG_ENABLED=1', 'NFC_DEBUG_ENABLED=0'),
|
||||
'vendor/lib/hw/audio.primary.lahaina.so': blob_fixup()
|
||||
.replace_needed('/vendor/lib/liba2dpoffload.so', '/odm/lib/liba2dpoffload.so')
|
||||
.replace_needed('/vendor/lib/libssrec.so', '/odm/lib/libssrec.so'),
|
||||
'vendor/lib/libgui1_vendor.so': blob_fixup()
|
||||
.replace_needed('libui.so', 'libui-v30.so'),
|
||||
'vendor/lib64/vendor.qti.hardware.camera.postproc@1.0-service-impl.so': blob_fixup()
|
||||
.sig_replace('27 0B 00 94', '1F 20 03 D5'),
|
||||
} # fmt: skip
|
||||
|
||||
module = ExtractUtilsModule(
|
||||
'lemonadep',
|
||||
'oneplus',
|
||||
namespace_imports=namespace_imports,
|
||||
blob_fixups=blob_fixups,
|
||||
add_firmware_proprietary_file=True,
|
||||
)
|
||||
|
||||
if __name__ == '__main__':
|
||||
utils = ExtractUtils.device_with_common(
|
||||
module, 'sm8350-common', module.vendor
|
||||
)
|
||||
utils.run()
|
||||
@@ -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=lemonadep
|
||||
export DEVICE_COMMON=sm8350-common
|
||||
export VENDOR=oneplus
|
||||
export VENDOR_COMMON=${VENDOR}
|
||||
|
||||
"./../../${VENDOR_COMMON}/${DEVICE_COMMON}/extract-files.sh" "$@"
|
||||
1
setup-makefiles.py
Executable file
1
setup-makefiles.py
Executable file
@@ -0,0 +1 @@
|
||||
#!./extract-files.py --regenerate_makefiles
|
||||
@@ -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=lemonadep
|
||||
export DEVICE_COMMON=sm8350-common
|
||||
export VENDOR=oneplus
|
||||
export VENDOR_COMMON=${VENDOR}
|
||||
|
||||
"./../../${VENDOR_COMMON}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"
|
||||
Reference in New Issue
Block a user