- 17 Jul, 2019 2 commits
- 16 Jul, 2019 3 commits
- 15 Jul, 2019 4 commits
-
-
topjohnwu authored
-
osm0sis authored
-
topjohnwu authored
Directly read from urandom instead of using std::random_device. libc++ will use iostream under-the-hood, which brings significant binary size increase that is not welcomed, especially in magiskinit.
-
topjohnwu authored
- Use C++ random generator instead of old and broken rand() - Randomize string length to piss off stupid detectors
-
- 08 Jul, 2019 2 commits
-
-
Viktor De Pasquale authored
-
topjohnwu authored
-
- 07 Jul, 2019 8 commits
-
-
Marius authored
-
osm0sis authored
- while many newer devices cannot allow / (system partition) to be mounted rw due to compressed fs (e.g. erofs) or logical partitions, it should remain possible to alter rootfs files/directories on those that previously allowed it
-
osm0sis authored
-
topjohnwu authored
Fix #1563
-
topjohnwu authored
-
topjohnwu authored
-
topjohnwu authored
-
topjohnwu authored
-
- 05 Jul, 2019 1 commit
-
-
topjohnwu authored
-
- 04 Jul, 2019 4 commits
-
-
John Wu authored
Some Samsung device uses the header version field as extra section size
-
osm0sis authored
-
osm0sis authored
- supports signing /recovery images - add as final argument and default to /boot if not supplied so installer scripts remain the same
-
osm0sis authored
"Allow recovery-dtbo in recovery.img to be signed" by Hridya Valsaraju: https://android.googlesource.com/platform/system/extras/+/9bb9f8f857170c5865944bdc9e4700a73a6e7434 "boot_signer should support boot header version 2" by Hridya Valsaraju https://android.googlesource.com/platform/system/extras/+/590e58454d25218bc295cf0fbdc241b0d1b8ae8e
-
- 02 Jul, 2019 1 commit
-
-
topjohnwu authored
-
- 01 Jul, 2019 3 commits
- 30 Jun, 2019 1 commit
-
-
topjohnwu authored
-
- 29 Jun, 2019 2 commits
-
-
topjohnwu authored
-
topjohnwu authored
The way how logical partition, or "Logical Resizable Android Partitions" as they say in AOSP source code, is setup makes it impossible to early mount the partitions from the shared super partition with just a few lines of code; in fact, AOSP has a whole "fs_mgr" folder which consist of multiple complex libraries, with 15K lines of code just to deal with the device mapper shenanigans. In order to keep the already overly complicated MagiskInit more managable, I chose NOT to go the route of including fs_mgr directly into MagiskInit. Luckily, starting from Android Q, Google decided to split init startup into 3 stages, with the first stage doing _only_ early mount. This is great news, because we can simply let the stock init do its own thing for us, and we intercept the bootup sequence. So the workflow can be visualized roughly below: Magisk First Stage --> First Stage Mount --> Magisk Second Stage --+ (MagiskInit) (Original Init) (MagiskInit) + + + ...Rest of the boot... <-- Second Stage <-- Selinux Setup <--+ (__________________ Original Init ____________________) The catch here is that after doing all the first stage mounting, /init will pivot /system as root directory (/), leaving us impossible to regain control after we hand it over. So the solution here is to patch fstab in /first_stage_ramdisk on-the-fly to redirect /system to /system_root, making the original init do all the hard work for us and mount required early mount partitions, but skips the step of switching root directory. It will also conveniently hand over execution back to MagiskInit, which we will reuse the routine for patching root directory in normal system-as-root situations.
-
- 27 Jun, 2019 6 commits
-
-
osm0sis authored
- Magisk "dirty" flashes would remove the /overlay directory which might have been put there by a custom kernel or other mod - this is a leftover from when Magisk itself used /overlay for placing init.magisk.rc, so just remove this file specifically and leave the rest intact
-
Rom authored
-
cristisilaghi authored
-
osm0sis authored
- correct 'booloader' typo breaking bootloader entry - remove extra bootloader entry Shell.su line which is unnecessary since it's covered by reboot() - revert to using `reboot recovery` for recovery entry since `svc power reboot recovery` triggers a very disconcerting "Factory data reset" reboot dialog on many devices - add Reboot to EDL mode option for good measure
-
topjohnwu authored
-
topjohnwu authored
-
- 26 Jun, 2019 3 commits