Commit Graph
58 Commits
Author SHA1 Message Date
canyieandJohn Wu ac8d4200e1 Add nativeSpecializeAppProcess signature for XR devices running 14
Build fingerprint: google/gms_sdk_xr64_x86_64/emulator64_x86_64:14/UP1A.231005.007.A1/13953962:userdebug/test-keys
2026-01-31 13:51:41 -08:00
残页andJohn Wu 335146a6a2 Update supported API levels 2025-08-17 23:58:43 -07:00
5b29fefc65 Replace LOGE with LOGW so the process don't abort
Co-authored-by: 南宫雪珊 <vvb2060@gmail.com>
2024-09-25 11:59:58 -07:00
残页andJohn Wu 16a168535d Check sepolicy database version in add_xperm_rule
Fix #8344
2024-09-25 11:59:58 -07:00
残页andJohn Wu 46a34e19bc Check vendor boot ramdisk table size 2024-07-31 16:59:51 -07:00
残页andJohn Wu c8fe0f5524 Catch possible exceptions when the receiver is already unregistered 2024-07-23 02:06:15 -07:00
canyieandJohn Wu 825c6c4316 Reverse format template argument order 2024-03-06 01:39:16 -08:00
canyieandJohn Wu f00408c793 Fix zygote restart monitor 2024-03-06 01:39:16 -08:00
残页andJohn Wu 4d5510be4f Prompt users to use reboot button in System Updates
So the update engine can write verify info of partitions which fixes bootloop on newer Pixel devices
2024-02-19 02:14:12 -08:00
残页andJohn Wu 94d3daeadf Fix Sony init.real check 2024-01-17 16:09:50 -08:00
残页andJohn Wu c013a349af Update install guide
- Remove boot vbmeta patching because the checkbox is removed in b1363ee
- Remove meaningless slot argument from `fastboot flash` as it will automatically flash the active slot. Fix #7571
2023-12-10 23:37:02 +08:00
canyieandJohn Wu 1fe9ede940 Update selinux to disable validation for policydb 2023-12-08 16:50:45 +08:00
canyieandJohn Wu 63eef153de Warn about unsupported installation methods 2023-11-17 13:58:41 -08:00
canyieandJohn Wu 68442f38ac Misc changes
- actions: Update all actions/checkout references to v4
- magiskboot: Add missing new line to dtb help message
- docs: Update documents, fix some errors and remove outdated info
2023-11-17 13:58:41 -08:00
残页andGitHub ecb31eed40 Prevent Zygisk from closing new fds created by Zygote itself 2023-11-08 00:34:38 -08:00
残页andJohn Wu 32c5153e8e Increase boot timeout to 600s 2023-10-16 01:20:25 -07:00
canyieandJohn Wu 187f583c95 Fix $RECOVERYMODE from config being incorrectly overridden
Move legacy SAR checking logic into mount_partitions, and avoid calling get_flags before check_boot_ramdisk
Fix #7346
2023-10-10 15:53:18 -07:00
残页andJohn Wu d868ff3080 AVD test release builds as well 2023-10-10 15:52:41 -07:00
残页andJohn Wu 6f77f190f2 Fix processPayload 2023-08-31 20:30:10 -07:00
残页andJohn Wu de00f1d5a9 Always check mounts to detect legacy SAR on bootmode 2023-08-30 01:02:19 -07:00
残页andJohn Wu e9b9bf987b Fix syntax error in util_functions.sh 2023-08-29 15:33:03 -07:00
残页andJohn Wu 189c03c047 Add canyie to developer list 2023-08-28 13:21:58 -07:00
残页andJohn Wu 6141bb5bb3 Fix MagiskInstaller.patchBoot() error catching 2023-07-21 12:05:33 -07:00
残页andJohn Wu d390ca2fdf Avoid using IconCompat.createFromIcon() that doesn't support bitmap icon 2023-07-17 21:46:47 -07:00
残页andGitHub 1a16004b20 Add help message for magisk --preinit-device 2023-04-08 18:32:34 -07:00
残页andGitHub b696dae808 Specify foregroundServiceType for DownloadService 2023-04-02 02:20:49 -07:00
ae34659b26 No kernel repack if it isn't patched at all
It turns out that decompressing and recompressing the kernel is enough to break booting on many devices that use MT6763.
Fix #5124, fix #6204, fix #6566 

