[One (M9) Q&A, Help & Troubleshooting] mikegrimwade:
I have an HTC One M9. It used to have Venum's Viper OS installed. Then about a week ago it began to update all the google apps, consequently they would then regularily but randomly close. It was annoying but I was living with it until I had the time to google what the cause/solution may be.

However the other day I was forced to reboot my phone and discovered that it would not boot. I got the initial white HTC screen with the red build notice at the bottom as usual then it would start the boot animation but would then freeze and reboot. Essentially it was stuck in a reboot loop.

I tried booting into TWRP and clearing the Cache - No change

I tried a full factory reset - No change

I tried flashing the viper rom again - It appeared to go well but when it came to the reboot I was back at sqaure one.

Ok getting desperate now I tried flashing the system.img and boot.img from TWRP - The behavior remained.

Then I made what I believe to be a real mistake and flashed what I think was a stock recovery.img

This left me in a real mess.

I can boot into the bootloader. It is unlocked and S-ON.

If I select reboot to download mode it fails with a nice red message.

I can select recovery mode but it will slip back into the reboot loop.

To actually get into recovery I have to select reboot to bootloader and once it's rebooted and back on the bootloader screen I can the select recovery mode.

Once in recovery mode I have some very limited options.

Apply update from ADB - I've been unable to get this to work

Wipe data/factory reset - This works but doesn't fix anything

Wipe cache partition - This works but doesn't fix anything

Reboot to bootloader - This works

Power Down - Also works

View recovery logs - Yep loads of technical gumf I don't really understand

Apply from phone storage / Apply from SD card

At the bottom of the recovery mode screen in yellow I have a number of error messages. Something like

E;missing bitmap oem_unlock_bg

(code -1)

E;missing bitmap oem_unlock_bg_yes

(code -1)

E;missing bitmap oem_unlock_bg_no

(code -1)

handle_cota_install: install cwpkg to /cota/cwpkg.zip

handle_cota_install: install cwprop to /cota/cw.prop

E:Fail to open file /sys/devices/platform/android_usb/host mode

Write host_mode error

handle_cota_install: no CW files. Skip cw installation.

I have ADB/Fastboot however...

Fastboot oem lock fails as does fastboot flashing lock

Attempts to fastboot flash the TWRP recovery back fail due to the S-ON state.

Fastboot getvar all shows the following but no CID or MID info

(bootloader) version:0.5

(bootloader) variant:MTP eMMC

(bootloader) secure:yes

(bootloader) version-baseband:

(bootloader) version-bootloader:

(bootloader) max-download-size: 0x20000000

(bootloader) partition-type:cache:ext4

(bootloader) partition-size:cache: 0x14000000

(bootloader) partition-type:userdata:ext4

(bootloader) partition-size:userdata: 0x5e0000000

(bootloader) partition-type:system:ext4

(bootloader) partition-size:system: 0x118000000

(bootloader) serialno:FA5B5YJ01037

all:

finished. total time: 0.133s

htc_fastboot finished. total time: 0.351s

I've tried connecting the device to laptop and running RUU update utility from HTC but it either cannot connect or it reports a battery state of less than 30% (when I know it's fully charged).

I read somewhere that you can flash an RUU by putting it on the SD card and rebooting into the bootloader but I've not had any luck with this yet. It maybe that I'm not using the right RUU without being able to gather the CID or version numbers it's just guesswork.

I'm currently researching if it would be possible to get the recovery partition mounted to my Kali Linux laptop and use DD to flash the TWRP image back on but so far I've found nothing suggesting that this would be possible.

Apologies for such a long post but I wanted to paint as detailed a picture of my current hell as I could. I suspect this maybe a case of NAND death. If so does anyone know if replacing the mainboard will resolve the issues?

I'm running out of options here but I'm determined. I just need help with my next move. Any suggestions are welcome.