Skip to main content

Posts

Transfer JuiceSSH connection database to a new phone (root required)

 I've just replaced my 5 year-old phone with something new and shiny, and I'm in the process of migrating apps. My JuiceSSH instance has about 20-30 connections in it, which makes it cumbersome to type in again. Sadly, the app doesn't have (yet?) a method to export and import the database, so we must make use of root access. Both my phones (source running Android 12, destination running Android 13) are rooted.  Here are the steps: 1. Enable ADB debugging on both phones. 2. Connect via ADB to the source phone and become root. Navigate to JuiceSSH database directory and identify the database being used: lavender:/ $ su - lavender:/ # cd /data/data/com.sonelli.juicessh/databases/ lavender:/data/data/com.sonelli.juicessh/databases # ls -l total 640 -rw-rw---- 1 u0_a221 u0_a221 462848 2023-12-25 07:50 19a093afcee2a1df8bb6ac14d79843 -rw-rw---- 1 u0_a221 u0_a221  25136 2023-12-25 07:50 19a093afcee2a1df8bb6ac14d79843-journal -rw-rw---- 1 u0_a221 u0_a221  40960 2020-08-11 21:...
Recent posts

Using an Android phone as a microphone for an ARM64 linux board

 I'm currently using an Odroid N2+  as a temporary desktop, while working from home, during the times when my regular desk is taken over by my kids doing homework. The alternative was using the laptop in the kitchen, but the chairs were uncomfortable for long term use, so I chose to set up an N2+ as a desktop (Ubuntu 22.04, Kernel 6.1), connected to the bedroom TV, with a wireless mouse/keyboard. With this setup I can operate it "remotely", 4m away, from the bed.  The N2+ has no problems running my work apps - mostly consisting of ssh, VSCodium, XPRA and xfreerdp. But there is one thing that I need and is problematic - Teams. I can connect to Teams via Chromium, share the desktop and participate, but the N2 doesn't have a microphone, so I need one that works 4m away. Forwarding Android microphone over the network to a PC is nothing new (e.g. WoMIC ), but finding a client app that works under Linux and especially under something else than x86_64, is more of a challenge...

Which process wakes up my HDD at 8 AM?!

 Having a NAS with mechanical disks and a door open to your bedroom because of the heatwave may be problematic during the night if the disks spin up and start crunching. In my case, the crunching noise happens every day at 8:00. Ok, maybe I like to sleep in and not hear crrrrr-crrrr-clack-clack as a wake-up call. Time to find the culprit. Since the NAS is running a vanilla Ubuntu and the disks are used only for cold storage, I kind-of know why they spin up each time they do. Most likely some cron process is running at 8:00 and interrogating the disks. Checking the crontab, all user's crontab, /etc/crontab, /etc/cron.d/* doesn't show anything obvious starting at 8:00. There could be some long-term running process which decides to index something at 8 o'clock, or there could be some external process on some other server that uses NFS or SSH to access some data on the NAS.  I decided to learn something new and use auditd to monitor file access to my /media/wdc mountpoint at 8...

Setting up wireguard

 Time has come to explore a new (well, it's not that new anymore, it was introduced in kernel 5.6) VPN technology that is more lightweight and faster on single-board computers (SBCs) than something like OpenVPN. I'm talking about Wireguard . The key takeaways for why Wireguard might be better than other VPN technologies (like OpenVPN, or IPSec) are: very small code, easier to audit runs in kernel space, not userspace  configuration can be done with standard linux tools (like ip, iproute, iptables), but there are some helper scripts that simplify setting up/starting up doesn't support cypher negotiation (thus preventing downgrade attacks) is quiet by default and doesn't reply to random packets from the Internet (difficult to scan for wireguard concentrators and try brute-force attacks) has better performance than userspace encryption (to be tested) All good network tutorials begin with a network diagram and end with a packet capture. So, let's say you want to host a ...

Installing Home Assistant Supervised on an old 32bit HP laptop

 I've received a challenge from my former boss: an old HP laptop that was born in 2005:  an HP-Compaq NC6220 ( https://www.pocket-lint.com/laptops/reviews/hp/68181-hp-compaq-nc6220-notebook-laptop/ ). The specs are abysmal: So, i386, 1.7GHz single-core CPU (remember those?), 1G of DDR2 RAM (2x512M) and a 40GB ATA (not SATA!) drive. But hey, at least it has a serial port!  The challenge is to install HomeAssistant ( https://www.home-assistant.io/ ) on it so that he can monitor some Zigbee temperature sensors and relays (via a gateway). The first hurdle was to remove the BIOS password - following this nice guide: https://www.youtube.com/watch?v=ZaGKyb0ntSg Next-up - install HASSOS. Unfortunately, it doesn't support i386, but only x86_64... So, I went the Home Assistant Supervised route, and installed Debian 11 i386 edition from a netinstall USB ( https://cdimage.debian.org/debian-cd/current/i386/iso-cd/debian-11.6.0-i386-netinst.iso ).   Once Debian was up and run...