Ok, if you're a newbie like me this is the process (After enable the termux storage permissions):
startarch
tar zcf mirrorlist.tar.gz /etc/pacman.d/
cp /etc/pacman.conf storage/downloads/pacman.conf
cp /etc/pacman.d/mirrorlist storage/downloads/mirrorlist
// Now you can edit the configuration :)
nano /etc/pacman.conf
nano /etc/pacman.d/mirrorlist
pacman -S git
pacman -S binutils
pacman -S pkgfile
pacman -S unzip
pacman -S fakeroot
pacman -S nodejs
pacman -S npm
npm install -g yarn // Yarn is a other good option to have
pacman -Syy; pacman -Su; pacman -S jdk8-openjdk
useradd -m myuser
su myuser
makepkg
- Install android-sdk:
cd ~/
git clone https://github.com/termux/termux-packages.git
./termux-packages/scripts/setup-android-sdk.sh
- Set Environment Variables
nano $HOME/.bash_profile
# Append these lines at the end of the file:
export ANDROID_HOME=$HOME/lib/android-sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
#end
source $HOME/.bash_profile
echo $ANDROID_HOME
/root/lib/android-sdk // Yay!
Eureka! You can build react-native apps now from your device! 💯
npm install -g react-native-cli
react-native init AwesomeProject
cd AwesomeProject
react-native run-android
Make a video at youtube pls sir that how to install react-native at termux