Use xmrig software to undermine the smartphone is very simple, just download the source and compile it on the phone.
First you need to install from GooglePlay Termux Linux terminal emulator for Android.
Once installed open it and give the following commands to download and fill xmrig:
apt update
apt install git cmake libuv-dev
git clone https://github.com/xmrig/xmrig.git
cd xmrig
mkdir build
cd build
cmake .. -DWITH_HTTPD=OFF -DWITH_TLS=OFF
make
Once you have compiled executable xmrig in / xmrig / build, to run it just type ./xmrig -c config.json config.json where the file is the configuration file.