diff --git a/DualBoot/Config.md b/DualBoot/Config.md index 6731d5f..083f8b2 100644 --- a/DualBoot/Config.md +++ b/DualBoot/Config.md @@ -8,6 +8,26 @@ If you do not need it, set the too values to 0. ``` StackBase=0x00000000 StackSize=0x00000000 + RestartReasonAddress=0x00000000 ``` - The value after `=` must be hex number. - - Config file not in this format will cause unexceptional behavior. \ No newline at end of file + - Config file not in this format will cause unexceptional behavior. + +## How to get these values + - `StackBase` + + StackBase can be found in your device's MemoryMap, which is named `UEFI FD` + + - `StackSize` + + StackSize the right after the base address of `UEFI FD`. + + - `RestartReasonAddress` + + Comming Soon. + + RestartReasonAddress can be found in a Qualcomm device's device tree. + + Enter android or recovery, run the following shell cmd with root permission. + + Output should like this: + ``` + android:/# printf "RestartReasonAddress=0x%x\n" $((0x$(realpath /sys/firmware/devicetree/base/soc/qcom\,msm-imem@*/restart_reason@* | awk -F'[@/]' '{print $(NF-2)"+0x"$(NF)}'))) + RestartReasonAddress=0x146bf65c + ``` + + \ No newline at end of file diff --git a/DualBoot/Introduction.md b/DualBoot/Introduction.md index d485109..b27fde9 100644 --- a/DualBoot/Introduction.md +++ b/DualBoot/Introduction.md @@ -33,7 +33,7 @@ flowchart TD subgraph hlos[HLOS] direction TB win[Windows] - other_os[Other Operation Systems] + other_os[Other Operating Systems] android_distribution[Linux/Android Distributions] end