Android hacks

February 23, 2019 — January 19, 2022

computers are awful
portable

I have an Android phone/tablet. How can I get things done without dicking around?

Android in a Box — Run Android applications on any GNU/Linux operating system.

1 File transfer over USB

Usually, this means “file transfer over MTP,” which is the native/default USB protocol for filesystem access. AFAICT this is OK on Windows and surprisingly tedious on macOS. Linux is usually OK, but sometimes modern devices don’t work with the OS.

Mac users have the Google native app File Transfer, but it’s awful. Maybe try instead: Ganesh Rathinavel’s OpenMTP (source).

If you are looking at transferring books because your tablet is an e-reader, you can use Calibre which has in-built connectivity.

But shouldn’t FUSE allow this to just work as part of the normal desktop Finder experience? Archlinux thinks so.

On Linux, this works by simple-mtpfs. simple-mtpfs is provided in homebrew. Installation and usage are minimalistic to the point of sullen:

simple-mtpfs mountpoint

doesn’t give errors or much feedback. And in fact, if something goes wrong, it can fail silently in confusing ways (the folders always show empty).

Try

simple-mtpfs -v -f tmp

to run it in the foreground with verbose feedback, which seems to work fine.

This app also worked on macOS in the past, but I am not sure if it does anymore because of the ongoing quagmire that is macFUSE.

To mount macOS style,

sudo simple-mtpfs -o allow_other,rw -v /Volumes/mountpoint

Contra the manual, on macOS the usual unmount command works.

umount mountpoint

Or just quit.

Alternative: go-mtpfs works great for me, although I had to manually install.

sudo apt install golang-go
sudo apt install libusb1-devel
mkdir /tmp/go
export GOPATH=/tmp/go
go get github.com/hanwen/go-mtpfs
mkdir xoom
go-mtpfs xoom &
cp -a ~/Music/Some-Album xoom/Music/
fusermount -u xoom

2 Alternative app repositories

2.1 F-droid

No frills open-source repository: F-droid

2.2 APKPure

APKPure is faster and more complete than F-droid, but has had security breaches.