forked from olegos2/termux-box
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
80 lines (65 loc) · 2.17 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
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
#!/bin/bash
cd
echo ""
echo "Сlick on allow to proceed"
termux-setup-storage & sleep 4 &>/dev/null
while true; do
if [ -e storage ]; then
rm -rf /sdcard/termux-box
break
else
echo "If you denied permission, change it manually in termux app settings now"
fi
sleep 2
done
mkdir -p /sdcard/termux-box
echo ""
echo "Updating termux packages"
apt-get clean
apt-get update >/dev/null 2>&1
apt-get -y --with-new-pkgs -o Dpkg::Options::="--force-confdef" upgrade >/dev/null 2>&1
echo ""
echo "Installing necessary packages"
pkg install x11-repo -y &>/dev/null
pkg install pulseaudio -y &>/dev/null
pkg install xwayland -y &>/dev/null
pkg install proot -y &>/dev/null
pkg install wget -y &>/dev/null
pkg install tsu -y &>/dev/null
pkg install root-repo -y &>/dev/null
rm -rf $HOME/termux-box
mkdir -p $HOME/termux-box
cd $HOME/termux-box
wget https://github.com/olegos2/termux-box/raw/main/components/termux-x11-1.02.07-0-all.deb &>/dev/null
dpkg -i termux-x11-1.02.07-0-all.deb &>/dev/null
rm -rf termux-x11-1.02.07-0-all.deb
echo "Downloading preconfigured Rootfs..."
cd $HOME/termux-box
wget -q --show-progress https://github.com/olegos2/termux-box/releases/download/0.0.1-alpha/rootfs.tar.xz
echo "Unzipping Rootfs..."
tar -xf rootfs.tar.xz
rm -rf rootfs.tar.xz
cd $HOME/termux-box/ubuntu-fs/opt
wget https://github.com/olegos2/termux-box/raw/main/scripts/scripts.tar.gz &>/dev/null
tar -xf scripts.tar.gz
rm -rf scripts.tar.gz
cd $HOME/termux-box/
wget -N https://github.com/olegos2/termux-box/raw/main/scripts/termux-box &>/dev/null
chmod +x termux-box
mv termux-box $PREFIX/bin/
wget -N https://github.com/olegos2/termux-box/raw/main/scripts/start-proot.sh &>/dev/null
wget -N https://github.com/olegos2/termux-box/raw/main/scripts/start-chroot.sh &>/dev/null
chmod +x start-proot.sh
chmod +x start-chroot.sh
echo "Installing patch"
cd $HOME/termux-box/ubuntu-fs
wget -q --show-progress https://github.com/olegos2/termux-box/releases/download/0.0.1-alpha/patch.tar.xz
rm -rf opt/d3d
rm -rf opt/mesa
tar -xf patch.tar.xz
rm -rf patch.tar.xz
cd
echo "Starting termux-box now. Next time use \"termux-box\" command to run it."
sleep 2
rm -rf "$0"
. $PREFIX/bin/termux-box