You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DualBoot/PatchKernel.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
4
4
## Prepare
5
5
- An android device.
6
-
- Download `UEFI FD` file from [Github Action](https://github.com/Project-Aloha/mu_aloha_platforms/actions)(You may need to login to download artifacts) or [Release Page](https://github.com/Project-Aloha/mu_aloha_platforms/releases) of uefi repository.
6
+
- Download `UEFI FD` file from [GitHub Action](https://github.com/Project-Aloha/mu_aloha_platforms/actions)(You may need to login to download artifacts) or [Release Page](https://github.com/Project-Aloha/mu_aloha_platforms/releases) of uefi repository.
7
7
-`Magiskboot` for your environment, there are prebuilt binaries on github.
8
8
- DualBoot kernel patcher binary and shellcode binaries for your devices from [release page](https://github.com/Project-Aloha/DualBootKernelPatcher/releases) or [action page](https://github.com/Project-Aloha/DualBootKernelPatcher/actions).
9
9
@@ -13,9 +13,9 @@
13
13
14
14
## Steps
15
15
> Assume you have done the following steps on your android device.
16
-
> 1. Root your device with magisk.
17
-
> 2. Downloaded and installed termux.
18
-
> 3. Installed root-repo and tsu in termux with apt.
16
+
> 1. Root your device with magisk.
17
+
> 2. Downloaded and installed termux.
18
+
> 3. Installed root-repo and tsu in termux with apt.
19
19
20
20
- Get Android Boot Image.
21
21
+ The boot image usually can be found at `/dev/block/by-name/boot` or `/dev/block/by-name/boot_a` (or _b).
@@ -27,7 +27,7 @@
27
27
```
28
28
29
29
- Unpack it with magiskboot.
30
-
+ If your device was rooted by magisk, there should be an magiskboot binary at `/data/adb/magisk/magiskboot`
30
+
+ If your device was rooted by magisk, there should be a magiskboot binary at `/data/adb/magisk/magiskboot`
31
31
+ By the way you can press the `tab` button in termux to automatically fill path, instead of typing the characters one by one.
32
32
+ Do Unpack
33
33
```bash
@@ -61,7 +61,7 @@ Please do not patch a patched kernel.
61
61
- Apply patch with dualboot kernel patcher.
62
62
+ Assume the patcher and shellcodes and config you downloaded above was saved at `/sdcard/Download/`
63
63
+ Unpack these zips with these cmds, or extract in file manager.
@@ -81,7 +81,7 @@ Please do not patch a patched kernel.
81
81
mv patched_kernel kernel
82
82
/data/adb/magisk/magiskboot repack boot.img
83
83
```
84
-
+ You will get a file named `new-boot.img` if magiskboot success.
84
+
+ You will get a file named `new-boot.img` if magiskboot succeeds.
85
85
86
86
- Test with fastboot.
87
87
+ Send `new-boot.img` to your computer:
@@ -100,13 +100,13 @@ Please do not patch a patched kernel.
100
100
+ See if the device is entering a correct os.
101
101
102
102
- Flash boot image into disk
103
-
+ If everything goes well and boot image was backuped. You can flash boot image into disk now. Then no fastboot command is required when using dualboot.
103
+
+ If everything goes well and boot image was backed up. You can flash boot image into disk now. Then no fastboot command is required when using dualboot.
104
104
+ Flash boot:
105
105
```powershell
106
106
fastboot flash boot new-boot.img
107
107
```
108
108
- Recover original boot image:
109
-
+If you want to remove dualboot, flash your backuped boot image.
109
+
-If you want to remove dualboot, flash your backed up boot image.
-PlaceHolders of Linux Kernel hdr.(refer `kernel64_hdr` struct in [Qualcomm ABL](https://git.codelinaro.org/clo/la/abl/tianocore/edk2/-/blob/KERNEL.PLATFORM.2.1.r1-04700-kernel.0/QcomModulePkg/Include/Library/BootImage.h?ref_type=tags#L477-489))
10
+
-Placeholders of Linux Kernel hdr.(refer `kernel64_hdr` struct in [Qualcomm ABL](https://git.codelinaro.org/clo/la/abl/tianocore/edk2/-/blob/KERNEL.PLATFORM.2.1.r1-04700-kernel.0/QcomModulePkg/Include/Library/BootImage.h?ref_type=tags#L477-489))
11
11
- This part will not be injected into Linux kernel.
12
12
13
13
+`ShellCode.xxx.S`
14
14
- Read flags in memory or do other check.
15
15
- Once the conditions are met, will jump to `_UEFI`, otherwise continue next instruction.
0 commit comments