残页
44cfe94e4d
Always cleanup init LD_PRELOAD hooks
...
Fix #6296
2022-10-03 08:26:33 -07:00
topjohnwu
095d821240
Don't use xopen in readlink
2022-09-25 16:35:28 -07:00
topjohnwu
48f829b76e
Minor refactoring
2022-09-21 03:09:46 +02:00
topjohnwu
af99c1b843
Don't crash when nullptr paired with len = 0
2022-09-15 16:56:22 -07:00
topjohnwu
c6646efe68
Move all xwrap to Rust
2022-09-15 01:17:05 -07:00
canyie
9474750bdf
Close fd of erroneous daemon socket connections
2022-09-13 04:29:29 -07:00
LoveSy
e86db0bd61
Reset stack guard after fork from Zygote
2022-09-13 04:18:34 -07:00
topjohnwu
a66a3b7438
Make sure logs are always ended with newline
2022-09-09 04:29:50 -07:00
topjohnwu
44029875a6
Add new API exemptFd
2022-09-09 03:27:19 -07:00
topjohnwu
ccf21b0992
Zygisk code refactor
2022-09-07 13:48:20 -07:00
topjohnwu
4e14dab60a
Specialize does not need to close logd_fd
2022-09-06 03:01:39 -07:00
topjohnwu
6e299018a4
Preserve logd_fd after specialization
...
Also add more comments regarding FD checks
2022-09-02 01:49:17 -07:00
topjohnwu
555a54ec53
Avoid doing any unmounts for SysUI
2022-08-31 00:15:15 -07:00
topjohnwu
1565bf5442
Make Zygisk API 0BSD
2022-08-30 01:58:40 -07:00
topjohnwu
14b830027b
Cleanup zygisk headers
2022-08-30 01:40:14 -07:00
topjohnwu
38325e708e
Make private applets hidden
2022-08-27 14:50:28 -07:00
topjohnwu
646260ad6d
Fix typo
2022-08-27 05:27:23 -07:00
topjohnwu
d1d26f4481
Fix building individual applet
2022-08-27 05:06:28 -07:00
vvb2060
77d8445bfd
Avoid hardcode package name
2022-08-24 03:18:55 -07:00
topjohnwu
a54114f149
Pre-grant permissions if possible
2022-08-23 05:09:50 -07:00
vvb2060
c2f96975ce
Pre grant as much as possible
2022-08-23 01:33:10 -07:00
topjohnwu
4737c5117a
Update to ONDK r25.2
2022-08-19 16:26:25 -07:00
topjohnwu
9806b38d8e
Introduce zygisk loader
...
Use a separate library for 1st stage
2022-08-19 04:49:19 -07:00
topjohnwu
34dd9eb7d6
More Rust
2022-08-19 02:21:52 -07:00
topjohnwu
4d9b7e7114
More Rust
2022-08-15 11:53:51 -07:00
topjohnwu
40aab13601
Make IDE recognize we are targeting Android
2022-08-09 14:09:39 -07:00
topjohnwu
4c0f72f68f
Move part of libbase to Rust
2022-08-08 22:53:37 -07:00
残页
1735a713cb
Use ANDROID_DLEXT_FORCE_LOAD
to load second stage if possible
...
Fix #6095
2022-08-08 02:43:19 -07:00
残页
52ba6d11bc
Don't let remote errors crash Zygisk
...
Fix #6095
2022-08-07 05:09:46 -07:00
topjohnwu
7357a35f8d
Fix build errors
2022-08-07 05:03:18 -07:00
Acetylcholine
aeb7fd7cb3
Fix denylist add_list
...
Signed-off-by: ACh Sulfate <xenonhydride@gmail.com>
Co-authored-by: John Wu <topjohnwu@gmail.com>
2022-08-07 04:48:47 -07:00
topjohnwu
1b4a6850b8
Ensure parent folders exist before extract
2022-08-07 04:06:18 -07:00
canyie
1d0b873950
Fix sepolicy attribute
rule parsing
...
Fix #6166
2022-08-07 03:35:50 -07:00
canyie
e8787b5cfd
Fix UB when remote process died
...
If remote process died, `xreadlink` fails and leaves `buf` uninitialized. Then the daemon calls `str_ends`, creates a temp `std::string_view` with the uninitialized buffer and undefined behavior occurs.
2022-08-02 12:54:54 -07:00
topjohnwu
b496923cbb
Update Cargo.toml
2022-07-24 06:14:49 -07:00
topjohnwu
759d196aad
Update cxx.rs
2022-07-24 05:45:23 -07:00
topjohnwu
a7ab8216ce
Proper build scripts
2022-07-24 05:39:14 -07:00
topjohnwu
b9e89a1a2d
Restructure the native module
...
Consolidate all code into the src folder
2022-07-23 13:51:56 -07:00
vvb2060
c7c9fb9576
Restore context before copy
...
fix magiskpolicy context
2022-07-23 03:57:43 -07:00
vvb2060
8b095de04d
Fix app_zygote context
2022-07-23 03:14:44 -07:00
vvb2060
d4b9ef736d
Check magisk32 exists
2022-07-23 02:41:36 -07:00
vvb2060
00d3cb0908
magisk_node: check target exists
2022-07-23 02:40:13 -07:00
vvb2060
d35072d4e6
Match app_zygote by context
2022-07-23 02:39:28 -07:00
topjohnwu
4264ae49c0
Format with rustfmt
2022-07-22 03:56:09 -07:00
LoveSy
3906fe75dc
Clean up code
2022-07-21 00:52:28 -07:00
topjohnwu
910a36fdc1
Make sepolicy.rules relative if possible
2022-07-20 19:28:38 -07:00
canyie
8423dc8d63
Later check persistent_properties
...
`daemon_entry` calls `getprop` which initializes sysprop impl and checks whether we need to load persistent property file. On FDE devices, magiskd starts before /data is actually decrypted, and the check always fails. Thus `persist_getprop("persist.sys.safemode")` will always fail.
2022-07-20 09:58:20 -07:00
Andrew Gunnerson
1f8c063dc6
Fix booting into recovery with Android 13 GKI kernels
...
With Android 13 GKI kernels, the boot partition has no ramdisk, so
Magisk constructs one from scratch. In this scenario, there's no backup
init binary at /.backup/init. For normal boot, magiskinit will symlink
/init -> /system/bin/init if needed. This commit implements the same
for booting into recovery. Before, magiskinit would just exec itself
over and over again because it couldn't restore the backup init.
Signed-off-by: Andrew Gunnerson <chillermillerlong@hotmail.com>
2022-07-18 13:33:50 -07:00
topjohnwu
70fd03d5fc
Rearchitect logging
2022-07-06 01:16:08 -07:00
topjohnwu
2e52875b50
Move all logging into Rust
2022-07-05 21:13:09 -07:00