-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from ShorelineCrypto/v1.4.x_MobileMining
V1.4.x mobile mining
- Loading branch information
Showing
89 changed files
with
1,061 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Mobile Mining on Android 32 bits phone (armhf) with UserLand App | ||
|
||
This folder describe how to CPU mine NewEnglandcoin (NENG) on 32 bits android phone (armhf). | ||
|
||
Please read high level overview first from pdf report: | ||
https://github.com/ShorelineCrypto/NewEnglandCoin/releases/download/NENG_2020_Q3_report/NENG_2020_Q3_report.pdf | ||
|
||
|
||
### Step 1: Install and setup UserLand app from Google Play Store | ||
|
||
First install free "UserLand" app from google play store. After installation, click Distribution | ||
"Debian", pick a username, password, and VNC password (which could be same password). You will enter | ||
a linux terminal inside UserLand app, which runs armhf version of Debian 10 (Buster). | ||
|
||
Here we are recommending running through SSH (linux terminal) only, not VNC. For linux GUI, it is much better to run remotely | ||
through putty and you can display all linux GUI software in windows 10 with a few mouse clicks of free software download and installs. See optional | ||
item at bottom of the parent page. | ||
|
||
### Step 2: prepare UserLand | ||
|
||
Type below commands in linux terminal inside Userland: | ||
|
||
``` | ||
sudo apt update | ||
sudo apt install wget ssh | ||
hostname -I | ||
``` | ||
|
||
### Step 3: Remember IP of phone from above step, remote login from desktop computer | ||
|
||
For windows 10 desktop machine, install a free software "PuTTY", login into phone with your | ||
username/password picked at port 2022 | ||
|
||
A screen shot of putty was provided. | ||
|
||
For linux or MacOS, you can remote login with ssh from command line at port 2022. For example | ||
IP = 192.168.1.4 with user "hlu" like below | ||
``` | ||
ssh [email protected] -p 2022 | ||
``` | ||
|
||
## Now you can run below commands from putty from windows 10 or ssh from MacOS or Linux | ||
### Step 4: Prepare UserLand app Linux Terminal | ||
First login into UserLand app linux terminal remotely, you should find that common linux command like "top", "uptime" does not work. | ||
Please run below for workaround for those issues: | ||
``` | ||
bash prepare_userland.sh | ||
``` | ||
|
||
After completion of above, logout and re-login into UserLand linux terminal, you should be able to use "top", "uptime" etc command. | ||
|
||
|
||
### Step 5: Install library files, wallet and cheetah_cpuminer | ||
Please run below shell script in Userland Debian for installing dependencies and library files: | ||
``` | ||
bash prepare_neng.sh | ||
``` | ||
The above step automatically download binary NENG wallet file and cheetah_cpuminer in current folder. | ||
|
||
### Step 6: Optimize CPU mining with Cheetah_Cpuminer: | ||
|
||
Run below to find cpu info and memory information: | ||
|
||
``` | ||
more /proc/cpuinfo | ||
top | ||
``` | ||
For quad core phone, 8 cpu threads were found. You can now optimize Cheetah_Cpuminer parameter to perform android mining. | ||
|
||
For more information on CPU mining with cheetah_Cpuminer, please checkout: | ||
https://github.com/ShorelineCrypto/cheetah_cpuminer | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
sudo apt-get update | ||
sudo apt-get -y install wget curl | ||
sudo apt-get -y install build-essential | ||
sudo apt-get -y install g++ libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils | ||
sudo apt-get -y install libboost-all-dev | ||
|
||
sudo apt-get -y install software-properties-common | ||
sudo apt-get update | ||
|
||
|
||
sudo apt-get -y install libzmq3-dev libbz2-dev zlib1g | ||
sudo apt-get -y install libprotobuf-dev protobuf-compiler | ||
sudo apt-get -y install openssl | ||
|
||
sudo apt-get -y install qt4-default | ||
|
||
sudo apt-get -y install python-pip | ||
sudo apt-get -y install python-setuptools | ||
sudo pip install python-bitcoinrpc | ||
|
||
sudo apt-get -y install git | ||
#git clone https://github.com/ShorelineCrypto/NewEnglandCoin.git | ||
git clone https://github.com/ShorelineCrypto/cheetah_cpuminer.git | ||
|
||
|
||
# Berkeley DB: http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz | ||
# This can not be compiled and used for NENG wallet | ||
# we obtained binaries from Ubuntu 18.04 and bundled in one folder | ||
|
||
wget https://github.com/ShorelineCrypto/NewEnglandCoin/releases/download/v1.4.0.5/ubuntu18_armhf_db-4.8.30.NC.tgz | ||
tar xvfz ubuntu18_armhf_db-4.8.30.NC.tgz | ||
sudo mv db-4.8.30.NC /opt/ | ||
sudo mv bitcoin.conf /etc/ld.so.conf.d/ | ||
|
||
wget https://github.com/ShorelineCrypto/NewEnglandCoin/releases/download/v1.4.0.5/ubuntu18_armhf_miniupnpc.tgz | ||
tar xvfz ubuntu18_armhf_miniupnpc.tgz | ||
sudo mv miniupnpc /opt/ | ||
sudo mv miniupnpc.conf /etc/ld.so.conf.d/ | ||
|
||
wget https://github.com/ShorelineCrypto/NewEnglandCoin/releases/download/v1.4.0.5/ubuntu16_armhf_openssl1.0.tgz | ||
tar xvfz ubuntu16_armhf_openssl1.0.tgz | ||
sudo mv openssl /opt/ | ||
sudo mv openssl.conf /etc/ld.so.conf.d/ | ||
|
||
wget https://github.com/ShorelineCrypto/NewEnglandCoin/releases/download/v1.4.0.5/ubuntu16_armhf_boost1.58.tgz | ||
tar xvfz ubuntu16_armhf_boost1.58.tgz | ||
sudo mv boost1.58 /opt/ | ||
sudo mv boost1.58.conf /etc/ld.so.conf.d/ | ||
## link all libary files | ||
sudo ldconfig | ||
|
||
## download the binary wallet and enjoy: | ||
wget https://github.com/ShorelineCrypto/NewEnglandCoin/releases/download/v1.4.0.5/newenglandcoin_v1.4.0.5_ubuntu16_armhf.tgz | ||
tar xvfz newenglandcoin_v1.4.0.5_ubuntu16_armhf.tgz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## Productivity tools | ||
sudo apt-get update | ||
sudo apt -y install ssh | ||
sudo apt -y install wget | ||
sudo apt -y install screen | ||
sudo apt -y install vim | ||
sudo apt -y install nano | ||
|
||
## fix proc and permission errors causing top ps to fail, workaround | ||
## toybox-armv7l workaround provided at: | ||
## https://github.com/CypherpunkArmory/UserLAnd/issues/87 | ||
|
||
wget http://landley.net/toybox/bin/toybox-armv7l | ||
chmod a+rx toybox-armv7l | ||
sudo mv toybox-armv7l /usr/local/bin/ | ||
|
||
cat >> ~/.bashrc << EOF | ||
alias top="toybox-armv7l top" | ||
alias ps="toybox-armv7l ps" | ||
alias uptime="toybox-armv7l uptime" | ||
alias reset="toybox-armv7l reset" | ||
EOF |
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
doc/Android_Userland_App/ubuntu/arm64/compile_boost1.58.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
sudo rm -rf /opt/boost1.58 | ||
|
||
wget -O boost_1_58_0.tar.bz2 http://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.bz2/download | ||
tar xvfj boost_1_58_0.tar.bz2 | ||
cd boost_1_58_0 | ||
./bootstrap.sh --with-libraries=all --with-toolset=gcc | ||
./b2 toolset=gcc | ||
sudo ./b2 install --prefix=/opt/boost1.58 | ||
|
||
sudo ldconfig |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# Mobile Mining on Android 32 bits phone (armhf) with UserLand App | ||
|
||
This folder describe how to CPU mine NewEnglandcoin (NENG) on 32 bits android phone (armhf). | ||
|
||
Please read high level overview first from pdf report: | ||
https://github.com/ShorelineCrypto/NewEnglandCoin/releases/download/NENG_2020_Q3_report/NENG_2020_Q3_report.pdf | ||
|
||
|
||
### Step 1: Install and setup UserLand app from Google Play Store | ||
|
||
First install free "UserLand" app from google play store. After installation, click Distribution | ||
"Ubuntu", pick a username, password, and VNC password (which could be same password). You will enter | ||
a linux terminal inside UserLand app, which runs armhf version of Ubuntu 18.04. | ||
|
||
Here we are recommending running through SSH (linux terminal) only, not VNC. For linux GUI, it is much better to run remotely | ||
through putty and you can display all linux GUI software in windows 10 with a few mouse clicks of free software download and installs. See optional | ||
item at bottom of the parent page. | ||
|
||
### Step 2: prepare UserLand | ||
|
||
Type below commands in linux terminal inside Userland: | ||
|
||
``` | ||
sudo apt update | ||
sudo apt install wget ssh | ||
hostname -I | ||
``` | ||
|
||
### Step 3: Remember IP of phone from above step, remote login from desktop computer | ||
|
||
For windows 10 desktop machine, install a free software "PuTTY", login into phone with your | ||
username/password picked at port 2022 | ||
|
||
A screen shot of putty was provided. | ||
|
||
For linux or MacOS, you can remote login with ssh from command line at port 2022. For example | ||
IP = 192.168.1.4 with user "hlu" like below | ||
``` | ||
ssh [email protected] -p 2022 | ||
``` | ||
|
||
## Now you can run below commands from putty from windows 10 or ssh from MacOS or Linux | ||
### Step 4: Prepare UserLand app Linux Terminal | ||
First login into UserLand app linux terminal remotely, you should find that common linux command like "top", "uptime" does not work. | ||
Please run below for workaround for those issues: | ||
``` | ||
bash prepare_userland.sh | ||
``` | ||
|
||
After completion of above, logout and re-login into UserLand linux terminal, you should be able to use "top", "uptime" etc command. | ||
|
||
|
||
### Step 5: Install library files, wallet and cheetah_cpuminer | ||
Please run below shell script in Userland Ubuntu for installing dependencies and library files: | ||
``` | ||
bash prepare_neng.sh | ||
``` | ||
The above step automatically download binary NENG wallet file and cheetah_cpuminer in current folder. | ||
|
||
### Optional Step 6: compile boost 1.58 from source | ||
The above should work for most of armhf android phones/chromebook. However it may fail in rare phone/chromebook cases. | ||
|
||
You can fix the hardware incompatible issue by removing binary boost1.58 and compile boost 1.58 library in the machine from source as replacement: | ||
``` | ||
bash compile_boost1.58.sh | ||
``` | ||
|
||
### Step 7: Optimize CPU mining with Cheetah_Cpuminer: | ||
|
||
Run below to find cpu info and memory information: | ||
|
||
``` | ||
more /proc/cpuinfo | ||
top | ||
``` | ||
For quad core phone, 8 cpu threads were found. You can now optimize Cheetah_Cpuminer parameter to perform android mining. | ||
|
||
For more information on CPU mining with cheetah_Cpuminer, please checkout: | ||
https://github.com/ShorelineCrypto/cheetah_cpuminer | ||
|
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
doc/Android_Userland_App/ubuntu/armhf/compile_boost1.58.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
sudo rm -rf /opt/boost1.58 | ||
|
||
wget -O boost_1_58_0.tar.bz2 http://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.bz2/download | ||
tar xvfj boost_1_58_0.tar.bz2 | ||
cd boost_1_58_0 | ||
./bootstrap.sh --with-libraries=all --with-toolset=gcc | ||
./b2 toolset=gcc | ||
sudo ./b2 install --prefix=/opt/boost1.58 | ||
|
||
sudo ldconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
sudo apt-get update | ||
sudo apt-get -y install ssh wget curl unzip | ||
#install libbost, gcc and g++ compilers | ||
sudo apt-get -y install build-essential | ||
sudo apt-get -y install g++ libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils | ||
sudo apt-get -y install libboost-all-dev | ||
sudo apt-get -y install software-properties-common | ||
sudo add-apt-repository -y ppa:bitcoin/bitcoin | ||
sudo apt-get update | ||
sudo apt-get -y install libdb4.8-dev libdb4.8++-dev | ||
sudo apt-get -y install libzmq3-dev libbz2-dev zlib1g libminiupnpc-dev | ||
sudo apt-get -y install libqt4-dev libprotobuf-dev protobuf-compiler | ||
|
||
sudo apt -y install git | ||
sudo apt -y install python-pip | ||
sudo pip install python-bitcoinrpc | ||
|
||
## reuse prior compiled boost libary for Ubuntu 18.04 | ||
wget https://github.com/ShorelineCrypto/NewEnglandCoin/releases/download/v1.4.0.5/ubuntu16_armhf_boost1.58.tgz | ||
tar xvfz ubuntu16_armhf_boost1.58.tgz | ||
sudo mv boost1.58 /opt/ | ||
sudo mv boost1.58.conf /etc/ld.so.conf.d/ | ||
## link all libary files | ||
sudo ldconfig | ||
|
||
git clone https://github.com/ShorelineCrypto/cheetah_cpuminer.git | ||
## download the binary wallet and enjoy: | ||
wget https://github.com/ShorelineCrypto/NewEnglandCoin/releases/download/v1.4.0.5/newenglandcoin_v1.4.0.5_ubuntu16_armhf.tgz | ||
tar xvfz newenglandcoin_v1.4.0.5_ubuntu16_armhf.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## Productivity tools | ||
sudo apt-get update | ||
sudo apt -y install ssh | ||
sudo apt -y install wget | ||
sudo apt -y install screen | ||
sudo apt -y install vim | ||
sudo apt -y install nano | ||
|
||
## fix proc and permission errors causing top ps to fail, workaround | ||
## toybox-armv7l workaround provided at: | ||
## https://github.com/CypherpunkArmory/UserLAnd/issues/87 | ||
|
||
wget http://landley.net/toybox/bin/toybox-armv7l | ||
chmod a+rx toybox-armv7l | ||
sudo mv toybox-armv7l /usr/local/bin/ | ||
|
||
cat >> ~/.bashrc << EOF | ||
alias top="toybox-armv7l top" | ||
alias ps="toybox-armv7l ps" | ||
alias uptime="toybox-armv7l uptime" | ||
alias reset="toybox-armv7l reset" | ||
EOF |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.