Commit Graph

587 Commits

Author SHA1 Message Date
topjohnwu e483d6befe Do not go through a fragment for auth 2023-10-17 17:39:31 -07:00
topjohnwu 75d905a56d Fix device detection scripts and logic 2023-08-28 22:13:36 -07:00
topjohnwu b1363ee479 Do not allow user to configure boot vbmeta patching 2023-08-28 22:13:36 -07:00
残页 189c03c047 Add canyie to developer list 2023-08-28 13:21:58 -07:00
vvb2060 c6efb51f61 sulog: add more info 2023-08-02 21:18:05 -07:00
vvb2060 ab9ee449e4 suBiometric: fix open app on second user will auto disable biometric
second user does not support biometric, but the config of app ignores user
2023-08-02 21:16:06 -07:00
vvb2060 9571b6f9be SuperuserViewModel: fix updatePolicy
Starting biometrics may cause the SuperuserFragment to lost focus. After onResume(), doLoadWork() will refresh the itemsPolicies, so notify property changed will work on wrong items. Fixed by snapshotting items to be refreshed before starting biometrics.
2023-08-02 09:29:14 -07:00
vvb2060 207d7fd3f6 SuRequestViewModel: fix await RootService on the main thread 2023-08-02 09:21:25 -07:00
topjohnwu cf1bc82537 Random small refactoring 2023-07-24 23:49:20 -07:00
topjohnwu 39383229d1 Update dependencies
Close #7128
2023-07-20 18:35:53 -07:00
topjohnwu 56707b8119 Make FilterList more accurate 2023-04-08 18:32:00 -07:00
LoveSy f29cc26103 Correctly get displayName of live uri 2023-04-06 02:03:09 -07:00
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 5117dc1a31 Reorganize code 2023-04-03 17:47:07 -07:00
LoveSy aa785b5845 Show confirm dialog when installing local module
It can avoid miss click

Co-authored-by: 南宫雪珊 <vvb2060@gmail.com>
2023-04-02 21:33:13 -07:00
topjohnwu 0b987dd0b0 Cleanup more databinding implementation 2023-03-31 00:05:33 -07:00
LoveSy 004b193f69 Fix installation crash 2023-03-22 02:44:14 -07:00
vvb2060 84e1bd7bc3 Refactor sepolicy.rules resolve app 2023-03-21 00:40:11 -07:00
LoveSy 4de93cfd4b Use RV to show Magisk logs 2023-03-19 23:47:29 -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 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
LoveSy d52ea1b068 Postpone showMainUI when activity has stopped
Co-authored-by: topjohnwu <topjohnwu@gmail.com>
2023-03-07 21:04:04 -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 a721206c6f Update items in the right thread 2023-02-27 23:00:21 -08:00
vvb2060 5520f0fbf7 Add stub version to apk comment 2023-02-26 14:23:02 -08:00
topjohnwu 78a444d601 Wait for root service to bind 2022-12-30 15:52:41 -08:00
vvb2060 13c2695e98 simplify denylist rm 2022-12-13 14:11:32 -08:00
topjohnwu 357d913f18 Dynamically generate component names at runtime 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 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
vvb2060 8bd4760b00 Fix build 2022-08-23 01:32:32 -07:00
canyie fed4f1b50f Collect kernel version and environment variables in log 2022-08-22 12:52:13 -07:00
vvb2060 dd565a11ea Fix outdated state 2022-08-08 13:59:56 -07:00
vvb2060 38abad1e44 Fix app state 2022-07-01 15:12:50 -07:00
topjohnwu 9fd1f41e8b Always relaunch process after package migration 2022-06-19 02:09:14 -07:00
canyie 71205bc530 Anchor Snackbar above reboot FAB in FlashFragment 2022-06-12 11:00:36 -07:00
topjohnwu 515f81944c Move coroutine job into its own class 2022-06-10 04:12:31 -07:00
topjohnwu 46d4708386 Decouple state from BaseViewModel 2022-06-10 02:13:25 -07:00
topjohnwu aabc36f86b Maintain separate flash screen state 2022-06-10 00:33:53 -07:00
nikk gitanes e0d5d90267 fix restart button focus on flash result 2022-06-10 00:33:53 -07:00
topjohnwu 482a5b991b Don't always refresh on network state change 2022-06-09 23:28:46 -07:00
vvb2060 42606efe56 Always remove task 2022-06-09 21:02:31 -07:00
vvb2060 c495b3d183 Remove request uninstall code
unreachable
2022-06-06 02:51:11 -07:00