Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Accardo on December 03, 2022, 12:32:01 PM



Title: Is it cool to run Bitcoin full node on Android OS?
Post by: Accardo on December 03, 2022, 12:32:01 PM
While going through Carl Mengers' (https://carlbmenger.substack.com/p/dont-trust-verify) news letter on running a phone Node which he recommended for a time like this when running a full node is like owning your own keys.  A question was raised on the comment box about if its possible to run a full node using Android phones. At first I thought it was a silly question, but my instincts about the question changed when Carl Menger shared this link https://portaldobitcoin.uol.com.br/brazilian-teaches-how-to-run-a-full-bitcoin-node-on-an-android-smartphone-tutorial/
 
 A blog that translated the Brazilian, Ricardo Reis (https://twitter.com/ricardoreis007?ref_src=twsrc%5Etfw%7Ctwcamp%5Etweetembed%7Ctwterm%5E1547259052358500360%7Ctwgr%5E61fdb75c96453286a1d2cae646d87001cca1a28e%7Ctwcon%5Es1_&ref_url=https%3A%2F%2Fportaldobitcoin.uol.com.br%2Fbrazilian-teaches-how-to-run-a-full-bitcoin-node-on-an-android-smartphone-tutorial%2F), Tutorial of running a bitcoin full node on Samsung phone - dex enabled.

He listed, an external storage device like HD or SSD with atleast 1TB memory space, USB Hub type C as the two devices needed to run Bitcoin full node on Android OS to enable a bitcoin node set up.

My scepticism about it started changing and I was seeing more possibilities, then I further read.
https://portaldobitcoin.uol.com.br/cdn/image/wp-content/uploads/2022/07/montagem-de-um-full-node-de-bitcoin-com-celular-android-750x560.png

A pic he shared.

The processes he share includes;

Formating the hard drive

Installing Termux

Installing Ubuntu on Termux; then execute this

Code:
pkg upgrade && termux-setup-storage && curl https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/repo-fix.sh > repo.sh && chmod +x repo.sh && bash repo.sh && pkg update -y && pkg install wget curl proot tar -y && wget https://bitbrasil.com.br/sh/ubuntu20.sh -O ubuntu20.sh && chmod +x ubuntu20.sh && bash ubuntu20.sh

Installing Bitcoin Core on Ubuntu by executing this command on Termux

Code:
apt-get update && apt-get upgrade -y && apt install curl -y && curl https://bitbrasil.com.br/sh/install-full-node.sh | sh


That's all. Looking at the method and external memory which is capable of storing the Bitcoin data and the methods he displayed, I didn't have much doubt, but I think it'll have some loopholes on the pipeline.
https://pbs.twimg.com/media/FXj35q7WAAA1yHg?format=jpg&name=small

This is a video of Ricardo Reis process on running a full node on Android phone.
https://youtu.be/IrM8K3XUYwo


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: mindrust on December 03, 2022, 01:09:16 PM
You are probably going to kill your phone faster with this setup. There is absolutely no need for that. Does it look cool? It does if you are into that kind of thing. However there is a much easier setup you can do instead of using a phone. Get a used netbook and replace its hdd with a 1tb one and you are set. Use either win or linux it is up to you. Their batteries last long too. Or you can use a raspberry pi 3 and add an external battery pack.


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: NeuroticFish on December 03, 2022, 02:44:41 PM
Interestingly, I've read another topic too on Bitcoin Core full node on Android also made this week.
I didn't go into the internals, since I don't have extra smartphone for the job (although I find it sa cool idea since it may consume less than a laptop for the job), however, maybe somebody does a cross-check between the threads.
The other one is: [ANN] Smartino - Android Bitcoin Core Full Node (https://bitcointalk.org/index.php?topic=5425137)


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: Accardo on December 03, 2022, 06:54:55 PM
You are probably going to kill your phone faster with this setup. There is absolutely no need for that. Does it look cool? It does if you are into that kind of thing. However there is a much easier setup you can do instead of using a phone. Get a used netbook and replace its hdd with a 1tb one and you are set. Use either win or linux it is up to you. Their batteries last long too. Or you can use a raspberry pi 3 and add an external battery pack.

Of course, Raspberry pi 4 is a better fit for the job, except that this option can hurt the phone on the long run, it'll boost the running of bitcoin full node amongst Bitcoin users. And it's my first time seeing such, that is why I raised this question.

Interestingly, I've read another topic too on Bitcoin Core full node on Android also made this week.
I didn't go into the internals, since I don't have extra smartphone for the job (although I find it sa cool idea since it may consume less than a laptop for the job), however, maybe somebody does a cross-check between the threads.
The other one is: [ANN] Smartino - Android Bitcoin Core Full Node (https://bitcointalk.org/index.php?topic=5425137)

Apparently not all phones are fitted for this task. The phone must be able to detect the external memory device and charge at same time to maintain 24 hrs runtime. However, I checked the threads they're not same the other thread seems like the phone is not connected to an external memory device.


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: BlackHatCoiner on December 03, 2022, 08:03:06 PM
Ugh... That doesn't look good. Definitely not cool.  :P

I mean, yeah, absolutely it's possible to use a mobile device, since it's a computer as well, but... it makes very little sense. Don't you have a few bucks to spare for a second-hand laptop, or a Raspberry Pi? There's little to no support on running a node on an Android, so even if you don't have that money, you're about to pay it with time.  ::)


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: NeuroticFish on December 03, 2022, 09:37:23 PM
However, I checked the threads they're not same the other thread seems like the phone is not connected to an external memory device.

If you look more carefully at the picture in the other thread you'll see that in the back of the phone there's an external HDD. So they're pretty much the same.
Also if you look at the other solution's Git it tells:

*It may be not recognized by Android. Please consider that Android supports exFAT/NTFS/EXT4/F2FS partitions up to version 8.1 (Oreo)

You jumped too fast to the conclusion they're not similar.


... it makes very little sense. Don't you have a few bucks to spare for a second-hand laptop, or a Raspberry Pi? There's little to no support on running a node on an Android, so even if you don't have that money, you're about to pay it with time.  ::)

It can be a fun project for one who has the time, obviously. Second hand laptop may be a bit more power hungry and nowadays electricity may be expensive in certain areas/countries. And Raspberry Pi devices are overpriced and hard to find (in my country there's only one official shop and it's always out of stock since more than a year ago).
However, I agree, it makes much more sense as a fun project than something to use for long term.


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: achow101 on December 03, 2022, 10:44:32 PM
You probably shouldn't do it as it'll kill the battery pretty quickly, especially with the method you've described.

Bitcoin Core itself has an Android APK build target, so it's not particularly hard to produce an APK that you can install on an Android phone. There's some docs (https://github.com/bitcoin/bitcoin/blob/master/doc/build-android.md) for doing that. This completely removes the need for things like Termux, or any third party application to get it running. The UI is not very usable as it's just the desktop Qt UI jammed into a phone screen. There's also some issues with the phone pausing the app when it's in the background though.


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: joniboini on December 04, 2022, 12:26:15 AM
I think some Android mods such as the advanced charging controller Magisk module allow you to bypass charging so your battery doesn't die too quickly. It needs a custom kernel though, and if your phone doesn't have a custom ROM it is probably not gonna work. Might be able to reduce the wear on the battery if anyone is interested in doing this, but yea I'd rather buy a Pi or a cheap laptop instead.


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: n0nce on December 04, 2022, 01:34:13 AM
If you dedicate an old Android phone as a node, battery dying or Core shutting down if you put the app in the background shouldn't be anything to worry about.
I can definitely see this be a viable alternative to my ~$50 laptop-based node example (https://bitcointalk.org/index.php?topic=5364742.0).

It's been quite a few years now that we have 4+ GB of RAM and appropriate computing power in Android phones; so there must be a ton of devices going to landfill or sitting in drawers for eternity, that could be used as nodes!
It would be great if someone replicated this and could share their experience here on the forum. :)


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: pawanjain on December 04, 2022, 04:24:20 PM
I don't understand the point of running a full node on an Android device. It's more like murdering your phone with poison which kills it slowly day by day.
The battery health will degrade sooner everyday and performance of the device will start decreasing too.
Basically phones are not mean for running a full node. We can simply run a low end processor to run a full node instead.
The cheaper and convenient option would be raspberry pi instead. The cost of running it would be lower along with maintenance.
Running things which are not meant for a device isn't cool. So the idea of running a bitcoin full node on Android isn't really cool.


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: NotATether on December 04, 2022, 05:04:10 PM
Don't run a node on any System-on-Chip that is designed for power management over performance, not just smartphones. The ARM ports for Core means it can run on a host of embedded devices, but this is a terrible idea because Core's resource requirements are too demanding for embedded platforms to supply.

That does not imply that there are no performance chips for ARM though. I just haven't seen any on the market yet as everyone is focusing on low energy use. Except for AWS Graviton silicon, which you can't buy at retail of course so that's out.


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: n0nce on December 04, 2022, 07:33:36 PM
That does not imply that there are no performance chips for ARM though. I just haven't seen any on the market yet as everyone is focusing on low energy use. Except for AWS Graviton silicon, which you can't buy at retail of course so that's out.
I guess the new Apple M1 Max & similar chips have impressive performance (as well as low energy use).

Nonetheless; I don't share your statement that weak ARM chips shouldn't be used for Bitcoin Core. Some smartphones and single board computers may be too weak to run it, but if they are capable of running a node, I don't see a reason why not to. We know that weak ARM chips can power nodes, looking at Raspiblitz, Umbrel & similar, running on Pi 4's around the world. So it is possible.

Let's say you have an old phone with 6-8GB of RAM with dead battery, that has no value anymore and is not used anymore, at least try to run Bitcoin Core on it, before spending money on new hardware.
If it's actually too slow, the only thing you lost was some time.


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: BlackHatCoiner on December 04, 2022, 08:07:08 PM
If it's actually too slow, the only thing you lost was some time.
It can evolve into a much worse time waster over time, though. Running a Bitcoin node in a standard way, such as with a RPi by following reputable OSes (e.g., Raspibolt), is going to save you a lot of time, and you're going to do it in the right way. If you an issue emerges, you can address their Github repository. You can of course try to install such OS in the Android device, but an untested and non-reviewed manner is prone to failure.

And if we're talking about spending an extra $50, then I don't think it's worth it.


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: NotATether on December 05, 2022, 02:07:58 AM
Nonetheless; I don't share your statement that weak ARM chips shouldn't be used for Bitcoin Core. Some smartphones and single board computers may be too weak to run it, but if they are capable of running a node, I don't see a reason why not to. We know that weak ARM chips can power nodes, looking at Raspiblitz, Umbrel & similar, running on Pi 4's around the world. So it is possible.

And that is why I did not write weak chips, I wrote chips designed (intended) for energy-efficient use.

A Raspberry Pi can get more RAM sand USB ports attached and run Bitcoin Core perfectly well. However, most smartphones hardly have any storage space, so the energy-efficient chip is going to be under constant pressure from Core doing I/O activity to some USB port and also (unreliable) network activity.

Generally when you run Core on this kind of hardware, one of three things will happen:

- It might crash entirely due to lack of resources.
- If it has AC power, the application will be extremely slow (verification in particular)
- Additionally, if it normally runs on batteries, you will wear them out as well.


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: pooya87 on December 05, 2022, 04:49:05 AM
on running a phone Node which he recommended for a time like this when running a full node is like owning your own keys.
This whole premise is wrong. In order to have the custody of your own money (owning your own keys) running a full node is not the only option. There are SPV clients designed specifically to run on phones and need minimal disk and CPU specifications. Neither full nodes were designed to run on phones nor phones were designed to run such heavy applications that need a lot of IO and CPU power that runs 24/7.

Such projects are only cool for enthusiasts who want to create new stuff that may not be viable solutions.


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: n0nce on December 05, 2022, 01:51:21 PM
And that is why I did not write weak chips, I wrote chips designed (intended) for energy-efficient use.
But the Raspberry Pi is designed for energy-efficient use, as well...

A Raspberry Pi can get more RAM sand USB ports attached and run Bitcoin Core perfectly well. However, most smartphones hardly have any storage space, so the energy-efficient chip is going to be under constant pressure from Core doing I/O activity to some USB port and also (unreliable) network activity.
Raspberry Pi doesn't have any internal storage space, either. If anything, the smartphone will perform better due to having the OS on internal flash memory, meanwhile the Raspberry Pi has to communicate with the microSD card for OS operations and the HDD for Bitcoin Core (as you won't be storing any blocks on the microSD card, just like you won't do that on the phone).


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: dkbit98 on December 05, 2022, 03:05:36 PM
If you dedicate an old Android phone as a node, battery dying or Core shutting down if you put the app in the background shouldn't be anything to worry about.
Can android phones work only with charger connected to wall if battery is dead?
If this can be done without issue than I agree you don't have to worry about battery at all, and this would probably be device that spends even less than raspberry Pi, in theory.
Even if battery dies they are cheap to replace and it would be good to have some modular phones like Fairphone, that have easy removable battery.

It's been quite a few years now that we have 4+ GB of RAM and appropriate computing power in Android phones; so there must be a ton of devices going to landfill or sitting in drawers for eternity, that could be used as nodes!
If China can use phones to create millions of bot accounts, than bitcoiners can use them for Bitcoin nodes ;)


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: simpic on December 17, 2022, 02:13:43 PM
You are probably going to kill your phone faster with this setup. There is absolutely no need for that. Does it look cool? It does if you are into that kind of thing. However there is a much easier setup you can do instead of using a phone. Get a used netbook and replace its hdd with a 1tb one and you are set. Use either win or linux it is up to you. Their batteries last long too. Or you can use a raspberry pi 3 and add an external battery pack.

What about space taken and consumption requested by a netbook? What about mobile connectivity on Raspberry Pi? Do you have also to to buy a modem in addition to the battery?
Phone is ubiquitous!

https://i.ibb.co/McGyjkH/smartino.png

Besides, in future you could find affordable buying a 1 TB MicroSD and if you even use a SIM instead of wireless connection you can get a portable node!



Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: Cyber_Alien on December 17, 2022, 08:43:34 PM
Running a full Bitcoin node on your smartphone isn't something I would recommend, unless you have plans to replace your phone soon. It would undoubtedly harm your phone because it needed you to plug it into electricity, which would cause it to heat up. I suggest purchasing a Raspberry Pi or perhaps a decent laptop to power the node.


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: simpic on December 17, 2022, 09:18:18 PM
Running a full Bitcoin node on your smartphone isn't something I would recommend, unless you have plans to replace your phone soon.
You do not have to use the phone you use everyday.
Just take that old phone you have in the drawer and give it a new life instead of throw it.

Quote
It would undoubtedly harm your phone because it needed you to plug it into electricity, which would cause it to heat up.
Testing node on an old phone of mine I can't figure out a thing: why the phone is always cold! :o

Quote
I suggest purchasing a Raspberry Pi or perhaps a decent laptop to power the node.
The previous meme was for rebut this.


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: simpic on December 18, 2022, 02:08:53 PM
What about space taken and consumption requested by a netbook?

Looking at image shared by OP, space taken between used laptop/netbook and Android phone (including external storage, charging cable and converter cable) shouldn't be that different.
You can still use a MicroSD. You can buy it at uneconomical prices or wait for becoming cheaper.

Quote
What about mobile connectivity on Raspberry Pi? Do you have also to to buy a modem in addition to the battery?

That's good point, although if people buy Raspberry Pi, i expect most of them will use WiFi or ethernet cable.
I said "mobile"...
With a phone you have a builtin 3g/4g/5g modem, that makes your node portable if you need.


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: Accardo on December 19, 2022, 04:30:06 PM

Testing node on an old phone of mine I can't figure out a thing: why the phone is always cold! :o


Sounds weird, but it depends on the room temperature and the position of the phone; keeping the phone on hard substance like tables could help regulate the phone temperature. On the other hand, if the phone, with enough memory space, is used to run only bitcoin node the program may not drain the processing power, therefore, maintaining a cool temperature.

They've been some responses that opposes the idea of running a full node on Android OS, but giving it a try, from your responses, better reveals the importance of utilizing a phone for the task. 


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: NotATether on December 20, 2022, 02:28:47 PM
Running a full Bitcoin node on your smartphone isn't something I would recommend, unless you have plans to replace your phone soon.
You do not have to use the phone you use everyday.
Just take that old phone you have in the drawer and give it a new life instead of throw it.

Maybe this will contradict my previous posts, but after watching a YouTube video about Apple's ARM chips, they (and other recent ARM processors) will *probably* have the required CPU performance to run Bitcoin Core, but memory is still a question mark. Disk is obviously a no-no of course.


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: LoyceV on December 20, 2022, 04:21:49 PM
I like the idea, but connecting a phone to an external USB drive seems ridiculous. A 1 TB microsd card costs well over €100.

You are probably going to kill your phone faster with this setup.
I don't think so, keeping it wall mounted makes it much less likely to drop it (which is how most phones break).

Quote
Get a used netbook and replace its hdd
I have several old netbooks, but they're limited to 1 or 2 GB RAM. That's makes Bitcoin Core very slow.

after watching a YouTube video about Apple's ARM chips, they (and other recent ARM processors) will *probably* have the required CPU performance to run Bitcoin Core, but memory is still a question mark. Disk is obviously a no-no of course.
My current Android phone is 2 years old, and was high end. It has 8 GB RAM and I'm pretty sure both the storage and CPU are much faster than my old netbooks. Possibly also faster than my (aging) laptop.



The main problem I see with this is the cost: powerful phones with enough storage are still expensive. I do have a pile of old phones that I don't use, but those lack performance. Give it a few more years, and many people will have old phones powerful enough to run this. Throw in $20 for a 1 TB microsd card by then, and it's a very cheap way to run a low-power node. So give it time :)


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: simpic on December 20, 2022, 04:27:58 PM
I like the idea, but connecting a phone to an external USB drive seems ridiculous. A 1 TB microsd card costs well over over €100.
In my previous post I said that "You can buy it at uneconomical prices or wait for becoming cheaper."

