Hi Everyone I want to share a knowledge about how to fix adb not working in twrp
Go to init.recovery.mt****.rc if you see this code
"write /sys/class/udc/musb-hdrc/device/cmode 2"
remove it.
If its not there then look at the init.recovery.usb.rc or look at the other init files
This tips was from claude ai