Skip to content

Shell Code

Assembly codes
Inject into kernel after compiling.

Shell Code is the key place why we patch kernel or what do we patch kernel for.

DualBoot ShellCodes

  • For DualBoot feature, here provided several sources:
    • DummyHead.S

      • Placeholders of Linux Kernel hdr.(refer kernel64_hdr struct in Qualcomm ABL)
      • This part will not be injected into Linux kernel.
    • ShellCode.xxx.S

      • Read flags in memory or do other check.
      • Once the conditions are met, will jump to _UEFI, otherwise continue next instruction.
    • CommonTail.S

      • First instruction is jumping to linux, that happens when the condition in ShellCode.xxx.S is not met.
      • Provide _UEFI label, ShellCode.xxx.S will jump here after conditions.
      • Handles unexpected behavior in the end.

DTB Wrapper

  • Coming soon.