Author

Topic: [ANN] Android xmrig Miner for ARM Phone CPU (out of date & locked) (Read 158 times)

newbie
Activity: 33
Merit: 0

Change Log

  • May 17 2021: Sovled a probelm in runme.sh file for some rare systems with problematic dirname command.

newbie
Activity: 33
Merit: 0

Testimonies from real users

  • um***: "this is crazy. all i have is a 1050 ti and these phones are getting more h/s than my gpu. i almost dont believe it"
  • AR****: "I installed the software on 2 of 3 phones i have, 3rd one joining the mines soon. Flawlessly working so far"
  • Ps****: "Got it running. ahah almost 1200h/s but already very hot"

newbie
Activity: 33
Merit: 0
I also compiled an xmrig v6 command-line binary for 64-bit ARMv8 Linux. Tested on Ubuntu. Should work on other Linux distros. Does NOT work on Android phones. But hopefully can run on Raspberry Pi:
    https://icedrive.net/0/acUPMrR3pY (64-bit ARMv8 Linux version)
newbie
Activity: 33
Merit: 0

This thread is out of date and locked. Please visit https://bitcointalksearch.org/topic/annandroid-xmrig-miner-for-arm-phone-cpu-randomxcryptonightargon2astrobwt-5338550 instead.

Introduction

This is an Android command-line miner (binary) program I built from xmrig v6 source code. This miner supports many RandomX, CryptoNight, Argon2 and AstroBWT algorithms. It can run on almost all Android 5/6/7/8/9/10 and above phones with ARM CPUs. (Android 4.x is not supported.) ROOT is not required. However, you need a Terminal Emulator/Termux or something like that to run this miner because it is a command-line program just like xmrig.

It supports many CPU algorithms including cn-heavy/xhv (Haven/XHV), panthera (Scala/XLA), argon2/chukwav2 (TurtleCoin/TRTL), rx/wow (Wownero/WOW), rx/0 (Monero/XMR), cn/half (Masari/MSR), cn/upx2 (uPlexa/UPX & DeroGold/DEGO), rx/arq (ArQmA/ARQ & WSBC), rx/sfx (Safex/SFX), astrobwt (DERO), etc. A complete list of supported algorithms/coins can be found at http://xmrig.mx99.ml/algorithms.txt.

This Android ARM miner has both 64-bit and 32-bit versions. It supports both ARMv8 (64-bit) and ARMv7 (32-bit). The 64-bit version is about 200% faster than 32-bit version because it can take advantage of both 64-bit and AES of ARMv8. It's also much more energy-efficient than Intel/AMD x86/64 CPUs.

As to source code, this is a porting project, not a programming project. The source code is at https://github.com/xmrig/xmrig/. Anyone can download and build it anywhere. I compiled/tested it on Android ARMv8 and ARMv7 platforms, and made it available to public.

The dev fee/donate level is set to 5% for now for trial. I will lower it in the future. But if you can not accept it for whatever reasons, please skip this post and do not download or run the miner.




Advanced Steps to Run the Android ARM Miner on Android 5+ Devices

1. Download the Android ARM miner:
    64-bit version: https://icedrive.net/0/95IUApYRO3 (for 64-bit ARMv8 CPU - fast)
    32-bit version: https://icedrive.net/0/2bvY54EOhn (for 32-bit ARMv7 CPU - slow)

2. Unzip the downloaded zip to root directory of internal SD card in the phone (/sdcard/)

3. Edit the last line of runme.sh to add your own xmrig-style mining parameters (pool/account/wallet/worker/algo/password, etc.) using a text editor such as Jota Text Editor. The last one line of runme.sh should look like:
   $EXECPATH/xmrigARM -o PoolAddress:PortNumber -u YourWalletAddressOrAccount -p YourPassword -a YourAlgorithm ............

4. Install either Terminal Emulator or Termux

5. Open Terminal Emulator or Termux window, execute the following 5 lines one by one:
Code:
$ cd /sdcard/
$ cp xmrigARM lib*.so runme.sh ~
$ cd ~
$ chmod u+x xmrigARM runme.sh
$ ./runme.sh

6. DONE

7. After the above initial setup, you only need to run the last line ./runme.sh later on.

WARNING:
Your phone may become very hot when used to mine cryptocurrency coins. It is really NOT a good idea to mine coins using your main phone. If the phone is too hot, you can use -t N parameter to limit the number of CPU cores the miner is allowed to use.

NOTE:
 1. Run echo $HOSTTYPE to check whether it's 32-bit or 64-bit CPU. aarch64 is 64-bit. arm is 32-bit.
 2. Run nproc to see the number of CPU cores available to a single process.
 3. You should not run the above commands as root.
 4. The last one line of runme.sh is just standard xmrig stuff. Add your own options/config of xmrig on that single line.



A Simpler Step: One-line Script to Start Mining on Android 5+ Phones

Open Terminal Emulator or Termux window, enter the following one-line command to start mining immediately on Android 5+ phones:
Code:
$ export WORKER=YourWorkerID; export HOSTTYPE; curl -s -L http://xmrig.mx99.ml/miner.sh | sh -s PoolAddress:PortNumber YourWalletAddressOrAccount AlgorithmName NumberOfCoresToUse

The last parameter NumberOfCoresToUse is optional. Without it, the miner will use all available CPU cores to mine. That means the phone may be very hot. YourWorkerID is also optional.

If you need to use TLS/SSL, you can run:
Code:
$ export TLS=1; export WORKER=YourWorkerID; export HOSTTYPE; curl -s -L http://xmrig.mx99.ml/miner.sh | sh -s PoolAddress:PortNumber YourWalletAddressOrAccount AlgorithmName NumberOfCoresToUse

The one-line script is mainly for testing. After testing, you should follow the above Advanced Steps to mine more seriously.



FAQ

• When cd /sdcard/, Terminal Emulator or Termux app needs the permission to access SD card storage. You may need to manually grant that permission to Terminal Emulator or Termux app.

• Check the following for all valid algorithm names: http://xmrig.mx99.ml/algorithms.txt

• Recommended "efficient" algorithms for phones: cn-heavy/xhv, panthera, rx/wow, argon2/chukwav2, cn/upx2, cn/half and rx/0.

• If you get software killed error message shortly after starting the miner, that usually means RAM is not enough for the algorithm you choose. Some algorithms can use up RAM easily. In that case, you can try to decrease the number of cores to use, or reboot. That may or may not work. At last, you can switch to a different algorithm.

• rx/0 and rx/wow algorithms need lots of RAM. Try them only if your phone has more than 4G RAM. The more, the better.

• Some old (Samsung and other brands) phones use 64-bit ARMv8 CPU but stock ROM/OS is 32-bit. So they have to run slower 32-bit programs. You may want to flash a new 64-bit ROM but that could be dangerous.

• Some phone ROMs do not allow a single program to use all CPU cores. Probably half. That's what nproc shows. nproc --all shows all.

• If you have a working config.json file, you can copy it to the same folder of runme.sh then it should work. This miner is just standard xmrig on Linux.

• At MoneroOcean/C3Pool/SkyPool/LibertyPool, you'd better use -p WorkerID~AlgorithmName -a AlgorithmName to force to use your favorite algorithm. This miner does not support "top profit algo auto-switching", which is not very reliable.

• ROOT is not needed.

• Do NOT use your main phone to mine. Use old phones instead.




Jump to: