adb shell returns with error: closed
Since you can boot into recovery reflash your ROM - make a clean flash (wipe cache , dalvick cache , system and data .

If you can’t flash through twrp , then you have to use the flashtool ...