Even 32 GB MicroSd cards cost over 100€ some years ago...


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: NotATether on December 20, 2022, 04:55:58 PM
The main problem I see with this is the cost: powerful phones with enough storage are still expensive. I do have a pile of old phones that I don't use, but those lack performance. Give it a few more years, and many people will have old phones powerful enough to run this. Throw in $20 for a 1 TB microsd card by then, and it's a very cheap way to run a low-power node. So give it time :)

What a service that would be, if someone started selling smartphones doubling as Bitcoin Nodes. In fact, 512GB storage capacity is pretty common on high-end phones. Just waiting for 1TB to be more common and the SSD should run it fine.

I wonder if this kind of stuff is even allowed on the App Stores. Basically, wrap the Bitcoin Core full daemon (not the GUI) into an ARM64 module, which you then call from your own bootstrapping code, and then your user interface is just a bunch of RPCs.

It would need to be optimized to spin up and down quickly (something Core is very bad at doing at the moment).


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: dkbit98 on December 20, 2022, 10:20:53 PM
I said "mobile"...
With a phone you have a builtin 3g/4g/5g modem, that makes your node portable if you need.
I saw there is a way to run internet on mobile phones even with ethernet sables, so simple adapter cable would work just fine, and you would probably get better speed.
It wouldn't be portable anymore, but you could always switch between option and choose what you prefer more.
People usually don't move bitcoin nodes with them all the time, but I guess you could also do that in extreme cases if you have unlimited internet.

