Repository navigation
Added
- The DebDroid app (
app/): an installer and a front end, so installing
needs no terminal and no third-party terminal app. It runs the same
install.shas the module and the terminal route, and every action is a
debdroid.shcall. It carries its own terminal, an ongoing notification
with Attach and Stop, Quick Settings tiles, settings for the manager's
flags, a command script manager and editor, and uninstall with the image
kept unless asked. Android 5 and later. Seeapp/README.md. - The offline installer as the app's offline route. "Use the offline
installer instead" takes the image fromDebDroid-module-offline.zip. An
image that does not match the pinned checksum is shown with both checksums
and installed only on "Use it anyway"; downloads stay strict. See
docs/reference/integrity.md. debdroid.sh probe, the device's state askey=valuelines for
programs, with a documented contract (docs/reference/probe.md). It also
runs from an unpacked release with nothing installed, which is how the app
decides what to install.- Background mode.
debdroid.sh startleaves Debian running after the
terminal closes,attachopens a session in it,stopshuts it down and
statusreports what is running. Attaching skips the filesystem check, the
mounts and the bootstrap, so it is near-instant compared torun.
This is what the project's headline claim needed: before this, exiting a
session killedsshdand any VNC server with it. - Wakelock support (
CONFIG_ENV_WAKELOCK), without which the device deep
sleeps and an always-on server stops answering. - Managed swap (
CONFIG_ENV_SWAPplusdebdroid.sh swap), replacing the
third-party Magisk module the troubleshooting guide used to point at. - A start-at-boot hook (
boot/debdroid.service.sh) for Magisk, KernelSU
and APatch, guarded by a sentinel so a failed attempt stands down rather than
repeating itself on a device that may not survive it. - Service helpers:
command/user.sh,command/sshserver.shand
command/vncserver.sh. The VNC helper disables the XFCE4 power manager,
which is what caused the out-of-memory reboots. debdroid.sh self-updateanddebdroid.sh uninstall, both of which
were missing entirely.- A Magisk, KernelSU and APatch module under
module/, installing DebDroid
in one tap and setting up start-at-boot. - A test suite with three tiers: a host suite needing no device, unit tests
loaded out of the product scripts, andtests/device.sh, which checks a real
device and only reads by default. - Provenance records for every bundled binary, in
provenance/manifestand
THIRD_PARTY.md, verified by CI. - Architecture plumbing for
armhf,amd64andi386, with build recipes
inpackage/. Onlyarm64binaries ship so far, and the scripts now say so
clearly instead of failing later. - CI, running the checks, the host tests, the provenance verification, the
documentation checks, the app's build, and guards on the two design
constraints.
Fixed
-
The debian image was writable by everyone. Its base had been built with
umask 000: 880 directories and 1870 files, among them/usr,/usr/bin,
/etcand/root, could be written by any user in debian,/etc/shadow
could be read by any user,/usr/bin/suhad lost its setuid bit, and
/var/tmpits sticky bit. Any user could replace a program root later ran.
The image is now built from debootstrap byrootfs/build-image.sh, so
every mode is the one Debian's own packages set, and the release refuses to
publish an image whose key paths have the wrong mode. It carries the same
packages as before, with the current security updates. An image already
installed keeps its permissions; reinstalling the image replaces it, and
your files in it with it. -
Sessions had no controlling terminal. debian's
su -cdrops it, so
every session printed "no job control in this shell" and Ctrl-C could not
interrupt a running command. Interactive sessions now take their terminal
back; commands run through pipes behave as before. -
debdroid_env.shandenvironmentwere never updated. The installer
kept them on every update in case they had been edited, so a device that
never touched them kept an old default forever, a staleDEBDROID_VER
with it, and gained a new.newfile each time. They are now kept only
when a setting in them differs from the shipped one. -
The
/devoverlay never mounted.upperdirwas on a tmpfs while
workdirwas on the ext2 image, and the kernel requires both on the same
filesystem, so it failed every time and silently used the bind fallback: an
advertised feature that had never once run. A private tmpfs was also added
between the overlay and the bind mount, so sharing android's real/devis
now a last resort rather than the normal path. -
/deventries were created in android's real/dev./dev/fd,
/dev/std*and/dev/loopNwere created before/devwas isolated, leaving
them behind in the running system. -
Writes into the image could escape through a symlink.
etc/resolv.conf,
etc/hostsandetc/ld.so.preloadwere truncated in place, so an image
shippingresolv.confas an absolute symlink (which systemd-resolved does)
had the write land on android's real/etc. -
The user's command lost its quoting. It crossed three hops unquoted, so
apt install 'foo bar'split into two arguments and*expanded against the
host's current directory. -
The installer discarded user configuration, overwriting
environmentand
debdroid_env.shon every update. They are kept now when you changed a
setting in them, with the new versions saved alongside as.new. -
The root check calls busybox, as the android toolbox
idon very old devices
does not support-u. -
DEBDROID_VERwas still1.2while the last release was 1.2.5. -
Assembling the image from its parts is checked, as a partial image only fails
later during the filesystem check. -
The installer rejected every device.
getpropis part of the android
toolbox and is not a busybox applet, but it was called as$BUSYBOX getprop.
That writes a usage error to stderr and nothing to stdout, which looks exactly
like an unset property, so the detected architecture was always empty and the
installer refused to continue. The host suite could not catch it: its busybox
stub emulatedgetpropas an applet, so the one thing that was wrong was the
thing the test faked. The stub no longer provides it, and a check now refuses
the call shape outright. -
DNS inside the session was never the device's. The same mistake in the
resolv.confloop meant no nameserver was ever read from android, so every
session silently fell back to the hardcoded default instead of the network's
own resolver. -
debdroid.sh runalways reported success. It discarded what the session
returned, sodebdroid.sh run falseexited 0 and a refusal to start was
indistinguishable from a clean run. Anything scripted on top of it, the boot
hook included, could not tell that it had failed.attachwas already
correct, andrunnow matches it. -
A foreground run could orphan the background environment. Starting a
session whiledebdroid.sh startwas running deleted the supervisor's pid
file before testing whether one was alive, then stopped at the image lock.
The supervisor stayed running with no pid file, sostopcould not find it,
statusreported it as stopped, and only a reboot cleared it. Both modes now
check for a live supervisor before touching the file, and say to attach
instead. -
Swap never worked. Two independent causes.
swapon -pneeds a busybox
built withCONFIG_FEATURE_SWAPON_PRIand the bundled one is not, so every
attempt failed on the flag; there is a fallback now, and the kernel's own
descending priorities keep the file below zram as intended. Separately, the
free-space check read the wrong column: busyboxdfwraps a device name
longer than its column onto its own line, which is what/datalooks like on
a real phone, so a device with 17G free was reported as having 0M and every
swapfile was refused. -
commanddropped its arguments, so the documented
DEBDROID_USER=name debdroid.sh command usercould not work at all: the
session starts throughsu -, which resets the environment, and no argument
was forwarded in its place. Arguments are passed through now
(debdroid.sh command user alice), and the reference says which variables
belong in/sdcard/debdroid/environmentrather than the calling shell. -
command userclaimed success after failing to set a password. Without a
terminalpasswdaborts and the account stays locked, which is the safe
outcome, but the script still printed that the user was ready to use. It now
says the account is locked and how to set a password. -
/etc/hostsread127.0.0.1 localhost localhoston any device reporting its
hostname aslocalhost, which is most of them. -
The module could not be flashed by any root manager. Magisk, KernelSU and
APatch decide a zip is an old-style module purely on whether it contains a
top-levelinstall.sh, and DebDroid's own installer sat there under exactly
that name. The installer was then sourced as the module's install script,
with onlymodule.propand itself extracted beside it, so it failed its own
file check and calledexit 1, which killed the whole flash because it had
been sourced rather than run.customize.shnever ran at all. The installer
now ships asdebdroid-install.sh, and the build refuses to produce a zip
with a top-levelinstall.shso it cannot regress. -
A fresh module install could not find the bundled busybox. Root managers
apply their own default permissions, which set every file to 0644, before
customize.shruns. The installer tested[ -x ./bin/busybox ], found it not
executable and fell back to the installed path, which does not exist on a
fresh device, so the install stopped with "Cannot locate the busybox binary".
It appeared to work only where an earlier install had left an executable copy
behind. The installer now restores the execute bit before testing it, which
also covers a zip extracted by a file manager that drops permissions. -
A failed flash explained nothing.
errorandwarnwrite to stderr, and
a root manager's console shows only stdout, so a failure printed one abort
line with no reason and none of the installer's guidance. The commonest real
case is a device with no usable network and no bundled image, where the
installer says exactly where to put the image by hand. The module now merges
the installer's stderr into the console. -
The module set
service.shto 0755 and then ran a recursive permission pass
that reset it to 0644, so the explicit mode did nothing. Harmless, as Magisk
runs service scripts throughsh, but the ordering is fixed. -
Your configuration flags were discarded by every update.
docs/reference/configuration.mdsaid to edit theCONFIG_*block at the top
ofdebdroid_mgr.sh, and the installer replaces that file, so following the
documentation lost the settings on the next update. The page also contradicted
itself, announcing "two files" above a table of three. The flags now live in
/sdcard/debdroid/debdroid.conf, which is not shipped at all: the
installer has no code path that writes it, so there is nothing to overwrite
and nothing for a later change to forget to preserve. The defaults stay in the
manager as code, the conf overrides them, and an update carries the flags out
of an older manager into the new file once so nobody loses what they had set.
Only the flags that differ from the new defaults are carried over, and no
file is written when none do, so an untouched install stays on the shipped
defaults and a later release is still free to improve one. -
The reported version never changed after an update.
DEBDROID_VERlived
indebdroid_env.sh, which the installer preserves because the paths in it
are the user's to change, so the version froze at whatever was first
installed. The help banner, the uninstall header and
self-update --checkall reported it, and the backup directory was named
after it, so a rollback was filed under the wrong version. It now lives in
debdroid_lib.sh, which is always replaced, andmake versionfails if a
copy reappears in the preserved file. -
The README's first example did not work.
debdroid.sh startfollowed by
command sshserverwas refused:commandalways took the foreground path,
so the manager stopped at the image already being in use. Even without a
background environment it was wrong, because a foreground session shuts the
environment down when the command exits, killing the server it had just
started.commandnow runs inside the background environment when there is
one, exactly asattachdoes, and keeps a session of its own when there is
not. -
self-update --rollbackcould restore the wrong version. It chose its
backup withls | tail -n 1, which sorts lexically, so 1.2.9 was picked over
1.2.10. The version to restore is now recorded when the backup is taken, so
nothing has to be inferred from a directory listing. A rollback also only
copied over the top, leaving behind any script the newer version had added;
it now clears the project's own scripts first, and says so and skips that
step when the backup is too incomplete to replace them. Yourenvironment,
debdroid.conf, the debian image and the command directory are never
touched. -
A failed bootstrap was reported as a success.
debinitpipes its output
throughtee, and a pipeline reports its last command, so it almost always
exited 0. The manager runs it assh debinit && <your command>, so that
&&was holding nothing back: a broken bootstrap carried straight on. The
status now survives the pipe. -
The swap warning pointed at
debdroid.sh command swap, which has never
existed. The command isdebdroid.sh swap create. -
debdroid.sh uninstallleftdebdroid_swap.shanddebdroid_image.sh
behind, as both were missing from the list of scripts it removes. -
Removed an unused downloader from the updater. Nothing called it, and it
carried a plain-http fallback, so it read as a feature that existed and was
a trap for whoever wires up online updates later. -
The device test suite reported a held lock as a failure, telling anyone who
ran it without stopping their environment that a second session could corrupt
the image. A running session holding that lock is the lock working, so it
skips with the reason now, as the session checks beside it already did. -
The slim module could not download the image, so a first install from it
failed. That is the zip the module manager points at and the one the
install guide recommends, and it had never worked on any device. The two HTTP
clients on a device fail on opposite halves of the releases redirect and each
succeeds where the other does not: busybox'swgetcannot complete a
handshake with the host that issues the redirect, which is why this was never
about how old the device was, and the host the redirect points at serves a
certificate from a root younger than the device, which the systemcurl
cannot validate. The redirect is now resolved withcurland the asset
pulled with busyboxwget. No certificate bundle was added and no
verification was turned off: busyboxwgetnever validated certificates, so
it is the same client the download already used, and the image is still
accepted only if it matches the checksum recorded inrootfs/manifest.
Changed
- The file list the module zip is staged from is now
module/payload.list,
shared with the app's build. - Text files are checked out with LF endings everywhere
(.gitattributes), as a checkout on windows otherwise put CR into every
script. - The shipped debian image is current again, bookworm 12.15 rather than a
build from 2025-09-02, so a new install no longer starts with a year of
updates to download. The download is about 127 MB rather than 146 MB. - The documentation is split into three tiers: the README as the pitch,
docs/guide/written for people who just want it working, and
docs/reference/where the technical detail belongs.Security.mdand
Patches.mdwere nine-line stubs and now have real content. Troubleshooting
is organised by the message you are looking at. The old paths keep redirect
stubs. - The bundled APKs were removed in favour of F-Droid links. One of them,
the keyboard, could not be vouched for: it carried build metadata postdating
its last upstream release and a generic signing certificate, and a keyboard
sees every keystroke on the device. SeeTHIRD_PARTY.md. /apexis bind-mounted on android 10 and later, which is what lets android's
own tools run inside the chroot.- Added
debdroid_lib.sh, holding the helpers every entry point shares. The
busybox lookup, the root check and the architecture gate had been duplicated
across three scripts. - Added
licenses/andNOTICE, as the redistributed GPL binaries carry an
obligation to offer their source.
Verify any asset against SHA256SUMS before installing it.
The full history is in CHANGELOG.md.