How to Run Android Mobile/TV Emulator on NixOS Using flake without Android Studio

Your browser doesn't support HTML5 video. See? I’m really running NixOS. TL;DR Use the below provided flake.nix and set ~/.android/avd/phone.avd/config.ini hw.keyboard = yes to have a good Android emulator experience. Introduction It was an absolute nightmare but I finally managed to run both Android Mobile and Android TV emulators on NixOS without resorting to using a virtual machine. This blog post was super helpful in my quest. I literally just copied the flake.nix and the Android mobile emulator worked flawlessly. ...

May 18, 2025 · 5 min

Using Termux And Cloudflare Tunnel to SSH into My Android Phone

TL;DR Why not Linux VM? Termux is way more reliable for keeping the SSH connection alive and it allows accessing other directories. Introduction In my previous post I talked about using Nix and Home Manager on my Pixel 6A. In this article I’ll share how to use a more “traditional” approach, i.e., using Termux with Cloudflare Tunnel. This is my current setup. Prerequisite Installed Termux, Termux:API and Termux:Boot and turn off battery optimization for them Enabled termux-setup-storage Set up openssh Possess a cloudflare domain for cloudflare tunnel Guide 1. Install cloudflared pkg update && pkg upgrade pkg install cloudflared 2. Configure cloudflared Note ~ is aliased to /data/data/com.termux/files/home Create the dir: cd ~ mkdir .cloudflared cd .cloudflared Set up the tunnel cloudflared tunnel login # follow the on-screen instruction cloudflared tunnel create pixel # create a tunnel called pixel cloudflared tunnel route dns pixel pixel.helloworld.com # create a route (`pixel` is the tunnel name; `helloworld.com` is the domain you own.) You should now have the following files in ~/.cloudflared: ...

May 17, 2025 · 4 min

Using Nix and Home Manager on My Pixel Android Phone

Introduction Note This article is a good intro if you have no idea what I’m talking about. I use a Pixel 6A and I was surprised that I could run a Linux VM on it. Of course, I tried to use Nix on it. I found nixos-avf but it required Android 16+. I did not want to join the beta program so no NixOS for now. ...

May 11, 2025 · 4 min