I was trying to do a factory reset from the twrp recovery, but wiped system partition mistakely.. my device has no system now. i can only access the twrp recovery and download mode. However, i tried to install many firmwares using odin but odin gave me a red Failed every single time. help me plz. model j7(2015) or (sm-j700h/ds) region Syria
Have you tried marking also the NAND ERASE option in Odin? Although marking the nand erase option would wipe the whole phone including the twrp and everything...and then try reflashing by going into download mode on your phone and then to Odin, you'll see a green/blue mark on the ICOM or something like that. If you pass on flashing and it gets stuck on bootloop, don't panic, just restart the phone and boot into recovery mode and wipe/reset user data! That should do it c:
There's also another thing you can do, you can extract the .tar.md5 using this guide There you can find the system.img file and from there, you can flash the system.img using fastboot, needless to say that you must have your bootloader unlocked!
You could also try Samsung kies/smart switch, whichever suits you c: