I'll guide you how to replace emmc for Xiaomi Redmi note 4/4x qualcomm.
Please follow this guide carefully :
1. Prepare new emmc, just do nand test and factory erase after Identify emmc
2. Resolder emmc to board, plug usb, and device will stuck in emergency mode(9008)
3. Open Ufi Android ToolBox
4. In Qualcomm tab, please select Brand, model according to your device
5. This is Important step : Load developer china rom, uncheck Restart after flash
After finish flashing, Do Not Restart or Reconnect the USB.
Do Identify Device Again,
Go to Special Task, Dissable DM verity and force encrypt with Sig Overflow
After this, you can reboot the device.
6. If you want to flash global rom, make sure you have unlock the bootloader at first, otherwise you will get wifi problem.