TWRP: adb devices works in recovery but fails in sideload mode

I want to install a custom rom (LineageOS with microG) on My Asus Zenfone Max Pro M1. I followed every steps detailed in the tutorial (enable debugging, unlock bootloader, run fastboot, flash TWRP, reboot in recovery, backup then wipe the system with TWRP). My problem is when I want to sideload the custom rom. So, adb devices works and detects my phone in recovery mode. However, as soon as I lauch the sideload mode in TWRP, adb devices is not able to detect my phone anymore and the command adb sideload xxxxxx.zip fails because it cannot see any device. I'm running TWRP 3.2.3, my computer runs on GNU/Linux (Xubuntu 18.04), I have the latest version of the Android SDK. It is the same question as here from 2015: Device disappears from ADB devices when entering sideload but there was no answer. Thanks in advance

asked Feb 11, 2019 at 20:17 291 1 1 gold badge 2 2 silver badges 5 5 bronze badges Why don't you install the ROM directly from TWRP? Commented Feb 12, 2019 at 19:40 That's indeed what I ended up doing Commented Feb 28, 2019 at 10:59

2 Answers 2

Eventually, I found a workaround (which is not a fix but it allowed me to continue the installation).

Since my device was detected in discovery, I did not used sideload. I just pushed the image to the sdcard with:

adb push xxxxx.zip /sdcard/ 

and then I installed the image from the sdcard directly in TWRP.