Running Actinium Full Node on Samsung Galaxy Note 2

Harris Brakmic
8 min readMay 30, 2019

--

This is a tutorial on how to build a full node that runs on an old Samsung Galaxy Note 2 (a smartphone from 2012).

Updating the Android Operating System

But before we try to compile Actinium’s sources we will have to update the original operating system, Android 4.x, to Lollipop (Android 5.1.1), because the Linux Deploy app we’re using doesn’t accept the 4.x-version. As we all know, updating Android out-of-the-box isn’t possible, because Google has blocked all the “interesting” functions in its Android. We will have to make the smartphone “rooted”, that is: willing to execute any command we want. And I hope you know what that means:

You will lose any warranty and also make your smartphone susceptible to various potential problems. I am not responsible for any damages or problems. It’s your smartphone!

Having said that, please, go and make your device “rooted” by following one of the tutorials out there, then come back to continue reading this tutorial.

Installing Lollipop 5.1.1 — With ROM Manager and CyanogenMod

Having successfully rooted your device the next stepp will be the installation of the modded Lollipop 5.1.1 from CyanogenMod. You will download two zip files, one is the OS, the other is a special Google Play variant. To manage the installation you will need the ROM Manager app. The two zip files should go into the default Downloads folder from your internal phone card. Now shutdown and unplug your device.

Start it by pressing VolumeUp+Home+PowerOff keys. After a while you will get ROM Manager screen with various options. One of them is “install ZIP from sdcard”. Use the Volume buttons to scroll up/down and select this option by pressing the Power button.

Navigate to your Download folder and select the OS zip file first. The installation will take a few moments to complete. Now select the option “go back” and reboot the device. After you have successfully booted into the new Lollipop OS you will have to shut it down again. Now, activate it the same way (VolUp+Home+PowOff), then go back to the installation procedure again. This time install the GooglePlay ZIP file, then reboot the phone.

Congratulations! You just updated your ancient Samsung Galaxy Note 2 to Lollipop 5.1.1. This Android version is good enough to boot Ubuntu Trusty Linux that we will need for compiling and running our Actinium Wallet.

Running Ubuntu with Linux Deploy

Linux Deploy is a wonderful app for running various Linux distributions. In our case we will be using Ubuntu 14.04 (Trusty) distribution. There are newer versions available, but so far I have only been able to run this version on Lollipop 5.1.1. Although there are other Linux distros as well (Kali, Debian, Arch etc.) I have no experience with running them on Lollipop 5.1.1. You could try it, but I’d strongly recommend to stick with Ubuntu Trusty. However, before taking any further steps you should install BusyBox first. This app is needed for executing various Linux commands and you should take care of installing only the version linked in the previous sentence. DO NOT install any other BusyBox as there are many other variants available on Google Play. If you happen to have some other BusyBox already installed, remove it first! Having said that, we can now go to configure Linux Deploy. Open the app and then select “Settings” from the left menu.

Main menu

Scroll down to PATH variable option and set it to /system/xbin , this is the root folder of the commands Linux Deploy needs to manage your future Linux installation.

Set PATH variable

Now go to the option ENV directory and check that it contains this path-entry as in the screenshot below:

/data/data/ru.meefik.linuxdeploy/files

Accept changes and then reconfigure LinuxDeploy by selecting the option Update ENV below. It will start the reconfiguration. Wait until it has completed.

Updating the Linux Deploy environment

There are some other useful options like Network Trigger, Lock Wi-Fi, Wake Lock and Lock Screen. Use them according to your individual preferences.

Leave the Settings menu and go to the menu on the lower right side.

Prepare Linux Environment

Select the Linux Distribution: Ubuntu and Distribution Suite: trusty.

Select Linux Distribution

Set installation type to Directory and leave the provided Installation path unchanged.

Set installation type and path

Enable SSH and GUI. Set user name and password.

Allow SSH and GUI services

Select remote Graphics Subsystem VNC and Desktop Environment (LXDE, MATE, Xfce).

Remote GUI and Desktop Environment

Additionally, you can also change the GUI settings (resolution, depth etc.)

GUI settings

Now it’s time to install our Trusty! Leave this menu and select the option Install from the upper right menu.

Install Linux

This operation will take some time, so be patient and watch the log. You can use the option Status from the same menu to see the log.

Installation ongoing

