-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.sh
55 lines (50 loc) · 1.21 KB
/
config.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
AUTOMOUNT=true
PROPFILE=false
POSTFSDATA=false
LATESTARTSERVICE=true
print_modname() {
ui_print "*******************************"
ui_print " TTL Fix (TTL Target module) "
ui_print " for stock Xiaomi Mi8, MiMix3, "
ui_print " MiMix2S, Pocophone F1 kernels "
ui_print " by LazyMind "
ui_print " (forum.smartsworld.ru) "
ui_print "*******************************"
}
REPLACE="
"
set_permissions() {
# The following is default permissions, DO NOT remove
set_perm_recursive $MODPATH 0 0 0755 0644
}
#------------------------------//////-----------------------------#
#Checking for supported device. Thx @Didgeridoohan for this function.
device_fn() {
# Variables
DEVFND=0
DEVICES="
dipper
polaris
perseus
beryllium
equuleus
ursa
"
# Device check
for ITEM in $DEVICES; do
if [ $(getprop ro.product.name) == $ITEM ] ; then
DEVFND=1
break
fi
done
# Abort if no match
if [ $DEVFND == 0 ]; then
abort "Unsupported device ($(getprop ro.product.name)) or modified buld.prop"
fi
}
#Checking API version. Thx @Didgeridoohan for this function.
sdkver_fn() {
if ! [ $API -ge 28 ] && [ $API -le 28 ]; then
abort "Unsupported Android version (API $API) or modified build.prop"
fi
}