Commit Graph

36 Commits

Author SHA1 Message Date
6c3896079d Add zygote server notifier 2019-03-05 20:23:27 -05:00
8032bd0bac Introduce /data mirror
Since we switched to imageless Magisk, module files are directly
stored in /data. However, /data is mounted with nosuid, which also
prevents SELinux typetransition to work (auto transition from one
domain to another when executing files with specific context).
This could cause serious issues when we are replacing system critical
components (e.g. app_process for Xposed), because most of them
are daemons that run in special process domains.

This commit introduced /data mirror. Using similar mirroring technique
we used for system and vendor, we mount another mirror that mounts
/data without nosuid flag. All module files are then mounted from this
mirror mountpoint instead of directly from /data.

Close #1080
2019-02-25 06:13:42 -05:00
19ee189468 Separate scripting code 2019-02-15 20:45:05 -05:00
a19c7215d2 Better nice name 2019-02-15 04:31:39 -05:00
ed4df87b57 Remove imgtool 2019-02-12 02:44:46 -05:00
1321f097b8 Remove usage of magisk.img
Mounting ext4 images causes tons of issues, such as unmountable with broken F2FS drivers.
Resizing is also very complicated and does not work properly on all devices.
Each step in either measuring free space, resizing, and shrinking the image is a
point of failure, and either step's failure could cause the module system completely broken.

The new method is to directly store modules into /data/adb/modules, and for module installation
on boot /data/adb/modules_update. Several compatibility layers has been done: the new path is
bind mounted to the old path (/sbin/.magisk/img), and the helper functions in util_functions.sh
will now transparently make existing modules install to the new location without any changes.

MagiskHide is also updated to unmount module files stored in this new location.
2019-02-12 02:14:57 -05:00
71ecbb3af3 Clean/refactor includes 2019-02-10 03:57:51 -05:00
c8491d008f Move sbin overlay creation to magiskinit 2019-02-09 01:51:46 -05:00
fdf167db11 Get API level from build.prop 2019-01-20 15:20:34 -05:00
572e078d87 Fully deprecate <mount_point>/.core folder
Symlinks are preserved for backwards compatibility
2018-11-15 22:55:28 -05:00
ee4548230b Disable native systemless hosts, add built-in systemless hosts module 2018-11-15 13:57:41 -05:00
376e7977f0 Deprecate path /sbin/.core, switch to /sbin/.magisk
Symlink is preserved for backwards compatibility
2018-11-15 01:36:03 -05:00
5743c72cca Minor cleanup 2018-11-08 15:23:36 -05:00
803c5377a6 Clean init.c 2018-11-07 02:21:15 -05:00
cda57dd4b4 Fully migrate Magisk to C++ 2018-11-04 04:15:51 -05:00
27c688252d Store hidelist in magisk database 2018-11-01 13:23:12 -04:00
5020cd1bbf Small cleanup 2018-09-28 01:25:43 -04:00
cce636224c Reorganization 2018-09-27 18:26:41 -04:00
60b3b8ddce Better incremental builds 2018-09-27 03:56:56 -04:00
1d53335ae5 Dynamic load libselinux 2018-09-27 00:09:59 -04:00
c38533e0f8 Prevent problematic modules causing device stuck in bootloop
If boot failed after 2 times, it will enable core only mode (which disables all modules)
2018-08-07 04:41:48 +08:00
d9564bd04c Delay full sepolicy patch loading time 2018-08-02 05:35:01 +08:00
91818cfa1a Support compiling split cils via magiskpolicy CLI 2018-07-21 05:12:22 +08:00
1283167595 Maintain our own set of loop devices 2018-07-07 01:32:58 +08:00
c88dc8795b Single log file 2018-07-02 22:48:26 +08:00
a8030c39b1 Separate logging into its own daemon 2018-07-02 22:11:28 +08:00
528634d755 Remove unused code 2018-06-27 06:04:16 +08:00
7265450e2e Precise free space calculation for magisk.img
1. Introduce new applet: imgtool for better separation from the main program
2. Actually mount the image and check statvfs for free space in the image

This shall eliminate any possible module installation failure from image resizing issues.
2018-06-22 06:18:06 +08:00
f2064a84ed Move database logic outside of MagiskSU 2018-06-13 04:34:05 +08:00
34dcf49fbc Update restorecon implementation 2018-06-03 14:43:03 +08:00
fb491cfdcf Add Protobuf support to resetprop 2018-04-29 01:20:48 +08:00
9484ec0c17 Massive refactoring
Remove post-fs mode
2018-04-22 02:16:56 +08:00
87f6018468 Massive sepolicy refactor 2018-04-15 03:18:18 +08:00
9c6e64f47d Workaround compiler optimization bug 2018-02-21 14:44:24 +08:00
ebd509d92d Obfuscate socket name to prevent detection
Because why not
2018-02-11 03:59:54 +08:00
328fc44194 Rename module core to native 2018-01-27 09:11:28 +08:00