Commit Graph
89 Commits
Author SHA1 Message Date
topjohnwu e8915d9db1 su: remove obsolete access and reauth settings
With reactive su request prompts removed and superuser permissions
granted explicitly ahead of time in the app, the legacy 4-way superuser
access mode (Disabled, Apps only, ADB only, Apps & ADB) and pre-O
reauthentication after upgrade settings are no longer applicable.

ADB shell (com.android.shell) is now an explicit policy entry managed
directly in the Superuser tab, making global access filters redundant
and prone to conflicting state. Furthermore, revoking policy on package
upgrade without reactive prompting silently breaks root for upgraded
apps.

- Remove RootAccess enum and root_access checks from magiskd.
- Remove su access mode and reauthenticate settings from Manager app.
- Drop ACTION_PACKAGE_REPLACED from Receiver and manifests.
- Purge obsolete string resources across all translations.

Assisted-by: Gemini 3.8 Flash
2026-10-09 09:37:15 -07:00
vvb2060 160fb3e40b su: pass all unknown options 2026-10-05 20:03:11 -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 9ee6a6b3d7 Update to ONDK r29.5 2026-02-06 16:32:25 -08:00
topjohnwu ff4ca74cfe Ban all unwrap usage in codebase 2025-12-08 23:31:04 -08:00
topjohnwu 3a60ef2039 Update to ONDK r29.3 2025-11-21 13:28:46 -08:00
topjohnwu b72ba6759e Vendor argh sources
Further customization will come in future commits
2025-10-19 17:15:30 -07:00
topjohnwu 3cda9beb93 Cleanup unused bindings 2025-09-24 02:38:18 -07:00
topjohnwu 8b7d1ffcdd Migrate magisk_main to Rust 2025-09-18 03:22:44 -07:00
topjohnwu cf483ad4d2 Migrate connect_daemon to Rust 2025-09-15 14:25:18 -07:00
topjohnwu 8b3a44344f Move bootstages into its own module 2025-09-15 14:25:18 -07:00
topjohnwu 8b49eda85a Migrate daemon_entry to Rust 2025-09-15 14:25:18 -07:00
topjohnwu 7057d4c7f1 Migrate setup_magisk_env to Rust 2025-09-15 14:25:18 -07:00
topjohnwu 312bfe1bab Do not leak base::ffi to external crates 2025-09-11 01:17:34 -07:00
topjohnwu 177a456d8b Enable term for nix 2025-09-09 12:04:31 -07:00
topjohnwu bd657c354c Reduce FFI across C++/Rust 2025-09-02 22:06:08 -07:00
topjohnwu c4e2985677 Migrate resetprop to Rust 2025-08-27 22:48:48 -07:00
topjohnwu 42d9f87bc9 Cleanup resetprop code 2025-08-27 22:48:48 -07:00
topjohnwu 2e4fa6864c Make Utf8CStr a first class citizen in C++ codebase
Utf8CStr is in many cases a better string view class than
std::string_view, because it provides "view" access to a string buffer
that is guaranteed to be null terminated. It also has the additional
benefit of being UTF-8 verified and can seemlessly cross FFI boundaries.

We would want to start use more Utf8CStr in our existing C++ codebase.
2025-08-27 22:48:48 -07:00
topjohnwu 8d10ab89f2 Set zygisk properties in Rust 2025-08-20 11:23:18 -07:00
topjohnwu 251c3c3e0e Remove old ffi data structure 2025-08-08 21:06:41 -07:00
topjohnwu cd0eca20b0 Migrate connect.cpp to Rust 2025-08-08 21:06:41 -07:00
topjohnwu e489b3b6dd Migrate load_modules to Rust 2025-08-05 11:24:55 -07:00
topjohnwu 589a270b8d Migrate disable/remove modules to Rust 2025-08-05 11:24:55 -07:00
topjohnwu 55c3ee3a6f Move Zygisk code out of module.cpp 2025-07-07 13:43:11 -07:00
vvb2060 ff18cb8e70 su: support drop capabilities 2025-07-03 02:42:08 -07:00
topjohnwu d8cf42af16 Reduce unstable feature usage 2025-05-30 11:11:36 -07:00
topjohnwu 8c79d66b7b Update ONDK r28.4 2025-05-30 01:53:26 -07:00
topjohnwu 527bbc0368 Migrate module mounting to Rust 2025-05-20 03:24:43 -07:00
topjohnwu a2896be4a6 Cargo fmt
[skip ci]
2025-05-08 23:29:27 -07:00
LoveSy e9220a28d9 Use splice to pump tty to avoid userspace copying 2025-05-08 23:20:46 -07:00
topjohnwu 22884e173a Implement reboot in Rust 2025-04-28 17:22:14 -07:00
topjohnwu d1829308e9 Move more daemon_start code into Rust 2025-04-28 17:22:14 -07:00
topjohnwu 73840f8721 Migrate selinux.cpp to selinux.rs 2025-04-28 17:22:14 -07:00
topjohnwu 7a207d4ccf Only accept UTF-8 directory entries 2025-04-15 10:26:22 -07:00
LoveSy 9ddeab034b Fix wrong tty pump
See #1463
2025-04-11 13:21:10 -07:00
LoveSy c4847ed288 Move pts to rust, and avoid using thread 2025-04-11 13:21:10 -07:00
topjohnwu 9c7d359093 Optimize and format imports
[skip ci]
2025-04-08 09:57:09 -07:00
topjohnwu c90e73ccec Migration to Edition 2024 2025-03-07 02:35:25 -08:00
topjohnwu 540253a55b Remove unnecessary FFI 2025-02-14 11:24:46 -08:00
topjohnwu 0469817781 Cleanup code and bindings 2025-02-02 22:08:41 +08:00
topjohnwu a786801141 Implement su_daemon in Rust 2025-02-02 22:08:41 +08:00
topjohnwu 59622d1688 Use static methods in cxx-rs 2025-02-02 02:46:33 +08:00
topjohnwu 7f7f625864 Code reorganization 2025-01-31 02:52:27 +08:00
topjohnwu b25aa8295a Move bootstage into Rust 2025-01-31 02:52:27 +08:00
topjohnwu 15a605765c Fully implement daemon side of Zygisk in Rust 2025-01-31 02:52:27 +08:00
topjohnwu b575c95710 Implement fd I/O on Rust side 2025-01-31 02:52:27 +08:00
topjohnwu a48a9c858a Migrate zygisk handler to Rust 2025-01-31 02:52:27 +08:00
topjohnwu 0d8d6290a3 Move module list into MagiskD 2025-01-31 02:52:27 +08:00
topjohnwu 82d1d19267 Migrate uid_granted_root to Rust 2025-01-11 00:11:48 +08:00