You will have to wait until the entry <<deploy is shown in the log. This is the indicator that the installation was successful and your device is now ready to boot Linux. To start Linux simply tap on START option in the screen. The log will show you the boot process with entries like these:

Boot Process

Congratulations! You are now running Ubuntu 14.04. Let’s login via SSH by using the username/password you entered in Settings window. Here I am using Termius under macOS (you can use any other SSH-capable app of course)

SSH Login from macOS

Compiling Actinium Wallet

Now it’s time to install the needed packages for configuration and compilation of the Actinium Wallet. Go to this tutorial from our GitHub pages and install all the given packages by simply copy/pasting the commands. However, be careful of not trying to install the libdb4.8 packages as they don’t exist for the ARMHF architecture. Instead use the small tutorial from the same page located here. Instead of installing BDB4.8 packages you will have to compile them manually. For those of you who don’t like reading compilation tutorials here are all the commands needed to get all of the packages and also compile the BDB4.8.

sudo apt-get install git build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libseccomp-dev libcap-dev libevent-devsudo apt-get install libminiupnpc-dev
sudo apt-get install libzmq3-dev

Depending on your preferences you can also install Qt5 packages if you want to run the Wallet GUI. Otherwise, ignore the commands below.

sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compilersudo apt-get install libqrencode-dev

Create a subdirectory src in your $HOME path and clone the Actinium sources with git.

mkdir $HOME/src
cd $HOME/src
git clone https://github.com/Actinium-project/Actinium.git

Here’s how you will manually compile and install the BDB4.8 package. Although copy/pasting below commands should be sufficient, it’s better to know what’s actually happening here:

  • You set the root path to the previously cloned source tree inside your $HOME/src/
  • You download & check the BDB4.8 sources
  • You configure them accordingly
  • You compile and install them inside the given root folder
ACTINIUM_ROOT=$(pwd)

BDB_PREFIX="${ACTINIUM_ROOT}/db4"
mkdir -p $BDB_PREFIX

wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -ctar -xzvf db-4.8.30.NC.tar.gz

cd db-4.8.30.NC/build_unix/
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
make install

Now prepare and execute compilation scripts with:

cd $ACTINIUM_ROOT
./autogen.sh
./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" LIBS="-lcap -lseccomp" --with-gui=qt5 --disable-shared --disable-tests --disable-bench
make -j3
make install

The flag — with-gui only makes sense if you have installed Qt5 libraries before. So, remove it if only running the console variant of Actinium.

Also, I have used the flag -j3 to speed up the compilation a bit. As Galaxy Note 2 has a Quad-CPU it is recommended to use a bit more of its processing power for our compilation purposes. However, the compilation will still take some time, so maybe drink a coffee or do something else while your Galaxy Note 2 is crunching numbers.

Configuring Actinium Wallet

After you have successfully compiled your wallet it’s time to write a proper configuration for it. Here’s what I am using but your preferences may vary.

testnet=0debug=0
shrinkdebugfile=1
server=1
listen=1
port=4334
txindex=1
rpcport=2300
rpcuser=YOUR_UserNameIsHere
rpcpassword=YOUR_PasswordIsHere
rpcbind=127.0.0.1
torenabled=0
addnode=goldmine.actinium.org
addnode=actinium.org
addnode=explorer.actinium.org
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333
zmqpubhashtx=tcp://127.0.0.1:28334
zmqpubhashblock=tcp://127.0.0.1:28335
deprecatedrpc=accounts

Save the above file under $HOME/.actinium/Actinium.conf

Now it’s time to fire up your daemon or to start the GUI wallet. If you only want to start the daemon all you need is to type Actiniumd -daemon in the console. For the GUI variant you will need a GUI client like VNC Viewer. Also, you can communicate with your Trusty directly from your device. Fire up a Terminal app like Termux or the mobile variant of VNC Viewer. For example, here I am entering Trusty with Termux.

SSH Login
SSH Login succeeded

I could start the daemon directly from device, or use any other of the available commands. Alternatively, with my VNC client I would land in the LXDE Desktop environment that I have configure previously.

I have also setup a simple menu for my wallet apps.

Cryptocurrency Degenerates’ Paradise :-)
Running Actinium

As there are many different desktop environments for Linux the configurations differ greatly. You will have to check their tutorials first before trying to change them.

And you can of course do the same with the VNC app. Not sure how useful this is, but it’s a nice way to show off a bit. ;)

Have fun with running Actinium on Samsung Galaxy Note 2! :-)

--

--