3 ms·
> A rooted Android smartphone with Nix is a full Linux computer. I'm not sure. You still have the "Android ecosystem" interfering with common computer access t
by Jenda_ 5y ago
> A rooted Android smartphone with Nix is a full Linux computer.
I'm not sure. You still have the "Android ecosystem" interfering with common computer access that I'm using on normal Linux:
- There is no standard V4L2/camera access, only their camera library. I wanted to take photos into tmpfs (to be encrypted asymetrically with GPG and saved to the storage/sent over the network), but the thing still saved them "under the mountpoint" where tmpfs was mounted. There is no v4l2loopback - for example I needed to scan a QR code from a webpage (web.whatsapp.com) and instead of using v4l2loopback like on normal Linux, I had to literally get a physical camera to point at the screen (so something impossible to do remotely).
- There is no Alsa/PulseAudio. I have run alsamixer and the hardware froze when manipulating certain controls (on both Samsum Galaxy Ch@at with stock ROM and Nexus 4 with LineageOS). You cannot trivially add audio output to your scripts with "foo | aplay". Call recording is a mess (normally you would just hook the "monitor" output in pulseaudio). It's much more difficult to implement simple stuff like "when I'm home and it's dark, enter silent mode" - normally I'd just do iwlist scan to check if I'm on the home wifi network, capture a v4l2 frame to check if it's black, and mute the ringing app in pulseaudio.
- The lockscreen is not PAM. You cannot easily add a module (it's like 3 lines of shell using pam_exec on normal Linux) that will poweroff the device after N failed password attempts/entering a special password. If you want to unlock the screen remotely, you literally need to fake the input (https://stackoverflow.com/questions/23529460/is-there-a-way-to-unlock-android-phone-via-adb-if-i-know-the-pattern https://stackoverflow.com/questions/23529460/is-there-a-way-...). All the we-are-reinventing-PAM is littered with WTFs https://android.stackexchange.com/questions/28689/install-ca-without-having-to-activate-screen-lock https://android.stackexchange.com/questions/28689/install-ca...
- The storage encryption is something custom, not a standard LUKS/cryptsetup. It was not possible to set different password for a lockscreen vs. the storage encryption, except by a special command-line API. There were several versions of such APIs, if you have used the wrong one, it silently set the wrong key and it was impossible to unlock. Recovery was not possible even when I had the master AES key, as it's not standard LUKS, so you cannot recover with cryptsetup --master-key-file or header backup.
- The way the storage is implemented, full system backup, or configuration backup and versioning is terrible. I simply user "rsync /" on my normal Linux systems.
- You need to run an X-server as an app, so there is no xmodmap to easily change the keyboard layout etc. There was no video player that could do reasonable speed scaling without pitch shifting, and running it from a chrooted system on the X-server app is terrible performance-wise. (I have now learned that there is a native MPV port. Hopefully it's better than the VLC port, and hopefully things like socket control work...)
- There is no VNC server (like x11vnc) except for some paid apps. You can use scrcpy, which always streams the entire screen (VNC transfers only changed rectangles).
And the list goes on and on (note that some of these are a few years old, I'm not using Android since then as I have evaluated this to be unusable. Maybe the situation has changed.)