[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] munjeni:
Found another thing. Step 1 is not need t all! Just tried with only one step on freshly restored previous android version, 3000000000000000 started to flash things without first step! First step I'm believing have verify and check purpose in case firmware not match update, but its allways recommend to run step 1 because if something is worng seccond step will not start if fota-ua found an error & will not write 0300000000000000, it will just delete command file and write log. Step 3 and 4 from your post is not need at all, booth steps 3 and 4 is the same at least I found your logs logs in step 3 and 4 is the same, I'm beliebving those logs is from step 2 but somehow it is writen in step 3 from some unknown reason. On me logs is written till after 0300000000000000 step finish flashing, but on your I not see logs in your fota folder, its inside step 3 and 4 on yours.

edit:

On my virtual machine it is working excatly like this https://xdaforums.com/showpost.php?p=80690663&postcount=1366

Edit:

just to confirm, only one step used now, step 0300000000000000 , less than ten minutes full update done without strace :)

Edit:

Seems one partition (fotakernel?) didn't updated with using one step update, redbend error probably due I have restored only system,vendor,cache before stary fota-ua, log:

Fota log
Start time: 2019-10-19 17:44:46 (Time in UTC)
Current time: 2019-10-29 20:50:59 (Time in UTC)
Status written for DA: 0x0
Uptime: 6492

Last log messages:
Info [292] Logging OK
Info [392] Current kernel id: 2
Info [1155] Found /cache/recovery/command
Info [1258] Command file for FOTA [--update_package=@/cache/recovery/block.map
--locale=en_GB]
Info [1329] Found locale_info[en_GB]
Info [1360] Package placed on 4
Info [1361] Package found [/cache/recovery/block.map]
ERROR [174] Unable to open file: /sys/class/power_supply/battery/charging_enabled, errno: No such file or directoryWARN [512] Unable to initialize USB device for charging, will continue anyway

=== Total memory info ===
Total physical memory: 2024026112 bytes
Total available physical memory: 1420095488 bytes
Configuration info at runtime:
The num of pages of physical memory: 494147
The num of currently available pages of physical memory: 346703
The num of processors configured: 2
The num of processors currently online (available): 2
Size of a page in bytes: 4096
Logging of resource usage measures:
Max resident set size ru_maxrss: 3196 KB
Page reclaims ru_minflt: 130
Page faults ru_majflt: 14
Block input operations: 3792
Block output operations: 3792
===
WARN [35] Unable to open file: /sys/devices/virtual/thermal/thermal_zone10/temp, errno: No such file or directoryERROR [248] Unable to open file: /sys/class/power_supply/usb/present, errno: No such file or directoryWARN [289] Failed to get usb present
WARN [471] Error at ui_init
ERROR [59] Failed to open /dev/graphics/fb0
WARN [537] Error at ui_prepare
WARN [541] Error at ui_add_background
WARN [545] Error at ui_add_image
WARN [549] Error at ui_add_animation
WARN [561] Error at ui_set_resources
Info [578] Package OK
WARN [578] Error at ui_draw
WARN [582] Error at ui_start_animation
WARN [339] Error at ui_add_progress progressbar_normal
WARN [365] Error at ui_draw
WARN [322] Error at ui_add_progress progressbar_indeterminate
WARN [365] Error at ui_draw
WARN [381] Error ui_remove at locale_image
WARN [202] Error at ui_add_localized_image: -23
WARN [450] Error at ui_draw
Info [600] Security OK
Info [628] Skipping meta-info check
Info [132] Updater continues in 3 state
Info [596] Primary GPT ok, header crc:0xa5436e26, entries crc: 0xd02818f
Info [613] Secondary GPT ok, header crc:0x8d9d7cbb, entries crc: 0xd02818f
Info [596] Primary GPT ok, header crc:0x192fec7a, entries crc: 0x8b54b583
Info [613] Secondary GPT ok, header crc:0x3bbff83, entries crc: 0x8b54b583
Info [596] Primary GPT ok, header crc:0x6d53394c, entries crc: 0x55574a13
Info [613] Secondary GPT ok, header crc:0x458d2bd1, entries crc: 0x55574a13
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [421] Starting operation 0
WARN [339] Error at ui_add_progress progressbar_normal
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=50
WARN [450] Error at ui_draw
Info [156] RedBend: Source signature 0x37fc907b and CRC 0x7c6ea11b mismatch

Info [517] Return value from RB_vRM_Update: 0x0
Info [518] End of operation 0
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [421] Starting operation 0
Info [517] Return value from RB_vRM_Update: 0x0
Info [518] End of operation 0
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [421] Starting operation 0
Info [517] Return value from RB_vRM_Update: 0x0
Info [518] End of operation 0
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [421] Starting operation 0
Info [517] Return value from RB_vRM_Update: 0x0
Info [518] End of operation 0
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [421] Starting operation 0
Info [517] Return value from RB_vRM_Update: 0x0
Info [518] End of operation 0
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [421] Starting operation 0
Info [156] RedBend: Source signature 0xe28fb4be and CRC 0xf3cc28de mismatch

