-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextract-files.py
executable file
·51 lines (44 loc) · 1.29 KB
/
extract-files.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env -S PYTHONPATH=../../../tools/extract-utils python3
#
# SPDX-FileCopyrightText: 2024-2025 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 = [
'device/xiaomi/miuicamera-sweet',
]
lib_fixups: lib_fixups_user_type = {
**lib_fixups,
}
blob_fixups: blob_fixups_user_type = {
'system/lib64/libcamera_algoup_jni.xiaomi.so': blob_fixup()
.add_needed('libgui_shim_miuicamera.so')
.sig_replace('08 AD 40 F9', '08 A9 40 F9'),
'system/lib64/libcamera_mianode_jni.xiaomi.so': blob_fixup()
.add_needed('libgui_shim_miuicamera.so'),
'system/lib64/libmicampostproc_client.so': blob_fixup()
.remove_needed('libhidltransport.so'),
'system/priv-app/MiuiCamera/MiuiCamera.apk': blob_fixup()
.apktool_patch('patches'),
} # fmt: skip
module = ExtractUtilsModule(
'miuicamera-sweet',
'xiaomi',
blob_fixups=blob_fixups,
lib_fixups=lib_fixups,
namespace_imports=namespace_imports,
)
if __name__ == '__main__':
utils = ExtractUtils.device(module)
utils.run()