I like the idea, but connecting a phone to an external USB drive seems ridiculous. A 1 TB microsd card costs well over over €100.
I don't understand what's weird about that, people are using exactly the same thing on Raspberry Pi running Bitcoin nodes, with external hard drives or with SD cards.
You could also use larger USB stick (maybe with adapter) that is usually cheaper than SD card, but it's more expensive than hard drives.


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: LoyceV on December 21, 2022, 12:26:21 PM
What a service that would be, if someone started selling smartphones doubling as Bitcoin Nodes.
Most people would complain it uses up their data :P

Quote
It would need to be optimized to spin up and down quickly (something Core is very bad at doing at the moment).
I tested it, and Bitcoin Core shuts down within 2 seconds. Starting takes less than 10 seconds, and my laptop isn't very powerful. On a phone, it could run in the background so it's always up to date.

I like the idea, but connecting a phone to an external USB drive seems ridiculous. A 1 TB microsd card costs well over over €100.
I don't understand what's weird about that, people are using exactly the same thing on Raspberry Pi running Bitcoin nodes, with external hard drives or with SD cards.
People don't bring their Pi with them ;)


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: chrysophylax on December 21, 2022, 09:48:57 PM
The main problem I see with this is the cost: powerful phones with enough storage are still expensive. I do have a pile of old phones that I don't use, but those lack performance. Give it a few more years, and many people will have old phones powerful enough to run this. Throw in $20 for a 1 TB microsd card by then, and it's a very cheap way to run a low-power node. So give it time :)

