-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
export Rootfs="$HOME/Box4Droid/ubuntu-fs/" | ||
termux-x11 :1 &>/dev/null & pulseaudio --start --load="module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" --exit-idle-time=-1 | ||
cd $HOME/Box4Droid/ | ||
./start-ubuntu.sh | ||
pkill -f "app_process / com.termux.x11" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
echo "" | ||
echo "Сlick on allow to proceed" | ||
termux-setup-storage & sleep 3 &>/dev/null | ||
while true; do | ||
if [ -e storage ]; then | ||
rm -rf storage/shared/Box4Droid | ||
break | ||
else | ||
echo "If you denied permission, change it manually in termux app settings now" | ||
fi | ||
sleep 1 | ||
done | ||
echo "" | ||
echo "Installing packages" | ||
pkg update -y | ||
pkg install x11-repo pulseaudio xwayland proot wget -y &>/dev/null | ||
mkdir -p $HOME/Box4Droid | ||
cd $HOME/Box4Droid | ||
wget https://github.com/olegos2/a/raw/main/termux-x11-1.02.07-0-all.deb | ||
dpkg -i termux-x11-1.02.07-0-all.deb &>/dev/null | ||
rm -rf termux-x11-1.02.07-0-all.deb | ||
|
||
echo "" | ||
echo "Downloading preconfigured Rootfs..." | ||
cd $HOME/Box4Droid | ||
wget https://github.com/olegos2/a/releases/download/0.0.1-alpha/rootfs.tar.xz | ||
|
||
echo "" | ||
echo "Unzipping Rootfs" | ||
tar -xf rootfs.tar.xz | ||
rm -rf rootfs.tar.xz | ||
|
||
echo "" | ||
echo "Installing scripts" | ||
cd $HOME/Box4Droid/ubuntu-fs/opt | ||
wget https://github.com/olegos2/a/raw/main/scripts.tar.gz | ||
tar -xvf scripts.tar.gz | ||
rm -rf scripts.tar.gz | ||
|
||
cd $HOME/Box4Droid/ | ||
wget https://github.com/olegos2/a/raw/main/box | ||
wget https://github.com/olegos2/a/raw/main/start-ubuntu.sh | ||
chmod +x box | ||
mv box $PREFIX/bin/ | ||
chmod +x start-ubuntu.sh | ||
|
||
echo "" | ||
echo "Done. Type 'box' to start" | ||
|
||
rm -rf $HOME/install |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/data/data/com.termux/files/usr/bin/bash | ||
cd $(dirname $0) | ||
pulseaudio --start | ||
## For rooted user: pulseaudio --start --system | ||
## unset LD_PRELOAD in case termux-exec is installed | ||
unset LD_PRELOAD | ||
command="proot" | ||
command+=" --link2symlink" | ||
command+=" -0" | ||
command+=" -r ubuntu-fs" | ||
if [ -n "$(ls -A ubuntu-binds)" ]; then | ||
for f in ubuntu-binds/* ;do | ||
. $f | ||
done | ||
fi | ||
command+=" -b /dev" | ||
command+=" -b /proc" | ||
command+=" -b /sys" | ||
command+=" -b ubuntu-fs/root:/dev/shm" | ||
## uncomment the following line to have access to the home directory of termux | ||
command+=" -b /data/data/com.termux/files/usr/tmp/.virgl_test:/tmp/.virgl_test" | ||
command+=" -b /data/data/com.termux/files/usr/tmp/.X11-unix/:/tmp/.X11-unix/" | ||
command+=" -b /data/data/com.termux/files/usr/tmp/.X1-lock:/tmp/.X1-lock" | ||
## uncomment the following line to mount /sdcard directly to / | ||
command+=" -b /sdcard" | ||
command+=" -w /root" | ||
command+=" /usr/bin/env -i" | ||
command+=" HOME=/root" | ||
command+=" PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/games:/usr/local/games" | ||
command+=" TERM=$TERM" | ||
command+=" LANG=C.UTF-8" | ||
command+=" /bin/bash --login" | ||
com="$@" | ||
if [ -z "$1" ];then | ||
exec $command | ||
else | ||
$command -c "$com" | ||
fi |
Binary file not shown.