forked from kenuku/un-lock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.install
36 lines (29 loc) · 1.42 KB
/
.install
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
#!/data/data/com.termux/files/usr/bin/bash
if ! command -v python3 &>/dev/null; then
printf "\n\n\n\e[1;32mInstalling Python3...\e[0m\n\n\n"
yes | pkg install python3
fi
if ! command -v adb &>/dev/null || ! command -v fastboot &>/dev/null; then
printf "\n\n\n\e[1;32mUpdate & Upgrade Pkg...\e[0m\n\n\n"
yes | apt update && yes | apt upgrade
printf "\n\n\n\e[1;32mInstalling ADB and Fastboot...\e[0m\n\n\n"
yes | pkg uninstall termux-adb 2>/dev/null
curl -s https://raw.githubusercontent.com/nohajc/termux-adb/master/install.sh | bash
ln -s $PREFIX/bin/termux-fastboot $PREFIX/bin/fastboot
ln -s $PREFIX/bin/termux-adb $PREFIX/bin/adb
fi
if ! python3 -c "import Cryptodome" &>/dev/null; then
printf "\n\n\n\e[1;32mInstalling Cryptodome...\e[0m\\n\n\n"
yes | pip install pycryptodomex --extra-index-url https://termux-user-repository.github.io/pypi/
fi
if ! python3 -c "import urllib3" &>/dev/null; then
printf "\n\n\n\e[1;32mInstalling urllib3...\e[0m\\n\n\n"
yes | pip install urllib3
fi
if ! python3 -c "import requests" &>/dev/null; then
printf "\n\n\n\e[1;32mInstalling requests...\e[0m\\n\n\n"
yes | pip install requests
fi
printf "\n\n\n\033[32mupdate MiUnlockTool...\033[0m\n\n\n"
curl "https://raw.githubusercontent.com/offici5l/MiUnlockTool/main/MiUnlockTool.py" -o "$PREFIX/bin/miunlock" && chmod +x "$PREFIX/bin/miunlock"
printf "\n\n\nuse command: \e[1;32mmiunlock\e[0m\n"