Commit Graph

70 Commits

Author SHA1 Message Date
osm0sis 18fe0e6442 Fix scripts
manager.sh + boot_patch.sh:
- all listed files from boot_patch.sh header are required for boot patching, but stub.apk was being removed so install_magisk via addon.d.sh would fail without it; leave it in place

addon.d.sh:
- remove old redundant recovery_actions call (it's also performed by setup_flashable in initialize)
- print ABI to match flash_script.sh output

boot_patch.sh:
- catch and abort on any errors from ramdisk.cpio patching in the future

util_functions.sh:
- fix hiding of mount_partitions /system_root umount stderr
- quote mount_apex .pb DEST name parsing charset for safety even though both work

Fixes #6828
2023-04-08 21:13:40 -07:00
zjw a70c73bffd Fix config file path
$MAGISKTMP was redefined in commit 4e2b88b
2023-04-08 21:10:54 -07:00
LoveSy 15cab86152 Make module mirror read only 2023-04-02 22:03:02 -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
LoveSy 7048aa1014 Rename sepolicy.rules -> rules 2023-03-21 00:40:11 -07:00
vvb2060 84e1bd7bc3 Refactor sepolicy.rules resolve app 2023-03-21 00:40:11 -07:00
LoveSy b9213b7043 Remove redundant stub.apk 2023-03-03 11:07:36 -08:00
topjohnwu a54114f149 Pre-grant permissions if possible 2022-08-23 05:09:50 -07:00
topjohnwu 6f74ed6ceb Cleanup manager.sh 2022-06-13 01:21:24 -07:00
Chris Renshaw 10e236abdf scripts: fix remaining instances of && ||
Looks like I may have missed this in https://github.com/topjohnwu/Magisk/commit/ce84f1762c65e39b59b0677e7f50f1104afe78eb originally
2022-06-12 11:00:09 -07:00
残页 2248af00f3 Fix #5673
util_functions.sh overrides `get_flags` function (defined in manager.sh), which sets `RECOVERYMODE` and causes `check_boot_ramdisk` not overriding the incorrect value.
2022-06-12 00:32:34 -07:00
vvb2060 2fb46a11dc Check MAGISKBIN/magiskpolicy 2022-04-02 04:26:47 -07:00
topjohnwu 21505a7470 Update scripts for PATCHVBMETAFLAG 2022-01-12 02:29:34 -08:00
vvb2060 fd7bf2bc3a Support PATCHVBMETAFLAG env variable 2022-01-12 02:29:34 -08:00
南宫雪珊 baa19f0ccf Rewrite app installation
Fix  #4960
2021-12-14 05:20:29 -08:00
osm0sis 68ac409bfd Scripts fixes and improvements
- ensure all scripts use $NVBASE $MAGISKBIN $POSTFSDATAD and $SERVICED where appropriate
- simplify new grep_cmdline() using xargs and more sed
- show correct active sepolicy $RULESDIR on devices with no encryption
- add support for Android 12 .capex (compressed apex) files
2021-11-20 14:17:02 -08:00
vvb2060 9396288ca2 Check util_functions.sh version 2021-08-28 20:52:05 -07:00
topjohnwu 97c1e181c5 Remove unused file 2021-05-11 21:47:46 -07:00
osm0sis 0a4e7eea41 scripts: clean up remaining Manager references 2021-03-24 03:06:57 -07:00
topjohnwu bec5edca84 Avoiding using shell I/O 2021-01-29 05:15:22 -08:00
topjohnwu ec31bb9a82 Rename scripts 2021-01-24 07:18:14 -08:00
topjohnwu ec8fffe61c Merge Magisk install zip into Magisk Manager
Distribute Magisk directly with Magisk Manager APK. The APK will
contain all required binaries and scripts for installation and
uninstallation. App versions will now align with Magisk releases.

Extra effort is spent to make the APK itself also a flashable zip that
can be used in custom recoveries, so those still prefer to install
Magisk with recoveries will not be affected with this change.

As a bonus, this makes the whole installation and uninstallation
process 100% offline. The existing Magisk Manager was not really
functional without an Internet connection, as the installation process
was highly tied to zips hosted on the server.

An additional bonus: since all binaries are now shipped as "native
libraries" of the APK, we can finally bump the target SDK version
higher than 28. The target SDK version was stuck at 28 for a long time
because newer SELinux restricts running executables from internal
storage. More details can be found here: https://github.com/termux/termux-app/issues/1072
The target SDK bump will be addressed in a future commit.

Co-authored with @vvb2060
2021-01-22 02:29:54 -08:00
topjohnwu 5a71998b4e Stop embedding magisk in magiskinit 2021-01-18 04:25:26 -08:00
topjohnwu a27e30cf54 Update release notes 2021-01-17 06:08:15 -08:00
topjohnwu 0cd80f2556 Update app changelog 2021-01-16 04:42:14 -08:00
topjohnwu 5ce29c30d2 Fix sepolicy copying 2021-01-10 20:16:02 -08:00
topjohnwu b6144ae582 Add v21.2 release notes 2020-12-28 15:35:09 -08:00
vvb2060 6ce9225f52 Check block dev ro status
magisk is shared object, use static busybox instead
2020-12-19 14:12:12 -08:00
topjohnwu 2d5cf8a6fe Push release notes 2020-11-13 04:32:20 -08:00
topjohnwu 2e4dc91b96 Better stub hiding experience 2020-10-17 03:40:43 -07:00
topjohnwu fbcbb20178 Update app changelog 2020-10-08 01:06:37 -07:00
topjohnwu 8dc62a0232 Update docs and README 2020-10-06 05:10:19 -07:00
topjohnwu 64effe9385 Add v21.0 release notes 2020-10-03 03:30:22 -07:00
topjohnwu 46de1ed968 Better handling of data encryption 2020-09-28 04:45:56 -07:00
topjohnwu ca9f9fee9a Update device state detection 2020-09-23 04:49:38 -07:00
vvb2060 49559ec0ec try root if adb install fail 2020-09-10 01:02:50 -07:00
topjohnwu 31681c9c5f Remove ProcessPhoenix 2020-08-23 00:12:58 -07:00
vvb2060 a4c1ddd9f2 Use uid 2000 to install patched apk 2020-08-15 22:16:15 -07:00
vvb2060 08818e8542 Remove force_pm_install
gms package verifier only checks the `notBefore` value of the certificate
2020-07-04 03:00:51 -07:00
topjohnwu 3c78344812 Refactor version handling 2020-06-28 06:52:02 -07:00
topjohnwu 85755e3022 Tone down our DTB patching
- Do not attempt to patch DTB anywhere outside of boot images as they
are no longer essential. This makes Magisk installation to only modify
strictly boot/recovery partitions again.
- The only required patch for DTB is to strip verity out of partitions
2020-05-05 03:29:36 -07:00
topjohnwu 93aedcfeb7 Update all hardcode paths in app and script 2020-04-05 01:27:07 -07:00
topjohnwu 9471577b3b Properly detect advanced device info 2020-02-10 16:33:58 -08:00
topjohnwu e85d5e54e2 Update root shell preparation 2020-02-10 16:31:41 -08:00
topjohnwu 5fb071d80b Merge app scripts 2020-02-10 03:36:28 -08:00
topjohnwu 984997e73b Update paths
Close #2244
2020-01-11 12:37:08 +08:00
topjohnwu 7db523071d Update changelog 2020-01-10 01:41:39 +08:00
topjohnwu e0d02a61a9 Add v7.5.0 changelog 2020-01-02 12:09:36 +08:00
topjohnwu 1b4a3d2d9f More precise env detection in non-root 2020-01-01 14:19:24 +08:00
topjohnwu 3049a81c3b Update several scripts
- Update backup format as we might be patching multiple partitions
- Update uninstaller to remove files in persist (sepolicy.rule)
- Better handling for dtb/dtbo partition patching
2020-01-01 14:02:44 +08:00