-
Notifications
You must be signed in to change notification settings - Fork 0
/
unpack.sh
161 lines (156 loc) · 4.94 KB
/
unpack.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
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#!/bin/bash
#Unpack Repack Boot.img By M24-XT
#binary by NamakuHendra : https://github.com/NamakuHendra/mkbootimg-unpackbootimg_android
#Thanks !
#v1.0-1
#Warna
W='\033[1;37m'
B='\033[1;34m'
R='\033[1;31m'
G='\033[1;32m'
Y='\033[1;33m'
binary=`pwd`
xz=`ls $binary | grep 'img'`
os=`echo $OSTYPE`
#Binary variable gk digunain awikwok
#fun
out(){
clear
sleep 1.5
echo $Y ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
sleep 0.1
echo ""
echo $Y Made BY M24-XT
echo ""
sleep 0.1
echo $Y ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
sleep 1.5
clear
sleep 0.5
exit
}
bck(){
main
}
unpck(){
sleep 1
clear
echo $Y ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
sleep 0.1
figlet UNPACK
sleep 0.1
echo $Y ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
echo ""
echo ""
echo $Y
read -p "Nama Boot Img : " img
mkdir unpack
./unpackbootimg -i $img -o unpack
echo $G [+] Sukses Unpack !
sleep 1
bck
}
repck(){
sleep 1
clear
echo $Y ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
sleep 0.1
figlet REPACK
echo $Y ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
echo ""
echo ""
echo $R COMING SOON !
sleep 2
bck
}
main(){
sleep 1
clear
sleep 0.5
echo $Y {}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━{}
sleep 0.1
echo ""
figlet MAIN MENU
echo ""
echo $Y {}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━{}
sleep 0.1
echo ""
echo $G "v1.2-0-Stable No Repack"
echo ""
echo $G " 1 > Unpack Boot.img 2 > Repack Boot"
sleep 0.1
echo ""
echo $G " 00 > Keluar "
echo ""
echo ""
echo $W
read -p "> " pil
case "$pil" in
1) unpck;;
2) repck;;
00) out;;
*) echo $R Pilihan Invalid
main;;
esac
}
pkgsetup(){
sleep 1
clear
sleep 0.5
echo $W ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
sleep 0.1
echo $Y [*] Ini Adalah Package Setup, Sabar....
sleep 0.1
echo $W ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
echo $Y Memulai Setup......
sleep 1.5
clear
apt-get update -y&&apt-get upgrade -y
apt-get install ruby -y
apt-get install figlet -y
gem install lolcat
sleep 0.5
clear
sleep 0.5 echo $W ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
sleep 0.1
echo $G [✓] Setup Selesai !
sleep 0.1
echo $W ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
sleep 0.5
main
}
chck_pkg(){
if [ -f $pkg_dir/git ];then
if [ -f $pkg_dir/lolcat ];then
if [ -f $pkg_dir/figlet ];then
clear
sleep 1
echo $W ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
sleep 0.1
echo $G "[+] Git,Figlet dan lolcat telah diinstall"
sleep 0.1
echo $W ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
sleep 1
main
else
pkgsetup
fi
fi
fi
}
if [ $os==linux-android ];then
pkg_dir=/data/data/com.termux/files/usr/bim
chck_pkg
elif [ $os==linux-gnu ];then
pkg_dir=/usr/bin
chck_pkg
else
echo $W ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
sleep 0.1
echo $R [-] Unknown OS
sleep 0.1
echo $W ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━{
sleep
clear
fi
main