RUU Update mode explained (oem-78)
HTC RUU Update tool for Windows uses underlying tools to perform the upgrade. Here is the essential list of what's going on.
# Get list of attached devices
adb devices
# Check battery power for detected device.
adb -s <SN> shell cat /sys/class/power_supply/battery/capacity
# Get current device version
adb -s <SN> shell getprop ro.build.description
# Reboot into RUU mode in bootloader
adb -s <SN> shell reboot oem-78
# Check if device is is disconnected from usermode
adb devices
# If not present any more, check via fastboot
fastboot devices
# If detected, check if in RUU mode
fastboot -s <SN> getvar boot-mode
# If mode returns RUU, start the upgrade by erasing cache
fastboot -s <SN> erase cache
# Upload rom.zip file and flash
fastboot -s <SN> flash zip rom.zip