-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextract-files.py
executable file
·91 lines (85 loc) · 2.6 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/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_fixup_remove,
lib_fixups,
lib_fixups_user_type,
)
from extract_utils.main import (
ExtractUtils,
ExtractUtilsModule,
)
namespace_imports = [
'vendor/xiaomi/sdm660-common',
'device/xiaomi/sdm660-common',
'hardware/qcom-caf/msm8998',
'hardware/qcom-caf/wlan',
'hardware/xiaomi',
'vendor/qcom/opensource/data-ipa-cfg-mgr-legacy-um',
'vendor/qcom/opensource/dataservices',
]
lib_fixups: lib_fixups_user_type = {
**lib_fixups,
(
'libllvd_smore',
): lib_fixup_remove,
}
blob_fixups: blob_fixups_user_type = {
(
'vendor/lib/hw/camera.sdm660.so',
): blob_fixup()
.add_needed('libcamera_sdm660_shim.so'),
(
'vendor/lib/libFaceGrade.so',
): blob_fixup()
.remove_needed('libandroid.so')
.replace_needed('libstdc++.so', 'libstdc++_vendor.so'),
(
'vendor/lib/libXMFD_AgeGender.so',
'vendor/lib/lib_lowlight.so',
'vendor/lib/libarcsoft_beautyshot.so',
'vendor/lib/libchromaflash.so',
'vendor/lib/libdualcameraddm.so',
'vendor/lib/libmmcamera_hdr_gb_lib.so',
'vendor/lib/liboptizoom.so',
'vendor/lib/libseemore.so',
'vendor/lib/libtrueportrait.so',
'vendor/lib/libts_detected_face_hal.so',
'vendor/lib/libts_face_beautify_hal.so',
'vendor/lib/libubifocus.so',
'vendor/lib/libvideobokeh.so',
'vendor/lib64/libchromaflash.so',
'vendor/lib64/libdualcameraddm.so',
'vendor/lib64/liboptizoom.so',
'vendor/lib64/libseemore.so',
'vendor/lib64/libts_detected_face_hal.so',
'vendor/lib64/libts_face_beautify_hal.so',
'vendor/lib64/libubifocus.so',
'vendor/lib64/libvideobokeh.so',
): blob_fixup()
.replace_needed('libstdc++.so', 'libstdc++_vendor.so'),
(
'vendor/lib/[email protected]',
'vendor/lib64/[email protected]',
): blob_fixup()
.replace_needed('libhidlbase.so', 'libhidlbase-v32.so'),
} # fmt: skip
module = ExtractUtilsModule(
'clover',
'xiaomi',
blob_fixups=blob_fixups,
lib_fixups=lib_fixups,
namespace_imports=namespace_imports,
)
if __name__ == '__main__':
utils = ExtractUtils.device_with_common(
module, 'sdm660-common', module.vendor
)
utils.run()