Just a simple guide for easily mining XMR (Monero) with Termux on mobiles.
The first thing you have to do is to install Termux.
Once done, run the following commands:
$ pkg upgrade
$ pkg install -y git build-essential cmake libuv libzmq libcurl
Next, install p2pool and xmrig.
$ git clone --recursive https://github.com/SChernykh/p2pool.git
$ cd p2pool
$ mkdir build && cd build
$ cmake ..
$ make -j$(nproc)
Once the compilation is finished, check if the binary called p2pool
has been compiled correctly with ./p2pool --help
.
$ git clone https://github.com/xmrig/xmrig.git
$ cd xmrig
$ mkdir build && cd build
$ cmake -DWITH_HWLOC=OFF ..
$ make -j$(nproc)
Once the compilation is finished, check if the binary called xmrig
has been compiled correctly with ./xmrig --help
.
In order to be able to detect the temperature on mobile devices, you need to install both, mobile app and the Termux package.
- Mobile App
Search for application named "Termux:API" on the Google Play store and install it.
- Termux Package
$ pkg install -y termux-api
Additionally, you will also have to install the jq
package as it is now required by the launcher scripts.
$ pkg install -y jq
Once done, run the following command:
$ termux-battery-status | jq .
If you see something, then it means that the Termux API has been installed correctly.
You don't have to grant any permissions to the 'Termux:API' application as no permissions are required to query the device battery status.
By default, the P2Pool launcher script is configured to use remote Monero mining nodes as this project is primilary made for low-end devices.
Use can use this page to select the remote node you want to use:
To make the prcess even more easier, you can use the following launcher scripts:
Clone this repo to make things easier:
$ git clone https://github.com/Jiab77/termux-xmr-mining.git
$ cd termux-xmr-mining
Once done, run each launcher scripts in a dedicated tab / session by swipping from left to right on mobile devices.
Add your wallet address in the start-p2pool.sh
script or it will not run.
- P2Pool
$ ./start-p2pool.sh
Wait around 5 to 10 minutes for
p2pool
to be fully synced.
- XMRig
$ ./start-xmrig.sh
You can stop both scripts by using
[Ctrl + C]
in case the mobile device is overheating.
Have a look at the pool observer and paste the wallet address you are using for mining to see your progression.
You might also have to look at the pool mini observer instead of the main one if the "mini" has been enabled.
The support for XvB Raffle is currently in development and might not be functional yet.
You will need to register to get started.
Once done, set the
XVB_TOKEN
variable in the config part of the start-p2pool.sh launcher script.
Here is some useful information:
Nodes
- P2P:
p2pmd.xmrvsbeast.com:18081
- EU:
eu.xmrvsbeast.com:18089
- NA:
na.xmrvsbeast.com:18089
These nodes are listed in the following format:
node:rpc
The support for the several supported APIs will be implemented soon.
Here is some implementation details:
P2Pool
- Argument(s):
--local-api
- Path:
/local/
- Port:
3333
XMRig
- Argument(s):
--http-host
,--http-port
- Port:
18088
XvB
- Public:
https://xmrvsbeast.com/p2pool/stats
- Private:
https://xmrvsbeast.com/cgi-bin/p2pool_bonus_history_api.cgi?address=WALLET_ADDRESS&token=TOKEN
The support for Tor will be implemented soon.
Here is some implementation details:
P2Pool
- Argument:
--socks5
- Value:
IP:PORT
XMRig
- Argument:
--proxy
- Value:
IP:PORT
Thanks to gupax and gupaxx devs for the inspiration.
- Create launcher scripts
- Add device memory detection code
- Add OpenCL support for Intel and Nvidia
- Add XvB Raffle support (pending)
- Add API support for P2Pool, XMrig and XvB
- Add Tor support
- Add iSH support
- Create installer scripts
- Improve OpenCL code
- Improve documentation
- https://p2pool.io
- https://p2pool.io/mini
- https://p2pmd.xmrvsbeast.com/p2pool
- https://github.com/SChernykh/p2pool
- https://github.com/xmrig/xmrig
- Jiab77