Info [517] Return value from RB_vRM_Update: 0x0
Info [518] End of operation 0
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [421] Starting operation 0
Info [517] Return value from RB_vRM_Update: 0x0
Info [518] End of operation 0
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [421] Starting operation 0
Info [156] RedBend: Source signature 0xb0e8db3e and CRC 0x6a7b39ea mismatch

Info [517] Return value from RB_vRM_Update: 0x0
Info [518] End of operation 0
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [596] Primary GPT ok, header crc:0xa5436e26, entries crc: 0xd02818f
Info [613] Secondary GPT ok, header crc:0x8d9d7cbb, entries crc: 0xd02818f
Info [596] Primary GPT ok, header crc:0x192fec7a, entries crc: 0x8b54b583
Info [613] Secondary GPT ok, header crc:0x3bbff83, entries crc: 0x8b54b583
Info [596] Primary GPT ok, header crc:0x6d53394c, entries crc: 0x55574a13
Info [613] Secondary GPT ok, header crc:0x458d2bd1, entries crc: 0x55574a13
Info [188] system partition : use start address from disk info instead of fsconfig
Info [191] system partition : start { 0xb2685000, size : 0x138800000 }
Info [421] Starting operation 0
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=51
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=52
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=53
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=54
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=55
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=56
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=57
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=58
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=59
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=60
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=61
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=62
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=63
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=64
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=65
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=66
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=67
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=68
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=69
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=70
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=71
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=72
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=73
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=74
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=75
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=76
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=77
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=78
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=79
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=80
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=81
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=82
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=83
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=84
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=85
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=86
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=87
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=88
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=89
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=90
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=91
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=92
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=93
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=94
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=95
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=96
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=97
WARN [450] Error at ui_draw
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=98
WARN [450] Error at ui_draw
Info [517] Return value from RB_vRM_Update: 0x0
Info [518] End of operation 0
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [421] Starting operation 0
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=99
WARN [450] Error at ui_draw
Info [517] Return value from RB_vRM_Update: 0x0
Info [518] End of operation 0
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [421] Starting operation 0
WARN [365] Error at ui_draw
WARN [458] Error at ui_set_progress with fraction=100
WARN [450] Error at ui_draw
Info [517] Return value from RB_vRM_Update: 0x0
Info [518] End of operation 0
Info [596] Primary GPT ok, header crc:0xa5436e26, entries crc: 0xd02818f
Info [613] Secondary GPT ok, header crc:0x8d9d7cbb, entries crc: 0xd02818f
Info [596] Primary GPT ok, header crc:0x192fec7a, entries crc: 0x8b54b583
Info [613] Secondary GPT ok, header crc:0x3bbff83, entries crc: 0x8b54b583
Info [596] Primary GPT ok, header crc:0x6d53394c, entries crc: 0x55574a13
Info [613] Secondary GPT ok, header crc:0x458d2bd1, entries crc: 0x55574a13
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [188] system partition : use start address from disk info instead of fsconfig
Info [191] system partition : start { 0xb2685000, size : 0x138800000 }
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [232] LUN(fd=3) using: /dev/block/sda (size 31240192 kB)
Info [790] No pending partition changes, not updating partition tables
Info [790] No pending partition changes, not updating partition tables
Info [790] No pending partition changes, not updating partition tables
Info [657] Updater OK
ERROR [158] call_as(miscta_write_wrapper,u:r:recovery:s0) failed:6!
ERROR [31] Failed to write to modem switcher miscta command unit
WARN [698] Failed to write modem switcher update command to miscta

=== Total memory info ===
Total physical memory: 2024026112 bytes
Total available physical memory: 1837117440 bytes
Configuration info at runtime:
The num of pages of physical memory: 494147
The num of currently available pages of physical memory: 448515
The num of processors configured: 2
The num of processors currently online (available): 2
Size of a page in bytes: 4096
Logging of resource usage measures:
Max resident set size ru_maxrss: 462440 KB
Page reclaims ru_minflt: 102211
Page faults ru_majflt: 45
Block input operations: 24086592
Block output operations: 24086592
===
WARN [35] Unable to open file: /sys/devices/virtual/thermal/thermal_zone10/temp, errno: No such file or directory
=== Thermal info ===
therm(msm_therm): -300.0 => -300.0
===

Dump of internal data structures:

================================== ua_context ==================================
ua_ctx->last_result: 1 (RESULT_UA_OK)
ua_ctx->do_kernel_update: 0
ua_ctx->kid: 2 (KERNEL_FOTA)
ua_ctx->t_ctx.tm: 1 (NO_TEST)

ua_ctx->fota_ua_executable: 0x0
ua_ctx->fota_ua_executable_size: 0
ua_ctx->copy_crypt_key: 0
ua_ctx->use_ua_charger: 1

============================== ua_logging_context ==============================
l_ctx->result: 0
l_ctx->use_console: 1

