forked from broodplank/ProprietaryLibCleaner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPLC
executable file
·145 lines (120 loc) · 3.22 KB
/
PLC
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#!/bin/bash
#Proprietary Lib Cleaner v0.5
#PLC Main Script
#Copyright (c) 2014. broodplank.net
bold=`tput bold`
normal=`tput sgr0`
while :
do
clear;
if [ -e dbs/output ]; then
rm dbs/output
fi;
if [ -e dbs/targets ]; then
rm dbs/targets
fi;
if [ -e dbs/targetset ]; then
rm dbs/targetset
fi;
if [ -e test ]; then
rm test
fi;
echo
echo "=============================================="
echo "==> ${bold}Proprietary Lib Cleaner Version 0.5"
echo "==> Created by broodplank1337 @ XDA "
echo "==> Copyright (c) 2014 broodplank.net${normal}"
echo "=============================================="
echo
echo
echo "${bold}==ᐶ Install${normal}"
echo
echo " [1] Install ADB + USB driver on PC"
echo " [2] Install Swiss File Knife on phone"
echo
echo "${bold}==ᐶ General${normal}"
echo
echo " [3] Information"
echo " [4] View targets & patches"
echo
echo "${bold}==ᐶ Actions${normal}"
echo
echo " [5] Set target & start patch"
echo " [6] Exit"
echo
echo
echo -en "${bold}==ᐶ Menu Selection: "
read opt
echo "${normal}"
if [ "$?" != "x" ]
then
case $opt in
1) clear;
echo
echo "${bold}Installing ADB and ADB Drivers${normal}"
sudo add-apt-repository ppa:nilarimogard/webupd8 -y;
sudo apt-get update;
sudo apt-get install android-tools-adb -y;
echo "Done!"
echo
echo "Installing ADB Drivers"
wget http://www.broodplank.net/51-android.rules
sudo mv -f 51-android.rules /etc/udev/rules.d/51-android.rules
sudo chmod 644 /etc/udev/rules.d/51-android.rules
echo "Done!"
;;
2) clear;
echo
echo "${bold}Installing Swiss File Knife to phone${normal}"
echo "Make sure your phone is in debugging mode"
echo
echo "Waiting for device..."
echo
adb -d wait-for-device
echo "Mounting system";
adb -d remount;
echo "Pushing file to /system/bin";
adb -d push ${PWD}/sfk /system/bin/sfk;
echo "Setting mode to 755 (RWX-RX-RX)";
adb -d shell chmod 755 /system/bin/sfk;
echo "Done!";
echo -n "Press [enter] to continue"
read enter
continue;;
3) clear;
echo
echo "0"
echo "|========================================="
echo "|==> Proprietary Lib Cleaner ="
echo "|==> Created by broodplank1337 @ XDA ="
echo "|==> Copyright (c) 2014 broodplank.net ="
echo "|========================================="
echo "|"
echo "| Proprietary libs/binaries tend to spam logcat an awful lot, making it harder"
echo "| for you to properly read logcat, that's why I have created this tool that"
echo "| allows you to remove certain common lines, which you do NOT want to see in"
echo "| your logcat all the time, This will make logcat much more peacful and readable"
echo "|"
echo "| - 'The quieter you become the more you are able to hear'"
echo "|"
echo "| >>> WARNING: Use this tool at your own risk!, It manipulates system files <<<"
echo "|"
echo "|"
echo "^"
echo -n "Press [enter] to continue"
read enter
continue;;
4) clear;
clear;
./dbs/database
;;
5) clear;
clear;
./dbs/picker
;;
6)
exit;;
*) echo "Invalid option"; continue;;
esac
fi
done