[OnePlus 5T  Questions & Answers] JayDawg9099:
Disclaimer: I am no developer just someone who has done a ton of research in the last day

This may be a long post due to my extensive troubleshooting issues, so here's some background.

OP5T is the first android I've owned and I have had it for about a year. I rooted it right after I received it and haven't updated it since. With the release of Oreo, I entertained the idea of updating my firmware, which I knew meant that I'd need to factory reset my device. Yesterday was the day I decided to do it and man I regret it. Long story short, I fully uninstalled Magisk through the app, attempted to fully remove the root by means of 'full unroot' in the SuperSU app, which failed. I then was stupid enough to fully wipe my device using TWRP (I think I checked the box for every partition in 'advanced wipe'). I was then stuck in a boot loop. Eventually, I managed to use fastboot to boot recovery to TWRP. I have been stuck in this state ever since.

I am currently using 3.2.1-x | blu_spark v8.61 and previously used Magisk.

The main ROM I have been attempting to flash is OnePlus5TOxygen - 5.1.5

- https://www.oneplus.com/support/softwareupgrade/details?code=7

- https://xdaforums.com/oneplus-5/how-to/oxygen-os-5-1-5-signed-zip-t3832336 (not sure how

these are different but their filenames differ so I have tested both

The errors I have received in my troubleshooting process:

- The most infamous: Error 7

- E1001: Failed to update system image

- no file_contexts

- and a host of others I have weeded out using xda as a resource, such as many partition errors, vendor issues,

etc.

- Failed to read command: No error (terminal result when attempting to flash some ROMS through ADB)

The steps I have taken to remedy these errors:

Let me just say I have consulted tons of xda threads regarding error 7, and none work for me. I have attempted to flash using several of the latest versions of TWRP, finding the most success with blu_spark. I have attempted to sideload the ROMS, push them using ADB, and directly place them in the internal storage and no method works. I always get Error 7, with the exception below.

I have attempted to flash stock ROMS for OOS versions 5.1.4, 5.1.5, custom ROMS recommended by xda threads pertaining to the same issue, and many variations of these. Since there are no assert statements in the update_script found in the stock ROMS, which many people mentioned on the forums, I have attempted to approach error 7 from a different angle.

- Each stock ROM starts with this function, which when deleted gets rid of the 'vendor partition is not existed'

error getprop("ro.display.series") == "OnePlus 5T" || abort("E3004: This package is for

"OnePlus 5T" devices; this is a "" + getprop("ro.display.series") + "".");

is_part_existed("/dev/block/bootdevice/by-name/vendor") || abort("vendor partition is not existed, exit

ota!!");

- Even when deleting that, I found there to be two more errors that would appear every time I attempted to

flash, caused by two block_image_update functions that result in errors E1001 and E1002: These both have to do

with updating the system or vendor image.

I have attempted to delete any combination of these. If I don't delete all three functions, I will get an error pertaining to the function I didn't delete. If I do delete them, the ROM will install up to 47% every time and it will cancel (no error). This has happened for all stock ROMS I have flashed, and I have swapped to the latest stock recovery multiple times with no luck.

Additionally, I reformatted data multiple times, set the system partition to ext4, attempted to fix the file system, attempted to mount system in read only to see if that would fix the system update error, all to no avail. I also delete the cache after each ROM flash attempt as well.

I have spent at least 10 hours trying every troubleshoot option I came across on the forums and nothing has helped, which is why I am making this now. I have attempted to flash the current firmware for OP5T with every flash attempt ending with the string '...done' in the terminal, even though nothing has been changed or installed. Every time I try to reboot, it still tells me that I have no OS installed, and I can tell since my internal storage is currently using only around 100MB of usable memory. I have also locked my bootloader, wiped the device, switched to stock recovery, and attempted to clean flash the latest OS with no luck.

In conclusion, it seems that I have deleted my OS so there is nothing to boot to (I go straight to bootloader), there is an error or something missing in my filesystem that is preventing me from fully installing any ROM, and I have tried everything suggested on these forums for similar issues with very limited success. I have done much more than what I mentioned here, and if anything useful comes to mind I will update this post.

(I am also a Computer Science college student that needs a working phone drastically and have already spent so much time diagnosing this issue rather than study that I am ashamed)

I am on the brink of contacting OnePlus, even though I feel as though they wouldn't be much help, or sending this to a repair shop.

Any suggestions/ideas would be greatly appreciated. I will attempt to be as active as possible on this forum as well.