[Xiaomi Mi A2 / 6X Questions & Answers] kurogam3:
So recently i bought Xiaomi mi a2 and tried to root it. I installed TWRP, then Magisk, everything was going well until i decided to mess with the build.prop. I changed some settings, so the phone thinks it's Samsung galaxy S9. Then notifications started not popping up and i tried to reinstall ROM. I deleted everything using TWRP (absolutely everything) and then i tried flashing stock ROM with Mi Flash toll and kept getting error: "Flash system_a error". Then i went into flash_all.bat and installed everything manually with command prompt, to both partitions. After that fastboot reboot and it now is stuck on Google one logo and does not go any further. Pc is not detecting it anymore in fastboot and I cant access recovery, it simply doesn't work. It still turns on so i hope I can recover it. Im all new to rooting so sorry if i won't understand something. I think it doesn't boot up because it thought that it's Samsung Galaxy S9 and so it didn't let me install Xiaomi ROM and so I force installed it. Hope you can help me, i am really desperate to fix it as fast as possible.

Just after posting this i found another post here with a guy having the same situation as me and i'll try to od the test pins method.(hope it works)

This is the error log:

[22:36:27]:10 COM10 6,9961779s write time out,maybe device was disconnected.

[22:37:00]:10 COM10 0,4752161s [22:37:00 COM10]:System.IO.IOException: The requested resource is in use.

at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)

at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)

at System.IO.Ports.SerialPort.Open()

at XiaoMiFlash.code.bl.SerialPortDevice.registerPort(SerialPort port)

at XiaoMiFlash.code.bl.SerialPortDevice.XiaomiFlash() at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)

at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)

at System.IO.Ports.SerialPort.Open()

at XiaoMiFlash.code.bl.SerialPortDevice.registerPort(SerialPort port)

at XiaoMiFlash.code.bl.SerialPortDevice.XiaomiFlash()

[22:38:21]:30 COM30 4,935272s write time out,maybe device was disconnected.

[22:39:06]:30 COM30 0,4636368s [22:39:06 COM30]:System.IO.IOException: The requested resource is in use.

at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)

at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)

at System.IO.Ports.SerialPort.Open()

at XiaoMiFlash.code.bl.SerialPortDevice.registerPort(SerialPort port)

at XiaoMiFlash.code.bl.SerialPortDevice.XiaomiFlash() at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)

at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)

at System.IO.Ports.SerialPort.Open()

at XiaoMiFlash.code.bl.SerialPortDevice.registerPort(SerialPort port)

at XiaoMiFlash.code.bl.SerialPortDevice.XiaomiFlash()

[22:42:01]:30 COM30 3,5075972s write time out,maybe device was disconnected.

[22:42:23]:30 COM30 0,0421577s [22:42:23 COM30]:System.IO.IOException: The requested resource is in use.

at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)

at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)

at System.IO.Ports.SerialPort.Open()

at XiaoMiFlash.code.bl.SerialPortDevice.registerPort(SerialPort port)

at XiaoMiFlash.code.bl.SerialPortDevice.XiaomiFlash() at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)

at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)

at System.IO.Ports.SerialPort.Open()

at XiaoMiFlash.code.bl.SerialPortDevice.registerPort(SerialPort port)

at XiaoMiFlash.code.bl.SerialPortDevice.XiaomiFlash()

[22:43:00]:30 COM30 0,3836646s [22:43:00 COM30]:System.IO.IOException: The requested resource is in use.

at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)

at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)

at System.IO.Ports.SerialPort.Open()

at XiaoMiFlash.code.bl.SerialPortDevice.registerPort(SerialPort port)

at XiaoMiFlash.code.bl.SerialPortDevice.XiaomiFlash() at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)

at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)

at System.IO.Ports.SerialPort.Open()

at XiaoMiFlash.code.bl.SerialPortDevice.registerPort(SerialPort port)

at XiaoMiFlash.code.bl.SerialPortDevice.XiaomiFlash()