Skip to content

Dev - #2

Open
superturtlee wants to merge 228 commits into
superturtlee:devfrom
ravindu644:dev
Open

Dev#2
superturtlee wants to merge 228 commits into
superturtlee:devfrom
ravindu644:dev

Conversation

@superturtlee

Copy link
Copy Markdown
Owner

No description provided.

404-GCross and others added 30 commits June 5, 2026 15:47
* 微调 README_CN.md 与社区支持设备文档措辞

* 修复 GPU-Acceleration_CN 缺少 Rootfs 仓库引用链接

* 翻译 community-supported-devices_CN 新增的 WildKernels OnePlus 设备表格(96行)

* 翻译 community-supported-devices_CN 中 none→无、Working→正常运行

* 翻译社区支持设备状态选项:正常运行/部分可用/不可用

* 修复社区支持设备文档措辞

* 微调社区支持设备文档措辞

* 微调社区支持设备文档措辞

* 微调社区支持设备文档措辞

* 微调社区支持设备文档措辞

* 微调社区支持设备文档措辞

* 微调社区支持设备文档措辞
- monitor, virgl, pulse: explicitly enter droidspacesd via new
  ds_selinux_enter_domain() -- permissive, zero enforced denials
- x11: stays on untrusted_app_27 (app_process requires it);
  dyntransition() loses dead applied_ctx output param
- untrusted_app_27 first in domain trial order to match real Termux
- sepolicy: scope fd/fifo_file rules to untrusted_app_27 (not untrusted_app);
  add audioserver/mediaserver fd use for PulseAudio binder path
Patch default.pa at runtime: load aaudio before always-sink, disable
module-sles-sink and module-console-kit. Add --use-pid-file=false and
--disallow-exit to prevent futex deadlock on Android userdata flock.

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
…ndencies and configure PulseAudio for Droidspaces

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
Signed-off-by: ravindu644 <droidcasts@protonmail.com>
…ough

OPOST on the outer line discipline transforms \n->\r\n, corrupting
escape sequences from tmux/vim/claude-code before they reach the user.

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
vendor 4.9 devpts patches return EINVAL/EIO on newinstance mounts,
causing silent PTY alloc failure; kernel auto-unlocks when needed

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
… buf

- signalfd(SIGCHLD) replaces 100ms poll-waitpid busy loop in handle_session
- signalfd(SIGWINCH) replaces signal handler + 200ms epoll timeout in client
- drop redundant poll() probe before recv_frame_hdr in client frame loop
- shrink cmdline log buffer from 16KB to 512B stack allocation

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
all four functions were identical modulo which ds_config bool field
they tested. collapse into one offsetof-based scanner; keep thin
compat wrappers so existing call sites are unchanged

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
…own_lines

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
3 identical ~25-line stop functions (x11/virgl/pulse) collapsed to
one-liner wrappers; kill/wait/unlink logic lives in one place now

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
Move Android-specific sources (android, x11, virgl, pulseaudio) into
src/android/, network sources (network, netlink, iptables, dhcp) into
src/net/, and all headers into src/include/.

Redundant prefixes/suffixes dropped: ds_ and -android stripped where
the subdirectory name already conveys the context.

Update Makefile SRCS paths, -I flag (now -Isrc/include), VERSION grep
path, and add mkdir -p to the compile rule for object subdirs.
Update src/socketd/Makefile -I and fix api_server.cpp's relative
Support NixOS-specific su path to run su correctly in NixOS containers.
…stale runtime configuration

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
Currently translated at 100.0% (467 of 467 strings)

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (467 of 467 strings)



Translate-URL: https://hosted.weblate.org/projects/droidspaces/strings/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/droidspaces/strings/zh_Hant/
Translation: Droidspaces/Strings

