topjohnwu
8d28f10a3f
Enable zerocopy for nix
2025-09-09 12:04:46 -07:00
topjohnwu
177a456d8b
Enable term for nix
2025-09-09 12:04:31 -07:00
topjohnwu
ef4e230258
Use nix for libc functions
2025-09-08 23:59:29 -07:00
topjohnwu
ea5fe7525d
Simplify LibcReturn
2025-09-08 10:55:57 -07:00
topjohnwu
fb0c4ea838
Fallback to userspace copy if splice failed
...
Fix #9032
2025-09-03 16:10:18 -07:00
topjohnwu
bd657c354c
Reduce FFI across C++/Rust
2025-09-02 22:06:08 -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
b861671391
Cleanup libbase
2025-08-25 01:31:47 -07:00
topjohnwu
e91fc75d86
Consolidate for_each implementation into Rust
2025-08-25 01:31:47 -07:00
topjohnwu
9476e7282d
More borrowing, less copying
2025-08-08 21:06:41 -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
vvb2060
ff18cb8e70
su: support drop capabilities
2025-07-03 02:42:08 -07:00
topjohnwu
37a9724a54
Apply clippy fix
2025-07-02 21:20:14 -07:00
topjohnwu
8c79d66b7b
Update ONDK r28.4
2025-05-30 01:53:26 -07:00
Wang Han
fada8b148a
Ensure manager can always bypass su access policy
...
This fixes https://github.com/topjohnwu/Magisk/issues/9050 .
2025-05-21 16:14:46 -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
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
topjohnwu
c0a1fb77be
Code cleanup
2025-04-11 14:48:01 -07:00
LoveSy
4864c1112a
no pty for -c by default, and add -i to force pty
2025-04-11 13:21:10 -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
c6c1a17ae6
Address several clippy warnings
2025-03-03 02:15:14 -08:00
Wang Han and LoveSy
a14fc90f07
Fix fetching notification settings from db ( #8761 )
...
Co-authored-by: LoveSy <shana@zju.edu.cn >
2025-02-04 17:42:21 +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
a1b2830c06
Address clippy warnings
2025-01-11 00:11:48 +08:00
topjohnwu
82d1d19267
Migrate uid_granted_root to Rust
2025-01-11 00:11:48 +08:00
topjohnwu
4d4195c02d
Migrate prune_su_access to Rust
2025-01-11 00:11:48 +08:00
topjohnwu
5637a258fc
Migrate package detection to Rust
2025-01-11 00:11:48 +08:00
topjohnwu
0d31d356ef
Use SQLite's internal time function
2025-01-05 05:04:04 -08:00
topjohnwu
b782e7dcb7
Fetch policy table from Rust
2025-01-05 05:04:04 -08:00
topjohnwu
7edd8be169
Minor changes
2025-01-04 02:24:08 -08:00
topjohnwu
24650eefe4
Bind SQLite to Rust
2025-01-04 02:24:08 -08:00
topjohnwu
8e1a44e7eb
Use argument binding for query
2025-01-04 02:24:08 -08:00
topjohnwu
2722875190
Use better C++ SQL APIs
2025-01-04 02:24:08 -08:00
topjohnwu
3ca6d06f69
Cleanup database code
2025-01-04 02:24:08 -08:00
topjohnwu
5885b8c20d
Add new tests for app hiding
2024-12-18 17:22:31 -08:00
topjohnwu
2bdc047c4d
Call sqlite3_free only on sqlite3 malloc-ed objects
2024-08-14 13:23:59 -07:00
vvb2060
2963d4ca9e
Rewrite get_manager
2024-07-12 13:45:48 -07:00
vvb2060
6aab856de7
Enhanced denylist app id tracking
2024-07-12 13:45:48 -07:00
Wang Han
bd7f9c9e46
Unset FLAG_ACTIVITY_NO_HISTORY for SuRequestActivity
...
This fixes device credential confirm activity on OnePlus devices
because SuRequestActivity is accidentally finished before a valid
response is delivered to it.
2024-07-01 14:50:09 -07:00
topjohnwu
8d5b9e5329
C++/Rust 2 way binding for MagiskD
2023-11-17 13:35:50 -08:00
topjohnwu
65c18f9c09
Restructure project files
2023-11-08 01:46:02 -08:00
9fbd079560
Refactor zygisk to use native bridge to inject
...
Co-authored-by: vvb2060 <vvb2060@gmail.com >
Co-authored-by: topjohnwu <topjohnwu@gmail.com >
2023-11-07 14:25:57 -08:00
topjohnwu
16ae4aedf1
Remove usage of MAGISKTMP
2023-11-02 15:50:36 -07:00