[Nexus 6P Original Android Development] mscottdemarco:
Can't execute kexec

Long time listener, First time caller here,

I am having some trouble injecting this into an Angler ROM (MTC20) that has been modified with the Kali Nethunter packages.

With your code, -initrd=.. wasn't working so upon closer inspection you had --initrd=.. below. That solved some of it. the other errors I am getting are:

:
shell@angler:/ $ su
root@angler:/ # cd /sdcard/"kexec stuffs"/
root@angler:/sdcard/kexec stuffs # ls
cmdline
initramfs.cpio.gz
zImage-dtb
root@angler:/sdcard # kexec --load-hardboot zImage-dtb -initrd=initramfs.cpio --mem-min=0x0 --command-line="$(cat /proc/cmdline)" <
kexec version: 16.02.07.19.31-g364a380
arch_process_options:112: command_line: sched_enable_hmp=1 sched_enable_power_aware=1 androidboot.hardware=angler androidboot.console=ttyHSL0 msm_rtb.filter=0x37 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 boot_cpus=0-3 androidboot.bootdevice=f9824900.sdhci androidboot.verifiedbootstate=orange androidboot.veritymode=enforcing androidboot.serialno=8XV7N15B24005971 androidboot.wifimacaddr=24:00:BA:CD:DE:B4 androidboot.btmacaddr=24:00:BA:CD:FA:6B androidboot.hardware.revision=ANGLER-VN2 androidboot.bootloader=angler-03.52 androidboot.radio=angler-03.61 coherent_pool=8M restart.download_mode=0 console=NULL androidboot.wifi_cal= androidboot.mode=normal androidboot.baseband=msm mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_dualmipi0_cmd:1:qcom,mdss_dsi_dualmipi1_cmd androidboot.hardware.emmc=64GB,Samsung androidboot.hardware.ddr=3072MB,SAMSUNG,LPDDR4 androidboot.bootreason=reboot androidboot.hardware.sku=H1511 androidboot.secure_hardware=1
arch_process_options:114: initrd: initramfs.cpio.gz
arch_process_options:115: dtb: (null)
arch_process_options:117: port: 0x0
Try gzip decompression.
kernel: 0x7f95140000 kernel_size: 0x1969fe0
read_sys_dtb: No such file or directory
read_proc_dtb: No such file or directory
read_1st_dtb: not found
get_memory_ranges_dt:877: (null): Unusable device-tree file
get_memory_ranges_iomem:926: RAM: 0000000000000000 - 0000000004800000 : System RAM
get_memory_ranges_iomem:919: SKIP: 0000000000080000 - 00000000014bb484 : Kernel code
get_memory_ranges_iomem:919: SKIP: 0000000001815000 - 0000000001bf84f0 : Kernel data
get_memory_ranges_iomem:926: RAM: 0000000006100000 - 0000000006300000 : System RAM
get_memory_ranges_iomem:926: RAM: 000000000e900000 - 000000001fe00000 : System RAM
get_memory_ranges_iomem:919: SKIP: 000000001fe00000 - 000000001fe10000 : persistent_ram
get_memory_ranges_iomem:919: SKIP: 000000001fe10000 - 000000001fe20000 : persistent_ram
get_memory_ranges_iomem:919: SKIP: 000000001fe20000 - 000000001fe30000 : persistent_ram
get_memory_ranges_iomem:919: SKIP: 000000001fe30000 - 000000001fe40000 : persistent_ram
get_memory_ranges_iomem:919: SKIP: 000000001fe40000 - 000000001fe50000 : persistent_ram
get_memory_ranges_iomem:919: SKIP: 000000001fe50000 - 000000001fe60000 : persistent_ram
get_memory_ranges_iomem:919: SKIP: 000000001fe60000 - 000000001fe70000 : persistent_ram
get_memory_ranges_iomem:919: SKIP: 000000001fe70000 - 000000001fe80000 : persistent_ram
get_memory_ranges_iomem:919: SKIP: 000000001fe80000 - 000000001ff80000 : persistent_ram
get_memory_ranges_iomem:919: SKIP: 000000001ff80000 - 0000000020000000 : persistent_ram
get_memory_ranges_iomem:926: RAM: 0000000020000000 - 0000000060000000 : System RAM
get_memory_ranges_iomem:926: RAM: 0000000080000000 - 00000000e0000000 : System RAM
get_memory_ranges_iomem:919: SKIP: 00000000f9017000 - 00000000f9018000 : msm-watchdog
get_memory_ranges_iomem:919: SKIP: 00000000f9109000 - 00000000f910e000 : /soc/cci@f9100000/pmu@a000
get_memory_ranges_iomem:919: SKIP: 00000000f920c100 - 00000000f92fc000 : f9200000.dwc3
get_memory_ranges_iomem:919: SKIP: 00000000f9824900 - 00000000f9824aa0 : mmc0
get_memory_ranges_iomem:919: SKIP: 00000000f98a4900 - 00000000f98a4a1c : mmc1
get_memory_ranges_iomem:919: SKIP: 00000000f9923000 - 00000000f9924000 : f9923000.i2c
get_memory_ranges_iomem:919: SKIP: 00000000f9924000 - 00000000f9925000 : f9924000.i2c
get_memory_ranges_iomem:919: SKIP: 00000000f9927000 - 00000000f9928000 : spi_qsd
get_memory_ranges_iomem:919: SKIP: 00000000f9928000 - 00000000f9929000 : f9928000.i2c
get_memory_ranges_iomem:919: SKIP: 00000000f9963000 - 00000000f9964000 : f9963000.i2c
get_memory_ranges_iomem:919: SKIP: 00000000f9967000 - 00000000f9968000 : f9967000.i2c
get_memory_ranges_iomem:919: SKIP: 00000000f9b38000 - 00000000f9b38800 : qmp_phy_base
get_memory_ranges_iomem:919: SKIP: 00000000f9b39000 - 00000000f9b3917f : qusb_phy_base
get_memory_ranges_iomem:919: SKIP: 00000000f9b3e000 - 00000000f9b3e3ff : qmp_ahb2phy_base
get_memory_ranges_iomem:919: SKIP: 00000000fc190020 - 00000000fc190024 : /soc/qcom,npa-dump@0xfc190020
get_memory_ranges_iomem:919: SKIP: 00000000fc401680 - 00000000fc401684 : restart_reg
get_memory_ranges_iomem:919: SKIP: 00000000fc4281d0 - 00000000fc4291d0 : vmpm
get_memory_ranges_iomem:919: SKIP: 00000000fc4a8000 - 00000000fc4aa000 : tsens_physical
get_memory_ranges_iomem:919: SKIP: 00000000fc4ab000 - 00000000fc4ab004 : /soc/restart@fc4ab000
get_memory_ranges_iomem:919: SKIP: 00000000fc4bc000 - 00000000fc4bd000 : tsens_eeprom_physical
get_memory_ranges_iomem:919: SKIP: 00000000fc820000 - 00000000fc820020 : rmb_base
get_memory_ranges_iomem:919: SKIP: 00000000fc880000 - 00000000fc880100 : qdsp6_base
get_memory_ranges_iomem:919: SKIP: 00000000fd860000 - 00000000fd861000 : fd_vbif
get_memory_ranges_iomem:919: SKIP: 00000000fd878000 - 00000000fd878800 : fd_core
get_memory_ranges_iomem:919: SKIP: 00000000fd87c000 - 00000000fd87c800 : fd_misc
get_memory_ranges_iomem:919: SKIP: 00000000fda00020 - 00000000fda00030 : csi_clk_mux
get_memory_ranges_iomem:919: SKIP: 00000000fda00030 - 00000000fda00034 : csiphy_clk_mux
get_memory_ranges_iomem:919: SKIP: 00000000fda00038 - 00000000fda0003c : csiphy_clk_mux
get_memory_ranges_iomem:919: SKIP: 00000000fda00040 - 00000000fda00044 : csiphy_clk_mux
get_memory_ranges_iomem:919: SKIP: 00000000fda04000 - 00000000fda04100 : fda04000.qcom,cpp
get_memory_ranges_iomem:919: SKIP: 00000000fda08000 - 00000000fda08400 : fda08000.qcom,csid
get_memory_ranges_iomem:919: SKIP: 00000000fda08400 - 00000000fda08800 : fda08400.qcom,csid
get_memory_ranges_iomem:919: SKIP: 00000000fda08800 - 00000000fda08c00 : fda08800.qcom,csid
get_memory_ranges_iomem:919: SKIP: 00000000fda08c00 - 00000000fda08d00 : fda08c00.qcom,csid
get_memory_ranges_iomem:919: SKIP: 00000000fda0a000 - 00000000fda0a500 : fda0a000.qcom,ispif
get_memory_ranges_iomem:919: SKIP: 00000000fda0ac00 - 00000000fda0ae00 : fda0ac00.qcom,csiphy
get_memory_ranges_iomem:919: SKIP: 00000000fda0b000 - 00000000fda0b200 : fda0b000.qcom,csiphy
get_memory_ranges_iomem:919: SKIP: 00000000fda0b400 - 00000000fda0b600 : fda0b400.qcom,csiphy
get_memory_ranges_iomem:919: SKIP: 00000000fda0c000 - 00000000fda0d000 : fda0c000.qcom,cci
get_memory_ranges_iomem:919: SKIP: 00000000fdb00000 - 00000000fdb40000 : kgsl-3d0
get_memory_ranges_iomem:919: SKIP: 00000000fec00000 - 00000000fee00000 : fdd00000.qcom,ocmem
get_memory_ranges_iomem:940: Success
elf_arm64_probe: Not an ELF executable.
image_arm64_probe: PE format: no
kernel symbol _text vaddr = 0
add_segment_phys_virt: 0000007f95140000 - 0000007f96aa9fe0 (01969fe0) -> 0000000000080000 - 00000000019ea000 (0196a000)
arm64_load_other_segments:599: add '(null)' to command line
arm64_load_other_segments:612: purgatory sink: 0x0
read_sys_dtb: No such file or directory
read_proc_dtb: No such file or directory
read_1st_dtb: not found
kexec: Error: No device tree available.
Cannot load zImage-dtb
255|root@angler:/sdcard/kexec stuffs # kexec -e
kexec version: 16.02.07.19.31-g364a380
arch_process_options:112: command_line: (null)
arch_process_options:114: initrd: (null)
arch_process_options:115: dtb: (null)
arch_process_options:117: port: 0x0
kexec failed: Invalid argument

I am running this through an ADB shell with the phone completely booted up. kexec was placed in /system/bin/ by booting to recovery and mounting system, then unmounting and rebooting. I'd just use the Stock 6.0.1-20160514 kernel that is pre modified, but that is what I began with and the kernel was modified by kali I believe.

Any suggestions?

Thanks