Co-authored-by: Jung Chi Wang <snowwolf725@gmail.com>
Co-authored-by: MengHanLOVE <2193438288@qq.com>
Inject libskcodec.so into LD_PRELOAD (lib64 > lib priority) to fix
module-sles-sink dlopen failure on One UI 6.1+; install libandroid-stub
and disable module-suspend-on-idle in setup-termux.sh to fix PA futex hang.

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
Signed-off-by: ravindu644 <droidcasts@protonmail.com>
replace scattered getuid() checks with a single gate after daemon proxy;
rename is_stateless_cmd -> is_no_root_cmd, add 'check' to exempt list

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
Signed-off-by: ravindu644 <droidcasts@protonmail.com>
replace blocking write_all(master) with non-blocking write + dynamic wbuf;
flush via EPOLLOUT, suspend conn EPOLLIN at 192KB, resume at 64KB

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
Signed-off-by: ravindu644 <droidcasts@protonmail.com>
* build: add patched BusyBox as submodule

* build: enable socketd backend bridge by default
Signed-off-by: ravindu644 <droidcasts@protonmail.com>
…y applied post-extract fixes

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
Acquire PARTIAL_WAKE_LOCK then fire ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
(API 23+); fallback to ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS for OEMs
that block the direct dialog (MIUI etc.). Add manifest permission.

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
Add receive/send timeouts to accepted socketd backend bridge
connections so a partially written request cannot block the privileged
bridge indefinitely.

Also replace the bridge-specific same-EUID authorization rule with the
same peer authorization model used by the main daemon: allow root, or
allow peers that are members of the droidspaces group. This keeps the
backend bridge aligned with the existing Droidspaces local privilege
boundary instead of granting access to every process running under the
same UID.
ravindu644 and others added 4 commits July 26, 2026 18:49
- WelcomeScreen / InstallationSummaryScreen: drop the now-unused 'btnShape' vals
  left behind when DT-4 extracted PrimaryActionBottomBar.
- InstallationScreen: drop a redundant elvis on the (smart-cast non-null)
  errorMessage introduced by the DT-6 move.
No behavior change; compileReleaseKotlin is now warning-clean for these files.

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
The systemd/OpenRC/procd service list only switched filter categories (Running,
Enabled, Disabled, Abnormal, Static, All, Masked) by tapping a chip. Wrap the list
in a HorizontalPager (one page per filter) so categories can also be swiped
left/right: the pager and chip row stay in sync (tap animates, swipe selects), the
selected chip auto-scrolls into view, and far hops jump directly instead of flipping
through every intermediate page. Search still overrides with a single results list.

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
The monitor never read the console PTY master in background mode, only
foreground did (via console_monitor_loop). Once a container's init wrote
past the ~64 KiB PTY buffer, /dev/console blocked forever in
n_tty_write and the whole container wedged permanently.

Add the master to the monitor's existing heartbeat poll loop and drain
it continuously, appending output to a per-container console log. This
both fixes the deadlock and recovers previously-lost background boot
logs.
* Fix launcher icon blurry on Xiaomi tablet dock

Change ic_launcher_foreground.xml width/height from 24dp to 108dp to match
adaptive icon canvas size. This fixes the blurry icon issue on Xiaomi tablet
desktop and dock bar where the launcher renders the vector at its intrinsic
size before scaling up.

