Skip to content

Just a simple guide for easily mining XMR with Termux on mobiles.

License

Notifications You must be signed in to change notification settings

Jiab77/termux-xmr-mining

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Termux XMR Mining

Just a simple guide for easily mining XMR (Monero) with Termux on mobiles.

Installation

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.

Installing p2pool

$ 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.

Installing xmrig

$ 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.

Installing Termux API

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.

Remote nodes

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:

Launcher scripts

To make the prcess even more easier, you can use the following launcher scripts:

Running 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.

Check your progress

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.

XvB Raffle

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

APIs

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

Tor

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

Thanks to gupax and gupaxx devs for the inspiration.

Roadmap

  • 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

References

Author

  • Jiab77

About

Just a simple guide for easily mining XMR with Termux on mobiles.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages