-
@audrew It's an old post, but should give pointers. Don't take it "as is", but use it to help solve issues.
If you have an ADB error, you have to do basic troubleshooting i.e.:
Change USB cable
Change USB port
Try another PC
Update ADB drivers
Clear space on your PC
Install TWRP and format data partition and make sure it is formatted to EXT4
Wipe the system and Cache partition
Reinstall the correct stock ROM, but DO NOT relock the bootloader (you have to use a windows PC for Xiaomi phones and use the Mi Flash tool) and start again.One USB cable may work on one device, but not on another.
-
@mrt10001 as far as I know adb shoudnt to be detected in fast boot mode. Or it should? Every time I try to install ubuntu, boot data is erased and the ubuntu touch is not installed. So basically I have to rewrite back android and try again. It is very tedious
-
@audrew ADB is like a higher level of Fastboot. Basically ( please feel to correct me anyone) fastboot installs a boot image and a recovery image. The boot image allows UT to boot, but you usually have to manually boot to recovery. Once in recovery ADB is then working and the UT install will continue by pushing the UT files over it from the PC to the device.
A bad or incompatible USB cable will stop ADB from functioning so no UT install.
An encrypted data partition will stop an install and can be flagged as an ADB error, that is why you have to format the data partition to EXT4 and wipe it so it is decrypted.
If the partitions have been resized, usually by installing a non stock ROM such as Lineage OS, UT won't install and may give an ADB error.
A bad or USB 3 port may cause an ADB error.
A PC/laptop may cause an issue for various reasons, if UT won't install on Windows, try a Linux based machine or a MacOS based machine.
Try an older installer, the latest Ubports installer may be a bit buggy.
Also follow the installation instructions to the letter or the install usually fails. Try a different channel if the stable channel fails to install.