Commit Graph
100 Commits
Author SHA1 Message Date
topjohnwu 22e023b58d Set notes on main thread 2023-04-06 00:53:06 -07:00
topjohnwu 7be958e35d Fix crash when revoke root permission 2023-04-06 00:40:26 -07:00
topjohnwu 69b66ef637 Make core package more self contained 2023-04-05 23:04:33 -07:00
topjohnwu daf8653c38 Release new canary build 2023-04-05 11:13:51 -07:00
topjohnwu e2545e57cf Update README badges 2023-04-05 11:07:40 -07:00
topjohnwu 7cb0909c70 Release Magisk v26.0 2023-04-05 11:02:17 -07:00
topjohnwu cc5ff36165 Revert "Cancel recursive bind"
This reverts commit a18a440236.
2023-04-05 10:47:13 -07:00
topjohnwu 18b1ef6c29 Only restore JNIEnv in constructor 2023-04-05 10:13:50 -07:00
topjohnwu 6c3519923d Make things more obvious 2023-04-05 04:01:07 -07:00
topjohnwu 9ea859810d Update api.hpp copyright notice 2023-04-05 01:54:56 -07:00
topjohnwu 637a8af234 Add v26.0 release notes 2023-04-05 01:42:42 -07:00
topjohnwu 39d1d23909 Release new canary build 2023-04-04 03:00:50 -07:00
topjohnwu 24ba4ab95b Better AVD support 2023-04-04 02:04:49 -07:00
topjohnwu 762b70ba9d Better string split implementation 2023-04-03 18:50:36 -07:00
topjohnwu 41b77e4f25 Make base as template argument for optimization 2023-04-03 18:32:11 -07:00
topjohnwu 2087e47300 Get random separately 2023-04-03 18:32:11 -07:00
topjohnwu 5117dc1a31 Reorganize code 2023-04-03 17:47:07 -07:00
topjohnwu 732a8260c2 Update dependencies 2023-04-02 02:13:47 -07:00
topjohnwu 23b1b69110 Consolidate zygisk cleanup routines 2023-04-01 03:37:17 -07:00
topjohnwu 3f4f4598e8 Better AVD support 2023-03-31 17:21:12 -07:00
topjohnwu 0b987dd0b0 Cleanup more databinding implementation 2023-03-31 00:05:33 -07:00
topjohnwu b089511e91 Update Android Studio 2023-03-30 13:35:13 -07:00
topjohnwu 4417997749 Make sure ro mmap region is not overwritten 2023-03-21 15:50:43 -07:00
topjohnwu 76405bd984 Add more comments 2023-03-21 00:40:11 -07:00
topjohnwu 4e2b88b3d0 Rename rules to preinit
It is possible that we will allow more preinit files for modules.
Rename the partition and folders from rules to preinit.
2023-03-21 00:40:11 -07:00
topjohnwu 0e851cdcf8 Always fetch network state on process onStart 2023-03-19 04:11:59 -07:00
topjohnwu af054e4e31 Bump minSdk to 23 2023-03-17 04:24:26 -07:00
topjohnwu 3cc81bb3fd Cleanup ObservableList implementation 2023-03-17 01:40:28 -07:00
topjohnwu 366dd52419 Update AGP 2023-03-16 04:18:03 -07:00
topjohnwu fe6b658c02 Use MenuProvider 2023-03-09 18:05:37 -08:00
topjohnwu 382568bd3c Cleanup filterable list implementation 2023-03-09 17:45:00 -08:00
topjohnwu 71b7f52663 Release new canary build 2023-03-06 05:32:08 -08:00
topjohnwu f80d5d858e Update AGP 2023-03-06 05:08:58 -08:00
topjohnwu a1ce6f5f12 Fix race condition when switching root manager
Before this change, the root manager package name is only written into
the database after the repackaged APK is installed. In the time between
the repackaged APK being installed and the package name being written
into the database, if some operation calls `get_manager`, the Magisk
daemon will cache this result and ignore the repackaged APK, even if
the package name is set afterwards, because the cache won't be
invalidated. The result is that the repackaged manager APK will not be
recognized as the root manager, breaking the hide manager feature.

This race condition is more likely to happen when Zygisk is enabled,
because `get_manager` is called with a very high frequency in that case.

To fix the issue, we have to set the new package name into the database
BEFORE installing the repackaged APK. We also stop pruning the
database if the repackaged manager is not found, moving this logic into
the Magisk app. By doing so, we can guarantee that the instant after
the repackaged manager APK is installed, the Magisk daemon will
immediately pick it up and treat it as the root manager.

