-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpost-fs-data.sh
37 lines (29 loc) · 1.59 KB
/
post-fs-data.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
#!/system/bin/sh
# Do NOT assume where your module will be located.
# ALWAYS use $MODDIR if you need to know where this script and module are placed.
# This will make sure your module will still work if Magisk changes its mount point in the future
[ -z "$(magisk --path)" ] && alias magisk='ksu-magisk'
MODDIR=${0%/*}
MAGISKTMP="$(magisk --path)/.magisk"
# Note: Don't use "${MAGISKTMP}/mirror/system/vendor/*" instaed of "${MAGISKTMP}/mirror/vendor/*".
# In some cases, the former may link to overlaied "/system/vendor" by Magisk itself (not mirrored original one).
# This script will be executed in post-fs-data mode
# "full" below this line means "up to 386kHz unlock";
# for "up to 768kHz unlock", replace "full" with "max" below this line;
# for "up to 192kHz unlock", replace "full" with "default" below this line.
. "$MODDIR/functions2.sh"
for lname in "libalsautils.so" "libalsautilsv2.so"; do
for ld in "lib" "lib64"; do
if [ -r "${MAGISKTMP}/mirror/vendor/${ld}/${lname}" -a -w "${MODDIR}/system/vendor/${ld}/${lname}" ]; then
patchClearLock "${MAGISKTMP}/mirror/vendor/${ld}/${lname}" "${MODDIR}/system/vendor/${ld}/${lname}" "full"
fi
done
done
for lname in "audio_usb_aoc.so"; do
for ld in "lib" "lib64"; do
if [ -r "${MAGISKTMP}/mirror/vendor/${ld}/${lname}" -a -w "${MODDIR}/system/vendor/${ld}/${lname}" ]; then
patchClearTensorOffloadLock "${MAGISKTMP}/mirror/vendor/${ld}/${lname}" "${MODDIR}/system/vendor/${ld}/${lname}"
fi
done
done
# End of patch