* Trigger CI build for testing
@ravindu644
ravindu644 deleted the branch superturtlee:dev July 26, 2026 15:04
@ravindu644
ravindu644 deleted the dev branch July 26, 2026 15:04
@ravindu644
ravindu644 restored the dev branch July 26, 2026 15:05
ravindu644 and others added 3 commits July 29, 2026 10:25
The requirements checker listed CONFIG_USER_NS under a [HARDENING] section
with inverted polarity: a kernel that *has* user namespace support rendered
as "[x] CONFIG_USER_NS disabled". Users read that as a missing requirement
and filed it as a detection bug (#254) - detection was correct, the framing
was backwards, and it contradicts Kernel-Configuration.md, which recommends
CONFIG_USER_NS=y.

Drop the [HARDENING] section entirely and move the probe into [OPTIONAL] as
a normal positive check, "User namespace". Same detection (/proc/self/ns/user);
the description now explains why you would want it - Docker on some kernels,
sandboxed apps (Flatpak, Bubblewrap, browsers) and desktop environments - and
points at --allow-userns, which is how it is opted into per container.

Fixes: #254

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
Fish 4.x probes for Kitty keyboard protocol support by emitting ESC[=5u.
terminal-emulator 0.118.1 has no case for the CSI private parameter byte
'=', so it fell out of the escape state machine and rendered the trailing
"5u" as literal text after the prompt (#250).

Upstream fixed this in 3f23750 by routing ESC [ = and ESC [ < into
ESC_CSI_UNSUPPORTED_PARAMETER_BYTE, which consumes the rest of the
sequence. The fix ships in v0.118.3.

Verified against the published JitPack AARs by feeding the reporter's
repro through TerminalEmulator directly:
  0.118.1 -> "before>5u<after"   (matches the bug report)
  0.118.3 -> "before><after"     (expected)

No source changes needed on our side. The signature changes in 0.118.3
(updateSize/initializeEmulator/TerminalEmulator now take cell pixel
dimensions) are all on methods TerminalView calls internally, and both
artifacts move in lockstep; TerminalSession's constructor,
TerminalSessionClient and TerminalViewClient are untouched. minSdk 24 on
both modules stays under our 26. Release build passes.

Fixes: #250

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
Currently translated at 100.0% (515 of 515 strings)

Translated using Weblate (Czech)

Currently translated at 100.0% (3 of 3 strings)

Added translation using Weblate (Czech)

Added translation using Weblate (Czech)

Translated using Weblate (Khmer (Central))

Currently translated at 100.0% (515 of 515 strings)




Translate-URL: https://hosted.weblate.org/projects/droidspaces/plurals/cs/
Translate-URL: https://hosted.weblate.org/projects/droidspaces/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/droidspaces/strings/km/
Translation: Droidspaces/Plurals
Translation: Droidspaces/Strings

Co-authored-by: LayAn <chumlayan95@gmail.com>
Co-authored-by: Michal Várady <miko.vaji@gmail.com>
abd3-13 and others added 17 commits August 2, 2026 13:55
…escape (#262)

* seccomp: block KSU magic-reboot fd install and neutralize GRANT_ROOT escape

A Droidspaces container runs as real root (uid 0) in the init user
namespace - the exact precondition for the KernelSU manager-uid-
impersonation container escape. A process can obtain the KSU
[ksu_driver] fd via the magic reboot() supercall, read the manager
appid, setresuid() to it to satisfy is_manager(), then issue
KSU_IOCTL_GRANT_ROOT, which installs a full-root credential
(uid 0, all caps, u:r:ksu:s0) and calls disable_seccomp(), breaking
out of the container. The direct uid-0 GRANT_ROOT path is guarded by
is_ksu_domain(), but is_manager() short-circuits allowed_for_su() with
no domain check, so the impersonation bypasses that guard.

Add two complementary barriers, applied at every container/attach entry
point (internal_boot + both setns attach paths) in the required order:

1. ds_ksu_neutralize_root_escape() runs BEFORE seccomp. It obtains the
   [ksu_driver] fd via reboot(0xDEADBEEF,0xCAFEBABE,0,&fd) and issues
   KSU_IOCTL_DISABLE_ESCAPE_TO_ROOT (only_root perm), setting
   TIF_KSU_DISABLE_ESCAPE_WITH_ROOT so escape_with_root_profile() aborts
   for the calling thread. Per-thread defense-in-depth. Silent no-op on
   non-KSU kernels (the magic reboot just returns -EINVAL, no fd).

2. ds_seccomp_apply_minimal() gains a BPF rule that denies reboot()
   with the KSU magic pair (EPERM). This is the load-bearing, tree-wide
   barrier: inherited across fork/exec, it prevents any descendant from
   ever obtaining the fd in the first place. Other reboot() calls are
   unaffected (already gated by CAP_SYS_BOOT; wrong magic returns
   -EINVAL in-kernel).

Ordering is critical: (1) must precede (2), because the ioctl is
delivered through the very fd the magic reboot installs and (2) blocks
that magic reboot.

The fd is closed immediately after the ioctl (it is O_CLOEXEC anyway)
so it can never be reused by a descendant for GRANT_ROOT.

* Change log message for escape_with_root disable

---------

Co-authored-by: Ravindu Deshan <Droidcasts@protonmail.com>
Extends the systemd management screen beyond start/stop/restart:

- ContainerSystemdManager: add inspectUnit() (systemctl show properties,
  status text, dependency tree) and getOverrideConf/setOverrideConf/
  deleteOverrideConf, mirroring 'systemctl edit <unit>' at
  /etc/systemd/system/<unit>.d/override.conf. Override writes go through
  the existing base64-streaming pattern to stay safe against shell
  injection via unit names.
- InitServiceMenuAction: convert to a sealed class (Command / Navigate)
  so overflow-menu items can open a screen instead of only running a
  systemctl action. Updates OpenRCScreen/ProcdScreen call sites
  accordingly.
- Add UnitDetailScreen and OverrideEditorScreen, wired into
  DroidspacesNavigation with two new routes.
- SystemdScreen: add 'Inspect unit' and 'Edit override' to the
  per-service overflow menu.
…e editor

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
Currently translated at 15.1% (78 of 515 strings)

Translated using Weblate (Korean)

Currently translated at 100.0% (3 of 3 strings)

Added translation using Weblate (Korean)

Added translation using Weblate (Korean)



Translate-URL: https://hosted.weblate.org/projects/droidspaces/plurals/ko/
Translate-URL: https://hosted.weblate.org/projects/droidspaces/strings/ko/
Translation: Droidspaces/Plurals
Translation: Droidspaces/Strings

Co-authored-by: Jeongwan Bae <jeongwan.bae@outlook.com>
* UI: updated spinner and PullToRefresh anim, corner radius in systemd page, and minor tweaks

* UI: restore graphics-shapes dependency to resolve compilation failure

* docs: add changelog.md for ui branch

* Delete changelog.md
Signed-off-by: Ahmed Al-Nassif <mr.ahmed.nassif@gmail.com>
Currently translated at 100.0% (544 of 544 strings)

Translated using Weblate (Czech)

Currently translated at 100.0% (544 of 544 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (544 of 544 strings)

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (544 of 544 strings)






Translate-URL: https://hosted.weblate.org/projects/droidspaces/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/droidspaces/strings/id/
Translate-URL: https://hosted.weblate.org/projects/droidspaces/strings/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/droidspaces/strings/zh_Hant/
Translation: Droidspaces/Strings

Co-authored-by: Arif Budiman <arifpedia@gmail.com>
Co-authored-by: Jung Chi Wang <snowwolf725@gmail.com>
Co-authored-by: Michal Várady <miko.vaji@gmail.com>
Co-authored-by: seriaTvT <63958697+seriaTvT@users.noreply.github.com>
* 한국어 추가 드가자

* 어라 리소스가 있네

* 흠

* 멍청하다

* plurals.xml 업데이트
Selected upstream interfaces could previously only be added or removed,
not reordered, even though order matters (first entry is the primary
upstream, the rest are fallbacks). Reuses the same drag-to-reorder
pattern as the Auto Boot Priority screen: a LazyColumn driven by
sh.calvin.reorderable's live onMove callback, so the reordered list
propagates immediately as items cross during the drag rather than only
after a settle animation.

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
Android's netd rebuilds its entire netfilter and policy-routing state
whenever it restarts, and a system_server crash ("soft reboot") is enough
to trigger it.  It flushes the iptables built-in chains and the FIB rule
table wholesale, taking our rules with them, which silently strands every
running container.

The container keeps running and the host's own connectivity comes back,
so the failure looks like a Droidspaces bug: with the policy rules gone
nothing consults the main table for 172.28.0.0/16, so host traffic to a
container falls through to "from all unreachable" and SSH into the
container hangs, while the missing MASQUERADE and FORWARD ACCEPT rules
leave the container with no WAN.  Only restarting the container fixed it.

Setup installed these rules exactly once and assumed they would survive.
Make the route monitor reconcile them instead:

- Split the rule installation out of setup into install_policy_rules()
  and install_netfilter_rules(), each the single source of truth for its
  half, called both at container start and from the monitor.  This also
  collapses the bridge/bridgeless branching in setup_veth_host_side()
  into one call.
- Re-assert the three policy rules on every monitor cycle.  They are
  cheap netlink round-trips and ds_nl_add_rule4() maps EEXIST to success,
  so this is a silent no-op when nothing is wrong.
- Gate the netfilter set behind ds_ipt_host_rules_present(), a new
  fork-free probe that checks INPUT/FORWARD ACCEPT and MASQUERADE in two
  table reads.  ds_ipt_ensure_mss_clamp() and the port-forward helpers
  shell out to the iptables binary, so they must not run every cycle.
  Probing every rule rather than one canary matters because netd is not
  the only thing that removes them: firewall apps rewrite the filter
  chains while leaving nat's MASQUERADE untouched.
- Snapshot the topology and port-forward list in setup_veth_host_side()
  so the monitor thread can rebuild the rules without reading cfg, which
  the reboot path rewrites in place.  ds_ipt_add_portforwards() now takes
  the port-forward array directly instead of the whole config.

Recovery is automatic within one 1.5s heartbeat, or immediately on the
netlink event, and every helper is idempotent so no rules are duplicated.
Verified on a device by killing system_server and by deleting each rule
individually.

Fixes: #273
Signed-off-by: ravindu644 <droidcasts@protonmail.com>
ds_ipt_host_rules_present() only covered the four connectivity rules, so
a flush that spared them went unnoticed: deleting the mangle MSS clamp,
or flushing just nat PREROUTING, left the container reachable but with a
silent MTU blackhole or dead --port mappings until it was restarted.

Both are detectable from the entry blob without forking, so extend the
probe to cover them:

- mangle POSTROUTING is checked for a TCPMSS target.  An unreadable
  mangle table deliberately leaves the verdict untouched instead of
  failing the probe - MSS clamping is an MTU guard rather than
  connectivity, and bailing out there would stop us reconciling the
  rules that do matter.
- nat PREROUTING is checked for a DNAT target, but only when the
  container actually has --port mappings.

Both match on target name, since the --dport selector lives in an xt
match payload we do not parse.  They therefore prove that MSS clamping
and port forwarding are still installed, not that every individual
mapping is: a single mapping deleted on its own is still not detected,
while anything that removes them as a group now is.

Reinstalling port forwards on a partially flushed table also had to be
made safe.  Those rules go in through the iptables binary, which has no
idempotency check, so re-adding them stacked a second copy of every
survivor - and removal only issues one -D per recorded rule, so the
extras leaked on container stop.  ds_ipt_add_portforwards() now drops
whatever the state file recorded before reinstalling; with no state file
(first install) that is a no-op.

Verified on a device: deleting the MSS clamp alone and flushing nat
PREROUTING alone both self-heal within one heartbeat, three consecutive
full flushes leave exactly one copy of every rule, and a forwarded port
still reaches the container afterwards.

Signed-off-by: ravindu644 <droidcasts@protonmail.com>
Signed-off-by: ravindu644 <droidcasts@protonmail.com>
Currently translated at 100.0% (544 of 544 strings)

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (544 of 544 strings)



Translate-URL: https://hosted.weblate.org/projects/droidspaces/strings/zh_Hans/
Translation: Droidspaces/Strings

Co-authored-by: seriaTvT <63958697+seriaTvT@users.noreply.github.com>
Co-authored-by: 月有陰晴圓缺 <moonleeeaf@petalmail.com>
Signed-off-by: ravindu644 <droidcasts@protonmail.com>
* Add terminal dark mode toggle in settings

Add a 'Terminal Dark Mode' switch in the Appearance settings section that
renders only the terminal page in dark colors (dark background, light
foreground/cursor, dark virtual keys bar) while the rest of the app keeps
the light theme. The preference is independent of the app-wide theme.

* Fix terminal dark mode: set TerminalView background color

The termux renderer only paints cell backgrounds; the full-screen default
background comes from the View itself. Set the TerminalView background to
dark when terminal dark mode is enabled, otherwise the terminal area stays
white while only the foreground/cursor colors change.

* Use classic termux white-on-black colors for terminal dark mode

Change the terminal dark mode foreground/background to pure white (#FFFFFF)
on pure black (#000000), matching termux's default scheme instead of the
previous grayish text (#E2E2E6) on dark gray background (#121212).

* Fix unresolved Color.White/Black references for cloud build

Use Compose's Color.White / Color.Black constants instead of the
Android android.graphics.Color.WHITE/BLACK uppercase aliases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.