forked from Magisk-Modules-Repo/liboemcryptodisabler
-
Notifications
You must be signed in to change notification settings - Fork 3
/
customize.sh
37 lines (31 loc) · 862 Bytes
/
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
ui_print "*******************************"
ui_print " liboemcrypto.so disabler "
ui_print "*******************************"
# warn if superfluous
bl=$(getprop ro.boot.bootloader)
device=${bl:0:$((${#bl} - 8))}
if ( [ $device = G975F ] || [ $device = G973F ] || [ $device = G970F ] )
then
ui_print "- Warning: This module is not needed on the $device."
ui_print ''
fi
for part in system vendor
do
for libdir in lib lib64
do
if [ -s /$part/$libdir/liboemcrypto.so ]
then
size=$(ls -l /$part/$libdir/liboemcrypto.so | awk '{print $5}')
ui_print "- Found /$part/$libdir/liboemcrypto.so, which is $size bytes."
ui_print "- Neutralising..."
if [ $part = vendor ]
then
instdir=system/vendor
else
instdir=system
fi
mkdir -p $MODPATH/$instdir/$libdir
touch $MODPATH/$instdir/$libdir/liboemcrypto.so
fi
done
done