github zweck/omdroid v0.0.9-alpha
Phoshdroid 0.0.9-alpha

6 months ago

APK withdrawn (2026-11-27). Phoshdroid is now Omdroid:
install v0.0.18-alpha or later.

Add pmroot for installing packages from inside phosh.

Why sudo doesn't work

Android's untrusted_app sandbox sets PR_SET_NO_NEW_PRIVS=1 on every process Phoshdroid spawns. sudo and su detect this kernel flag and refuse to elevate — exactly the no new privileges error you hit. We can't clear the flag from inside an unrooted app; Android imposes it before our code runs.

start.sh drops the phosh session to UID 1000 because phosh, Nautilus, and xdg-desktop-portal all bail with running as root unsupported otherwise. Once that drop happens, proot's -0 fake-root mode can't get UID 0 back: real setuid() is irreversible.

How pmroot works

While start.sh is still running as fake-UID-0, it spawns a long-running bash listener tied to a FIFO at /tmp/pmroot/in, then drops to UID 1000 for phosh. A small wrapper at /usr/local/bin/pmroot writes commands into the FIFO, blocks on a per-id done-marker, and returns the listener's stdout, stderr, and exit code.

Usage

From the phosh terminal:

pmroot apk add curl
pmroot apk update
pmroot passwd user
pmroot apk add --no-cache htop neovim git

Security model

Any UID-1000 process inside the proot can write to the FIFO, so pmroot is functionally a passwordless sudo. That's already the security model of proot-on-Android — proot is simulation, not a real privilege boundary — so pmroot doesn't weaken anything that wasn't already permeable.

Install

Obtainium auto-updates from 0.0.8-alpha.

Manual:

adb install -r phoshdroid-0.0.9-alpha.apk

Tested on Android 16 / Pixel 9 Pro Fold.

Don't miss a new omdroid release

NewReleases is sending notifications on new releases.