Skip to content

Instantly share code, notes, and snippets.

@GGPrompts
Created November 19, 2025 13:28
Show Gist options
  • Select an option

  • Save GGPrompts/2a6fb10fcc3767e834e72f46d4c9f301 to your computer and use it in GitHub Desktop.

Select an option

Save GGPrompts/2a6fb10fcc3767e834e72f46d4c9f301 to your computer and use it in GitHub Desktop.
Termux Migration Guide: Play Store to F-Droid

Termux Migration: Play Store → F-Droid

Complete guide to migrate from deprecated Play Store Termux to actively maintained F-Droid version.

Created: 2025-11-19 System: Android with Termux on Phone


Why Migrate?

  • Active maintenance - F-Droid version gets regular updates
  • Companion apps available - Widget, Tasker, Float, Boot
  • Better security - Latest patches and features
  • Future-proof - Play Store version deprecated since 2020

Pre-Migration Checklist

1. Document Current Setup

# List installed packages
pkg list-installed > ~/termux-packages.txt

# Check storage permissions
termux-setup-storage

# List running processes
ps aux > ~/running-processes.txt

# Check crontab/scheduled tasks (if any)
crontab -l > ~/crontab-backup.txt 2>/dev/null || echo "No crontab"

2. Backup Critical Files

# Create backup directory
mkdir -p ~/termux-backup

# Backup Termux configuration
cp -r ~/.termux ~/termux-backup/

# Backup bash configuration
cp ~/.bashrc ~/termux-backup/
cp ~/.bash_history ~/termux-backup/ 2>/dev/null

# Backup SSH keys (if any)
cp -r ~/.ssh ~/termux-backup/ 2>/dev/null

# Backup Git config
cp ~/.gitconfig ~/termux-backup/ 2>/dev/null

# Backup custom bin scripts
cp -r ~/bin ~/termux-backup/

# List of custom aliases/functions
alias > ~/termux-backup/aliases.txt

# McFly history database (if important)
cp -r ~/.local/share/mcfly ~/termux-backup/ 2>/dev/null

3. Document GitHub Projects

Your projects (already on GitHub - just note them):

  • GGPrompts-MCP
  • phone-organizer
  • react-card-app
  • MatrixCards
  • TFE
  • ClaudeMobile
  • claude-code-cheatsheet
  • VSCodeMobile
  • PortfolioHub
  • etc.

4. Note API Keys & Credentials

# Search for potential credentials
find ~ -name ".env" -o -name "*key*" -o -name "*token*" -o -name "credentials*" 2>/dev/null | grep -v ".git"

# Backup any found credentials
# MANUAL STEP: Copy these files to ~/termux-backup/

5. Check Node.js Global Packages

npm list -g --depth=0 > ~/termux-backup/npm-global.txt

6. Backup Important Data

# Phone organizer uploads (if any)
cp -r ~/phone-organizer/uploads ~/termux-backup/ 2>/dev/null

# Any other important data directories
# MANUAL STEP: Identify and copy

Migration Steps

Phase 1: Final Backup

# Push backup to GitHub (create new repo or use existing)
cd ~/termux-backup
git init
git add .
git commit -m "Termux migration backup - $(date)"
# Push to GitHub (create repo first via gh or web)
gh repo create termux-backup --private --source=. --push

Phase 2: Uninstall Play Store Termux

  1. Close all Termux sessions
  2. Open Android Settings → Apps → Termux
  3. Uninstall (or use adb uninstall com.termux from PC)
  4. Also uninstall Termux:API if installed

Phase 3: Install F-Droid Termux

  1. Install F-Droid app from https://f-droid.org
  2. Open F-Droid → Search "Termux"
  3. Install Termux (main app)
  4. Install Termux:API (device integration)
  5. Install Termux:Widget (home screen shortcuts)
  6. Install Termux:Styling (themes/fonts)
  7. Optional: Termux:Float, Termux:Boot, Termux:Tasker

Phase 4: Initial Setup

# Update packages
pkg update && pkg upgrade

# Setup storage access
termux-setup-storage

# Install essential packages
pkg install git gh nodejs python vim tmux openssh ripgrep

Phase 5: Restore Configuration

# Clone backup repo
cd ~
gh repo clone GGPrompts/termux-backup

# Restore Termux config
cp -r ~/termux-backup/.termux ~/

# Reload Termux settings
termux-reload-settings

# Restore bash config
cp ~/termux-backup/.bashrc ~/
source ~/.bashrc

