Commit Graph

2810 Commits

Author SHA1 Message Date
162eeaa0a6 Improve repo adapter 2019-03-24 02:02:34 -04:00
f36ce905aa Improve repo adapter
Fix #435
2019-03-23 23:18:26 -04:00
8ac3aaf36c Rename Topic -> Event 2019-03-23 21:58:42 -04:00
a199b0ace1 Use ZIPFILE instead of ZIP
The tool zip reads , we don't want it
2019-03-23 20:49:16 -04:00
2f2108e4e8 Fix typo in module installer 2019-03-23 05:28:43 -04:00
f5f7fd9132 Add com.android.google gms to default hide list
Close #1235
2019-03-23 04:39:34 -04:00
f9ae4ab475 Add base Magisk module installer script 2019-03-23 04:27:36 -04:00
8de03eef3f Allow modules to have custom uninstaller script 2019-03-23 03:50:55 -04:00
8df942f96e Adjust scripting 2019-03-23 03:36:35 -04:00
9bb2243b56 Switch to skip_mount instead of auto_mount
95%+ of existing modules enables auto mount (obviously).
Switching auto mount to opt-out makes more sense than opt-in as
in previous module format. The file 'auto_mount' will be ignored, and
the file 'skip_mount' will be checked to toggle the mounting behavior.

After scanning through the current Magisk Module Repo modules, no
modules are using custom bind mounting; all modules with auto mount
disabled have empty system folder, which means this change will not
affect any existing module.
2019-03-23 03:05:38 -04:00
db06038548 Fix Magisk installation 2019-03-22 02:48:42 -04:00
ecb33d3176 Cleanup scripts 2019-03-22 02:32:21 -04:00
eae1c17738 Remove features before aborting 2019-03-22 02:01:36 -04:00
ea55532e33 Copy busybox instead of bind mounting 2019-03-22 01:52:13 -04:00
2a40cb60a9 Behave more sane in extreme conditions 2019-03-22 01:50:33 -04:00
d371d017b7 Update dependencies 2019-03-22 00:49:55 -04:00
1d9359d563 Fix additional setup 2019-03-20 03:20:02 -04:00
945f88105f Support system-as-root devices with monolithic sepolicy 2019-03-18 04:54:15 -04:00
957feca626 Limit sepolicy load to Android Q only
It seems both Android cancers, Samsung and Huawei devices, don't
like preloading sepolicy. For a temporary solution now is to limit
the sepolicy loading to Android Q only.
2019-03-16 17:15:48 -04:00
c0447009db Allow entrypoint for rootfs construction simulation 2019-03-16 04:45:56 -04:00
8893cbd64a Modularize MagiskInit 2019-03-15 14:46:30 -04:00
f0240b1f06 Support Android Q new split sepolicy setup 2019-03-15 06:17:37 -04:00
e476c18c99 Don't load sepolicy on Huawei devices
Of course, the cancer of Android, Huawei, has to do some f**king weird
modifications to the Linux kernel. Its kernel only accepts 1 single
policy load in its lifetime, a second load will result in ENOMEM error.
Since Huawei devices always use their own stupid ramdisk setup and not
system-as-root, not loading sepolicy is not a concern (for now).
2019-03-14 22:48:23 -04:00
a1b5185ecb Make sure rootfs file selabels are correct
Android Q init assumes rootfs to always be on EXT4 images, thus
never runs restorecon on the whole root directory. This is an issue
because some folders in rootfs were set with special selabels in
the system partition, but when copying over to initramfs by magiskinit,
these labels will not be preserved.

So the solution is to relabel the files in rootfs with the original
context right? Yes, but rootfs does not allow security xattr to be set
on files before the kernel SELinux initializes with genfs_contexts.
We have to load our sepolicy to the kernel before we clone the root
directory from system partition, which we will also restore the selabel
in the meantime.

Unfortunately this means that for each reboot, the exact same policy
will be loaded to the kernel twice: once in magiskinit so we can label
rootfs properly, and once by the original init, which is part of the
boot procedure. There is no easy way to prevent init from loading
sepolicy, as init will refuse to continue if policy loading has failed.
2019-03-14 22:27:29 -04:00
981e90cc32 Don't remove SafetyNet from hide list 2019-03-14 07:00:36 -04:00
da0a72e8b0 Improve builtin selinux implementation 2019-03-14 06:34:22 -04:00
b7e2e972c7 Support boot_img_hdr_v2 2019-03-13 16:51:22 -04:00
650b2ce6b1 Fix config bugs 2019-03-13 15:25:53 -04:00
ecf3d30349 Only show expansion when necessary 2019-03-13 08:15:02 -04:00
15ddd0e284 More MagiskHide list UI improvements 2019-03-13 07:49:12 -04:00
18ac6b270f Make Expandable more extensible 2019-03-13 06:12:02 -04:00
3e35de9b39 Small UI improvements 2019-03-13 05:11:18 -04:00
1e24c72c11 Use our own existing implementation 2019-03-13 01:37:35 -04:00
217564963d New MagiskHide UI 2019-03-12 17:20:08 -04:00
f2f4649ab0 Don't crash when encounter unexpected XML input 2019-03-12 17:19:29 -04:00
4395ffec5f Update it-it stub
Better wording!
2019-03-12 17:04:23 -04:00
9a7a26407a Update build script 2019-03-12 17:01:37 -04:00
5072a67807 Update AGP and R8 2019-03-12 16:53:07 -04:00
dce0b6c05a Always detach all child threads before leaving 2019-03-12 16:48:01 -04:00
a4a661bf34 Small code restructuring 2019-03-11 12:44:50 -04:00
771e500468 Use dark theme by default 2019-03-11 07:39:01 -04:00
7e3ff03109 Default to canary channel if running canary build 2019-03-11 07:38:31 -04:00
a1827fd680 Make sure to read db before 2019-03-11 07:30:37 -04:00
9ce334feac Update the way to deal with configs 2019-03-11 07:03:36 -04:00
ed11e0bff6 Fix repackage manager settings migration 2019-03-11 05:43:48 -04:00
5111086637 Don't care if child threads were unknown 2019-03-10 01:46:32 -05:00
20f204810e Use RAII to detach PIDs 2019-03-10 01:14:41 -05:00
4581354e7a Allow zygote to execve
Allow zygote to execute other programs (such as dex2oat).
This fixes the bug that cause ART framework boot images failed to load
and result to extremely serious performance degradation.

Fix #1195
2019-03-09 22:58:05 -05:00
faf4d76388 Use large vector<bool> instead of set<pid>
vector<bool> uses bitsets, so we actually only use 12k memory to
store all 3 possible PID info tables. PID checkup will be now become
O(1) instead of O(logn).

P.S. The reason why we don't use unordered_map is because including it
will result in significant binary size increase (might be due to the
complex hash table STL implementation? I really don't know).
2019-03-09 22:28:43 -05:00
a46e255709 Fix strings.xml 2019-03-09 05:47:19 -05:00