-
Notifications
You must be signed in to change notification settings - Fork 13
/
customize.sh
103 lines (88 loc) · 3.08 KB
/
customize.sh
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
92
93
94
95
96
97
98
99
100
101
102
103
#!/system/bin/sh
[ -z "$(magisk --path)" ] && alias magisk='ksu-magisk'
. "$MODPATH/customize-functions.sh"
if ! isMagiskMountCompatible; then
abort ' ***
Aborted by no Magisk-mirrors:
try again either
a.) with official Magisk v27.0 (mounting mirrors), or
b.) after installing "Compatible Magisk-mirroring" Magisk module and rebooting
***'
fi
REPLACE=""
REPLACEFILES=""
# Make patched ALSA utility and Tensor's offload libraries for "ro.audio.usb.period_us"
makeLibraries
# Remove post-A13 (especially Tensor's) spatial audio flags in an audio configuration file for avoiding errors
deSpatializeAudioPolicyConfig "/vendor/etc/bluetooth_audio_policy_configuration_7_0.xml"
# Disable pre-installed Moto Dolby faetures and Wellbeing for reducing very large jitter caused by them
# Excluded "MotorolaSettingsProvider" on Motorala devices only for avoiding their bootloop
if [ "`getprop ro.product.manufacturer`" = "motorola" -o "`getprop ro.product.manufacturer`" = "Motorola" ]; then
disablePrivApps "
/system_ext/priv-app/MotoDolbyDax3
/system_ext/priv-app/daxService
/system_ext/priv-app/DaxUI
/system_ext/app/MotoSignatureApp
/product/priv-app/WellbeingPrebuilt
/product/priv-app/Wellbeing
/system_ext/priv-app/WellbeingPrebuilt
/system_ext/priv-app/Wellbeing
"
else
disablePrivApps "
/system_ext/priv-app/MotoDolbyDax3
/system_ext/priv-app/MotorolaSettingsProvider
/system_ext/priv-app/daxService
/system_ext/priv-app/DaxUI
/system_ext/app/MotoSignatureApp
/product/priv-app/WellbeingPrebuilt
/product/priv-app/Wellbeing
/system_ext/priv-app/WellbeingPrebuilt
/system_ext/priv-app/Wellbeing
"
fi
if "$IS64BIT"; then
board="`getprop ro.board.platform`"
case "$board" in
zuma* | "pineapple" )
replaceSystemProps_VHPerf
;;
"kona" | "kalama" | "shima" | "yupik" )
replaceSystemProps_Kona
;;
"sdm845" )
replaceSystemProps_SDM845
;;
gs* )
replaceSystemProps_Tensor
;;
"sdm660" | "bengal" | "holi" )
replaceSystemProps_SDM
;;
mt68* )
replaceSystemProps_MTK_Dimensity
;;
mt67[56]? )
replaceSystemProps_Others
;;
* )
replaceSystemProps_Others
;;
esac
else
if [ "`getprop ro.build.product`" = "jfltexx" ]; then
replaceSystemProps_S4
else
replaceSystemProps_Old
fi
fi
# AudioFlinger's resampler has a bug on an Android OS of which version is less than 12.
# This bug makes the resampler to distort audible audio output by wrong aliasing processing
# when specifying a transition band around or higher than the Nyquist frequency
if [ "`getprop ro.system.build.version.release`" -lt "12" -a "`getprop ro.system.build.date.utc`" -lt "1648632000" ]; then
mv -f "$MODPATH/system.prop-workaround" "$MODPATH/system.prop"
else
rm -f "$MODPATH/system.prop-workaround"
fi
rm -f "$MODPATH/customize-functions.sh" "$MODPATH/LICENSE" "$MODPATH/README.md" "$MODPATH/changelog.md"
ui_print_replacelist "$REPLACEFILES"