June 18, 2019

Getting ABCore and LND running on an old Android Phone

Early last year, the Lightning Network hit mainnet and I spent the majority of the year wanting to get involved but wasn’t sure how to do it. Eventually, I was able to purchase a Casa node but I had to wait three months for it to ship. Being the impatient person that I am able, I decided that I would try to figure out how to setup a BTCPay server and use it to access the Lightning Network. Shortly thereafter I had a node running and I was able to do some transactions. Later on, I received my Casa node and realized how closed the interface was. This fueled my desire to have more direct control over my LND node.

This made me want to try to understand under the hood” as much as possible and this meant getting into the scary command line interface side of things. This started by SSHing into my BTCPay server and later I was able to use the Pierre’s Node Launcher to have LND running in Windows. This Node Launcher helped me to understand the configuration side of things and how some of the basics of how things worked.

Fast forward to 2019 and I was on Twitter reading about LarryBitcoin’s ABCore that allowed you to run a Bitcoin full node on an Android phone (or Android TV as they were suggesting in the thread) and my first thought was: Could I run LND on an Android phone? Having used something called Termux previously, I knew you could have a Linux enviroment running on top of Linux and thought it could be possible.

After some encouragement from Larry himself, I decided to see if I could get get LND running on an old Samsung Note 5. This post is one of my first attempts at constructing a technical post so please bear with me.

Your first step is to get ABCore installed on your Android device:

Install ABCore

Once installed, it will present you with an option to download the latest version of Bitcoind. Once done, please proceed to Settings->Daemon Configuration->Manually edit bitcoin.conf to edit your bitcoin.conf file.

Edit bitcoin.conf to include:

disablewallet=1
prune=10000
rpcuser=[choose_username] 
rpcpassword=[choose_password] 
server=1
deamon=1

Once this is done, go back to the opening screen of ABCore to begin syncing the blockchain to your phone. This process took me several days on my Note 5 and might take longer on older devices. In the meantime, you can get things setup for when the sync is complete.

Next, you’ll need to install Termux.

Next up is getting a version of Linux running in Termux that would allow more flexability.

In my case, I found a script that allows you to use a version of Ubuntu along with proot to get LND installed within Termux.

The script can be found here. Security tip: Double check that everything in the script is doing what you expect it to do or else you’re just trusting some random code on the internet not to do naughty things to a device that might have some amount of money on it. Don’t trust, verify.

Getting Ubuntu installed:

apt-get update && apt-get upgrade -y
apt-get install wget -y
apt-get install proot -y
apt-get install git -y
cd ~
git clone https://github.com/MFDGaming/ubuntu-in-termux.git
cd ubuntu-in-termux
chmod +x ubuntu.sh
./ubuntu.sh
cp ~/ubuntu-in-termux/resolv.conf ~/ubuntu-in-termux/ubuntu-fs/etc/

Ubuntu has now been installed on Termux, all you have to do now is to start Ubuntu:

./start.sh

Next up is getting GO installed and ready for our LND installation:

wget https://dl.google.com/go/go1.12.3.linux-amd64.tar.gz
sha256sum go1.12.3.linux-amd64.tar.gz | awk -F " " '{ print $1 }'
tar -C /usr/local -xzf go1.12.3.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
export GOPATH=~/gocode
export PATH=$PATH:$GOPATH/bin

Now that GO is installed, we are ready to install LND:

go get -d github.com/lightningnetwork/lnd```
cd $GOPATH/src/github.com/lightningnetwork/lnd```
make && make install

In my case, it took quite a while for LND to build, so go do something else for a bit and come back, it should be done. We’ll now need to create and set the configuration options using your lnd.conf:

cd ~/.lnd/
nano lnd.conf

Input the following into the lnd.conf file:

[Applications Options]
externalip=[Input your external IP]:9735
Alias=[Name of your Node]

One of the final steps is to configure your hosts file because it doesn’t map localhost by default:

cd /etc/
nano hosts

Add the following line to your hosts file:

127.0.0.1 localhost

Once these steps are done, all you have to do is wait for your Bitcoin node to finish syncing. Once that is complete, you’ll type LND into your ubuntu command line. You’ll be prompted to select a password and write down your seed for your LND node. Please do so.

Once that is done, swipe from the left of your screen and open up another session then type in:

lncli unlock

You’ll be prompted to enter your password, do so, and you should now be able to start using your LND node on your Android phone!

Some limitations:

  • I’ve been having a hard time figuring out how to get Zap or other GUIs working with this setup.
  • On my old Samsung Note 5, I’ve noticed that after a few days of not touching the phone, I’d return to see that both Bitcoind and LND not running any longer. This is likely due to Samsung phones being aggressive with wake locks, I even used a Termux wake lock in hopes that it would do something but the same thing happened.

Please let me know if you found this guide useful and if there are anyways that I could make the guide anymore useful.

bitcoin crypto writing Lightning Network LND android phone
April 15, 2019

Adventures in the Lightning Network

