Keep in mind I have not yet rooted the sacrificial lamb. For the initial stages I’m trying to muddle through it as the average user would. Having had Android on this device for a while now I can tell you I cannot wait for this experiment to be over. I have a massive itch to wipe this device and put something like Elementary on it so it is both useful and without an incessant fount of ads. I also desperately wish to remove GMail and that other email client on here. You will discover the reasons why reading this series (although the constant advertisement is reason enough to completely wipe the installed OS and its built in recovery.)
Packages
Word to the wise, Android blows!
First you have to install Termux from the app store/Google Play/whatever the built in place is. Once installed Termux has a nice welcome screen.
If you happen to be an IRC chatter they give you the #termux on freenode. What is really important is the packages command. Those of you coming from a Debian based distro are used to
sudo apt install blah
and its variants. This universe uses the packages command.
packages search <name> packages install <name> packages upgrade packages help
PostgreSQL Packages
Now we need to get PostgreSQL.
For those who cannot see the image clearly I did the following:
packages search postgres packages install postgresql packages install postgresql-contrib
Sadly, rebooting and restarting Termux does not automatically start the database. In fact, the package is rather incomplete for those coming from YABU (Yet Another uBUntu) or even OpenSUSE universes. It’s a disturbing trend in new distros or in this case new partial distros. It shows a real lack of polish. The installation package doesn’t automatically initialize the database and start the server for you.
Starting PostgreSQL
Adding insult to injury, there is no “service” type tool where one could add applications to start whenever the computer was booted, not just when Termux was started.
initdb ~/pg pgctl -D ~/pg start pg_ctl -D /data/data/com.termux/files/home/pg -l logfile start
Then you can connect with psql and use some user contributions.
createuser --superuser --pwprompt roland
Oh, we are a long way from done.
Temporary Storage
Google really screwed the pooch with Android 6 and Termux hasn’t managed to get the pooch to rape counseling just yet. In a biblical catastrophe which could only be put on par with Apple unilaterally deciding to rip out Postscript (a tried and true standard) support from CUPS, and replace it with PDF, a fuzzy guideline having no international standards and even less consensus. Google has decided thumb drives are temporary storage and that SD cards are “permanent” even though you see they are both removable media. On the surface this doesn’t sound horrible until you learn they have jailed off access to the thumb drive media from within ordinary apps.
Yes, it sucks bad. This was a deliberate attempt to force you into using insecure cloud storage so even more of your privacy could be violated. You have to be willing to do one of the following to get data from your real computer to your Android device:
- brute force data over to your Android 2 in 1 creating many copies
- power down your Android device, remove the micro SD card, put it in your real computer, copy stuff to it, put it back in your Android device and power up
- use some highly insecure cloud storage exposing your privacy to even more theft
- drop some theoretically more secure cloud storage onto your local network and two step shuffle via the app to access it.
The Flaw of the Cloud
I know, people claim to be getting rich with cloud storage, but, I’ve spent nearly 30 years in IT. There is no way you are going to convince me putting low/no-cost OS on generic computers, connecting them to the Internet having it all maintained by low wage workers is secure. Feel free to spin the news reel of identity theft stories for the past N years and see just how well that’s been working out.
I say a cloud device on your local network is “slightly more secure” if and only if you block it from all Internet access. If you try to make it Internet accessible via a vendor service or directly exposing it to the Internet then it isn’t any more secure than the rest of those clouds, especially when you used your home phone number as the password.
The Termux app
The Termux app shows a lack of polish in other respects too. By default it doesn’t give you any access to local storage. You have that funky double data home directory and that is it. The install really should have done this. If nothing else there should have been a first-run.sh created in one of the system directories to be executed on initial startup.
apt update && apt upgrade termux-setup-storage
You can read more about storage under Termux here. Sadly, using the built in file manager you cannot navigate your way down to /data/data because the second data directory level is way more than hidden. Turning on “Show Hidden Files” won’t even show it.
Our next post will show the copy process in pictures.
Related posts:
Where Did My QDebug Output Go?