Commit Graph
12 Commits
Author SHA1 Message Date
topjohnwu 33d09a2aff Expose xpipe2 as symbol 2026-10-02 17:17:48 -07:00
topjohnwu 8348d6e39c base: eliminate /proc/self/fd path resolution
Remove reliance on /proc/self/fd symlink resolution across base and core
components:
- Add top-level pre_order_walk and post_order_walk that track entry
  paths via an internal buffer, and unify Directory walk methods to
  support path-tracking and pathless traversals without extra overhead.
- Add DirEntry::get_stat using fstatat(AT_SYMLINK_NOFOLLOW) directly on
  directory file descriptors.
- Update Directory::copy_into and link_into to operate directly on file
  descriptors with fd_get_attr/fd_set_attr, passing paths only for
  symlink attribute updates.
- Refactor find_apk_path and restore_tmpcon to use pre_order_walk, and
  update get_app_no_list to use DirEntry::get_stat.
- Remove DirEntry::resolve_path, Directory::path_at,
  Directory::resolve_path, and fd_path.
- Replace remaining consumers of xrealpath and canonical_path (in su
  and magiskinit) with standard realpath or partition matching, allowing
  removal of Utf8CStr::realpath and its C FFI exports.

Assisted-by: Gemini 3.8 Flash
2026-10-02 17:17:48 -07:00
topjohnwu b76d674a60 Move daemon utilities from base to core
Move utilities that are exclusively used by the daemon (core module)
from base to core:
- fork_dont_care, fork_no_orphan, new_daemon_thread, init_argv0,
  set_nice_name, and switch_mnt_ns into utils.cpp
- exec_command* functions and exec_t into scripting.cpp as static
  functions, as scripting is their sole consumer

Also remove the unused exec_command_sync overload.

Assisted-by: Gemini 3.8 Flash
2026-10-02 17:17:48 -07:00
topjohnwu 0b0ee5611e Update libcxx 2026-08-03 19:22:52 -07:00
topjohnwu 01cb75eaef Code cleanup 2025-12-13 22:12:30 -08:00
topjohnwu b861671391 Cleanup libbase 2025-08-25 01:31:47 -07:00
LoveSy 6c612d66d7 Move BootConfig to rust 2025-02-14 14:24:13 -08:00
LoveSy cbc6d40b2c Clean up codes 2023-11-07 14:25:57 -08:00
topjohnwu 399b9e5eba Move hexpatch to Rust 2023-06-20 18:17:26 -07:00
topjohnwu 6b21091fe2 Fix compile errors and cleanup 2023-06-12 02:40:50 -07:00
topjohnwu 2bcf2e76f1 Generate cxx binding in build.rs 2023-05-19 15:16:54 -07:00
topjohnwu b9e89a1a2d Restructure the native module
Consolidate all code into the src folder
2022-07-23 13:51:56 -07:00