This repository has been archived by the owner on Apr 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 196
/
06-disable-protection
executable file
·63 lines (50 loc) · 1.63 KB
/
06-disable-protection
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
. "$env"
print "Removing Samsung secure kernel info..."
rm /system/*info*
print "Disabling SELinux enforcement..."
setprop ro.build.selinux 1
setprop ro.build.selinux.enforce 0
setprop ro.boot.selinux permissive
print "Disabling Knox..."
rm -rf /system/app/SecurityLogAgent
setprop ro.config.knox 0
setprop ro.config.kap false
delprop ro.config.kap_default_on
setprop ro.securestorage.support false
print "Disabling TIMA..."
setprop ro.config.tima 0
setprop ro.config.rkp false
delprop ro.config.timaversion
print "Disabling HDCP enforcing..."
setprop wlan.wfd.hdcp disable
print "Adding private mode support..."
insert_after_last init.rc "import /init\\..*\\.rc" "import /init.privatemode.rc"
#print "Probably unnecessary"
#setprop ro.sec.fle.encryption false
print "Applying MobiCore/TUI service fix..."
cat <<EOF > "$tmp/keepmc"
00060308060501020000000000000000.tlbin
07060000000000000000000000000000.tlbin
08130000000000000000000000000000.tlbin
ffffffff000000000000000000000005.tlbin
ffffffff00000000000000000000000e.tlbin
ffffffff000000000000000000000016.tlbin
ffffffff000000000000000000000019.tlbin
ffffffff00000000000000000000001f.tlbin
ffffffff00000000000000000000002e.tlbin
ffffffff000000000000000000000042.tlbin
ffffffff000000000000000000000047.tlbin
ffffffffd00000000000000000000004.tlbin
ffffffffd0000000000000000000000e.tlbin
ffffffffd00000000000000000000014.tlbin
ffffffffd00000000000000000000016.tlbin
ffffffffd00000000000000000000017.tlbin
ffffffffd0000000000000000000001a.tlbin
EOF
cd /system/app/mcRegistry
for tlbin in *.tlbin; do
grep -q "/^$tlbin\$/" "$tmp/keepmc" || rm "$tlbin"
done
rm -rf /system/app/TuiService
exit 0