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.) Ubuntu is not needed. ROOT is not required. You only need a Terminal Emulator/Termux or something like that to run this miner because it is a command-line program just like regular xmrig.
It supports many CPU algorithms including astrobwt (DERO), panthera (Scala/XLA), cn-heavy/xhv (XHV & BLOC), argon2/chukwav2 (TurtleCoin/TRTL), rx/0 (Monero/XMR), cn/half (Masari/MSR), cn/upx2 (uPlexa/UPX & DeroGold/DEGO), rx/arq (ArQmA/ARQ & WSBC), rx/sfx (Safex/SFX), rx/keva (KVA), etc. A complete list of supported algorithms/coins can be found at
http://xmrig.mine.bz/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: http://xmrig.mine.bz/xmrigARM-1.9.5-android-arm64v8.zip (for 64-bit ARMv8 CPU - fast)
32-bit version: http://xmrig.mine.bz/xmrigARM-1.9.3-android-arm32v7.zip (for 32-bit ARMv7 CPU - slow)
2. Unzip the downloaded zip to root directory of phone internal storage
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 (case-sensitive):cd /sdcard/
cp xmrig* lib*.so runme.sh ~
cd ~
chmod u+x xmrig* runme.sh
./runme.sh
6. DONE
7. After the above initial setup, you only need to run the last line ./runme.sh later on. Or you can always directly run:./xmrig all your command-line options here
8. If you update /sdcard/runme.sh for some reasons, you need to re-run:cp /sdcard/runme.sh ~
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. Keep phones far away from anything flammable or important, no matter Summer or Winter.
NOTE:
1. Run uname -m or echo $HOSTTYPE to check whether it's 32-bit or 64-bit CPU. armv8* or aarch64 is 64-bit. armv7* or 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 (case-sensitive):
export WORKER=YourWorkerID; export HOSTTYPE; curl -s -L http://xmrig.mine.bz/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:
export TLS=1; export WORKER=YourWorkerID; export HOSTTYPE; curl -s -L http://xmrig.mine.bz/miner.sh | sh -s PoolAddress:TLSPortNumber YourWalletAddressOrAccount AlgorithmName NumberOfCoresToUse
If you are an xmrig "expert", you may use this advanced one-line script to take full control over xmrig running on Android phones:
https://bitcointalksearch.org/topic/m.58533129
FAQ
• When accessing
/sdcard/, Terminal Emulator or Termux app needs the permission to access internal/shared storage. Please go to Phone Settings -> Applications -> Terminal Emulator or Termux -> Permissions. Then Grant Storage permission.
• Check the following for all valid algorithm names:
http://xmrig.mine.bz/algorithms.txt• If you use Termux, you can first run
termux-wake-lock command to acquire a wakelock which prevents Android from entering power-saving/deep-sleep. It should work on most devices.
• Recommended "efficient" algorithms for phones: astrobwt, cn-heavy/xhv, argon2/chukwav2, panthera, cn/upx2, cn/half, rx/arq 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.
• RandomX 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
xmrig* then it should work. This miner is just standard xmrig on Linux.
• Do not add
stratum+tcp:// or
stratum+tcps:// before pool address.
• 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. Ubuntu is not needed.
• Do NOT use your main phones to mine. Do not buy new phones to mine. Use old/abandoned/broken phones instead.