There is a better solution to restore your stock rom. Steps is:
adb push busybox /data/local/tmp/
disconnect usb cable
open terminal emulator and do:
cd /data/local/tmp
chmod 755 busybox
./busybox tar pczvf /storage/removable/sdcard1/system.tar.gz /system
now you have full system backup in your external sdcard. Ater rooting, simple do:
cd /
busybox mount -o remount,rw /system
busybox tar xzvf /storage/removable/sdcard1/system.tar.gz
reboot
done
Another thing. Any one confirm - current rooting status is safe??? Are you 100% sure??? Did you checked bootloader version, version of the other things...etc, are you sure something is not broken by flashing xperia z1 firmware, for example did your phone got touchscreen firmware flashed from z1, any strange thing after all that...???