Commit Graph

6385 Commits

Author SHA1 Message Date
0e851cdcf8 Always fetch network state on process onStart 2023-03-19 04:11:59 -07:00
af054e4e31 Bump minSdk to 23 2023-03-17 04:24:26 -07:00
33fb4653f0 Sanitize any bad chars from mount_apex apex_manifest.pb string parsing
For example, Lineage's com.android.ondevicepersonalization apex_manifest.pb has a # char, which strings keeps in its output, and breaks the mount for that apex before this fix
2023-03-17 02:44:36 -07:00
d9f0aed571 Fix unpack -n and repack -n of ZIMAGE kernel 2023-03-17 02:00:46 -07:00
98813c24fb Drop trailing garbage of gzip decompress
I previously refered to minigzip from libz which copies all trailing
data to the output when decompressing. However, gzip, on the other
hand, drop trailing garbage by default. Consider ZIMAGE append
the kernel size with zero padding, we should drop trailing garbage
as well.
2023-03-17 02:00:25 -07:00
3cc81bb3fd Cleanup ObservableList implementation 2023-03-17 01:40:28 -07:00
366dd52419 Update AGP 2023-03-16 04:18:03 -07:00
fe6b658c02 Use MenuProvider 2023-03-09 18:05:37 -08:00
3cf66d1c57 Fix currentFocus
Looks like currentFocus does not always exist even after setContentView,
so I hereby use another way to check if setContentView is called
2023-03-09 17:52:38 -08:00
382568bd3c Cleanup filterable list implementation 2023-03-09 17:45:00 -08:00
d130aa02a1 Do not always create new adapter 2023-03-09 16:00:08 -08:00
1a1646795f Support untrusted_app_32 2023-03-09 02:17:30 -08:00
d52ea1b068 Postpone showMainUI when activity has stopped
Co-authored-by: topjohnwu <topjohnwu@gmail.com>
2023-03-07 21:04:04 -08:00
e14f7b6908 No KeyDispatch or OnBackPress when no currentFocus 2023-03-07 20:20:35 -08:00
4709a32641 Fix mkdir
Co-authored-by: LoveSy <shana@zju.edu.cn>
2023-03-07 01:47:26 -08:00
71b7f52663 Release new canary build 2023-03-06 05:32:08 -08:00
981ccabbef No support for partitions w/o symlink in /system 2023-03-06 05:23:40 -08:00
9e07eb592c Fix make private before remount 2023-03-06 05:18:16 -08:00
9555380818 Replace parse_mnt with parse_mount_info 2023-03-06 05:09:12 -08:00
f80d5d858e Update AGP 2023-03-06 05:08:58 -08:00
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
1aade8f8a8 No greedy match to find parent mount point
This fixes /sys is considered as a parent mount point of /system
2023-03-03 11:09:03 -08:00
b9213b7043 Remove redundant stub.apk 2023-03-03 11:07:36 -08:00
4af72324f4 Fix gradle cache 2023-03-03 02:39:22 -08:00
b6ea5b8984 Fix SYSTEM_ROOT not passed to boot patch 2023-03-02 23:39:50 -08:00
c279e08c88 Release new canary build 2023-03-02 21:35:14 -08:00
2717feac21 Fix stub APK building in app 2023-03-02 21:27:48 -08:00
8adf27859d Build script adjustments 2023-03-02 20:32:46 -08:00
307cf87215 Fix build script 2023-03-02 20:32:46 -08:00
ca31412c05 Update strings.xml 2023-03-02 14:34:08 -08:00
f59fbd5dca Filter duplicate mount points
This prevents umounting existing overlay mount points
2023-03-02 14:33:50 -08:00
2285f5e888 Fix build script 2023-03-02 03:02:10 -08:00
da36e5bcd5 Make worker private 2023-03-02 02:25:44 -08:00
4ed9f57fdc Update ota.md (#6374)
Specified the steps of the OTA install process so there is less confusion about what step 1 and 2 entail.
2023-03-02 02:23:19 -08:00
ea7be6162f install.md: Mention Heimdall beside Odin
Proven to work with Magisk 25.2, LineageOS 18.1, SM-A520F.
2023-03-02 02:21:14 -08:00
3726eb6032 Deny init relabel to adb_data_file
Co-authored-by: 残页 <a1364259@163.com>
Co-authored-by: LoveSy <shana@zju.edu.cn>
2023-03-02 02:20:38 -08:00
6e918ffd68 Remove fetchCustomUpdate 2023-03-02 02:05:38 -08:00
4772868d6a Move REMOUNT_ROOT 2023-03-02 02:05:38 -08:00
78df677a42 Use /data/adb/modules directly 2023-03-02 02:05:38 -08:00
85a4b249b3 Skip copy old rule 2023-03-02 02:05:38 -08:00
d06e9a0b51 Allow R8 to delete fetchCanary 2023-03-02 02:05:38 -08:00
5eb774a2ad Fix typo 2023-03-02 02:05:38 -08:00
cbbbbab483 Release new canary build 2023-02-27 23:16:54 -08:00
e5641d5bdb Fix avd-magisk 2023-02-27 23:00:42 -08:00
a721206c6f Update items in the right thread 2023-02-27 23:00:21 -08:00
c7a27481f9 Update proguard rules to fix module page crash 2023-02-27 20:50:24 -08:00
594c304634 Fix release build 2023-02-26 22:35:20 -08:00
d0ec387c28 Release new canary build 2023-02-26 15:06:33 -08:00
7dbfba76bf Umount by tmpfs id 2023-02-26 14:23:11 -08:00
2a4aa95a6f Identify tmpfs used by magisk 2023-02-26 14:23:11 -08:00