How do I install OS in Andriod phone without using fastboot and TWRP? I've tried to upgrade the rom in MOTO G4 Plus using TWRP version of 3.2.1.0 and during installation process I wiped out the existing android 7.0.1 without backup(understood the cost of backups now). As I faced error while installing android 9.0.1 with error 255 code because of TWRP some upgrade issue couldn't complete the installation process successfully. 

I tried multiple ways to upgrade TWRP which was not successful and even fastboot commands aren't working now. Whenever I try fastboot + combinational command like devices and etc it goes into an infinite loop with an error code iterator not found. After a good amount of search found about ADB and happily can connect to my device using ADB now. Then started trying with multiple options like adb side load after reading multiple forum answers and posts I did pushed a rom to scared/data/media after reading this forum NEED HELP: Accidentally deleted OS in TWRP/Cant install Rom which was successfully pushed but didn't do any thing nor I couldn't understand what to do after pushing it. 

Then started search again to install stock rom in any different ways before coming here and stumbled at this question which is similar did read the question and included forum post in it to go start the process when I did download stock rom stock rom download couldn't find any flashall.sh file to start the process

Now I'm stuck and couldn't find better place to find a working solution for this situation. Can somebody help me? What can I do while my phone is in this state?
Here is the Full Forum discussion link to the problem I've faced. Thanks everyone who tried to help me out. 

For Quick Solution follow this steps mentioned below:


If you still have access to TWRP on your device? please push 32bit flashable ROM to your device.
Try with a TWRP flashable like the stock ROM Oreo flashable https://forum.xda-developers.com/mot...-test-t3873367 and follow the instructions to install it (i.e. push to your device, or copy to an SD card, then tap install in TWRP to flash it to your device). This TWRP flashable should work on this mentioned TWRP version since it's 32 bit.
The stock ROM download would still require fastboot, so I'm not sure why the fastboot is not working and not choosing the fastboot method as of now.


FYI: error 255 when flashing custom Oreo or Pie ROMs means that the TWRP is 32 bit, whereas the custom ROM requires a 64 bit TWRP.