One of my favorite Andreas Antonopoulos videos is where he introduces the Lightning Network and the concept of streaming money’ in his highly inspiring way. He tries to make sure everyone understands the general concept around the Lightning Network but he also wanted to wax poetic about the potential usecases of such a network.

Streaming money turned into an inspiration for me to look into the Lightning Network more in depth. Being paid monthly has always been a stress in my life and the concept of getting constant ongoing payment instead of waiting until the end of the month holds a lot of value for me.

It took a long time for me to finally be able to dig in on this vision. It was in early 2018 that the Lightning Network began to explode on Bitcoin. It probably wasn’t until October until I was able to spin up my own LND node in order to experiment myself. This started with a BTCPay server node hosted on a VPS that only charges around ~$17 per month for both a Bitcoin node and a LND node.

This began my adventure in playing with the Lightning Network. Right around the same time, many of the mobile LN wallets out there began to get even better. The Bitcoin Lightning Wallet was one of the first wallets to allow receiving on mobile. (Since then Eclair wallet has also added this functionality.) In Dececmber, I received my Casa node and began exploring even more. Eventually understanding the relationship of routing, fees, and generally how the UX is for possible n00bs in the system.

Currently the wallets that I am using:

Some planned writings relating to the Lightning Network:

  • Reviews of the wallets stated above.
  • Exploration of how a newbie might be able to get onboarded onto LN.
  • Exploring the idea of channel selection’ similar to the idea of coin selection’ in Bitcoin wallets like Samourai wallet.
  • Doing a deeper dive on streaming money’ and how it might be possible within less than 12 months.
bitcoin crypto writing Lightning Network
September 9, 2018

Crypto Transformation

In this update, I’m moving over to a new service provider to mark the final move away from the I’m going to be a photographer” Squarespace blog that I setup so long ago.

Time to move to a simpler platform that focuses on writing and just blog creation. What’s the subject matter? Bitcoin. Crypto. The only thing that keeps me excited, the only thing that keeps me fueled, the only thing that keeps me learning and pushing myself.

You’ll find that the blog might have some broken image links, I’m going to be fixing these over time.

bitcoin crypto writing next chapter
August 11, 2017

Evolution as a Choice

It has been a while since I’ve written here. It has been a while since I’ve written much of anything at all. 

It is somewhat embarrassing to have a blog with no updates for more than a year. However, much has been happening in my life. Lost one job, went through several others, then found my absolute dream job, in my dream industry. Learning more than ever. Changing my worldviews. 

It is my desire to write more, it is my choice to create more. More photography, more writing, more video. 

Let this be a symbol of my next form, my next evolution. 

Hopefully more to come and not years before the next followup to this blog.

April 10, 2016

Saga of Technology

In the 1993 movie Demolition Man, Sylvester Stallone starred as a cop cryogenically frozen for 36 years. John Spartan finds himself in the year 2032.  Things are a bit of a dystopian pseudo-Utopian future where language is sterilized, anything considered bad for you is illegal, everyone is tracked by biochips’ implanted in their hands, and Taco Bell is the only restaurant left standing after the great franchise wars.

While this movie isn’t the highest rated movie of all time. It is certainly cheesy in parts and almost prophetic in others. It has self driving cars, video chat, cryogenic reanimation, and virtual reality sex. It has its local government tracking everyone’s movements all of the time via biochips’ that allow instantaneous localization at all times of anyone. These chips would likely to have been used for a citizen’s entire identity and would allow for easy frictionless payment.

This movie gives us a good example of the meme of one day that all payment systems or identity systems will converge on the ever so scary microchip’. We will adorn ourselves with the technology that we currently keep in our pocket?

Will this be a negative?

Does it have to be?

While the idea of a sub-dermal chip being able to track me at all times is frightening, this is almost the reality today. Our phones are as close to being sub-dermal without literally being so. They are on us 24/7. But we still at least have the luxury of not having to dig our phone out of our hand with a scalpel to escape tracking.

Bitcoin could serve as the underlying philosophy of how a frictionless payment chip could work and in a way that wouldn’t allow external control. Hopefully we’ll still get self driving cars and virtual reality sex.

bitcoin future bioimplants implants money Bitcoin Writing technology
June 16, 2015

Slow Blogging

What have I been up to?

Sadly, not much.

The last 6 months have mostly been spent getting my life generally back into order after a long series of hurdles I had to overcome. Thankfully I have my license back after a nearly 4 year long legal issue. The supreme court ruled in my favor, by the way. 

Beyond that, I’ve been trying and failing to arrange some time to shoot some more virtual reality content. 

Why do I pay for this website if I am never going to write on it?

But hopefully — if I get my ass out of first gear, I’ll actually be posting more things here. I love to write. I just end up writing in other places that hardly anyone sees or cares about. 

DK2 videos have ground to a halt while I try to save up money for a new computer — my gaming laptop is very capable but not capable enough to really run VR even at 1080p. 

The Gear VR has improved significantly since my original purchase. A lot more content. Some dirty’ and some just plain fun. 

A lot of news about the CV1 is out. I’m excited. Hopefully more writing and content to come. Damnit!

writing virtual reality Writing