So, to get started you need to get the base OS installed using the instructions from the official docs . I chose option 3 since I only wanted the script
pkg update
pkg install wget proot
termux-setup-storage
termux-chroot
wget https://sdrausty.github.io/TermuxArch/setupTermuxArch.sh
bash setupTermuxArch.sh
This should download fine using wget and start installing. The install itself will take around 15-30 minutes to extract the system and install everything. When the process finishes you'll be in a root shell in your new Arch distro! Of course, not everything will work out of the box.
You'll need to install sudo first:
pacman -S sudo
and then you can make your user account and set your passwords
addauser user
sudo passwd root # Password for root
sudo passwd user # Password for your user
su - user
If pacman complains about a 404 error when downloading wget you'll just need to edit the /etc/pacman.d/mirrorlist as root (su) and uncomment the server that's closest to your location. Then run pacman -Syyuu to refresh the repos and ensure all packages are up to date with the repos and try to install wget again.
In order to download and build AUR packages, some more steps are required.
One thing you'll have to do is replace fakeroot with its tcp version. There is a series of commands to do just this, however, if everything goes as planned it should take 2 exits to exit the terminal, once for the fakeroot if it is unstalled successfully. If you're terminal exits completely then something went wrong, rerun the commands without the exit to find out why. Make sure wget, make and tar are installed correctly and then run:
wget http://ftp.debian.org/debian/pool/main/f/fakeroot/fakeroot_1.24.orig.tar.gz
tar xvf fakeroot_1.24.orig.tar.gz
cd fakeroot_1.24/
./bootstrap
./configure --prefix=/opt/fakeroot \
--libdir=/opt/fakeroot/libs \
--disable-static \
--with-ipc=tcp
make -j4
sudo make install
/opt/fakeroot/bin/fakeroot
exit
Download this zip and extract the makepkg to your users home directory. In your user's bin/ folder, backup your current makepkg binary by renaming it with mv /usr/bin/makepkg /usr/bin/makepkg.bk. Copy the new makepkg to the /usr/bin/ folder and you should now be able to make and install packages using yay.
If the makepkg binary I patched does not work for your install, then remove it from your bin and copy the original makepkg to the patch directory without the .bk extension.
cp /usr/bin/makepkg.bk ./makepkg
Then run this command to generate a patched version of your makepkg:
patch makepkg < makepkg.patch
cp makepkg /usr/bin/
Now to install yay, I followed the simple instructions from the github page.
If all the instructions were followed correctly yay should install and you'll have a functional Arch Linux with AUR support on your Android device.
sudo bash fresharch.sh не работает