This repository has been archived by the owner on Aug 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
realme_sdm710_unifying_script.sh
63 lines (59 loc) · 1.93 KB
/
realme_sdm710_unifying_script.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
#!/sbin/sh
#
# Copyright (C) 2020 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
# Get device codename
RMX_PEAFOWL=$(getprop "ro.product.model")
RMX_PEAFOWL_EU=$(getprop "ro.boot.product.hardware.sku")
# Remove camera motor hal in devices other than realme X
if [ "$RMX_PEAFOWL" = "RMX1901" ]; then
echo "Preserving camera motor hal"
else
echo "Attempting to remove camera motor hal"
rm -rf /vendor/bin/hw/*motor*
rm -rf /vendor/etc/init/hw/*motor*
rm -rf /vendor/etc/init/*motor*
rm -rf /vendor/lib/*motor*
rm -rf /vendor/lib64/*motor*
rm -rf /vendor/etc/vintf/manifest/*motor*
echo "Done removing camera motor hal"
fi
# Remove FOD hal in devices other than realme X and XT
if [ "$RMX_PEAFOWL" = "RMX1901" ] || [ "$RMX_PEAFOWL" = "RMX1921" ] ; then
echo "Preserving FOD hal"
else
echo "Attempting to remove FOD hal"
rm -rf /vendor/bin/hw/*inscreen*
rm -rf /vendor/etc/init/*inscreen*
rm -rf /vendor/lib/*inscreen*
rm -rf /vendor/lib64/*inscreen*
rm -rf /vendor/etc/vintf/manifest/*inscreen*
echo "Done removing FOD hal"
fi
# Remove NFC stuffs on devices other than EU/RU versions of Realme XT
if [ "$RMX_PEAFOWL_EU" = "nfc_ese" ] || [ "$RMX_PEAFOWL_EU" = "RMX1921EU" ] ] ; then
echo "Preserving NFC feature"
else
echo "Attempting to remove NFC feature"
# Remove NFC
rm -rf /system/app/*Nfc*
rm -rf /system/etc/permissions/*nfc*
rm -rf /system/framework/*nfc*
rm -rf /system/lib/*nfc*
rm -rf /system/lib64/*nfc*
rm -rf /system/priv-app/Tag
rm -rf /vendor/app/SmartcardService
rm -rf /vendor/bin/*nfc*
rm -rf /vendor/bin/hw/*nfc*
rm -rf /vendor/etc/*nfc*
rm -rf /vendor/etc/init/*nfc*
rm -rf /vendor/etc/permissions/*nfc*
rm -rf /vendor/firmware/libpn553_fw.so
rm -rf /vendor/lib/*nfc*
rm -rf /vendor/lib/hw/*nfc*
rm -rf /vendor/lib64/*nfc*
rm -rf /vendor/lib64/hw/*nfc*
echo "Done removing NFC feature"
fi