I had a same problem "and when I connect the phone via USB, Windows is stating it doesn't recognize the device..." and device was urooted but i fixed sd with this:
Also, SD card functionality has to work. For this, go into fastboot mode ( device off : volume down + power, select FASTBOOT) , and...