Commit Graph

67 Commits

Author SHA1 Message Date
topjohnwu
06531f6d06 Add annotations to suppress warnings 2022-01-25 04:16:14 -08:00
topjohnwu
45483fde74 Update CLI usages 2022-01-25 02:04:15 -08:00
topjohnwu
c6dcff0ae7 Minor dynamic_bitset changes 2022-01-24 22:30:19 -08:00
LoveSy
02dd962601 Don't load zygisk module for magisk app 2022-01-24 03:05:12 -08:00
topjohnwu
cbe97cdfde Fix dynamic_bitset implementation 2022-01-23 04:39:00 -08:00
topjohnwu
407dfc7547 Always write 0 to fd 2022-01-23 04:19:07 -08:00
topjohnwu
fbe17dde03 Add flag for unloaded Zygisk modules 2022-01-21 05:37:47 -08:00
topjohnwu
bb7a74e4b4 Add Zygisk API getFlags() 2022-01-17 19:54:33 -08:00
topjohnwu
76ddfeb93a Allow modifying denylist without enforcement 2022-01-15 23:46:22 -08:00
topjohnwu
21d7db0959 Add new Zygisk API to get module dir 2022-01-14 03:10:02 -08:00
残页
b5d80a88d1 Only care about mount namespace isolating 2021-12-14 03:08:55 -08:00
LoveSy
87c2f6ad14
xhook_clear after xhook_refresh 2021-12-14 03:06:57 -08:00
topjohnwu
2d82ad93dd Macro -> template 2021-11-29 19:56:37 -08:00
topjohnwu
4b5651bd6f Revert logging after pre specialize 2021-11-16 03:12:01 -08:00
topjohnwu
50515d9128 Close unclosed fds from modules 2021-11-16 01:59:45 -08:00
topjohnwu
6935033db5 Prevent dangling pointers 2021-11-12 02:02:05 -08:00
topjohnwu
421277d730 Prevent race conditions in connect_companion 2021-11-12 01:55:55 -08:00
topjohnwu
56988944b5 No need to dup fd 2021-11-12 01:54:48 -08:00
topjohnwu
b8c1588284 Always unload zygisk after specialize 2021-11-07 13:05:44 -08:00
topjohnwu
63f670fc36 Move first stage unload before fork 2021-11-02 21:53:33 -07:00
topjohnwu
d232cba02d Fix first stage unload 2021-11-02 04:12:56 -07:00
Nullptr
e34e04af04 Make Api functions inline
Make Api functions inline to avoid duplicate symbols when including api.hpp in multiple cpps
2021-10-31 10:55:41 -07:00
topjohnwu
34c36984e9 Stop extreme verbose logging 2021-10-27 04:00:40 -07:00
topjohnwu
8bd6aca0dd DenyList unmount without magiskd 2021-10-27 04:00:40 -07:00
topjohnwu
983b74be77 Pass MAGISKTMP over to zygote 2021-10-27 03:25:54 -07:00
topjohnwu
ea75a09f95 Make zygisk survive zygote restarts
Close #4777
2021-10-27 01:53:16 -07:00
topjohnwu
7496d51580 Make zygiskd ABI aware 2021-10-23 14:38:30 -07:00
topjohnwu
4194ac894c Support setting more options 2021-10-21 03:20:04 -07:00
topjohnwu
8d0dc37ec0 Use SO_PEERSEC to get client secontext 2021-10-19 23:46:38 -07:00
topjohnwu
8276a0775d Fix API doc 2021-10-17 05:42:33 -07:00
LoveSy
abfb3bb3bb
Fix always log hook fails 2021-10-17 05:00:31 -07:00
topjohnwu
d0fc372ecd Implement Zygisk companion process 2021-10-17 04:36:18 -07:00
topjohnwu
e8ae103d5f Update jni hooks 2021-10-14 02:43:56 -07:00
topjohnwu
b0198dab6c Update Zygisk logging 2021-10-14 02:13:23 -07:00
topjohnwu
c8ac6c07b0 Load Zygisk modules 2021-10-13 04:52:02 -07:00
topjohnwu
27814e3015 Minor Zygisk API changes 2021-10-09 11:53:40 -07:00
topjohnwu
f7aed10ea2 Fix friend template function 2021-10-08 19:17:31 -07:00
topjohnwu
410bbb8285 Update Zygisk APIs 2021-10-05 22:42:55 -07:00
topjohnwu
f56ea52932 Add public Zygisk API
Still WIP
2021-10-05 03:53:22 -07:00
topjohnwu
f642fb3b99 Properly handle child zygote
Close #4720
2021-09-24 01:23:58 -07:00
topjohnwu
e68dd866a3 Only create app_id_map if necessary 2021-09-24 00:22:19 -07:00
topjohnwu
05c4ad01d5 Move first stage unload into second stage 2021-09-22 19:33:08 -07:00
topjohnwu
12647dcf30 Improve memory map tricks
- In `unmap_all`, replace readable pages atomically with mmap + mremap
- Create new function `remap_all` to replace pages with equivalent
  anonymous copies to prevent simple maps name scanning
2021-09-22 19:14:05 -07:00
topjohnwu
da38f59e62 Only run destructor if necessary 2021-09-22 02:52:33 -07:00
topjohnwu
cf4ef54dc5 Unload first stage on main thread 2021-09-22 02:46:07 -07:00
topjohnwu
12e9873514 Update zygisk entry implementation 2021-09-22 00:14:22 -07:00
topjohnwu
82c7662cdf Cache Magisk app ID for performance 2021-09-20 05:47:15 -07:00
topjohnwu
4f0bced53e Track app ID instead of UID 2021-09-20 05:08:25 -07:00
topjohnwu
f1b6c9f4aa Refresh uid_map on package.xml change 2021-09-20 04:42:06 -07:00
topjohnwu
46e8f0779f Move denylist code into zygisk 2021-09-18 14:50:11 -07:00