mirror of
https://github.com/pjgowtham/android_device_realme_ferrarri.git
synced 2025-08-17 16:46:11 +00:00
lemonadep: Unpin QTI camera postproc
Change-Id: I376cfa8b0ab91814a0b602d68e333164ff90c891
This commit is contained in:
parent
6fce3e1b36
commit
f0980aad5d
@ -5,6 +5,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
from extract_utils.fixups_blob import (
|
from extract_utils.fixups_blob import (
|
||||||
|
BlobFixupCtx,
|
||||||
|
File,
|
||||||
blob_fixup,
|
blob_fixup,
|
||||||
blob_fixups_user_type,
|
blob_fixups_user_type,
|
||||||
)
|
)
|
||||||
@ -15,6 +17,12 @@ from extract_utils.main import (
|
|||||||
ExtractUtils,
|
ExtractUtils,
|
||||||
ExtractUtilsModule,
|
ExtractUtilsModule,
|
||||||
)
|
)
|
||||||
|
from extract_utils.tools import (
|
||||||
|
llvm_objdump_path,
|
||||||
|
)
|
||||||
|
from extract_utils.utils import (
|
||||||
|
run_cmd,
|
||||||
|
)
|
||||||
|
|
||||||
namespace_imports = [
|
namespace_imports = [
|
||||||
'hardware/oplus',
|
'hardware/oplus',
|
||||||
@ -22,6 +30,44 @@ namespace_imports = [
|
|||||||
'vendor/qcom/opensource/display',
|
'vendor/qcom/opensource/display',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def blob_fixup_nop_call(
|
||||||
|
ctx: BlobFixupCtx,
|
||||||
|
file: File,
|
||||||
|
file_path: str,
|
||||||
|
call_instruction: str,
|
||||||
|
disassemble_symbol: str,
|
||||||
|
symbol: str,
|
||||||
|
*args,
|
||||||
|
**kwargs,
|
||||||
|
):
|
||||||
|
for line in run_cmd(
|
||||||
|
[
|
||||||
|
llvm_objdump_path,
|
||||||
|
f'--disassemble-symbols={disassemble_symbol}',
|
||||||
|
file_path,
|
||||||
|
]
|
||||||
|
).splitlines():
|
||||||
|
line = line.split(maxsplit=3)
|
||||||
|
|
||||||
|
if len(line) != 4:
|
||||||
|
continue
|
||||||
|
|
||||||
|
offset, _, instruction, args = line
|
||||||
|
|
||||||
|
if instruction != call_instruction:
|
||||||
|
continue
|
||||||
|
|
||||||
|
if not args.endswith(f' <{symbol}>'):
|
||||||
|
continue
|
||||||
|
|
||||||
|
with open(file_path, 'rb+') as f:
|
||||||
|
f.seek(int(offset[:-1], 16))
|
||||||
|
f.write(b'\x1f\x20\x03\xd5') # AArch64 NOP
|
||||||
|
|
||||||
|
break
|
||||||
|
|
||||||
|
|
||||||
blob_fixups: blob_fixups_user_type = {
|
blob_fixups: blob_fixups_user_type = {
|
||||||
'odm/etc/camera/CameraHWConfiguration.config': blob_fixup()
|
'odm/etc/camera/CameraHWConfiguration.config': blob_fixup()
|
||||||
.regex_replace('SystemCamera = 0; 0; 1; 1; 1; 1', 'SystemCamera = 0; 0; 0; 0; 0; 1'),
|
.regex_replace('SystemCamera = 0; 0; 1; 1; 1; 1', 'SystemCamera = 0; 0; 0; 0; 0; 1'),
|
||||||
@ -41,7 +87,7 @@ blob_fixups: blob_fixups_user_type = {
|
|||||||
'vendor/lib/libextcamera_client.so': blob_fixup()
|
'vendor/lib/libextcamera_client.so': blob_fixup()
|
||||||
.replace_needed('libgui1_vendor.so', 'libgui_vendor.so'),
|
.replace_needed('libgui1_vendor.so', 'libgui_vendor.so'),
|
||||||
'vendor/lib64/vendor.qti.hardware.camera.postproc@1.0-service-impl.so': blob_fixup()
|
'vendor/lib64/vendor.qti.hardware.camera.postproc@1.0-service-impl.so': blob_fixup()
|
||||||
.sig_replace('27 0B 00 94', '1F 20 03 D5'),
|
.call(blob_fixup_nop_call, 'bl', '__cfi_check', '_ZN7android8hardware22configureRpcThreadpoolEmb@plt'),
|
||||||
} # fmt: skip
|
} # fmt: skip
|
||||||
|
|
||||||
module = ExtractUtilsModule(
|
module = ExtractUtilsModule(
|
||||||
|
@ -856,7 +856,7 @@ vendor/lib64/vendor.oplus.hardware.cameraextension-V1-ndk_platform.so
|
|||||||
vendor/lib64/vendor.oplus.hardware.cammidasservice@1.0.so
|
vendor/lib64/vendor.oplus.hardware.cammidasservice@1.0.so
|
||||||
vendor/lib64/vendor.oplus.hardware.osense.client-V1-ndk_platform.so
|
vendor/lib64/vendor.oplus.hardware.osense.client-V1-ndk_platform.so
|
||||||
vendor/lib64/vendor.oplus.hardware.sendextcamcmd-V1-ndk_platform.so
|
vendor/lib64/vendor.oplus.hardware.sendextcamcmd-V1-ndk_platform.so
|
||||||
vendor/lib64/vendor.qti.hardware.camera.postproc@1.0-service-impl.so|38ff048bb7f0a372e0d6ae88144bef2c01b8d10f|b08ed1ebb4298f9c9629ead4c8e088d7d543bc18
|
vendor/lib64/vendor.qti.hardware.camera.postproc@1.0-service-impl.so
|
||||||
|
|
||||||
# Camera firmware
|
# Camera firmware
|
||||||
vendor/firmware/CAMERA_ICP.elf
|
vendor/firmware/CAMERA_ICP.elf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user