Commit Graph
29 Commits
Author SHA1 Message Date
Wang Han 3a37e8c9c5 Don't clone attributes for magisk symlinks
This avoids use existing attributes for su, which will obviously break
magisk functions.
2025-07-01 02:16:16 -07:00
Wang Han 810174ef73 Ignore set_context() error if magisktmp is /sbin
recreate_sbin() will bind mount original files in /sbin to tmpfs /sbin,
so we have no choice but just log here to let the loop continue.
2025-06-30 17:39:54 -07:00
Wang Han 39f2940bd1 Skip symlink in restore_tmpcon()
If magisktmp is /sbin, there may exist files which is symlink to files in
root dir. As root is RO, setcontext will fail and break iterating loop.
2025-06-16 11:09:33 -07:00
Wang Han 0b494ed7df Avoid throwing error if chmod a symlink
It is possible that we want to clone attributes of a regular file to a
symlink. In this case, we don't need to error out if chmod fails. Just
skip it.
2025-06-06 17:08:34 -07:00
Wang Han 0e86d4dbcb Fix file pointer leak on error path 2025-06-03 00:34:52 -07:00
Wang Han 5e050d7456 Check binary existence before injecting zygisk bins 2025-06-03 00:33:40 -07:00
Wang Han fada8b148a Ensure manager can always bypass su access policy
This fixes https://github.com/topjohnwu/Magisk/issues/9050.
2025-05-21 16:14:46 -07:00
Wang Han a20a2a8fa0 Recognize Samsung custom policy version path 2025-05-09 11:03:58 -07:00
Wang Han 52ef1d1cb2 Simplify matching selinux context of child zygote (#8845) 2025-03-11 01:27:15 -07:00
Wang Han 8e73536e02 Remove unused hasGMS variable 2025-03-09 00:16:25 -08:00
Wang Han 442d0b5ddc Delete bootctl binary if execution fails
New devices may use AIDL bootctrl HAL, so if bootctl hal-info fails,
simply remove the temp file and return.
2025-03-01 22:43:55 -08:00
Wang HanandLoveSy 5e35703091 Ensure target path exists before mknod
Co-authored-by: LoveSy <shana@zju.edu.cn>
2025-02-12 01:13:56 +08:00
Wang HanandLoveSy a14fc90f07 Fix fetching notification settings from db (#8761)
Co-authored-by: LoveSy <shana@zju.edu.cn>
2025-02-04 17:42:21 +08:00
Wang Han 46980819c0 Expose safe mode option on 28+ 2025-01-31 12:20:02 +08:00
Wang Han 6ea740b5ab Skip clearing install dir if not needed 2025-01-27 12:14:55 +08:00
Wang HanandLoveSy 23eff70883 Fix repeated binding of first argument
Co-authored-by: LoveSy <shana@zju.edu.cn>
2025-01-19 11:57:09 +08:00
Wang HanandLoveSy d9c2bffc9f Avoid hardcoding max fd size
Android changed max fd limit to 32768 since Android 9:
https://github.com/aosp-mirror/platform_system_core/commit/cb5fccc83c6c757f25436884e96c318f72743ffd

Co-authored-by: LoveSy <shana@zju.edu.cn>
2025-01-19 11:54:26 +08:00
Wang Han 7c1d2ec61e zygisk: Let client send arch info 2025-01-11 00:15:10 +08:00
Wang Han 53e401fa2d Perform authentication if needed for AutomaticResponse setting 2024-12-27 16:00:02 -08:00
Wang Han 704541aef2 Use /metadata/watchdog as preinit dir if exists
Since Android 15, all domains are allowed to search /metadata so preinit
dir will be exposed. Use /metadata/watchdog when /metadata is chosen as
preinit device, and the dir is available (since Android 11).
2024-12-27 10:35:05 -08:00
Wang Han dadba44cf9 Update module installer guide about META-INF 2024-12-17 16:36:40 -08:00
Wang Han 33f70f8f6d Update zh-rCN strings 2024-09-17 15:01:10 -07:00
Wang Han 53d7cbc11b Clarify magiskboot requirements for repacking img 2024-09-08 01:13:46 -07:00
Wang Han 44f005077d Don't copy sepolicy.rule to /persist on boot
* This seems to be a logic that has been abandoned for a
   long time. Now we automatically choose which partition
   to store sepolicy.rule. Furthermore, touching /persist is
   what we should avoid doing whenever possible.
2021-04-15 05:01:03 -07:00
Wang Han e136fb3a4f Remove outdated sepolicies
* Support deodexed ROM: This should not be done and dexpreopt is mandatory since P
   Xposed: Xposed handles them just fine, at least in the latest version 89.3
   suMiscL6: For whatever audio mods, a leftover of phh time
   Liveboot and suBackL6: Was for CF.lumen and LiveBoot, not needed now

 * Also cleanup binder sepolicies since we allow all binder transactions.
2021-04-09 21:34:51 -07:00
Wang Han 4c7bdbb284 Fix crashing when selecting release notes on some devices 2017-03-26 23:55:11 +08:00
Wang Han 93598d3a51 Fix download button overlay on repo description when expanded 2017-01-06 02:43:16 +08:00
Wang Han 53aebcfb1e Fix MagiskHide Fragment Crash when freshing 2017-01-06 02:43:16 +08:00
Wang Han bb2467d2ac Handle Google API Connection Problems 2017-01-06 02:43:16 +08:00