chore: remove source comments and unused code, translate every missing string (#1965)

* chore(i18n): translate every missing string in all locales

Adds the 87 strings the bottom-screen Dashboard and in-game stats pages
introduced to all 32 locales, plus the 51 older settings strings Japanese
and the 50 Chinese locales were still missing. Every locale now has all
3456 translatable strings with the same placeholders as English.

Also translates 36 entries that were still English where the language
does not use the English word, and makes es-419 touch_app_id use the same
%1$s placeholder as English.

* chore(patches): drop comments from the lines downstream patches add

Removes comment lines and trailing comments from lines our patches add,
with hunk headers recounted. Lines that a later patch uses as context
and the upstream backport 0123 are left as they are.

The gamescope, FEX, proot and xodus series still apply to their pinned
sources, and the patched trees differ only in those comments.
test_hud_frames now finds the HUD writer by its first declaration.

* docs: credit Greenlight, Better xCloud, viture-v2, GameNative and DiRTTelemetryErrorFix

These were credited only in source headers and NOTICE files.

* chore: remove source comments and unused functions

Removes explanatory comments from first-party Kotlin, Java, C, C++,
Rust, TypeScript, Python, shell, Gradle, CMake and workflow files.
License and attribution headers stay, and vendored third-party trees,
generated files and license files are untouched. A shellcheck directive
is kept, and udevmon's fallthrough comments became fallthrough attributes.

Syntax trees and token streams match the previous sources apart from the
comments and Python docstrings. Module docstrings that argparse prints
are kept, and device-smoke.sh prints the same --help text from a heredoc.

Also removes 37 functions and 4 fields that nothing referenced.

* chore: remove comments from the Syncthing integration and the latest main sources

* docs: credit Syncthing and the syncthing-android fork

* chore(i18n): translate the Syncthing strings in all locales

The 107 strings the Syncthing integration added are now in all 32 locales.
sync_web_path_locked names the Syncthing tab by its label.

* docs: credit @xXJSONDeruloXx for the HUD metric readers

The CPU, GPU load, thermal and battery readers come from their
PerformanceHudView pull requests #777, #877, #991, #1406 and #1573.
The FusionHUD credit line is unchanged.

* docs: credit the HUD metric readers to @xXJSONDeruloXx's work
This commit is contained in:
MaxsTechReview authored and GitHub committed 2026-11-01 16:27:27 -05:00
1 parent d730f0fa8b
commit c5577478ca
511 files changed
+6813 -4068

No files matched your search

-1
View File
@@ -1,7 +1,6 @@
#ifndef DROIDDECK_BENCH_CHECKS_H
#define DROIDDECK_BENCH_CHECKS_H
/* Benchmark assertions execute the operations being measured. */
#ifdef NDEBUG
#undef NDEBUG
#endif
-6
View File
@@ -1,9 +1,3 @@
"""Fast path equivalence, part two: symlinked directories (Wine's dosdevices), "..", trailing
slashes, realpath/getcwd, the write family, Unix sockets, xattrs, statfs, inotify and fstat.
Run under proot with and without the fast path (run-device.sh fpoff / fastpath) and diff the
output: every line must match. Builds its own tree under /root/fx and /mnt/droiddeck-sd/fx.
"""
import ctypes
import errno
import os
-10
View File
@@ -1,13 +1,3 @@
"""Fast path equivalence, part three: /proc (self, fd and exe links, readlink as proot answers it,
realpath through it, opening through fd links), link text naming host paths, creating in
directories whose host path is long, glue above a binding proot cannot look into, files the
caller may not stat, trailing slashes, shm_open, accept, passwd lookups and the _FORTIFY_SOURCE
entry points.
Run under proot with and without the fast path (run-device.sh fpoff / fastpath) and diff the
output: every line must match. The rig's rootfs is ROOT; run-device.sh binds /cache/fp/perf and
SHARED at /opt/fpx.
"""
import ctypes
import errno
import os
-3
View File
@@ -913,7 +913,6 @@ static void fill_statx(struct statx *out, const struct stat *st) {
out->stx_dev_minor = dev_minor(st->st_dev);
}
/* Emulate statx on older kernels < 4.11 */
static long statx_call(int dirfd, const char *path, int flags, unsigned mask, struct statx *out) {
struct stat st;
long rs;
@@ -1374,7 +1373,6 @@ int inotify_add_watch(int fd, const char *path, uint32_t mask) {
}
/* The kernel reports a socket named through /proc/self/fd/N/<name> under that name: map it back, per socket. */
enum { LONG_SELF, LONG_PEER };
static struct { unsigned long ino; int kind; char name[sizeof ((struct sockaddr_un *)0)->sun_path]; char guest[sizeof ((struct sockaddr_un *)0)->sun_path]; } long_names[64];
static unsigned long_next;
@@ -1453,7 +1451,6 @@ static long socket_address(const struct sockaddr *addr, socklen_t len, int follo
memset(out, 0, sizeof *out);
out->sun_family = AF_UNIX;
if (hlen >= room) {
/* proot would bind it to a temporary name the fast path cannot see: name it through its directory. */
char *slash = strrchr(r.host, '/');
if (!slash || slash == r.host) return FP_SLOW;
*slash = 0;
+5 -6
View File
@@ -89,7 +89,6 @@ long fp_svc_dispatch(const long *r) {
}
void fp_svc_entry(void) __attribute__((visibility("hidden")));
/* A replaced svc may have live values in every register, including NZCV and SIMD. */
__asm__(
".text\n.p2align 4\n.hidden fp_svc_entry\n.type fp_svc_entry,%function\nfp_svc_entry:\n"
".cfi_startproc\n.cfi_def_cfa sp, 16\n.cfi_return_column 16\n"
@@ -144,11 +143,11 @@ static int svc_emit(uint32_t *code, uint32_t *site, uint32_t *branch) {
uint32_t back;
if (!svc_branch((uintptr_t)site, (uintptr_t)code, branch) ||
!svc_branch((uintptr_t)(code + 5), (uintptr_t)(site + 1), &back)) return 0;
code[0] = 0xa9bf47f0U; /* stp x16, x17, [sp, #-16]! */
code[1] = 0x580000f0U; /* ldr x16, literal at +32 */
code[2] = 0x10000051U; /* adr x17, +8 */
code[3] = 0xd61f0200U; /* br x16 */
code[4] = 0xa8c147f0U; /* ldp x16, x17, [sp], #16 */
code[0] = 0xa9bf47f0U;
code[1] = 0x580000f0U;
code[2] = 0x10000051U;
code[3] = 0xd61f0200U;
code[4] = 0xa8c147f0U;
code[5] = back;
uintptr_t entry = (uintptr_t)fp_svc_entry;
uintptr_t resume = (uintptr_t)(site + 1);
-1
View File
@@ -78,6 +78,5 @@ static int svc_stack_room(uintptr_t sp) {
if (grow < svc_stack_gap) grow = svc_stack_gap;
if (grow < low) low = grow;
}
/* Path translation nests several PATH_MAX-sized frames. */
return sp - low >= 96 * 1024;
}
@@ -15,19 +15,17 @@ diff --git a/src/tracee/tracee.c b/src/tracee/tracee.c
#include <sys/ptrace.h> /* ptrace(2), PTRACE_*, */
#include <errno.h> /* E*, */
#include <inttypes.h> /* PRI*, */
+#include <unistd.h> /* getpid(2), */
+#include <stdio.h> /* fopen(3), fgets(3), snprintf(3), */
+#include <dirent.h> /* opendir(3), readdir(3), closedir(3), */
+#include <limits.h> /* INT_MAX, */
+#include <unistd.h>
+#include <stdio.h>
+#include <dirent.h>
+#include <limits.h>
#include "tracee/tracee.h"
#include "tracee/reg.h"
@@ -402,16 +406,128 @@
@@ -402,16 +406,119 @@
}
}
+/* Read host process IDs, not PRoot's guest /proc view. /proc/<tid>/status
+ * works for non-leader threads too, even though /proc lists only leaders. */
+static int read_task_ids(pid_t pid, long *tgid, long *ppid, long *tracer)
+{
+ char path[64], line[256];
@@ -54,13 +52,6 @@ diff --git a/src/tracee/tracee.c b/src/tracee/tracee.c
+ return status;
+}
+
+/* Recover only a delivered creation event whose GETEVENTMSG succeeded but
+ * returned zero. The creator is still stopped at that event, and its real
+ * clone flags have already been read. Require exactly one uninitialized,
+ * PRoot-traced candidate of the right kind and relationship. Never infer
+ * clone flags from PPid, substitute a process for a thread, or choose by PID
+ * order. Include tracees whose initial SIGSTOP was handled before this event.
+ * Missing events and ambiguous candidates need separate recovery logic. */
+static int find_event_child(Tracee *parent, word_t clone_flags, unsigned long *result)
+{
+ char path[64];
@@ -153,7 +144,7 @@ diff --git a/src/tracee/tracee.c b/src/tracee/tracee.c
int status;
/* If the tracee calls clone(2) with the CLONE_VFORK flag,
@@ -425,24 +541,62 @@
@@ -425,24 +532,60 @@
* order to get the right flags.
*/
status = fetch_regs(parent);
@@ -185,8 +176,6 @@ diff --git a/src/tracee/tracee.c b/src/tracee/tracee.c
+ static bool warned;
+
+ status = flags_known ? find_event_child(parent, clone_flags, &pid) : -EIO;
+ /* A thread creator can reach clone's exit while its child is held.
+ * vfork cannot: its creator waits for the child, so do not defer it. */
+ if (status == -EAGAIN && (clone_flags & CLONE_THREAD) != 0 &&
+ (clone_flags & CLONE_VFORK) == 0) {
+ parent->pending_clone_flags = clone_flags;
@@ -218,14 +207,10 @@ diff --git a/src/tracee/tracee.c b/src/tracee/tracee.c
child = get_tracee(parent, (pid_t) pid, true);
if (child == NULL) {
@@ -628,6 +782,52 @@
@@ -628,6 +771,46 @@
return 0;
}
+/* A clone event occurs before the creating thread returns from clone. For an
+ * ambiguous thread lookup, obtain the exact TID at that syscall's exit instead
+ * of guessing from the order of /proc entries. Called before normal syscall
+ * exit handling so the registers and inherited tracee state are still intact. */
+void finish_pending_child(Tracee *parent)
+{
+ word_t flags = parent->pending_clone_flags;
@@ -243,8 +228,6 @@ diff --git a/src/tracee/tracee.c b/src/tracee/tracee.c
+ status = -ESRCH;
+ goto failed;
+ }
+ /* Validate the host TID before setup. This also rejects an unmappable
+ * PID from a different PID namespace instead of adopting an unrelated task. */
+ status = read_task_ids(parent->pid, &ptgid, &ppid, &tracer);
+ if (status < 0)
+ goto failed;
@@ -295,17 +278,16 @@ diff --git a/src/tracee/event.c b/src/tracee/event.c
diff --git a/src/tracee/tracee.h b/src/tracee/tracee.h
--- a/src/tracee/tracee.h
+++ b/src/tracee/tracee.h
@@ -172,6 +172,9 @@
@@ -172,6 +172,8 @@
SIGSTOP_ALLOWED, /* Allow SIGSTOP (once the parent is known). */
SIGSTOP_PENDING, /* Block SIGSTOP until the parent is unknown. */
} sigstop;
+
+ /* Nonzero only while resolving an ambiguous thread clone at its exit. */
+ word_t pending_clone_flags;
/* True if next SIGSYS caused by seccomp should be silently dropped
* without affecting state of any registers. */
@@ -310,6 +313,7 @@
@@ -310,6 +312,7 @@
bool only_with_pevent, word_t wait_options);
extern bool has_ptracees(const Tracee *ptracer, pid_t pid, word_t wait_options);
extern int new_child(Tracee *parent, word_t clone_flags);
-5
View File
@@ -72,11 +72,6 @@ static inline bool droiddeck_proot_statx_fill_mnt_id(pid_t pid, int fd,
int n = snprintf(tracee_fd_path, sizeof tracee_fd_path, "/proc/%ld/fd/%d", (long)pid, fd);
if (n < 0 || (size_t)n >= sizeof tracee_fd_path) return false;
/* Another thread sharing the tracee's fd table can close/reuse fd after statx returns. Pin the
* current referent, then require both device and inode to match statx before trusting its mount.
* Read fdinfo from our pin so a later tracee fd reuse cannot change which mount ID is observed.
* A same-inode bind-mount alias has the same device/inode pair; at this exit stop we cannot
* distinguish that rare concurrent replacement from the mount used by the completed syscall. */
int pinned = open(tracee_fd_path, O_PATH | O_CLOEXEC);
if (pinned < 0) return false;
struct stat st;