============================== ua_package_context ==============================
p_ctx->package.data: 0xffff7a39b000
p_ctx->package.data_size: 420897111
p_ctx->package.signature: 0xffff93500d57
p_ctx->package.fota_ua_executable: 0x0
p_ctx->package.fota_ua_executable_size: 0
p_ctx->package.meta_info calculated length: 1078
p_ctx->package.meta_info:
<?xml version='1.0' encoding='ISO-8859-1'?>
<metadata version="3.3">
<product>
<manufacturer>Sony</manufacturer>
<model>G8441</model>
<hwplatform>msm8998</hwplatform>
<security_state>HWC_Yoshino_Com_001</security_state></product>
<update>
<generation>
<version>1.1.39</version>
<date>2019-10-09T10:37:00Z</date>
<rb_version>11.2.0.4</rb_version>
<rb_ua_version>11.2.0.4</rb_ua_version>
</generation>
<source>
<software>
<revision>47.2.A.10.107</revision>
</software>
<customization>
<variant>1310-7123</variant>
<revision>R1C</revision>
</customization>
</source>
<target>
<software>
<revision>47.2.A.11.228</revision>
</software>
<customization>
<variant>1310-7123</variant>
<revision>R1C</revision>
</customization>
</target>
</update>
</metadata>
p_ctx->package.inc[0] = {
attributes: IA_IMAGE,
id: 0
address: 0xffff7a39b1a4
}
p_ctx->package.inc[1] = {
attributes: IA_IMAGE,
id: 1
address: 0xffff7a474638
}
p_ctx->package.inc[2] = {
attributes: IA_IMAGE, IA_OVERWRITE,
id: 2
address: 0xffff7a53a1a2
}
p_ctx->package.inc[3] = {
attributes: IA_IMAGE, IA_OVERWRITE,
id: 3
address: 0xffff7a53a298
}
p_ctx->package.inc[4] = {
attributes: IA_IMAGE, IA_OVERWRITE,
id: 4
address: 0xffff7a53a394
}
p_ctx->package.inc[5] = {
attributes: IA_IMAGE, IA_OVERWRITE,
id: 5
address: 0xffff7a53a490
}
p_ctx->package.inc[6] = {
attributes: IA_IMAGE,
id: 7
address: 0xffff7a553f79
}
p_ctx->package.inc[7] = {
attributes: IA_IMAGE,
id: 8
address: 0xffff7b014e48
}
p_ctx->package.inc[8] = {
attributes: IA_IMAGE,
id: 9
address: 0xffff7b014f39
}
p_ctx->package.inc[9] = {
attributes: IA_IMAGE,
id: 16
address: 0xffff7b01505c
}
p_ctx->package.inc[10] = {
attributes: IA_IMAGE,
id: 17
address: 0xffff928e1c8b
}
p_ctx->package.inc[11] = {
attributes: IA_IMAGE,
id: 18
address: 0xffff9350046a
}
p_ctx->result: 1 (PACKAGE_OK)
p_ctx->block_map_file: 1

============================= ua_security_context ==============================
s_ctx->result: 1

============================== ua_updater_context ==============================
u_ctx->result: 1
u_ctx->ui_error: 0
u_ctx->redbend_init_error: 0
u_ctx->redbend_verify: 0
u_ctx->redbend_write: 0
u_ctx->redbend_post: 0
u_ctx->redbend_error_code: 0
u_ctx->file_error: 0
u_ctx->lbm_error: 0
u_ctx->boot_error: 0
u_ctx->boot_verify: 0
u_ctx->boot_write: 0
u_ctx->boot_post: 0
u_ctx->google_error: 0
u_ctx->kid: 2 (KERNEL_FOTA)
u_ctx->running.state: 4 (UPDATE_DONE)
u_ctx->running.increment: 12

=============================== ua_file_context ================================
f_ctx->update_available: 1
f_ctx->package_path: /cache/recovery/block.map
f_ctx->package_location: 4
f_ctx->command_file_fota: 1

===================================== jitc =====================================
f_ctx->clear_data: 0
f_ctx->miscta_file_import: 0

================================== ui_context ==================================
ui_ctx->initialized: 1
ui_ctx->state: 2 (UI_INSTALL)
ui_ctx->increment_progress: 100
ui_ctx->ui_disabled: 0
ui_ctx->increment_index: 11
ui_ctx->keep_display_teardown: 0
ui_ctx->kid: 2 (KERNEL_FOTA)
ui_ctx->locale_info: en_GB

============================== ua_memory_context ===============================
memory_ctx->total_memory: 2024026112
memory_ctx->avail_total_memory: 1837117440
memory_ctx->phys_pages: 494147
memory_ctx->avphys_pages: 448515
memory_ctx->nprocessors_conf: 2
memory_ctx->nprocessors_onln: 2
memory_ctx->page_size: 4096

I will look next day in your strace log to get list of updated partitions and will try one step update again.