IDENA node installation process on your Android mobile device

Your device must support ARM64 (AArch64) instructions

IDENA World
9 min readSep 29, 2022

(🇷🇺) Русская версия

Preamble

In general idena node client is set to be installed on the desktop computer or VPS/VDS server. However due to the low system requirements it can be also installed on your old Android device for the future use as your personal 24/7 IDENA mining server.

The purpose of the article is to explain the installation process in details and bring more people into independent mining. As you know the majority of new members do not have coins in the stake so, they prefer to deligate themselves to pools because of the prospective financial obligations related to server hosting expenses. Considering the fact that many people have old phones that actually are on the shelf it is fair to assume that those devices potentially could be used to mine IDENA, create flips and pass validation without necessity to buy an API key and pay fees to pools.

In my case I would use my old Samsung Galaxy S6, that has the following system specifications:

Step 1. Check if your phone meets minimum system requirements.

The most important part is to be sure that the CPU of your mobile device has supported the 64-bit ARM extension called AArch64. Inware it’s a free and simple utility that shows all required information.

Inware: your Android device must have an arm64 instructions support

Mobile device list confirmed as compatible to run ARM64 idena-go node client

In case if you successfully use your mobile device as Idena node server, please send me the model of your phone to update the table.

Xiaomi devices based on MIUI

MIUI battery usage optimization is extremely high. As a result, termux application cannot being run continiously as background process. There is a strong probability that you would need to install a custom ROM. LineageOS is the best one so far for Xiaomi devices based on MIUI OS.

General scheme for idena-go implementation on ARM64 based devices

  1. F-Droid: Termu and Termux:boot installation
  2. Giving required storage permissions and adding F-Droid, Termux and Termux:boot to the power monitor application exception list
  3. Termux terminal preparation using termux-init.sh script to host Kali Linux
  4. Using Idena ARMer script to download/compile idena-go client, set all required services and import keys if necessary

Termux and termux:boot installation from the alternative app store and software repository F-Droid

Termux is an Android terminal emulator and Linux environment application that works directly with no rooting or setup required. A minimal base system is installed automatically, additional packages are available using the package manager. In our case we would need only openssh package to make possible establish SSH connection between your desktop computer and your cellphone inside your home network. It is important to note that establishing SSH connection to your mobile device outside of the home network is beyond the scope of this guide.

  • Since November 2, 2020 termux updates are no longer be able to be published on Google Play Store. So, as developers said everyone should move to Termux F-Droid version, if possible.
Download F-Droid.apk and install F-Droid from the official web page
  • After installation using the search button please find and install Termux and Termux:boot applications
Running F-Droid app store
F-Droid: Search button to navigate to the required application installation page
F-Droid: Termux Terminal installation
F-Droid: Termux:boot installation
  • Termux application initialization

After installation you must run Termux for the first time to make app bootstrap itself and get your system ready. Please do not close the app. Press the home button on your phone and continue to the next step.

F-Droid: Running Termux Terminal
  • Termux:boot application initialization

Run Termux:Boot for the first time to make app initialization and get your system ready to run scripts at boot time.

Termux:boot: After installation run it ones to make a basic init process
Termux:boot: Start the Termux:Boot app once to allow the system to start idena-go daemon at boot time

Allow Termux to access to the file storage of your Android phone

Switch back to Termux terminal and run the following command
termux-setup-storage

Termux: to give required storage permission you have to enter termux-setup-storage command
You will be prompted to “Allow Termux access photos, media and files on your device”, which you should allow.

Prevent Android OS from killing Termux app to save battery life

Phone Settings: Device maintenance
Phone Settings: Battery properties
Phone Settings: Unmonitored apps exceptions
Phone Settings: F-Droid, Termux and Termux:boot must be added to the application exceptions list of the power monitor of your device

Please remember that the above screenshots are applicable to Samsung Galaxy S6. With great probabibility the structure of the menu on your device would be slightly different and it depends on Android version and the model of your device.

Termux terminal preparation to run Kali Linux

Next step is to download a special script from IDENA ARMer repository. It will download and install all required packages and configure the password for SSH connection.

  • Updating Termux packages
pkg upgrade -y

If you’ve got Failed to fetch error, please use termux-change-repo command to select another termux repository mirror

Termux: Failed to fetch error
Termux: Command termux-change-repo
Termux: Choosing another repository mirror

In case of changing repository mirror you have to repeat the upgrade command pkg upgrade -y

  • Downloading termux-init.sh script to prepare your termnial to host Kali Linux
curl -O https://raw.githubusercontent.com/ltraveler/idena-armer/master/termux_init.sh
  • Running the script
chmod +x ./termux_init.sh && ./termux_init.sh
./termux_init.sh: Very likely to face packages configuration files compatibility problem. If you don’t know what that means just answer Y on all similar prompts
  • Set and remember the password for SSH connection. Anyone knowing your password and IP address can access your phone with all ensuing consequences.
./termux_init.sh: Set a strong password for SSH connection
  • Save your IP address. Port 8022 specifies the port number for SSH connection.
Please note: After establishing SSH connection via PuTTY for example, the username filed must be empty and the password would be the same as you set on the previous step.

IDENA ARMer script to setup your idena-go mobile node client

Now termux is ready to install Idena node to our Android mobile device. IDENA ARMer script helps to set your idena-go client and prepare your system to automatically run it after each boot. The script asks you some questions and set your phone ready to work as 24/7 Idena personal mining mobile server.

  • Running Kali Linux
