Sunday, September 29, 2019

Power on/off/reboot Android phone without using power button

Works without rooting the phone.

Power Off and Reboot

In Google Play Store, install app Button Mapper: Remap your keys. Remap one of the volume key to Power Dialogue. You can set Up Volume Long Press to bring up Power Dialogue.

Power On 

It may not work with every phone. Plug in power cable to charge it. When it show a simple charging (flash) icon on screen but not yet showing animated charging picture with percentage, unplug the cable. Wait a while, the phone will boot.

If your phone supports wireless charging, simply put it on charger. It will boot the phone right away.

Tuesday, September 10, 2019

Running Bitcoin Full Node on 10 year old Netbook

Recently installed a fully functioning Bitcoin Full Node on a ten year old Asus Eee PC 900HA. The hardware and software are lower than official requirement, but they work fine.

CPU: Intel Atom N270 (32bit, 1.7GHz)
Memory: 2GB
Hard Drive: 500GB HD not SSD
OS: 32bit Centos 6

Bitcoin Core has a 32bit installer.

The only catch is autostarting bitcoind daemon using non-root user at boot. After some research this command worked.

Edit /etc/rc.d/rc.local, add one line:
  su - user -c "bitcoind -daemon".

If using SSD instead of regular hard drive, it is nice to include a scheduled trim script in /etc/cron.weekly.
nano dofstrim
Add content:
 #! /bin/sh
#for mount in / /boot /home; do
      fstrim $mount
#done


Make it excutable:
chkmod +x dofstrim

Lastly, set up forward forwarding in router and add TCP 8333 to firewall iptables:
nano /etc/sysconfig/iptables


-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

Running Bitcoin Full Node with weak hardware only affects the initial block download and verification time. It took my netbook two weeks. When it is fully running and accepting incoming traffic, it handles 30 traffic without sweat.