Another small optimization: when the requester is root, simply bypass
the whole database + manager package check. Since the Magisk app hiding
APK installation proces will call `su` several times to run `pm` under
different UIDs, doing this opimization will reduce the amount of
unnecessary database query + filesystem traversals.
2023-03-06 03:58:58 -08:00
topjohnwu c279e08c88 Release new canary build 2023-03-02 21:35:14 -08:00
topjohnwu 2717feac21 Fix stub APK building in app 2023-03-02 21:27:48 -08:00
topjohnwu 8adf27859d Build script adjustments 2023-03-02 20:32:46 -08:00
topjohnwu 2285f5e888 Fix build script 2023-03-02 03:02:10 -08:00
topjohnwu cbbbbab483 Release new canary build 2023-02-27 23:16:54 -08:00
topjohnwu a721206c6f Update items in the right thread 2023-02-27 23:00:21 -08:00
topjohnwu d0ec387c28 Release new canary build 2023-02-26 15:06:33 -08:00
topjohnwu 85d9756f62 Update Zygisk API documentation 2023-02-26 03:16:13 -08:00
topjohnwu 3d3082bc82 Minor optimizations 2023-02-26 01:14:10 -08:00
topjohnwu 744ebca206 Don't let inter_node upgrade to module_node 2023-02-25 22:05:50 -08:00
topjohnwu 92077ebe53 Refactor module and node implementation 2023-02-25 18:19:46 -08:00
topjohnwu 9b1e173373 Update AGP 2023-02-20 01:03:35 -08:00
topjohnwu 459088024f Update dependencies 2023-02-09 19:53:40 -08:00
topjohnwu cd8a2edefb Reduce unnecessary formatting 2023-01-20 14:41:34 +08:00
topjohnwu 3517e6d752 Handle nullptr char* in Rust 2023-01-20 03:45:16 +08:00
topjohnwu 7fe9db90a1 Update AGP 2023-01-18 12:52:04 +08:00
topjohnwu 8f7d6dfb77 Cleanup unused functions 2023-01-12 23:17:41 +08:00
topjohnwu 636223b289 Cleanup APIs 2023-01-10 02:42:45 +08:00
topjohnwu e38f35eab2 Update libsu
Fix #6488
2023-01-09 03:16:11 +08:00
topjohnwu 78a444d601 Wait for root service to bind 2022-12-30 15:52:41 -08:00
topjohnwu 57d83635c6 Check stub.xz existence 2022-12-26 16:07:04 -08:00
topjohnwu 76fbf4634a Update scripts 2022-12-26 16:07:04 -08:00
topjohnwu 7ce4bd3330 Copy stub APK into output directory 2022-12-26 16:07:04 -08:00
topjohnwu 1b745ae1a0 Use latest build tools 2022-12-26 02:02:21 -08:00
topjohnwu b6d50bea2c Release new canary build 2022-12-26 00:33:02 -08:00
topjohnwu 831a398bf1 Check Python 3.8+ 2022-12-26 00:09:27 -08:00
topjohnwu a848783b97 Guard boot stages more precisely
Close #6468, fix #6148
2022-12-26 00:04:58 -08:00
topjohnwu dadae20960 Remove unused implementations 2022-12-23 17:20:39 -08:00
topjohnwu ed37ddd570 Stricter validation 2022-11-22 14:47:37 -08:00
topjohnwu cf9957ce4d Properly detect SysUI appId
Fix #6322
2022-11-01 02:04:50 -07:00
topjohnwu 44643ad7b3 Restrict pointer aliasing
Close #6354, close #6353
2022-10-31 16:35:33 -07:00
topjohnwu 1e53a5555e Update AGP 2022-10-31 16:00:42 -07:00
topjohnwu 616adc22e1 Support Linux < 3.6 2022-10-31 16:00:42 -07:00
topjohnwu 68874bf571 Release new canary build 2022-10-11 13:33:08 -07:00
topjohnwu e327565434 Release new canary build 2022-10-10 21:44:32 -07:00
topjohnwu c3b4678f6e Properly detect SysUI 2022-10-10 21:28:13 -07:00
topjohnwu 095d821240 Don't use xopen in readlink 2022-09-25 16:35:28 -07:00
topjohnwu e23f23a8b7 Update AGP 2022-09-21 03:09:53 +02:00
topjohnwu 48f829b76e Minor refactoring 2022-09-21 03:09:46 +02:00
topjohnwu 0b82fe197c Update avd_test.sh 2022-09-15 19:45:58 -07: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
topjohnwu a29fc11798 Update libsu
Fix #6255
2022-09-13 04:17:19 -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
topjohnwu 357d913f18 Dynamically generate component names at runtime 2022-08-26 06:31:51 -07:00
topjohnwu 71b0c8b42b Make stub patching 100% offline 2022-08-26 06:31:51 -07:00
topjohnwu cdc66c1ac8 Move patching logic out of AXML 2022-08-26 06:31:51 -07:00
topjohnwu e9af773901 Remove usage of AndroidX CoreComponentFactory 2022-08-26 06:31:51 -07:00
topjohnwu 87bec70d9f Setup notification on app init
Close #6216
2022-08-25 02:24:30 -07:00
topjohnwu f8395a7dc6 Make sure UI and state is in sync 2022-08-23 05:38:19 -07:00
topjohnwu 727c70005e Release new canary build 2022-08-23 05:20:44 -07:00
topjohnwu 38ab6858f0 Do not crash root service in stub 2022-08-23 05:10:18 -07:00
topjohnwu a54114f149 Pre-grant permissions if possible 2022-08-23 05:09:50 -07:00
topjohnwu 7a4a5c8992 Ensure JobService is rescheduled 2022-08-23 04:14:06 -07:00
topjohnwu 928a16d8cc Update app to target API 33
Close #6206
2022-08-23 03:59:09 -07:00
topjohnwu 3f7f6e619a Use VERSION_CODES instead of raw numbers 2022-08-23 01:43:53 -07:00