Miner.farm Crypto Currency Community Forum

Browse and post your favorite coin/crypto news, miner.farm and PiMP OS updates and announcements, mining guides, overclocking tips, and more...

Quick Links

Doc's Android Cluster

  • Support

    So, I was doing some cleaning up of my old junk hardware and ran across the family's old cell phones - 5 old Samsung Galaxy J7's just sitting in a box collecting dust. I couldn't bring myself to just toss them into the trash, so I headed to Google to see what I might be able to do with them. Let me save you some time... there's not much they'd be good for.

    With no good options, I wondered if I could get them mining. No, I don't care that they won't make me rich - that's not the reason I do this.


    Before I could begin, I needed to know what kind of hardware I was dealing with. A quick check online for these phones (model number "SM-J700T") says that they have 2GB of RAM and a Exynos 7580 CPU which is an 8 Core/8 Thread ARM-Cortex-A53 (ARMv8) 28nm chip.

    Next step was to figure out how to get Linux installed on these phones. The fastest and easiest way I found was to use an Android app called "Linux Deploy". The only catch is that to make this work, the devices must be rooted.

    I'm not going to go over the exact details, but what had to do to each device is:

    1. Factory Reset
    2. Update to the Newest Android
    3. Unlock the Bootloader
    4. Flash TWRP Recovery
    5. Root the Device
    6. Install "Linux Deploy"
    7. Configure/Install and Start Ubuntu for arm64 (see bottom of post)
    8. Compile/Build XMRig for ARMv8 (see bottom of post)

    At this point I configured XMRig to use 6 of the 8 cores and fired it up to mine LOKI on the RandomX algo (rx/loki). Simple tests showed that each device was pushing between 40 - 50 h/s, however, this is a bit too low for most pools and device timeouts will occur.

    At this point I thought I was done with this experiment, but just before "throwing in the towel", I ran across another piece of software from the XMRig developer called xmrig-proxy.

    As its name suggests, it acts as a proxy for other miners. The idea is simple: The proxy runs on one machine and connects to the pool. External miners get setup to connect to the proxy instead of a pool. The proxy's job is to control the workflow to and from the pool to the actual mining devices (the phones in this case).

    Score! This is exactly what I needed to keep these weaker devices going.

    Adding xmrig-proxy to PiMP OS was pretty easy. I compiled/built it like it was a normal miner and put it in /opt/miners/xmrig-proxy. Next, I created a xmrig-proxy.pcfg and added it to the /opt/confs/ folder. Using minerfarm I added a custom miner - pointing to the xmrig-proxy and the xmrig-proxy.pcfg files.

    PiMP OS fired this off without a problem. At this point, I just pointed each of the devices to the PiMP rig and away it went.

    Here's what it looks like with everything working. xmrig-proxy running on PiMP OS v2.15 and the 5 phones connected.

    Here it is reporting to the pool!

    Okay, so now let's go over the efficiency of all this.

    To avoid skewed data, I'm using my trusty little USB power meter on a single device that is fully charged. This way we will only be seeing what power is needed to keep the device running since some phones have "boost charging" abilities depending upon how low the battery is. We want to avoid getting our readings from any "boost" charging. Basically, we only want to measure what the device is pulling in order to keep the battery topped off while it is mining. This is what is being pulled from the wall.

    Node00 Power Node00 XMRig
    015807fc-476a-4a25-8608-c3d0b1620f3a-image.png 8d2a00b1-6c3c-4f70-8dbb-37966fe9f07b-image.png

    The measurement from Node00 is jumping between 1.5w and 2.8w, so we'll just call it 2.15w for now. Checking XMRig directly from the device, Node00 it is reporting 44.4h/s. Some simple math shows us that we are pulling 17.76 hashes per watt per second (h/w/s).

    For comparison, let's see how that stacks up against other common hardware. Note: Overhead Power is just an estimated amount of extra power needed just to run the system. This has to be taken into consideration since you can't just run a CPU or GPU without the rest of the computer.

    H/W/S column gives the overall device efficiency (higher is better).
    Hardware $/H gives the initial investment efficiency (lower is better).
    Power $/day gives the daily operating cost based upon $0.11/kwh (lower is better).
    The last three columns are from WhatToMine's calculation run on 1/1/2020.

    Device Hashrate (H/S) Power (W) Overhead (W) H/W/S Hardware (Used) Hardware $/H Coins/day Power $/day Profit $/day
    J7 44.4 2.15 0 20.65 $79 $1.78 0.008091 $0.005160 $0.00
    5x J7 222 10.75 $395 0.040425 $0.0258 -$0.01
    AMD EPYC 7742 44000 225 60 154.39 $5000 $0.11 8.005430 $0.75 $2.35
    THREADRIPPER 3970X 27703 280 60 81.48 $2000 $0.07 5.041909 $0.90 $1.06
    2X XEON E5-2698V4 13200 270 60 40 $596 $0.05 2.403054 $0.87 $0.06
    INTEL G4400 402 49 60 3.69 $40 $0.10 0.073202 $0.29 -$0.26
    GTX 1080 TI 1000 200 120 3.13 $450 $0.45 0.181945 $0.84 -$0.77
    RADEON VII 1710 280 120 4.28 $494 $1.76 0.311121 $1.06 -$0.94
    AMD RX 570 496 90 120 2.36 $94 $0.19 0.090245 $0.55 -$0.52

    Linux Deploy

    1. Configure
    • Distribution: Ubuntu
    • Architecture: arm64
    • Distribution Suite: bionic
    • User Name: root
    • Privileged Users: root
    • INIT: enabled
    • SSH: enabled
      • SSH Port: 2022 (Android blocks the default 22)
    1. Install
    2. Start

    XMRig Build for ARMv8 (or ARMv7)

    apt install git build-essential cmake libuv1-dev libssl-dev libhwloc-dev htop screen nano libhwloc-dev
    git clone https://github.com/xmrig/xmrig.git
    cd xmrig && mkdir build && cd build

    For ARMv8:

    cmake -DARM_TARGET=8 ..

    For ARMv7:

    cmake -DARM_TARGET=7 ..

    XMRig Start Script

    This will launch XMRig in a screen, just like PiMP OS does, so you can disconnect and reconnect without killing the miner. Connect with screen -r and disconnect with Ctl+a, d

    nano start.sh
    1. To mine via xmrig-proxy running on another machine:
    screen -wipe
    screen -dm /<path to xmrig>/xmrig -o <URL>:<port> -l /var/log/xmrig.log --donate-level 1 --rig-id <workerid>
    screen -r
    1. To mine directly to a pool:
    screen -wipe
    screen -dm /<path to xmrig>/xmrig -o <poolURL>:<port> -u <walletaddress> -p <workerid> -l /var/log/xmrig.log --donate-level 1 --api-id <workerid>
    screen -r

    Save and exit the editor.

    Now make the script executable with the following:

    chmod +x start.sh

    Starting, Stopping, Connecting, Disconnecting

    • Start - ./start.sh
    • Disconnect - CTL+a, d
    • Reconnect - screen -r
    • Stop - CTL+c from miner screen.


Want 10% more hash from your rigs?

We promise to keep your email safe and never spam you.

© 2014-2020 Miner.farm | By Miners, For Miners | Portable Instant Mining Platform, LLC