[Xiaomi Redmi Note 5 Pro Questions & Answers] drkdeath5000:
Hi all,

I recently restored my device from EDL mode using miflash. Its boots up fine to the official stock firmware rom that i recovered to (miui 9.6.4.0) using miflash but after re-installing TWRP i'm unable to install any custom roms.

The output from TWRP:

Installing MIUI update...
performing update
Installing MIUI update...package_extract_file took 00s.

package_extract_file took 00s.blockimg version is 4
maximum stash entries 0
creating stash /cache/recovery/2bdde8504898ccfcd2c59f20bb8c9c25f73bb524
254427136 bytes free on /cache (0 needed)
/cache/recovery/last_command doesn't exist.
erasing 181701 blocks
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
writing 512 blocks of new data
Decompression failed with BLOCK_LENGTH_2
missing 1222632 bytes of new data
failed to execute command [new 2,326044,326556]
Perform Block Image Update took 04s.
script aborted: E1001: Failed to update system image.
E1001: Failed to update system image.error: 1001
device name: /dev/block/bootdevice/by-name/system
Filesystem volume name: system
Last mounted on: <not availabel>
Filesystem UUID: da594c53-9beb-f85c-85c5-cedf76546f7a
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem flags: unsigned_directory_hash
Filesystem features: has_journal ext_attr resize_inode filetype extents sparse_super large_file gdt_csum
Default mount options: (none)
Filesystem state: clean
Errors behavior: Remount read-only
Filesystem os type: Linux
Inode count: 193920
Block count: 774155
Reserved block count: 0
Free blocks: 106382
Free inodes: 189202
First block: 0
Block size: 4096
Reserved GDT blocks: 191
Blocks per group: 32768
Inodes per group: 8080
Inode blocks per group: 505
Last mount time: n/a
Last write time: Wed Dec 31 19:00:00 1969
Mount count: 0
Maximum mount count: 10
Last checked: Wed Dec 31 19:00:00 1969
Check interval: 0 (<none>)
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 28
Desired extra isize: 28
Journal inode: 8
Default directory hash: tea
Journal backup: inode blocks
Updater process ended with ERROR: 7
I:Install took 5 second(s).
Error installing zip file '/sdcard/Download/globeROM_v10_whyred_9.2.28_cfg-fmygvtpxbrw.zip'
Updating partition details...
I:Data backup size is 842MB, free: 49040MB.
I:Unable to mount '/usb_otg'
I:Actual block device: '', current file system: 'vfat'
I:Unable to mount '/external_sd'
I:Actual block device: '', current file system: 'vfat'
...done
I:Set page: 'flash_done'
I:operation_end - status=1

Any ideas how to solve this one?