What a service that would be, if someone started selling smartphones doubling as Bitcoin Nodes. In fact, 512GB storage capacity is pretty common on high-end phones. Just waiting for 1TB to be more common and the SSD should run it fine.

I wonder if this kind of stuff is even allowed on the App Stores. Basically, wrap the Bitcoin Core full daemon (not the GUI) into an ARM64 module, which you then call from your own bootstrapping code, and then your user interface is just a bunch of RPCs.

It would need to be optimized to spin up and down quickly (something Core is very bad at doing at the moment).

More than likely not ...

Too much data with little knowledge by the 'layman' as to what they are actually installing. Connectivity issues would be rife also. Unless of course you are mainly stationary in an office somewhere using their WiFi of course.

Though probably something to look at in future if worth the effort.

#crysx #cwi


Title: Re: Is it cool to run Bitcoin full node on Android OS?
Post by: DaveF on December 22, 2022, 12:42:11 PM
From something I posted 7 months ago: https://bitcointalk.org/index.php?topic=5399730

It really is true about this. Just because you can, does not mean you should. Yes it can be done.
But, with the know how needed at the moment and the fact that you need a bunch of additional things the answer for now is no.

But as others have said, this is 'for now' you can get tablets with 4/5G and 1TB of SSD storage. Give it a bit and your phone will have it built in too.
NOT using SD cards (which are not the most reliable things in the world) NOT using dongles to attach drives. And so on. Just an app running on a phone eating up all your data and storage.

-Dave