# Restore SSH keys (if any)
cp -r ~/termux-backup/.ssh ~/ 2>/dev/null
chmod 700 ~/.ssh
chmod 600 ~/.ssh/* 2>/dev/null

# Restore Git config
cp ~/termux-backup/.gitconfig ~/ 2>/dev/null

# Restore bin directory
cp -r ~/termux-backup/bin ~/
chmod +x ~/bin/*

Phase 6: Reinstall Packages

# Install packages from backup list
# (You'll need to filter out the package names from termux-packages.txt)
# Common packages you use:
pkg install \
  git \
  gh \
  nodejs \
  python \
  tmux \
  vim \
  mc \
  ripgrep \
  fzf \
  golang \
  termux-api

# Restore npm global packages (if any)
# Check ~/termux-backup/npm-global.txt and reinstall needed ones

Phase 7: Restore Projects from GitHub

cd ~

# Clone your projects
gh repo clone GGPrompts/GGPrompts-MCP
gh repo clone GGPrompts/phone-organizer
gh repo clone GGPrompts/react-card-app
gh repo clone GGPrompts/MatrixCards
gh repo clone GGPrompts/TFE
gh repo clone GGPrompts/ClaudeMobile
# ... etc for other projects

# Rebuild TFE
cd ~/TFE
go build
./build.sh  # If build script exists

# Setup phone-organizer virtual environment
cd ~/phone-organizer
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Phase 8: Restore McFly

# Install McFly
pkg install mcfly

# Restore history database
cp -r ~/termux-backup/.local/share/mcfly ~/.local/share/ 2>/dev/null

# Verify .bashrc has mcfly init (should be restored already)
grep "mcfly init" ~/.bashrc

Phase 9: Setup Termux:Widget

# Create shortcuts directory
mkdir -p ~/.shortcuts

# Example: Create a widget for TFE
cat > ~/.shortcuts/tfe << 'EOF'
#!/bin/bash
tfe
EOF
chmod +x ~/.shortcuts/tfe

# Add more shortcuts as needed
# They'll appear in Termux:Widget app

Post-Migration Verification

Check Everything Works

# Test bash aliases
cc --version          # Claude Code
tfe --help            # TFE
mc --version          # Midnight Commander
gg-help               # GGPrompts

# Test tmux
ta                    # Should attach or create session

# Test Node.js projects
cd ~/react-card-app && npm install
cd ~/MatrixCards && npm install

# Test phone-organizer
phoneorg              # Should start server

# Test Git
gh auth status
git config --list

# Test McFly
# Press Ctrl+R and search history

Verify Storage Access

ls ~/storage/
# Should see: dcim, downloads, shared, etc.

Test Termux:API

termux-battery-status
termux-wifi-connectioninfo
termux-clipboard-get

Troubleshooting

Issue: Packages not found

pkg update
pkg upgrade
pkg search <package-name>

Issue: Permission denied on scripts

chmod +x ~/bin/*
chmod +x ~/.shortcuts/*

Issue: Git authentication failed

gh auth login
# Or restore from backup:
cp ~/termux-backup/.config/gh ~/.config/ -r

Issue: Node packages missing

cd <project-directory>
npm install

Issue: Python venv issues

cd ~/phone-organizer
rm -rf venv
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Estimated Time

  • Backup: 10-15 minutes
  • Uninstall/Install: 10 minutes
  • Restore & Setup: 30-45 minutes
  • Total: ~1-1.5 hours (with PC keyboard/mouse)

What You'll Gain

  • ✅ Termux:Widget for home screen shortcuts
  • ✅ Latest security updates
  • ✅ Active development and support
  • ✅ All companion apps available
  • ✅ Better package repository
  • ✅ Future-proof setup

Notes

  • Your current Termux version: googleplay.2025.10.05
  • All projects are on GitHub (safe)
  • TFE will need rebuilding with go build
  • Phone organizer needs venv recreation
  • McFly history can be restored from backup

Quick Command Reference

# Backup everything
mkdir -p ~/termux-backup && \
cp -r ~/.termux ~/.bashrc ~/.ssh ~/.gitconfig ~/bin ~/termux-backup/ && \
pkg list-installed > ~/termux-backup/packages.txt

# After F-Droid install - restore
cp -r ~/termux-backup/.termux ~/ && \
cp ~/termux-backup/.bashrc ~/ && \
termux-reload-settings && \
source ~/.bashrc

# Clone all projects
cd ~ && \
gh repo clone GGPrompts/GGPrompts-MCP && \
gh repo clone GGPrompts/phone-organizer && \
gh repo clone GGPrompts/TFE
# ... etc

Last Updated: 2025-11-19 Author: Generated for Termux Play Store → F-Droid migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment