[Xperia Z5 Android Development] russel5:
Hi [MENTION=357342]tobias.waldvogel[/MENTION], may be you need change your init script for correct work start_fota_recovery, because it don't work as it should.

you script is

start_fota_recovery() {
set_led_color 255 100 0
${BB} mkdir -m 755 -p /dev/block
${BB} mknod -m 600 ${DEV_FOTA} b ${NODE_FOTA} 0

${BB} mkdir -m 755 -p /root/tmp
${BOOTIMG} unpackelf -q -r ${RAMDISK} ${DEV_FOTA}
if [ $R? -eq 0 ]; then
echo "Found ELF recovery image" >> ${LOG_FILE}
else
${BOOTIMG} unpackimg -r ${RAMDISK} ${DEV_FOTA}
if [ $? -eq 0 ]; then
echo "Found android recovery image" >> ${LOG_FILE}
fi
fi

${BB} rm -f /init*.rc /init*.sh
${BB} gunzip -c ${RAMDISK} | ${BB} cpio -imu

${BB} umount /proc
${BB} umount /sys
${BB} rm -rf /dev/* ${ASSET_DIR}
exec /init $@
}

but unpackimg or unpackelf need -i command (?)

some change in your script and fota works perfect (on my z3c)

start_fota_recovery() {
led_orange
${BB} mkdir -m 755 -p /dev/block
${BB} mknod -m 600 ${DEV_FOTA} b ${NODE_FOTA} 16

${BOOTIMG} unpackelf -i ${DEV_FOTA} -r ${RAMDISK} -q
if [ $? -eq 0 ]; then
echo "Found ELF recovery image" >> ${LOG_FILE}
else
${BOOTIMG} unpackimg -i ${DEV_FOTA} -r ${RAMDISK}
if [ $? -eq 0 ]; then
echo "Found android recovery image" >> ${LOG_FILE}
fi
fi

${BB} rm -f /init*.rc /init*.sh
${BB} gunzip -c ${RAMDISK} | ${BB} cpio -imu

${BB} umount /proc
${BB} umount /sys
${BB} rm -rf /dev/* ${ASSET_DIR}
exec /init $@
}

Some proof in log file

Wed May 20 00:45:19 UTC 1970

+ /boot/busybox rm -f /init

+ /boot/busybox mv /init.bin /init

+ /boot/busybox mount -t proc proc /proc

+ /boot/busybox mount -t sysfs sysfs /sys

+ /boot/busybox grep -q warmboot=0x77665502 /proc/cmdline

+ /boot/busybox mkdir -m 755 -p /dev/input /sys

+ /boot/busybox mkdir -m 555 -p /proc

+ /boot/busybox seq 0 12

+ /boot/busybox expr 64 + 0

+ /boot/busybox mknod -m 600 /dev/input/event0 c 13 64

+ /boot/busybox expr 64 + 1

+ /boot/busybox mknod -m 600 /dev/input/event1 c 13 65

+ /boot/busybox expr 64 + 2

+ /boot/busybox mknod -m 600 /dev/input/event2 c 13 66

+ /boot/busybox expr 64 + 3

+ /boot/busybox mknod -m 600 /dev/input/event3 c 13 67

+ /boot/busybox expr 64 + 4

+ /boot/busybox mknod -m 600 /dev/input/event4 c 13 68

+ /boot/busybox expr 64 + 5

+ /boot/busybox mknod -m 600 /dev/input/event5 c 13 69

+ /boot/busybox expr 64 + 6

+ /boot/busybox mknod -m 600 /dev/input/event6 c 13 70

+ /boot/busybox expr 64 + 7

+ /boot/busybox mknod -m 600 /dev/input/event7 c 13 71

+ /boot/busybox expr 64 + 8

+ /boot/busybox mknod -m 600 /dev/input/event8 c 13 72

+ /boot/busybox expr 64 + 9

+ /boot/busybox mknod -m 600 /dev/input/event9 c 13 73

+ /boot/busybox expr 64 + 10

+ /boot/busybox mknod -m 600 /dev/input/event10 c 13 74

+ /boot/busybox expr 64 + 11

+ /boot/busybox mknod -m 600 /dev/input/event11 c 13 75

+ /boot/busybox expr 64 + 12

+ /boot/busybox mknod -m 600 /dev/input/event12 c 13 76

+ /boot/busybox mknod -m 666 /dev/null c 1 3

+ led_amber

+ /boot/busybox echo 255

+ /boot/busybox echo 255

+ /boot/busybox echo 0

+ vibrate

+ /boot/busybox echo 150

+ /boot/busybox timeout -t 3 /boot/bootimg keycheck

+ KEY=114

+ [ 114 -eq 115 ]

+ [ 114 -eq 114 ]

+ echo Entering Recovery Mode

Entering Recovery Mode

+ start_fota_recovery

+ led_orange

+ /boot/busybox echo 255

+ /boot/busybox echo 100

+ /boot/busybox echo 0

+ /boot/busybox mkdir -m 755 -p /dev/block

+ /boot/busybox mknod -m 600 /dev/block/mmcblk0p16 b 179 16

+ /boot/bootimg unpackelf -i /dev/block/mmcblk0p16 -r /boot/rd.gz -q

+ [ 1 -eq 0 ]

+ /boot/bootimg unpackimg -i /dev/block/mmcblk0p16 -r /boot/rd.gz

BOARD_KERNEL_CMDLINE="androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3b7 ehci-hcd.park=3 androidboot.bootdevice=msm_sdcc.1 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y coherent_pool=8M vmalloc=400M"

BOARD_PAGE_SIZE="2048"

BOARD_RAMDISK_OFFSET="02000000"

+ [ 0 -eq 0 ]

+ echo Found android recovery image

Found android recovery image

+ /boot/busybox rm -f /init.environ.rc /init.qcom.rc /init.rc /init.sony-device-common.rc /init.sony-device.rc /init.sony-platform.rc /init.sony.rc /init.sony.usb.rc /init.target.rc /init.trace.rc /init.usb.configfs.rc /init.usb.rc /init.zygote32.rc /init.class_main.sh /init.mdm.sh /init.qcom.class_core.sh /init.qcom.early_boot.sh /init.qcom.factory.sh /init.qcom.sh /init.qcom.ssr.sh /init.usbmode.sh

+ /boot/busybox gunzip -c /boot/rd.gz

+ /boot/busybox cpio -imu

20516 blocks

+ /boot/busybox umount /proc

+ /boot/busybox umount /sys

+ /boot/busybox rm -rf /dev/block /dev/console /dev/input /dev/null /boot

+ exec /init