Co-authored-by: LoveSy <shana@zju.edu.cn>
Co-authored-by: 南宫雪珊 <vvb2060@gmail.com>
2023-02-17 15:00:14 -08:00
canyieandJohn Wu 6ecc04a4df Fix auto install stub 2023-01-23 01:55:28 +08:00
canyieandJohn Wu 15a7e9af57 Fix ResourcesProvider being closed 2023-01-20 19:32:22 +08:00
canyieandJohn Wu 2839978cc1 Use null oat dir in root service only 2023-01-12 22:38:14 +08:00
canyieandJohn Wu e73f87b758 Update LSPlt 2023-01-12 01:18:56 +08:00
canyieandJohn Wu bd0409fd15 Fix busybox filename 2023-01-12 01:18:41 +08:00
canyieandJohn Wu babdfe80cb Fix stub resources load on Android 5 2023-01-12 01:12:56 +08:00
canyieandJohn Wu cb39514705 Fix NotificationService implementation
- Fix #6385. (Maybe the reason is, the call to stopForeground() with STOP_FOREGROUND_DETACH ensures the notification is shown so it reposts the notification?)
- Use FOREGROUND_SERVICE_IMMEDIATE on Android 12+ to make sure the downloading notification always shows immediately
2023-01-09 00:10:52 +08:00
canyieandJohn Wu 9474750bdf Close fd of erroneous daemon socket connections 2022-09-13 04:29:29 -07:00
canyieandJohn Wu fed4f1b50f Collect kernel version and environment variables in log 2022-08-22 12:52:13 -07:00
canyieandJohn Wu 1d0b873950 Fix sepolicy attribute rule parsing
Fix #6166
2022-08-07 03:35:50 -07:00
canyieandJohn Wu 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
canyieandJohn Wu 1a964e78dd Support 32-bit emulators
This would be helpful when debugging arch-related bugs, there is no reason to prevent it.
2022-07-23 02:27:50 -07:00
canyieandJohn Wu 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
canyieandJohn Wu 00247c7901 Fix meizu non-SAR 2SI compatibility again
Meizu devices using 2SI won't switch root to /system and still on rootfs, and /init is the 1st stage's, which cannot handle the 2nd stage. So we have to manually execute /system/bin/init for the 2nd stage.
2022-06-19 01:22:18 -07:00
canyieandJohn Wu 754e690274 Fix config backup for legacy SAR 2022-06-14 02:57:47 -07:00
canyieandJohn Wu 71205bc530 Anchor Snackbar above reboot FAB in FlashFragment 2022-06-12 11:00:36 -07:00
canyieandJohn Wu 89ff3c6572 Don't backup ramdisk created by Magisk
Fix topjohnwu#5938, fix topjohnwu#5944
2022-06-08 04:53:43 -07:00
canyieandJohn Wu aadb2d825c Also set snackbar container for FlashFragment 2022-06-05 05:36:04 -07:00
canyieandJohn Wu 0cc29350a0 Navigate only if user has not left the fragment 2022-05-28 22:40:09 -07:00
canyieandJohn Wu 4f1a1879e5 Misc QoL changes
- su: Preserve correct capacity to avoid vector reallocation
- su: Properly format code
- daemon: Remove useless `if`
- docs: Remove outdated info
2022-05-06 01:01:58 -07:00
canyieandJohn Wu 18566715e1 Fix MAGISKTMP unmount for CLI 2022-04-10 01:44:16 -07:00
canyieandJohn Wu b4099fc5f9 Support sepolicy.unlocked
Fix topjohnwu#4914
2022-04-08 02:24:20 -07:00
canyieandJohn Wu 448384af06 Guard su request IPC
Previously `read_string()` calls `std::string.resize()` with a int read from remote process. When I/O error occurs, -1 will be used for resizing the string, `std::bad_alloc` is thrown and since magisk is compiled with `-fno-exceptions`, it will crash the whole daemon process.

May fix topjohnwu#5681
2022-04-06 21:15:07 -07:00
canyieandJohn Wu 3f840f53a0 Check device tree fstab entries are compatible
Fix topjohnwu#5664
2022-04-02 04:28:30 -07:00
canyieandJohn Wu 24505cd111 Prevent destroyed activities from being reused
The adapter will cache a LayoutInflater which refers the current activity, and the ViewModel object will keep alive until activity finished. After activity recreates (e.g. split-screen), it will use the cached LayoutInflater which refers a destroyed activity and crashes. This also is a memory-leak, according to Google's official document, ViewModel shouldn't refer activity. See https://developer.android.com/topic/libraries/architecture/viewmodel

Fix topjohnwu#5413
2022-03-07 01:54:02 -08:00
canyieandJohn Wu ebb0ec6c42 Make xmmap() returns nullptr when fails
In the constructor of mmap_data, there are two possible values when fails: nullptr if fstat() fails, and MAP_FAILED if mmap() fails, but mmap_data treated MAP_FAILED as valid address and crashes.
2022-02-08 00:49:47 -08:00
canyieandJohn Wu c921964938 Make sure busybox can be executed recursively
Busybox will execute itself. On some older Samsung devices, when it is located in /data, it will not have rights to execute other programs including itself. We should also relocate busybox in this case to workaround Samsung bullshit.
See topjohnwu/ndk-busybox@bdc8655
Fix the "app doesn't detect installed Magisk" issue in topjohnwu#4174
2022-01-30 08:24:32 -08:00
canyieandJohn Wu 454e5dfc5d Show confirmation dialog before restore app 2022-01-21 01:35:11 -08:00
canyieandJohn Wu 5f4cd50cc4 Properly prevent fix env dialog from constantly showing
ViewModel has been reconstructed when switching fragment so we lost previous state.
2022-01-20 03:38:28 -08:00
b0fba6ce5b Optimize navigation back stack
Fix topjohnwu#4333

Co-authored-by: LoveSy <shana@zju.edu.cn>
2022-01-20 03:38:00 -08:00
canyieandJohn Wu 1f5992f2c2 Fix classloader when restoring bottom nav state 2022-01-20 03:36:31 -08:00