diff --git a/Scripts/InstallScript/GUI XFCE/LinuxXfce.zip b/Scripts/InstallScript/GUI XFCE/LinuxXfce.zip new file mode 100644 index 0000000..f2871a3 Binary files /dev/null and b/Scripts/InstallScript/GUI XFCE/LinuxXfce.zip differ diff --git a/Scripts/InstallScript/GUI XFCE/alpinexfce.sh b/Scripts/InstallScript/GUI XFCE/alpinexfce.sh new file mode 100644 index 0000000..7af1afb --- /dev/null +++ b/Scripts/InstallScript/GUI XFCE/alpinexfce.sh @@ -0,0 +1,164 @@ +#!/data/data/com.termux/files/usr/bin/bash +pkg install wget pv proot tar -y +#Variables we need. Script is modular, change below variables to install different distro's +name="Alpine" +distro=alpine +folder=$distro-fs +tarball="alpine-rootfs.tar.gz" +echo " " +echo " " +echo "----------------------------------------------------------" +echo "| NOTE THAT ALL THE PREVIOUS ALPINE DATA WILL BE ERASED |" +echo "----------------------------------------------------------" +echo "If you want to keep your old $distro press Ctrl - c now!! " +echo -n "5. " +sleep 1 +echo -n "4. " +sleep 1 +echo -n "3. " +sleep 1 +echo -n "2. " +sleep 1 +echo -n "1. " +sleep 1 +echo "Removing $folder and $distro-binds" +chmod 777 $folder +rm -rf $distro-binds $folder +echo " " +echo "Proceeding with installation" +echo " " +echo "Allow the Storage permission to termux" +echo " " +sleep 2 +termux-setup-storage +clear + +#Creating folders we need +mkdir -p $distro-binds $folder + +#Performing a check for online or offline install +[ -f $tarball ] && check=1 +if [ "$check" -eq "1" ] > /dev/null 2>&1; then + echo "Local $distro rootfs found, extracting" + echo "" + if [ -x "$(command -v neofetch)" ]; then + neofetch --ascii_distro Alpine -L + fi + echo "" + pv $tarball | proot --link2symlink tar -zxf - -C $folder || : +else + case `dpkg --print-architecture` in + aarch64) + archurl="aarch64" ;; + arm) + archurl="armhf" ;; + amd64) + archurl="x86_64" ;; + x86_64) + archurl="x86_64" ;; + i*86) + archurl="x86" ;; + x86) + archurl="x86" ;; + *) + echo "unknown architecture"; exit 1 ;; + esac + url=https://github.com/AndronixApp/AndronixOrigin/blob/master/Rootfs/Alpine/${archurl}/alpine-minirootfs-3.10.3-${archurl}.tar.gz?raw=true + echo "Downloading and extracting $name" + echo "Extraction happens in parallel" + echo "" + if [ -x "$(command -v neofetch)" ]; then + neofetch --ascii_distro Alpine -L + fi + echo "" + wget -qO- --tries=0 $url --show-progress --progress=bar:force:noscroll |proot --link2symlink tar -zxf - -C $folder --exclude='dev' || : +fi + +bin=start-$distro.sh +if [ -d $folder/var ];then + clear + echo "---------------------------" + echo "| Writing launch script |" + echo "---------------------------" + + cat > $bin <<- EOM + #!/data/data/com.termux/files/usr/bin/bash + cd \$(dirname \$0) + ## unset LD_PRELOAD in case termux-exec is installed + unset LD_PRELOAD + command="proot" + command+=" --link2symlink" + command+=" -0" + command+=" -r $folder" + if [ -n "\$(ls -A $distro-binds)" ]; then + for f in $distro-binds/* ;do + . \$f + done + fi + command+=" -b /dev" + command+=" -b /proc" + command+=" -b $folder/root:/dev/shm" + ## uncomment the following line to have access to the home directory of termux + #command+=" -b /data/data/com.termux/files/home:/root" + ## 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=/bin:/usr/bin:/sbin:/usr/sbin" + command+=" TERM=\$TERM" + command+=" LANG=en_US.UTF-8" + command+=" LC_ALL=C" + command+=" LANGUAGE=en_US" + command+=" /bin/sh --login" + com="\$@" + if [ -z "\$1" ];then + exec \$command + else + \$command -c "\$com" + fi + EOM + + echo "-------------------------------" + echo "| Checking for file presence |" + echo "-------------------------------" + echo "" + + if test -f "$bin"; then + echo "Boot script present" + chmod +x $bin + termux-fix-shebang $bin + echo " " + fi + + FD=$folder + if [ -d "$FD" ]; then + echo "Boot container present" + echo " " + fi + + UFD=$distro-binds + if [ -d "$UFD" ]; then + echo "Sub-Boot container present" + echo " " + fi + + echo "" > $folder/etc/fstab + rm -rf $folder/etc/resolv.conf + echo nameserver 8.8.8.8 > $folder/etc/resolv.conf + ./$bin apk update + ./$bin apk add --no-cache bash + sed -i 's/ash/bash/g' $folder/etc/passwd + sed -i 's/bin\/sh/bin\/bash/g' $bin + echo "Installation Finished" + rm -rf $folder/root/.bash_profile + echo "#!/bin/bash + wget https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Installer/Alpine/alpine-xfce.sh -O /root/alpine-xfce.sh + bash /root/alpine-xfce.sh + rm -rf /root/alpine-xfce.sh + clear" > $folder/root/.bash_profile + bash $bin +else + echo "Installation unsuccessful" + echo "Check network connectivity and contact devs on Discord if problems persist" +fi diff --git a/Scripts/InstallScript/GUI XFCE/arch-xfce.sh b/Scripts/InstallScript/GUI XFCE/arch-xfce.sh new file mode 100644 index 0000000..fd1e2c2 --- /dev/null +++ b/Scripts/InstallScript/GUI XFCE/arch-xfce.sh @@ -0,0 +1,258 @@ +#!/data/data/com.termux/files/usr/bin/bash +pkg install wget -y +folder=arch-fs +cur=`pwd` +dlink="https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Pacman/Manjaro" +if [ -d "$folder" ]; then + first=1 + echo "skipping downloading" +fi +tarball="arch-rootfs.tar.gz" +if [ "$first" != 1 ];then + if [ ! -f $tarball ]; then + echo "Download Rootfs, this may take a while base on your internet speed." + case `dpkg --print-architecture` in + aarch64) + archurl="aarch64" ;; + arm) + archurl="armv7" ;; + *) + echo "unknown architecture"; exit 1 ;; + esac + wget "http://os.archlinuxarm.org/os/ArchLinuxARM-${archurl}-latest.tar.gz" -O $tarball + fi + mkdir -p "$folder" + cd "$folder" + echo "Decompressing Rootfs, please be patient." + proot --link2symlink tar -xf ${cur}/${tarball}||: + cd "$cur" +fi + +mkdir -p arch-binds +mkdir -p ${cur}/${folder}/proc/fakethings + +if [ ! -f "${cur}/${folder}/proc/fakethings/stat" ]; then + cat <<- EOF > "${cur}/${folder}/proc/fakethings/stat" + cpu 5502487 1417100 4379831 62829678 354709 539972 363929 0 0 0 + cpu0 611411 171363 667442 7404799 61301 253898 205544 0 0 0 + cpu1 660993 192673 571402 7853047 39647 49434 29179 0 0 0 + cpu2 666965 186509 576296 7853110 39012 48973 26407 0 0 0 + cpu3 657630 183343 573805 7863627 38895 48768 26636 0 0 0 + cpu4 620516 161440 594973 7899146 39438 47605 26467 0 0 0 + cpu5 610849 155665 594684 7912479 40258 46870 26044 0 0 0 + cpu6 857685 92294 387182 8096756 46609 22110 12364 0 0 0 + cpu7 816434 273809 414043 7946709 49546 22311 11284 0 0 0 + intr 601715486 0 0 0 0 70612466 0 2949552 0 93228 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12862684 625329 10382717 16209 55315 8510 0 0 0 0 11 11 13 270 192 40694 95 7 0 0 0 36850 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 286 6378 0 0 0 54 0 3239423 2575191 82725 0 0 127 0 0 0 1791277 850609 20 9076504 0 301 0 0 0 0 0 3834621 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 806645 0 0 0 0 0 7243 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2445850 52 1783 0 0 5091520 0 0 0 3 0 0 0 0 0 5475 0 198001 0 2 42 1289224 0 2 202483 4 0 8390 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3563336 4202122 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 1 0 1 0 17948 0 0 612 0 0 0 0 2103 0 0 20 0 0 0 0 0 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 11 11 12 0 12 0 52 752 0 0 0 0 0 0 0 743 0 14 0 0 12 0 0 1863 229 0 464 0 0 0 0 0 0 8588 97 7236426 92766 622 31 0 0 0 18 4 4 0 5 0 0 116013 7 0 0 752406 + ctxt 826091808 + btime 1611513513 + processes 288493 + procs_running 1 + procs_blocked 0 + softirq 175407567 14659158 51739474 28359 5901272 8879590 0 11988166 46104015 0 36107533 + EOF +fi + + +if [ ! -f "${cur}/${folder}/proc/fakethings/version" ]; then + cat <<- EOF > "${cur}/${folder}/proc/fakethings/version" + Linux version 5.4.0-faked (andronix@fakeandroid) (gcc version 4.9.x (Andronix fake /proc/version) ) #1 SMP PREEMPT Sun Sep 13 00:00:00 IST 2020 + EOF +fi + +if [ ! -f "${cur}/${folder}/proc/fakethings/vmstat" ]; then + cat <<- EOF > "${cur}/${folder}/proc/fakethings/vmstat" + nr_free_pages 15717 + nr_zone_inactive_anon 87325 + nr_zone_active_anon 259521 + nr_zone_inactive_file 95508 + nr_zone_active_file 57839 + nr_zone_unevictable 58867 + nr_zone_write_pending 0 + nr_mlock 58867 + nr_page_table_pages 24569 + nr_kernel_stack 49552 + nr_bounce 0 + nr_zspages 80896 + nr_free_cma 0 + nr_inactive_anon 87325 + nr_active_anon 259521 + nr_inactive_file 95508 + nr_active_file 57839 + nr_unevictable 58867 + nr_slab_reclaimable 17709 + nr_slab_unreclaimable 47418 + nr_isolated_anon 0 + nr_isolated_file 0 + workingset_refault 33002180 + workingset_activate 5498395 + workingset_restore 2354202 + workingset_nodereclaim 140006 + nr_anon_pages 344014 + nr_mapped 193745 + nr_file_pages 218441 + nr_dirty 0 + nr_writeback 0 + nr_writeback_temp 0 + nr_shmem 1880 + nr_shmem_hugepages 0 + nr_shmem_pmdmapped 0 + nr_anon_transparent_hugepages 0 + nr_unstable 0 + nr_vmscan_write 8904094 + nr_vmscan_immediate_reclaim 139732 + nr_dirtied 8470080 + nr_written 16835370 + nr_indirectly_reclaimable 8273152 + nr_unreclaimable_pages 130861 + nr_dirty_threshold 31217 + nr_dirty_background_threshold 15589 + pgpgin 198399484 + pgpgout 31742368 + pgpgoutclean 45542744 + pswpin 3843200 + pswpout 8903884 + pgalloc_dma 192884869 + pgalloc_normal 190990320 + pgalloc_movable 0 + allocstall_dma 0 + allocstall_normal 3197 + allocstall_movable 1493 + pgskip_dma 0 + pgskip_normal 0 + pgskip_movable 0 + pgfree 384653565 + pgactivate 34249517 + pgdeactivate 44271435 + pglazyfree 192 + pgfault 46133667 + pgmajfault 5568301 + pglazyfreed 0 + pgrefill 55909145 + pgsteal_kswapd 58467386 + pgsteal_direct 255950 + pgscan_kswapd 86628315 + pgscan_direct 415889 + pgscan_direct_throttle 0 + pginodesteal 18 + slabs_scanned 31242197 + kswapd_inodesteal 1238474 + kswapd_low_wmark_hit_quickly 11637 + kswapd_high_wmark_hit_quickly 5411 + pageoutrun 32167 + pgrotated 213328 + drop_pagecache 0 + drop_slab 0 + oom_kill 0 + pgmigrate_success 729722 + pgmigrate_fail 450 + compact_migrate_scanned 43510584 + compact_free_scanned 248175096 + compact_isolated 1494774 + compact_stall 6 + compact_fail 3 + compact_success 3 + compact_daemon_wake 9438 + compact_daemon_migrate_scanned 43502436 + compact_daemon_free_scanned 248107303 + unevictable_pgs_culled 66418 + unevictable_pgs_scanned 0 + unevictable_pgs_rescued 8484 + unevictable_pgs_mlocked 78830 + unevictable_pgs_munlocked 8508 + unevictable_pgs_cleared 11455 + unevictable_pgs_stranded 11455 + swap_ra 0 + swap_ra_hit 7 + speculative_pgfault 221449963 + EOF +fi + +bin=start-arch.sh +echo "writing launch script" +cat > $bin <<- EOM +#!/bin/bash +cd \$(dirname \$0) +## unset LD_PRELOAD in case termux-exec is installed +unset LD_PRELOAD +command="proot" +command+=" --link2symlink" +command+=" -0" +command+=" -r $folder" +if [ -n "\$(ls -A arch-binds)" ]; then + for f in arch-binds/* ;do + . \$f + done +fi +command+=" -b /dev" +command+=" -b /proc" +command+=" -b /sys" +command+=" -b /data" +command+=" -b arch-fs/root:/dev/shm" +command+=" -b /proc/self/fd/2:/dev/stderr" +command+=" -b /proc/self/fd/1:/dev/stdout" +command+=" -b /proc/self/fd/0:/dev/stdin" +command+=" -b /dev/urandom:/dev/random" +command+=" -b /proc/self/fd:/dev/fd" +command+=" -b ${cur}/${folder}/proc/fakethings/stat:/proc/stat" +command+=" -b ${cur}/${folder}/proc/fakethings/vmstat:/proc/vmstat" +command+=" -b ${cur}/${folder}/proc/fakethings/version:/proc/version" +## uncomment the following line to have access to the home directory of termux +#command+=" -b /data/data/com.termux/files/home:/root" +command+=" -b /sdcard" +command+=" -w /root" +command+=" /usr/bin/env -i" +command+=" MOZ_FAKE_NO_SANDBOX=1" +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 +EOM + +echo "fixing shebang of $bin" +termux-fix-shebang $bin +echo "making $bin executable" +chmod +x $bin +echo "removing image for some space" +rm $tarball +echo "You can now launch Arch Linux with the ./${bin} script" +echo "Preparing additional component for the first time, please wait..." +wget "https://raw.githubusercontent.com/Techriz/AndronixOrigin/master/Installer/Arch/armhf/resolv.conf" -P arch-fs/root +wget "https://raw.githubusercontent.com/Techriz/AndronixOrigin/master/Installer/Arch/armhf/additional.sh" -P arch-fs/root +rm -rf arch-fs/root/.bash_profile + + +wget $dlink/xfce4_de.sh -O $folder/root/xfce4_de.sh +echo " #!/bin/bash +bash ~/additional.sh +pacman -Syyuu --noconfirm && pacman -S wget sudo --noconfirm +mkdir -p ~/.vnc +clear +if [ ! -f /root/xfce4_de.sh ]; then + wget --tries=20 $dlink/xfce4_de.sh -O /root/xfce4_de.sh + bash ~/xfce4_de.sh +else + bash ~/xfce4_de.sh +fi +clear +if [ ! -f /usr/local/bin/vncserver-start ]; then + wget --tries=20 $dlink/XFCE4/vncserver-start -O /usr/local/bin/vncserver-start + wget --tries=20 $dlink/XFCE4/vncserver-stop -O /usr/local/bin/vncserver-stop + chmod +x /usr/local/bin/vncserver-stop + chmod +x /usr/local/bin/vncserver-start +fi +if [ ! -f /usr/bin/vncserver ]; then + pacman -S tigervnc --noconfirm > /dev/null +fi +pacman -S firefox --noconfirm +clear +echo 'Welcome to Arch Linux | XFCE' +rm -rf ~/.bash_profile" > $folder/root/.bash_profile + +bash $bin diff --git a/Scripts/InstallScript/GUI XFCE/debian-xfce.sh b/Scripts/InstallScript/GUI XFCE/debian-xfce.sh new file mode 100644 index 0000000..15ff0c9 --- /dev/null +++ b/Scripts/InstallScript/GUI XFCE/debian-xfce.sh @@ -0,0 +1,117 @@ +#!/data/data/com.termux/files/usr/bin/bash +pkg install wget -y +folder=debian-fs +dlink="https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/APT" +if [ -d "$folder" ]; then + first=1 + echo "skipping downloading" +fi +tarball="debian-rootfs.tar.xz" +if [ "$first" != 1 ];then + if [ ! -f $tarball ]; then + echo "Download Rootfs, this may take a while base on your internet speed." + case `dpkg --print-architecture` in + aarch64) + archurl="arm64" ;; + arm) + archurl="armhf" ;; + amd64) + archurl="amd64" ;; + x86_64) + archurl="amd64" ;; + i*86) + archurl="i386" ;; + x86) + archurl="i386" ;; + *) + echo "unknown architecture"; exit 1 ;; + esac + wget "https://github.com/Techriz/AndronixOrigin/blob/master/Rootfs/Debian/${archurl}/debian-rootfs-${archurl}.tar.xz?raw=true" -O $tarball + fi + cur=`pwd` + mkdir -p "$folder" + cd "$folder" + echo "Decompressing Rootfs, please be patient." + proot --link2symlink tar -xJf ${cur}/${tarball}||: + cd "$cur" +fi +mkdir -p debian-binds +bin=start-debian.sh +echo "writing launch script" +cat > $bin <<- EOM +#!/bin/bash +cd \$(dirname \$0) +## unset LD_PRELOAD in case termux-exec is installed +unset LD_PRELOAD +command="proot" +command+=" --link2symlink" +command+=" -0" +command+=" -r $folder" +if [ -n "\$(ls -A debian-binds)" ]; then + for f in debian-binds/* ;do + . \$f + done +fi +command+=" -b /dev" +command+=" -b /proc" +command+=" -b debian-fs/root:/dev/shm" +## uncomment the following line to have access to the home directory of termux +#command+=" -b /data/data/com.termux/files/home:/root" +## 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 +EOM + +echo "fixing shebang of $bin" +termux-fix-shebang $bin +echo "making $bin executable" +chmod +x $bin +echo "removing image for some space" +rm $tarball + +#DE installation addition + +wget --tries=20 $dlink/XFCE4/xfce4_de.sh -O $folder/root/xfce4_de.sh +clear +echo "Setting up the installation of XFCE VNC" + +echo "APT::Acquire::Retries \"3\";" > $folder/etc/apt/apt.conf.d/80-retries #Setting APT retry count +echo "#!/bin/bash +apt update -y && apt install wget sudo -y +clear +if [ ! -f /root/xfce4_de.sh ]; then + wget --tries=20 $dlink/XFCE4/xfce4_de.sh -O /root/xfce4_de.sh + bash ~/xfce4_de.sh +else + bash ~/xfce4_de.sh +fi +clear +if [ ! -f /usr/local/bin/vncserver-start ]; then + wget --tries=20 $dlink/XFCE4/vncserver-start -O /usr/local/bin/vncserver-start + wget --tries=20 $dlink/XFCE4/vncserver-stop -O /usr/local/bin/vncserver-stop + chmod +x /usr/local/bin/vncserver-stop + chmod +x /usr/local/bin/vncserver-start +fi +if [ ! -f /usr/bin/vncserver ]; then + apt install tigervnc-standalone-server -y +fi +clear +echo 'Installing Browser' +apt install firefox-esr -y +clear +echo ' Welcome to Andronix | Debian ' +rm -rf ~/.bash_profile" > $folder/root/.bash_profile + +bash $bin diff --git a/Scripts/InstallScript/GUI XFCE/fedora-xfce.sh b/Scripts/InstallScript/GUI XFCE/fedora-xfce.sh new file mode 100644 index 0000000..cbe3b42 --- /dev/null +++ b/Scripts/InstallScript/GUI XFCE/fedora-xfce.sh @@ -0,0 +1,130 @@ +#!/data/data/com.termux/files/usr/bin/bash +folder=fedora-fs +dlink="https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Fedora" +if [ -d "$folder" ]; then + first=1 + echo "skipping downloading" +fi +tarball="fedora-rootfs.tar.xz" +if [ "$first" != 1 ];then + echo "Download Rootfs, this may take a while base on your internet speed." + arch=$(dpkg --print-architecture) + if [ "$arch" == 'aarch64' ]; + then + wget --tries=20 https://github.com/AndronixApp/AndronixOrigin/raw/master/Rootfs/Fedora/arm64/fedora.partaa -O fedora.partaa + wget --tries=20 https://github.com/AndronixApp/AndronixOrigin/raw/master/Rootfs/Fedora/arm64/fedora.partab -O fedora.partab + cat fedora.parta* > fedora-rootfs.tar.xz + rm -rf fedora.parta* + cur=`pwd` + mkdir -p "$folder" + cd "$folder" + echo "Decompressing Rootfs, please be patient." + proot --link2symlink tar -xJf ${cur}/${tarball} --exclude='dev'||: + cd "$cur" + first=1 + fi +fi + +if [ "$first" != 1 ];then + if [ ! -f $tarball ]; then + echo "Download Rootfs, this may take a while base on your internet speed." + case `dpkg --print-architecture` in + arm) + archurl="armhf" ;; + amd64) + archurl="amd64" ;; + x86_64) + archurl="amd64" ;; + *) + echo "unknown architecture"; exit 1 ;; + esac + wget "https://github.com/Techriz/AndronixOrigin/blob/master/Rootfs/Fedora/${archurl}/fedora-rootfs-${archurl}.tar.xz?raw=true" -O $tarball + fi + cur=`pwd` + mkdir -p "$folder" + cd "$folder" + echo "Decompressing Rootfs, please be patient." + proot --link2symlink tar -xJf ${cur}/${tarball} --exclude='dev'||: + + echo "Setting up name server" + echo "127.0.0.1 localhost" > etc/hosts + echo "nameserver 8.8.8.8" > etc/resolv.conf + echo "nameserver 8.8.4.4" >> etc/resolv.conf + cd "$cur" +fi +mkdir -p fedora-binds +bin=start-fedora.sh +echo "writing launch script" +cat > $bin <<- EOM +#!/bin/bash +cd \$(dirname \$0) +## unset LD_PRELOAD in case termux-exec is installed +unset LD_PRELOAD +command="proot" +command+=" --link2symlink" +command+=" -0" +command+=" -r $folder" +if [ -n "\$(ls -A fedora-binds)" ]; then + for f in fedora-binds/* ;do + . \$f + done +fi +command+=" -b /dev" +command+=" -b /proc" +command+=" -b fedora-fs/root:/dev/shm" +## uncomment the following line to have access to the home directory of termux +#command+=" -b /data/data/com.termux/files/home:/root" +## 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 +EOM + +echo "fixing shebang of $bin" +termux-fix-shebang $bin +echo "making $bin executable" +chmod +x $bin +echo "removing image for some space" +rm $tarball + +#DE installation addition + +wget --tries=20 $dlink/XFCE4/xfce4_de.sh -O $folder/root/xfce4_de.sh +clear +echo "Setting up the installation of XFCE VNC" +echo "#!/bin/bash +yum install wget -y +clear +if [ ! -f /root/xfce4_de.sh ]; then + wget --tries=20 $dlink/XFCE4/xfce4_de.sh -O /root/xfce4_de.sh + bash ~/xfce4_de.sh +else + bash ~/xfce4_de.sh +fi +clear +if [ ! -f /usr/local/bin/vncserver-start ]; then + wget --tries=20 $dlink/LXDE/vncserver-start -O /usr/local/bin/vncserver-start + wget --tries=20 $dlink/LXDE/vncserver-stop -O /usr/local/bin/vncserver-stop + chmod +x /usr/local/bin/vncserver-stop + chmod +x /usr/local/bin/vncserver-start +fi +if [ ! -f /usr/bin/vncserver ]; then + yum install tigervnc-server -y +fi +clear +echo 'Installing browser' +yum install firefox -y +rm -rf ~/.bash_profile" > $folder/root/.bash_profile +rm -rf fedora-lxde.sh +bash $bin diff --git a/Scripts/InstallScript/GUI XFCE/kali-xfce.sh b/Scripts/InstallScript/GUI XFCE/kali-xfce.sh new file mode 100644 index 0000000..b54d2e9 --- /dev/null +++ b/Scripts/InstallScript/GUI XFCE/kali-xfce.sh @@ -0,0 +1,133 @@ +#!/data/data/com.termux/files/usr/bin/bash +pkg install wget -y +folder=kali-fs +dlink="https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/APT" + +if [ -d "$folder" ]; then + first=1 + echo "skipping downloading" +fi +tarball="kali-rootfs.tar.xz" +if [ "$first" != 1 ];then + if [ ! -f $tarball ]; then + echo "Download Rootfs, this may take a while base on your internet speed." + case `dpkg --print-architecture` in + aarch64) + archurl="arm64" ;; + arm) + archurl="armhf" ;; + amd64) + archurl="amd64" ;; + x86_64) + archurl="amd64" ;; + i*86) + archurl="i386" ;; + x86) + archurl="i386" ;; + *) + echo "unknown architecture"; exit 1 ;; + esac + + if [ $archurl == "arm64" ]; then + wget "https://github.com/AndronixApp/AndronixOrigin/releases/download/kali-arm64-tarball/kali-rootfs-arm64.tar.xz" -O $tarball + else + wget "https://github.com/Techriz/AndronixOrigin/blob/master/Rootfs/Kali/${archurl}/kali-rootfs-${archurl}.tar.xz?raw=true" -O $tarball + fi + fi + cur=`pwd` + mkdir -p "$folder" + cd "$folder" + echo "Decompressing Rootfs, please be patient." + proot --link2symlink tar -xJf ${cur}/${tarball}||: + cd "$cur" +fi +mkdir -p kali-binds +bin=start-kali.sh +echo "writing launch script" +cat > $bin <<- EOM +#!/bin/bash +cd \$(dirname \$0) +## unset LD_PRELOAD in case termux-exec is installed +unset LD_PRELOAD +command="proot" +command+=" --link2symlink" +command+=" -0" +command+=" -r $folder" +if [ -n "\$(ls -A kali-binds)" ]; then + for f in kali-binds/* ;do + . \$f + done +fi +command+=" -b /dev" +command+=" -b /proc" +command+=" -b kali-fs/root:/dev/shm" +## uncomment the following line to have access to the home directory of termux +#command+=" -b /data/data/com.termux/files/home:/root" +## 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 +EOM + +cat > $folder/root/.bash_logout <<- EOM +#!/bin/bash +vncserver-stop +pkill dbus* +pkill ssh* +EOM + +echo -e "\e[31m Patching mirrorlist temporarily until further source update. Don't worry about GPG errors\e[0m" +echo "deb [trusted=yes] https://http.kali.org/kali kali-rolling main contrib non-free" > $folder/etc/apt/sources.list + +echo "fixing shebang of $bin" +termux-fix-shebang $bin +echo "making $bin executable" +chmod +x $bin +echo "removing image for some space" +rm $tarball + +#DE installation addition + +wget --tries=20 $dlink/XFCE4/xfce4_de.sh -O $folder/root/xfce4_de.sh +clear +echo "Setting up the installation of XFCE VNC" + +echo "APT::Acquire::Retries \"3\";" > $folder/etc/apt/apt.conf.d/80-retries #Setting APT retry count +echo "#!/bin/bash +apt update -y && apt install wget sudo dbus-x11 -y +clear +if [ ! -f /root/xfce4_de.sh ]; then + wget --tries=20 $dlink/XFCE4/xfce4_de.sh -O /root/xfce4_de.sh + bash ~/xfce4_de.sh +else + bash ~/xfce4_de.sh +fi +clear +if [ ! -f /usr/local/bin/vncserver-start ]; then + wget --tries=20 $dlink/LXDE/vncserver-start -O /usr/local/bin/vncserver-start + wget --tries=20 $dlink/LXDE/vncserver-stop -O /usr/local/bin/vncserver-stop + chmod +x /usr/local/bin/vncserver-stop + chmod +x /usr/local/bin/vncserver-start +fi +if [ ! -f /usr/bin/vncserver ]; then + apt install tigervnc-standalone-server -y +fi +clear +echo 'Installing browser' +apt install firefox-esr -y +clear +echo 'Welcome to Andronix | Kali' +rm -rf ~/.bash_profile" > $folder/root/.bash_profile + +bash $bin diff --git a/Scripts/InstallScript/GUI XFCE/manjaro-xfce.sh b/Scripts/InstallScript/GUI XFCE/manjaro-xfce.sh new file mode 100644 index 0000000..5d0d2a7 --- /dev/null +++ b/Scripts/InstallScript/GUI XFCE/manjaro-xfce.sh @@ -0,0 +1,113 @@ +#!/data/data/com.termux/files/usr/bin/bash +pkg install wget -y +folder=manjaro-fs +dlink="https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Pacman/Manjaro" +if [ -d "$folder" ]; then + first=1 + echo "skipping downloading" +fi +tarball="manjaro.tar.xz" +if [ "$first" != 1 ];then + wget --tries=20 https://github.com/AndronixApp/AndronixOrigin/raw/master/Rootfs/Manjaro/manjaro.partaa -O manjaro.partaa + wget --tries=20 https://github.com/AndronixApp/AndronixOrigin/raw/master/Rootfs/Manjaro/manjaro.partab -O manjaro.partab + wget --tries=20 https://github.com/AndronixApp/AndronixOrigin/raw/master/Rootfs/Manjaro/manjaro.partac -O manjaro.partac + cat manjaro.parta* > manjaro.tar.xz + cur=`pwd` + mkdir -p "$folder" + cd "$folder" + echo "Decompressing Rootfs, please be patient." + proot --link2symlink tar -xf ${cur}/$tarball --exclude='dev'|| : + cd "$cur" +fi +mkdir -p manjaro-binds +bin=start-manjaro.sh +echo "writing launch script" +cat > $bin <<- EOM +#!/bin/bash +cd \$(dirname \$0) +## unset LD_PRELOAD in case termux-exec is installed +unset LD_PRELOAD +command="proot" +command+=" --link2symlink" +command+=" -0" +command+=" -r $folder" +if [ -n "\$(ls -A manjaro-binds)" ]; then + for f in manjaro-binds/* ;do + . \$f + done +fi +command+=" -b /dev" +command+=" -b /proc" +command+=" -b manjaro-fs/root:/dev/shm" +## uncomment the following line to have access to the home directory of termux +#command+=" -b /data/data/com.termux/files/home:/root" +## 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=en_US.UTF-8" +command+=" LC_ALL=C" +command+=" LANGUAGE=en_US" +command+=" /bin/bash --login" +com="\$@" +if [ -z "\$1" ];then + exec \$command +else + \$command -c "\$com" +fi +EOM + +echo "fixing shebang of $bin" +termux-fix-shebang $bin +echo "making $bin executable" +chmod +x $bin +echo "fixing permissions for manjaro" +chmod 755 -R manjaro-fs + +#DE installation + +rm -rf $folder/root/.bash_profile +wget $dlink/xfce4_de.sh -O $folder/root/xfce4_de.sh +rm -rf $folder/etc/resolv.conf +cat >$folder/etc/pacman.d/mirrorlist <<'EOL' +## +## Manjaro Linux repository mirrorlist +## Generated on 02 May 2020 14:22 +## +## Use pacman-mirrors to modify +## +## Location : Germany +## Time : 99.99 +## Last Sync : +Server = https://mirrors.dotsrc.org/manjaro-arm/stable/$repo/$arch +EOL +rm -rf $folder/etc/resolv.conf && echo "nameserver 1.1.1.1" > $folder/etc/resolv.conf +wget --tries=20 $dlink/XFCE/vncserver-start -O $folder/usr/local/bin/vncserver-start +wget --tries=20 $dlink/XFCE/vncserver-stop -O $folder/usr/local/bin/vncserver-stop +mkdir $folder/root/.vnc +wget https://raw.githubusercontent.com/Techriz/AndronixOrigin/master/Pacman/Manjaro/XFCE/xstartup -O $folder/root/.vnc/xstartup +chmod +x $folder/usr/local/bin/vncserver-stop +chmod +x $folder/usr/local/bin/vncserver-start +echo " #!/bin/bash +echo 'pacman-key --init && pacman-key --populate && pacman -Syu --noconfirm' > /usr/local/bin/fix-repo +chmod +x /usr/local/bin/fix-repo +fix-repo +mkdir -p ~/.vnc +clear +if [ ! -f /root/xfce4_de.sh ]; then + wget --tries=20 $dlink/xfce4_de.sh -O /root/xfce4_de.sh + bash ~/xfce4_de.sh +else + bash ~/xfce4_de.sh +fi +clear +if [ ! -f /usr/bin/vncserver ]; then + pacman -S tigervnc --noconfirm > /dev/null +fi +clear +rm -rf ~/.bash_profile" > $folder/root/.bash_profile +rm -rf manjaro.partaa manjaro.partab manjaro.partac manjaro.tar.xz manjaro.sh +bash $bin diff --git a/Scripts/InstallScript/GUI XFCE/ubuntu-xfce.sh b/Scripts/InstallScript/GUI XFCE/ubuntu-xfce.sh new file mode 100644 index 0000000..a71e2c1 --- /dev/null +++ b/Scripts/InstallScript/GUI XFCE/ubuntu-xfce.sh @@ -0,0 +1,112 @@ +#!/data/data/com.termux/files/usr/bin/bash +pkg install wget -y +folder=ubuntu-fs +dlink="https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/APT" +if [ -d "$folder" ]; then + first=1 + echo "skipping downloading" +fi +tarball="ubuntu-rootfs.tar.xz" +if [ "$first" != 1 ];then + if [ ! -f $tarball ]; then + echo "Download Rootfs, this may take a while base on your internet speed." + case `dpkg --print-architecture` in + aarch64) + archurl="arm64" ;; + arm) + archurl="armhf" ;; + amd64) + archurl="amd64" ;; + x86_64) + archurl="amd64" ;; + i*86) + archurl="i386" ;; + x86) + archurl="i386" ;; + *) + echo "unknown architecture"; exit 1 ;; + esac + wget "https://github.com/Techriz/AndronixOrigin/blob/master/Rootfs/Ubuntu/${archurl}/ubuntu-rootfs-${archurl}.tar.xz?raw=true" -O $tarball +fi + cur=`pwd` + mkdir -p "$folder" + cd "$folder" + echo "Decompressing Rootfs, please be patient." + proot --link2symlink tar -xJf ${cur}/${tarball}||: + cd "$cur" +fi +mkdir -p ubuntu-binds +bin=start-ubuntu.sh +echo "writing launch script" +cat > $bin <<- EOM +#!/bin/bash +cd \$(dirname \$0) +## unset LD_PRELOAD in case termux-exec is installed +unset LD_PRELOAD +command="proot" +command+=" --link2symlink" +command+=" -0" +command+=" -r $folder" +if [ -n "\$(ls -A ubuntu-binds)" ]; then + for f in ubuntu-binds/* ;do + . \$f + done +fi +command+=" -b /dev" +command+=" -b /proc" +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/home:/root" +## 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 +EOM + +echo "fixing shebang of $bin" +termux-fix-shebang $bin +echo "making $bin executable" +chmod +x $bin +echo "removing image for some space" +rm $tarball + +#DE installation addition + +wget $dlink/XFCE4/xfce4_de.sh -O $folder/root/xfce4_de.sh +clear +echo "Setting up the installation of XFCE VNC" + +echo "APT::Acquire::Retries \"3\";" > $folder/etc/apt/apt.conf.d/80-retries #Setting APT retry count +echo "#!/bin/bash +apt update -y && apt install sudo wget -y +clear +if [ ! -f /root/xfce4_de.sh ]; then + wget --tries=20 $dlink/XFCE4/xfce4_de.sh -O /root/xfce4_de.sh + bash ~/xfce4_de.sh +else + bash ~/xfce4_de.sh +fi +clear +if [ ! -f /usr/local/bin/vncserver-start ]; then + wget --tries=20 $dlink/XFCE4/vncserver-start -O /usr/local/bin/vncserver-start + wget --tries=20 $dlink/XFCE4/vncserver-stop -O /usr/local/bin/vncserver-stop + chmod +x /usr/local/bin/vncserver-stop + chmod +x /usr/local/bin/vncserver-start +fi +if [ ! -f /usr/bin/vncserver ]; then + apt install tigervnc-standalone-server -y +fi +rm -rf ~/.bash_profile" >> ubuntu-fs/root/.bash_profile + +bash $bin diff --git a/Scripts/InstallScript/GUI XFCE/ubuntu20-xfce.sh b/Scripts/InstallScript/GUI XFCE/ubuntu20-xfce.sh new file mode 100644 index 0000000..917f8d3 --- /dev/null +++ b/Scripts/InstallScript/GUI XFCE/ubuntu20-xfce.sh @@ -0,0 +1,284 @@ +#!/data/data/com.termux/files/usr/bin/bash +pkg install wget -y +folder=ubuntu20-fs +cur=`pwd` +dlink="https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/APT" +if [ -d "$folder" ]; then + first=1 + echo "skipping downloading" +fi +tarball="ubuntu20-rootfs.tar.gz" + +termux-setup-storage + +if [ "$first" != 1 ];then + if [ ! -f $tarball ]; then + echo "Download Rootfs, this may take a while base on your internet speed." + case `dpkg --print-architecture` in + aarch64) + archurl="arm64" ;; + arm) + archurl="armhf" ;; + amd64) + archurl="amd64" ;; + x86_64) + archurl="amd64" ;; + *) + echo "unknown architecture"; exit 1 ;; + esac + wget "https://github.com/AndronixApp/AndronixOrigin/raw/master/Rootfs/Ubuntu20/focal-${archurl}.tar.gz" -O $tarball + +fi + mkdir -p "$folder" + cd "$folder" + echo "Decompressing Rootfs, please be patient." + proot --link2symlink tar -xf ${cur}/${tarball} --exclude=dev||: + cd "$cur" +fi + +mkdir -p ubuntu20-binds +mkdir -p ${folder}/proc/fakethings + +if [ ! -f "${cur}/${folder}/proc/fakethings/stat" ]; then + cat <<- EOF > "${cur}/${folder}/proc/fakethings/stat" + cpu 5502487 1417100 4379831 62829678 354709 539972 363929 0 0 0 + cpu0 611411 171363 667442 7404799 61301 253898 205544 0 0 0 + cpu1 660993 192673 571402 7853047 39647 49434 29179 0 0 0 + cpu2 666965 186509 576296 7853110 39012 48973 26407 0 0 0 + cpu3 657630 183343 573805 7863627 38895 48768 26636 0 0 0 + cpu4 620516 161440 594973 7899146 39438 47605 26467 0 0 0 + cpu5 610849 155665 594684 7912479 40258 46870 26044 0 0 0 + cpu6 857685 92294 387182 8096756 46609 22110 12364 0 0 0 + cpu7 816434 273809 414043 7946709 49546 22311 11284 0 0 0 + intr 601715486 0 0 0 0 70612466 0 2949552 0 93228 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12862684 625329 10382717 16209 55315 8510 0 0 0 0 11 11 13 270 192 40694 95 7 0 0 0 36850 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 286 6378 0 0 0 54 0 3239423 2575191 82725 0 0 127 0 0 0 1791277 850609 20 9076504 0 301 0 0 0 0 0 3834621 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 806645 0 0 0 0 0 7243 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2445850 52 1783 0 0 5091520 0 0 0 3 0 0 0 0 0 5475 0 198001 0 2 42 1289224 0 2 202483 4 0 8390 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3563336 4202122 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 1 0 1 0 17948 0 0 612 0 0 0 0 2103 0 0 20 0 0 0 0 0 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 11 11 12 0 12 0 52 752 0 0 0 0 0 0 0 743 0 14 0 0 12 0 0 1863 229 0 464 0 0 0 0 0 0 8588 97 7236426 92766 622 31 0 0 0 18 4 4 0 5 0 0 116013 7 0 0 752406 + ctxt 826091808 + btime 1611513513 + processes 288493 + procs_running 1 + procs_blocked 0 + softirq 175407567 14659158 51739474 28359 5901272 8879590 0 11988166 46104015 0 36107533 + EOF +fi + + +if [ ! -f "${cur}/${folder}/proc/fakethings/version" ]; then + cat <<- EOF > "${cur}/${folder}/proc/fakethings/version" + Linux version 5.4.0-faked (andronix@fakeandroid) (gcc version 4.9.x (Andronix fake /proc/version) ) #1 SMP PREEMPT Sun Sep 13 00:00:00 IST 2020 + EOF +fi + +if [ ! -f "${cur}/${folder}/proc/fakethings/vmstat" ]; then + cat <<- EOF > "${cur}/${folder}/proc/fakethings/vmstat" + nr_free_pages 15717 + nr_zone_inactive_anon 87325 + nr_zone_active_anon 259521 + nr_zone_inactive_file 95508 + nr_zone_active_file 57839 + nr_zone_unevictable 58867 + nr_zone_write_pending 0 + nr_mlock 58867 + nr_page_table_pages 24569 + nr_kernel_stack 49552 + nr_bounce 0 + nr_zspages 80896 + nr_free_cma 0 + nr_inactive_anon 87325 + nr_active_anon 259521 + nr_inactive_file 95508 + nr_active_file 57839 + nr_unevictable 58867 + nr_slab_reclaimable 17709 + nr_slab_unreclaimable 47418 + nr_isolated_anon 0 + nr_isolated_file 0 + workingset_refault 33002180 + workingset_activate 5498395 + workingset_restore 2354202 + workingset_nodereclaim 140006 + nr_anon_pages 344014 + nr_mapped 193745 + nr_file_pages 218441 + nr_dirty 0 + nr_writeback 0 + nr_writeback_temp 0 + nr_shmem 1880 + nr_shmem_hugepages 0 + nr_shmem_pmdmapped 0 + nr_anon_transparent_hugepages 0 + nr_unstable 0 + nr_vmscan_write 8904094 + nr_vmscan_immediate_reclaim 139732 + nr_dirtied 8470080 + nr_written 16835370 + nr_indirectly_reclaimable 8273152 + nr_unreclaimable_pages 130861 + nr_dirty_threshold 31217 + nr_dirty_background_threshold 15589 + pgpgin 198399484 + pgpgout 31742368 + pgpgoutclean 45542744 + pswpin 3843200 + pswpout 8903884 + pgalloc_dma 192884869 + pgalloc_normal 190990320 + pgalloc_movable 0 + allocstall_dma 0 + allocstall_normal 3197 + allocstall_movable 1493 + pgskip_dma 0 + pgskip_normal 0 + pgskip_movable 0 + pgfree 384653565 + pgactivate 34249517 + pgdeactivate 44271435 + pglazyfree 192 + pgfault 46133667 + pgmajfault 5568301 + pglazyfreed 0 + pgrefill 55909145 + pgsteal_kswapd 58467386 + pgsteal_direct 255950 + pgscan_kswapd 86628315 + pgscan_direct 415889 + pgscan_direct_throttle 0 + pginodesteal 18 + slabs_scanned 31242197 + kswapd_inodesteal 1238474 + kswapd_low_wmark_hit_quickly 11637 + kswapd_high_wmark_hit_quickly 5411 + pageoutrun 32167 + pgrotated 213328 + drop_pagecache 0 + drop_slab 0 + oom_kill 0 + pgmigrate_success 729722 + pgmigrate_fail 450 + compact_migrate_scanned 43510584 + compact_free_scanned 248175096 + compact_isolated 1494774 + compact_stall 6 + compact_fail 3 + compact_success 3 + compact_daemon_wake 9438 + compact_daemon_migrate_scanned 43502436 + compact_daemon_free_scanned 248107303 + unevictable_pgs_culled 66418 + unevictable_pgs_scanned 0 + unevictable_pgs_rescued 8484 + unevictable_pgs_mlocked 78830 + unevictable_pgs_munlocked 8508 + unevictable_pgs_cleared 11455 + unevictable_pgs_stranded 11455 + swap_ra 0 + swap_ra_hit 7 + speculative_pgfault 221449963 + EOF +fi + +bin=start-ubuntu20.sh +echo "writing launch script" +cat > $bin <<- EOM +#!/bin/bash +cd \$(dirname \$0) +## unset LD_PRELOAD in case termux-exec is installed +unset LD_PRELOAD +command="proot" +command+=" --kill-on-exit" +command+=" --link2symlink" +command+=" -0" +command+=" -r $folder" +if [ -n "\$(ls -A ubuntu20-binds)" ]; then + for f in ubuntu20-binds/* ;do + . \$f + done +fi +command+=" -b /dev" +command+=" -b /proc" +command+=" -b /sys" +command+=" -b /data" +command+=" -b ubuntu20-fs/root:/dev/shm" +command+=" -b /proc/self/fd/2:/dev/stderr" +command+=" -b /proc/self/fd/1:/dev/stdout" +command+=" -b /proc/self/fd/0:/dev/stdin" +command+=" -b /dev/urandom:/dev/random" +command+=" -b /proc/self/fd:/dev/fd" +command+=" -b ${cur}/${folder}/proc/fakethings/stat:/proc/stat" +command+=" -b ${cur}/${folder}/proc/fakethings/vmstat:/proc/vmstat" +command+=" -b ${cur}/${folder}/proc/fakethings/version:/proc/version" +## uncomment the following line to have access to the home directory of termux +#command+=" -b /data/data/com.termux/files/home:/root" +command+=" -b /sdcard" +command+=" -w /root" +command+=" /usr/bin/env -i" +command+=" MOZ_FAKE_NO_SANDBOX=1" +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 +EOM + +mkdir -p ubuntu20-fs/var/tmp +rm -rf ubuntu20-fs/usr/local/bin/* +echo "127.0.0.1 localhost localhost" > $folder/etc/hosts +wget -q https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Rootfs/Ubuntu19/.profile -O ubuntu20-fs/root/.profile.1 > /dev/null +cat $folder/root/.profile.1 >> $folder/root/.profile && rm -rf $folder/root/.profile.1 +wget -q https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Rootfs/Ubuntu19/vnc -P ubuntu20-fs/usr/local/bin > /dev/null +wget -q https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Rootfs/Ubuntu19/vncpasswd -P ubuntu20-fs/usr/local/bin > /dev/null +wget -q https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Rootfs/Ubuntu19/vncserver-stop -P ubuntu20-fs/usr/local/bin > /dev/null +wget -q https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Rootfs/Ubuntu19/vncserver-start -P ubuntu20-fs/usr/local/bin > /dev/null + +chmod +x ubuntu20-fs/root/.profile +chmod +x ubuntu20-fs/usr/local/bin/vnc +chmod +x ubuntu20-fs/usr/local/bin/vncpasswd +chmod +x ubuntu20-fs/usr/local/bin/vncserver-start +chmod +x ubuntu20-fs/usr/local/bin/vncserver-stop + +echo "fixing shebang of $bin" +termux-fix-shebang $bin +echo "making $bin executable" +chmod +x $bin +echo "removing image for some space" +rm $tarball + + +#DE installation addition + +wget --tries=20 $dlink/XFCE4/xfce19.sh -O $folder/root/xfce19.sh +clear +echo "Setting up the installation of XFCE VNC" + +echo "APT::Acquire::Retries \"3\";" > $folder/etc/apt/apt.conf.d/80-retries #Setting APT retry count +touch $folder/root/.hushlogin +echo "#!/bin/bash +rm -rf /etc/resolv.conf +echo 'nameserver 8.8.8.8' >> /etc/resolv.conf +mkdir -p ~/.vnc +apt update -y && apt install sudo wget -y > /dev/null +clear +if [ ! -f /root/xfce19.sh ]; then + wget --tries=20 $dlink/XFCE4/xfce19.sh -O /root/xfce19.sh + bash ~/xfce19.sh +else + bash ~/xfce19.sh +fi +clear +if [ ! -f /usr/local/bin/vncserver-start ]; then + wget --tries=20 $dlink/XFCE4/vncserver-start -O /usr/local/bin/vncserver-start + wget --tries=20 $dlink/XFCE4/vncserver-stop -O /usr/local/bin/vncserver-stop + chmod +x /usr/local/bin/vncserver-stop + chmod +x /usr/local/bin/vncserver-start +fi +if [ ! -f /usr/bin/vncserver ]; then + apt install tigervnc-standalone-server -y +fi +rm -rf /root/xfce19.sh +rm -rf ~/.bash_profile" > $folder/root/.bash_profile + +bash $bin diff --git a/Scripts/InstallScript/GUI XFCE/ubuntu22-xfce.sh b/Scripts/InstallScript/GUI XFCE/ubuntu22-xfce.sh new file mode 100644 index 0000000..b0cd38f --- /dev/null +++ b/Scripts/InstallScript/GUI XFCE/ubuntu22-xfce.sh @@ -0,0 +1,275 @@ +#!/data/data/com.termux/files/usr/bin/bash +pkg install wget -y +folder=ubuntu22-fs +cur=`pwd` +dlink="https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/APT" +if [ -d "$folder" ]; then + first=1 + echo "skipping downloading" +fi +tarball="ubuntu22-rootfs.tar.gz" + +termux-setup-storage + +if [ "$first" != 1 ];then + if [ ! -f $tarball ]; then + echo "Download Rootfs, this may take a while base on your internet speed." + case `dpkg --print-architecture` in + aarch64) + archurl="arm64" ;; + *) + echo "unknown architecture"; exit 1 ;; + esac + wget "https://github.com/AndronixApp/AndronixOrigin/raw/master/Rootfs/Ubuntu22/jammy-${archurl}.tar.gz" -O $tarball + +fi + mkdir -p "$folder" + cd "$folder" + echo "Decompressing Rootfs, please be patient." + proot --link2symlink tar -xf ${cur}/${tarball} --exclude=dev||: + cd "$cur" +fi + +mkdir -p ubuntu22-binds +mkdir -p ${folder}/proc/fakethings + +if [ ! -f "${cur}/${folder}/proc/fakethings/stat" ]; then + cat <<- EOF > "${cur}/${folder}/proc/fakethings/stat" + cpu 5502487 1417100 4379831 62829678 354709 539972 363929 0 0 0 + cpu0 611411 171363 667442 7404799 61301 253898 205544 0 0 0 + cpu1 660993 192673 571402 7853047 39647 49434 29179 0 0 0 + cpu2 666965 186509 576296 7853110 39012 48973 26407 0 0 0 + cpu3 657630 183343 573805 7863627 38895 48768 26636 0 0 0 + cpu4 620516 161440 594973 7899146 39438 47605 26467 0 0 0 + cpu5 610849 155665 594684 7912479 40258 46870 26044 0 0 0 + cpu6 857685 92294 387182 8096756 46609 22110 12364 0 0 0 + cpu7 816434 273809 414043 7946709 49546 22311 11284 0 0 0 + intr 601715486 0 0 0 0 70612466 0 2949552 0 93228 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12862684 625329 10382717 16209 55315 8510 0 0 0 0 11 11 13 270 192 40694 95 7 0 0 0 36850 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 286 6378 0 0 0 54 0 3239423 2575191 82725 0 0 127 0 0 0 1791277 850609 20 9076504 0 301 0 0 0 0 0 3834621 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 806645 0 0 0 0 0 7243 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2445850 52 1783 0 0 5091520 0 0 0 3 0 0 0 0 0 5475 0 198001 0 2 42 1289224 0 2 202483 4 0 8390 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3563336 4202122 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 1 0 1 0 17948 0 0 612 0 0 0 0 2103 0 0 20 0 0 0 0 0 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 11 11 12 0 12 0 52 752 0 0 0 0 0 0 0 743 0 14 0 0 12 0 0 1863 229 0 464 0 0 0 0 0 0 8588 97 7236426 92766 622 31 0 0 0 18 4 4 0 5 0 0 116013 7 0 0 752406 + ctxt 826091808 + btime 1611513513 + processes 288493 + procs_running 1 + procs_blocked 0 + softirq 175407567 14659158 51739474 28359 5901272 8879590 0 11988166 46104015 0 36107533 + EOF +fi + + +if [ ! -f "${cur}/${folder}/proc/fakethings/version" ]; then + cat <<- EOF > "${cur}/${folder}/proc/fakethings/version" + Linux version 5.4.0-faked (andronix@fakeandroid) (gcc version 4.9.x (Andronix fake /proc/version) ) #1 SMP PREEMPT Sun Sep 13 00:00:00 IST 2020 + EOF +fi + +if [ ! -f "${cur}/${folder}/proc/fakethings/vmstat" ]; then + cat <<- EOF > "${cur}/${folder}/proc/fakethings/vmstat" + nr_free_pages 15717 + nr_zone_inactive_anon 87325 + nr_zone_active_anon 259521 + nr_zone_inactive_file 95508 + nr_zone_active_file 57839 + nr_zone_unevictable 58867 + nr_zone_write_pending 0 + nr_mlock 58867 + nr_page_table_pages 24569 + nr_kernel_stack 49552 + nr_bounce 0 + nr_zspages 80896 + nr_free_cma 0 + nr_inactive_anon 87325 + nr_active_anon 259521 + nr_inactive_file 95508 + nr_active_file 57839 + nr_unevictable 58867 + nr_slab_reclaimable 17709 + nr_slab_unreclaimable 47418 + nr_isolated_anon 0 + nr_isolated_file 0 + workingset_refault 33002180 + workingset_activate 5498395 + workingset_restore 2354202 + workingset_nodereclaim 140006 + nr_anon_pages 344014 + nr_mapped 193745 + nr_file_pages 218441 + nr_dirty 0 + nr_writeback 0 + nr_writeback_temp 0 + nr_shmem 1880 + nr_shmem_hugepages 0 + nr_shmem_pmdmapped 0 + nr_anon_transparent_hugepages 0 + nr_unstable 0 + nr_vmscan_write 8904094 + nr_vmscan_immediate_reclaim 139732 + nr_dirtied 8470080 + nr_written 16835370 + nr_indirectly_reclaimable 8273152 + nr_unreclaimable_pages 130861 + nr_dirty_threshold 31217 + nr_dirty_background_threshold 15589 + pgpgin 198399484 + pgpgout 31742368 + pgpgoutclean 45542744 + pswpin 3843200 + pswpout 8903884 + pgalloc_dma 192884869 + pgalloc_normal 190990320 + pgalloc_movable 0 + allocstall_dma 0 + allocstall_normal 3197 + allocstall_movable 1493 + pgskip_dma 0 + pgskip_normal 0 + pgskip_movable 0 + pgfree 384653565 + pgactivate 34249517 + pgdeactivate 44271435 + pglazyfree 192 + pgfault 46133667 + pgmajfault 5568301 + pglazyfreed 0 + pgrefill 55909145 + pgsteal_kswapd 58467386 + pgsteal_direct 255950 + pgscan_kswapd 86628315 + pgscan_direct 415889 + pgscan_direct_throttle 0 + pginodesteal 18 + slabs_scanned 31242197 + kswapd_inodesteal 1238474 + kswapd_low_wmark_hit_quickly 11637 + kswapd_high_wmark_hit_quickly 5411 + pageoutrun 32167 + pgrotated 213328 + drop_pagecache 0 + drop_slab 0 + oom_kill 0 + pgmigrate_success 729722 + pgmigrate_fail 450 + compact_migrate_scanned 43510584 + compact_free_scanned 248175096 + compact_isolated 1494774 + compact_stall 6 + compact_fail 3 + compact_success 3 + compact_daemon_wake 9438 + compact_daemon_migrate_scanned 43502436 + compact_daemon_free_scanned 248107303 + unevictable_pgs_culled 66418 + unevictable_pgs_scanned 0 + unevictable_pgs_rescued 8484 + unevictable_pgs_mlocked 78830 + unevictable_pgs_munlocked 8508 + unevictable_pgs_cleared 11455 + unevictable_pgs_stranded 11455 + swap_ra 0 + swap_ra_hit 7 + speculative_pgfault 221449963 + EOF +fi + +bin=start-ubuntu22.sh +echo "writing launch script" +cat > $bin <<- EOM +#!/bin/bash +cd \$(dirname \$0) +## unset LD_PRELOAD in case termux-exec is installed +unset LD_PRELOAD +command="proot" +command+=" --kill-on-exit" +command+=" --link2symlink" +command+=" -0" +command+=" -r $folder" +if [ -n "\$(ls -A ubuntu22-binds)" ]; then + for f in ubuntu22-binds/* ;do + . \$f + done +fi +command+=" -b /dev" +command+=" -b /proc" +command+=" -b /sys" +command+=" -b /data" +command+=" -b ubuntu22-fs/root:/dev/shm" +command+=" -b /proc/self/fd/2:/dev/stderr" +command+=" -b /proc/self/fd/1:/dev/stdout" +command+=" -b /proc/self/fd/0:/dev/stdin" +command+=" -b /dev/urandom:/dev/random" +command+=" -b /proc/self/fd:/dev/fd" +command+=" -b ${cur}/${folder}/proc/fakethings/stat:/proc/stat" +command+=" -b ${cur}/${folder}/proc/fakethings/vmstat:/proc/vmstat" +command+=" -b ${cur}/${folder}/proc/fakethings/version:/proc/version" +## uncomment the following line to have access to the home directory of termux +#command+=" -b /data/data/com.termux/files/home:/root" +command+=" -b /sdcard" +command+=" -w /root" +command+=" /usr/bin/env -i" +command+=" MOZ_FAKE_NO_SANDBOX=1" +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 +EOM + +mkdir -p ubuntu22-fs/var/tmp +rm -rf ubuntu22-fs/usr/local/bin/* +echo "127.0.0.1 localhost localhost" > $folder/etc/hosts +wget -q https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Rootfs/Ubuntu19/vnc -P ubuntu22-fs/usr/local/bin > /dev/null +wget -q https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Rootfs/Ubuntu19/vncpasswd -P ubuntu22-fs/usr/local/bin > /dev/null +wget -q https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Rootfs/Ubuntu19/vncserver-stop -P ubuntu22-fs/usr/local/bin > /dev/null +wget -q https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Rootfs/Ubuntu19/vncserver-start -P ubuntu22-fs/usr/local/bin > /dev/null + +chmod +x ubuntu22-fs/usr/local/bin/vnc +chmod +x ubuntu22-fs/usr/local/bin/vncpasswd +chmod +x ubuntu22-fs/usr/local/bin/vncserver-start +chmod +x ubuntu22-fs/usr/local/bin/vncserver-stop + +echo "fixing shebang of $bin" +termux-fix-shebang $bin +echo "making $bin executable" +chmod +x $bin +echo "removing image for some space" +rm $tarball + + +#DE installation addition + +wget --tries=20 $dlink/XFCE4/xfce22.sh -O $folder/root/xfce22.sh +clear +echo "Setting up the installation of XFCE VNC" + +echo "APT::Acquire::Retries \"3\";" > $folder/etc/apt/apt.conf.d/80-retries #Setting APT retry count +touch $folder/root/.hushlogin +echo "#!/bin/bash +rm -rf /etc/resolv.conf +echo 'nameserver 8.8.8.8' >> /etc/resolv.conf +mkdir -p ~/.vnc +apt update -y && apt install sudo wget -y > /dev/null +clear +if [ ! -f /root/xfce22.sh ]; then + wget --tries=20 $dlink/XFCE4/xfce22.sh -O /root/xfce22.sh + bash ~/xfce22.sh +else + bash ~/xfce22.sh +fi +clear +if [ ! -f /usr/local/bin/vncserver-start ]; then + wget --tries=20 $dlink/XFCE4/vncserver-start -O /usr/local/bin/vncserver-start + wget --tries=20 $dlink/XFCE4/vncserver-stop -O /usr/local/bin/vncserver-stop + chmod +x /usr/local/bin/vncserver-stop + chmod +x /usr/local/bin/vncserver-start +fi +if [ ! -f /usr/bin/vncserver ]; then + apt install tigervnc-standalone-server -y +fi +rm -rf /root/xfce22.sh +rm -rf ~/.bash_profile" > $folder/root/.bash_profile + +bash $bin diff --git a/Scripts/InstallScript/GUI XFCE/void-xfce.sh b/Scripts/InstallScript/GUI XFCE/void-xfce.sh new file mode 100644 index 0000000..a152587 --- /dev/null +++ b/Scripts/InstallScript/GUI XFCE/void-xfce.sh @@ -0,0 +1,121 @@ +#!/data/data/com.termux/files/usr/bin/bash +pkg install wget -y +folder=void-fs +dlink="https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/XBPS" +if [ -d "$folder" ]; then + first=1 + echo "skipping downloading" +fi +tarball="void.tar.xz" + + + +if [ "$first" != 1 ];then + if [ ! -f $tarball ]; then + echo "Download Rootfs, this may take a while base on your internet speed." + case `dpkg --print-architecture` in + aarch64) + archurl="arm64" ;; + arm) + archurl="armhf" ;; + amd64) + archurl="amd64" ;; + x86_64) + archurl="amd64" ;; + i*86) + archurl="i386" ;; + x86) + archurl="i386" ;; + *) + echo "unknown architecture"; exit 1 ;; + esac + wget "https://github.com/AndronixApp/AndronixOrigin/blob/master/Rootfs/Void/${archurl}/void_${archurl}.tar.xz?raw=true" -O $tarball + fi + mkdir -p "$folder" + echo "Decompressing Rootfs, please be patient." + proot --link2symlink tar -xJf ${tarball} -C $folder||: +fi + +mkdir -p void-binds +bin=start-void.sh +echo "writing launch script" +cat > $bin <<- EOM +#!/bin/bash +cd \$(dirname \$0) +## unset LD_PRELOAD in case termux-exec is installed +unset LD_PRELOAD +command="proot" +command+=" --link2symlink" +command+=" -0" +command+=" -r $folder" +if [ -n "\$(ls -A void-binds)" ]; then + for f in void-binds/* ;do + . \$f + done +fi +command+=" -b /dev" +command+=" -b /proc" +command+=" -b void-fs/root:/dev/shm" +## uncomment the following line to have access to the home directory of termux +#command+=" -b /data/data/com.termux/files/home:/root" +## 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 +EOM + +echo "fixing shebang of $bin" +termux-fix-shebang $bin + + + +echo "Fixing DNS for internet connection" +rm -rf void-fs/etc/resolv.conf +echo "nameserver 8.8.8.8 +nameserver 8.8.4.4 +nameserver 192.168.1.1 +nameserver 127.0.0.1" > void-fs/etc/resolv.conf + +echo "making $bin executable" +chmod +x $bin +rm $tarball + +#DE installation addition + +wget --tries=20 $dlink/XFCE4/xfce4_de.sh -O $folder/root/xfce4_de.sh > /dev/null +clear +echo "Setting up the installation of XFCE VNC" + +echo "#!/bin/bash +xbps-install -u xbps -y +xbps-install -Su -y && xbps-install -S xfce4 tigervnc wget sudo -y +if [ ! -f /root/xfce4_de.sh ]; then + wget --tries=20 $dlink/XFCE4/xfce4_de.sh -O /root/xfce4_de.sh > /dev/null + bash ~/xfce4_de.sh +else + bash ~/xfce4_de.sh +fi +clear +if [ ! -f /usr/local/bin/vncserver-start ]; then + wget --tries=20 $dlink/XFCE4/vncserver-start -O /usr/local/bin/vncserver-start > /dev/null + wget --tries=20 $dlink/XFCE4/vncserver-stop -O /usr/local/bin/vncserver-stop > /dev/null + chmod +x /usr/local/bin/vncserver-stop + chmod +x /usr/local/bin/vncserver-start +fi +if [ ! -f /usr/bin/vncserver ]; then + xbps-install -S xfce4 tigervnc wget -y > /dev/null +fi +rm -rf ~/.bash_profile" > $folder/root/.bash_profile + +bash $bin