Kali Linux: Command ./start-kali.sh
./start-kali.sh
  • Update all installed packages to the latest version
Update packages: Command apt update && apt upgrade -y
apt update && apt upgrade -y
  • Install Git package
Installing Git package: Command apt install git -y
apt install git -y
  • Clonning IDENA ARMer repository
IDENA ARMer Installation: Command git clone https://github.com/ltraveler/idena-armer.git
git clone https://github.com/ltraveler/idena-armer.git
  • Running IDENA ARMer script
Running idena-armer script: Command cd idena-armer && chmod +x ARMer_init.sh &&./ARMer_init.sh
cd idena-armer && chmod +x ARMer_init.sh &&./ARMer_init.sh

IDENA ARMer: idena-go compilation, node configuration, creating separate user for idena daemon, import keys

  • Set a username used to run idena-go client as a daemon task
idena-armer script: Please do not use root as a username
  • idena-go compilation process or downloading the compilied binary file

The script has 2 options to download the compiled binary ARM64 idena-go client or to compile the program from the source code. The compiled version appeared on the repository in about 24 hours after offical node release. It is recommended to answer Non the compilation prompt.

idena-armer script: Would you like to compile idena-go from the source code? Recommended answer is N
  • Import private and node api keys in case if you have them. TheN answer set them to the generated default ones
idena-armer script: Answer N in case if you want to install a new node and Y if you would like to import credentials from the existed one.

Don’t forget to save the newly generated API and Private keys.

Congratulations your idena node has been successfully installed!

Reboot your phone and try to connect to it via SSH using credentials that your have saved on the above step.

PuTTY Client: SSH Configuration

IDENA Coacher — Node Management Tool

IDENA Coacher — Node Management Tool
IDENA Coacher: Main monitor window that shows the most important information about your node

IDENA Coacher is the node monitor tool which helps to manage your node in a user friendly way. As you can see in the above screen shot it can do the most important operations without having to run IDENA Desktop client.

  • It is placed in the home folder of the user that has been used to install idena:
cd /home/$username/idena-coacher 

*$username — is the name of the user that has been set to run idena-go node client

  • Make script executable:
chmod +x idena_coacher.sh
  • Run the script:
./idena_coacher.sh

Set port forwarding from your phone idena node to your idena-desktop client

Enter required data: device IP address, Port number, Session name and click Save.
In Tunnel tab: Source port 9999, Destination: localhost:9009. Click Add.
Save your session (Save button) and Open new connection (Open button)
User name should be empty; Password is the same as you have set during the installation process.
Open your Idena Desktop Client and entere Remote node settings after clicking Save the status of your node should become Online. Don’t forget to switch off Run built-in node and switch on Connect to remote node

A final word

In general mobile devices are unappropriated to be used as 24/7 server but due to the fact that the system requirements to run idena node client is low this solution gives a possibility to become an idena node validator and miner with a low budget and brings more poeple into the solo mining field to help the IDENA Network be more decentralized.

  • Please use SSH connection to manipulate with the settings of your node.
  • Do not close Termux terminal on your phone

Some important commands

Print private key:

cat /home/$username/idena-go/datadir/keystore/nodekey

*$username — is the name of the user that has been set to run idena-go node client

Print API key:

cat /home/$username/idena-go/datadir/api.key

*$username — is the name of the user that has been set to run idena-go node client

Stop idena

service idena stop

Start idena

service idena start

Rebuild idena blockchain database and start idena again

service idena restart

In case if something went wrong and you want to remove Kali Linux without Termux reinstallation

wget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Scripts/Uninstaller/Kali/UNI-kali.sh && bash UNI-kali.sh

Be sure, that you are running this command inside Termux shell and NOT IN Kali shell. It will fully remove Kali from Termux and you can install Kali Linux again by running:

pkg install wget openssl-tool proot -y && hash -r && wget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Scripts/Installer/Kali/kali.sh && bash kali.sh

and start IDENA ARMer installation process from this step

Update Idena node client (idena-go) to the latest version

/home/$username/scripts/armer_update.sh

*$username is the name that you have set to run IDENA node

idenachain.db safety system

Special script is checking idena-go log files and in case if it founds specific error message it stops idena daemon, delete idenachain.db folder and restore the blockchain from the fresh snapshot.

Why do we need that? Well, originally mobile devices are not adequate for being running as 24/7 server. There is a strong chance that in one moment your cellphone gonna lost power (battery problem,hard reboot etc.) if that happend the blockchain database could be corrupted and the only way to recover it is to restore it from the snapshot. I have added 2 basic messages that I could catch during my experience of using the script.

If you would like to add additional error messages to search please edit idena_selfcheck.sh file from /home/$username/scripts folder.

As you can see by default there are 2 search strings:

chain_err=(‘Cannot transform consensus config’ ‘corrupted or incomplete’)

I would appreciate if you could share additional error messages to add it for the future versions of the script.
Be free to DM me in telegram or to open an issue in the IDENA ARMer repository.

Special thanks:
Rioda — for the short hints that finally have been transformed and evolved to be represented as the final IDENA ARMer script

--

--

IDENA World

A peaceful spot to share some thoughts about IDENA World ⚖️ Vlogger • Online Entrepreneur • Content Creator • DevOps Engineer https://ltraveler.github.io API 🔑