yashsingh1/xdaforums huggingface dataset:
[One (M8) Q&A, Help & Troubleshooting] cytherian:
I have a few questions about returning an HTC One M8 HK to stock (6.20.654.3). Sorry if this was already covered somewhere, but I was unable to locate it. There's so much information scattered all over, with the added complication of older information and files (because the One M8 came out in 2014). Also, a few comprehensive procedures declare that you must be S-OFF. I'm not...

I'm running the latest stock ROM, Marshmallow 6.20.654.3 and have TWRP plus rooted (and S-ON). Before I get into trying out some custom ROMs, I wanted to be perfectly clear on how to reset my M8 back to stock, just in case. I learned a few things the hard way back when I had my HTC Evo 3D!

I have created a nandroid backup using TWRP.

I have a copy of the stock RUU Sprint_WWE_6.20.651.3

I understand that the first thing to do is unroot. So I'd use SuperSU to do a full unroot.

Next, using TWRP I would wipe Davlik, Cache, and System.

Next, go to Restore and select my backup recovery image or exit TWRP and run a stock RUU (if I want to start over).

But after restoring my original image or stock image, the recovery would still be TWRP. How do I reload the stock recovery? Would I have to do a factory reset first before restoring my nandroid or stock image?

Side question -- when I created a backup using TWRP, I included "Boot"... should I leave that off? I'm wondering if factory reset restores that, and restoring the backup might overwrite it.

Thanks for any assistance!
[One (M8) Q&A, Help & Troubleshooting] ckpv5:
Everything that you need is available in Sprint thread

https://xdaforums.com/showthread.php?t=2729173

To be back to stock (total stock), just relock bootloader and install Sprint_HTC_One_M8_HK_6.20.654.3_RUU .. done
[One (M8) Q&A, Help & Troubleshooting] cytherian:
Thank you, ckpv5.

Just a couple more questions, if you don't mind (really appreciate the help):

EDIT: I have educated myself a bit more and discovered that I had some misconceptions. I now understand that when TWRP makes a nandroid backup, by default it is including the following partitions: boot, data, recovery, and system. System and data partitions are the "big kahunas." Huge files. This nandroid backup does include the recovery, so when restored whatever recovery is in place (such as stock after RUU) ends up getting refreshed with TWRP. Even though TWRP FAQ states "There's usually no reason to back up cache or recovery." I checked my backup, and recovery.emmc.win is there.

I'm presuming that if I make another nandroid backup and excluded the recovery partition, then I'd be good to go for using this backup after flashing back to a stock RUU. Or, could I just archive/delete the recovery files from the existing backup?

If I wanted to directly replace TWRP with a stock recovery, could I simply flash the full firmware containing the recovery image? Of course, I'd make sure the firmware matched my phone (modelid: 0P6B70000, cidnum: SPCS_004) and locked the bootloader (since I'm S-ON). I'm presuming after this, I would still be able to unroot (selecting "full unroot" from SuperSU app) just in case I needed to turn my phone in for servicing.
[One (M8) Q&A, Help & Troubleshooting] ckpv5:
When you make a nandroid backup which include recovery, you actually make a backup of twrp recovery itself. That is why after restore all boot, data, system & recovery you still have twrp recovery. If you need to have stock recovery, just fastboot flash stock recovery that you can extract out from firmware.zip. Flashing firmware.zip after restore your backup will achieve the same goal bug you need to relock bootloader before flashing firmware.zip as your device is S-On.

Unrooting with SuperSU full unroot function will not really brings your device back to actual stock as some files modded by SuperSU will still be there especially the binary files.

The best to fully unroot is :

1. Make a nandroid backup before you root your ROM and restore this one

Or

2. Install RUU which will wipe everything in your device.

Also note, without S-Off, you can't revert the unlocked bootloader to locked, it will be relocked.

Why do you worry about root to send in for servicing ? Is your device still under warranty ? Don't know if still a device which is almost 4 years old is sold under warranty.
[One (M8) Q&A, Help & Troubleshooting] cytherian:
Thanks! I learned a bit more and this info confirms most of it. In the M8 Guide by exad I'd read

Is that right about the recovery, that the RUU will fail if stock recovery isn't in place? I'm thinking not, as you'd said "Install RUU which will wipe everything in your device."

I mentioned about servicing as just a quick reference cause for complete stock, but you're right -- at 4 years since release, the M8 is too old for that. But if I move on to another phone and want to sell my M8, I'd want it to be completely stock (no red text on splash screen, no "re-locked" message in bootloader). I guess as long as the splash screen is clear, it should be OK because most consumers won't even have a clue about how to get into HBoot. Since there are limited ROMs available for the M8 now and most everyone has moved on (no more updates), I won't get heavily into modding... no selective boot/kernel replacements, so I figured I would be fine with S-ON. I was hoping there was a "nougat" ROM for the M8 HK that doesn't require S-OFF, but it looks like that doesn't exist... so I may have to go to S-OFF after all.

One other question -- when you unlock the bootloader, the user data is wiped (so it's like starting with a new phone). That doesn't happen with you re-lock. But... if you unlock it the next time, does the user data get wiped again? Or does it only happen when "locked" not "relocked"? I just want to know the consequence for the effort involved (reloading all apps, restoring HTC Sync data, restoring backed-up SMS, and re-applying user configuration/options).
[One (M8) Q&A, Help & Troubleshooting] xunholyx:
You don't need to have the stock recovery installed. The RUU will install that when you run it. But if you are S-On you do need to relock your bootloader before running the RUU

---------- Post added at 10:15 AM ---------- Previous post was at 10:13 AM ----------

Yes, when you unlock it again your data will get wiped. The RUU will wipe your phone anyway, so unlocking the bootloader right after running the RUU is the best way to go if you plan on unlocking. Don't bother signing into Google and restoring your phone first before unlocking the bootloader
[One (M8) Q&A, Help & Troubleshooting] cytherian:
Good to know, thanks for clearing that up xunholyx! If after installing a custom ROM I decide to go back to stock, I'll be sure to use the nandroid backup I made from the stock ROM. Since that will include the call log and SMS messages from the time of that backup, what's the best way to catch up? I know Google doesn't backup SMS, so I'd have to do a selective restore from the SMS backup app in use (everything following the nandroid backup date); or simply just make a backup prior to the ROM restore, wipe old messages and restore fresh backup. Does the Google stored current call log restore without making duplicates of the older call log data?
[One (M8) Q&A, Help & Troubleshooting] xunholyx:
Actually, Google does back SMS up now. I unlocked the bootloader on my Pixel 2XL last night, and when I restored through Google all my text messages and call logs were restored as well.
[One (M8) Q&A, Help & Troubleshooting] cytherian:
Yes, seems so for Nougat now. I'm on Marshmallow and in the Backup & Reset screen, there isn't that level of granularity on backups. Btw, nice choices on the Pixel 2XL. I've been seriously considering that as my next primary phone.

Incidentally, I visited the LineageOS.org site and their Nougat ROM does support the One M8... but they don't seem to distinguish between HK and non-HK. My understanding is that if I was going to apply a non-HK ROM to my device, I'd have to be S-OFF... but that I'd also lose the driver that supports the HK speakers (and you need S-OFF to reapply). If it turns out only way I can get LineageOS is by S-OFF, I may just bite the bullet and do it. I've just felt more comfortable with S-ON...
[One (M8) Q&A, Help & Troubleshooting] ckpv5:
LineageOS Nougat or Oreo has no HK or Boomsound support. It has only generic sound control audiofx or musicfx. So doesn't matter you install it on non-HK or HK device. If you want HK sound, you have to stick on HK supported ROM which is Sense based & Marshmallow. And you don't need S-Off to install LineageOS. Once you restore your Sense ROM backup or install a ROM with HK support, you'll get your HK sound back.
[One (M8) Q&A, Help & Troubleshooting] cytherian:
Thanks, ckpv5. I was afraid of that, given the lack of info... and your explanation clears things up. I find the HK sound is really very good--it takes advantage of the M8 speakers nicely. But it's not critical... would be fun to explore LineageOS and I'm glad S-ON is OK. I'd read a fact sheet or FAQ that said something about the mid and cid need to match the zip with S-ON -- is that only for an RUU and firmware image, where hboot and recovery images are included? So this wouldn't apply with LineageOS? (I checked the zip and there's only boot and system).
[One (M8) Q&A, Help & Troubleshooting] ckpv5:
Yes .. only for RUU & firmware.

Yes .. not only for LineageOS but other custom ROM too but most ROM require your device firmware is updated to the latest Marshmallow for it to work.

For your case .. LineageOS should not be a problem but any Sense based custom ROM you want to install make sure it has Sprint HK support stated in their thread. Some GSM ROM works only on GSM device.
[One (M8) Q&A, Help & Troubleshooting] redpoint73:
Any time your unlock the bootloader, user data will be wiped. It doesn't matter if it was previously unlocked/relocked.

Additionally, relocking the bootloader with s-on, renders the phone unable to boot until you run RUU (or alternately, unlock the bootloader again). So either way, your user data is going to get wiped as a result of relocking the bootloader (as well as unlocking it).

---------- Post added at 09:30 AM ---------- Previous post was at 09:24 AM ----------

Flashing RUU removes the red text. It will only ever say RELOCKED (or UNLOCKED) once it's been unlocked, unless you have s-off. But it's not recommended to s-off, just to hack the bootloader to say s-on (just to sell the phone).

If selling the phone, you should always disclose that the bootloader has been previously unlocked, phone modded, etc. (but "returned to stock" if that description is appropriate). It's dishonest to conceal these facts. And can end up being harmful to the buyer under certain conditions.
[One (M8) Q&A, Help & Troubleshooting] TheMadKing:
I have a Verizon HTC One M8, it's S-OFF, is it possible to convert it to an unlocked/WWE version? I'm in Europe, and while I don't think that using it with the Verizon software will be that problematic, I'd love to convert it to stock Sense without any carrier bloat.

It seems that I found a thread about it, it says that it's pretty dangerous to try something like that.

Would converting it to GPE be easier or more difficult?

Thank you very much.
[One (M8) Q&A, Help & Troubleshooting] ckpv5:
Yes it is very dangerous to convert your Verizon device to EU and unfortunately you did it. You should revert everything back to Verizon and check whether your radio still working, you can get data working. If it already bricked, try a KitKat verizon RUU to fix it then only update to the latest Marshmallow.

If you want it to run a EU/WWE ROM, you can install a custom ROM based on EU and has Verizon support. You can try this -

https://xdaforums.com/htc-one-m8/development/rom-sense-6-12-401-4-mra58k-stock-t3296066

But first make sure your radio is not bricked after you converted your CDMA device to GSM.
[One (M8) Q&A, Help & Troubleshooting] TheMadKing:
Well, I'm not sure if it works or not. It shows me that it has signal, and I'm able to call others, but during the setup, it told me that my SIM card isn't from Verizon Wireless, and I can't activate mobile data, and it shows me that the sim card is missing right on the left of the signal bars.
[One (M8) Q&A, Help & Troubleshooting] redpoint73:
Your broke the radio when you flashed the Euro firmware. SIM error is a known symptom. You need to go back to Verizon RUU as ckpv5 instructed.
[One (M8) Q&A, Help & Troubleshooting] TheMadKing:
Manually adding the access point seems to make the mobile data work, even if of course, it's not LTE.

I'll flash the KitKat RUU, is the one found in this thread good?

https://xdaforums.com/verizon-htc-one-m8/development/ruu-m8vzw-4-4-4-s-off-onlynewest-t2914914
[One (M8) Q&A, Help & Troubleshooting] redpoint73:
Does it still say SIM missing?

The RUU you linked is not an "official" one. I think it was made by a dev, before the official ones were leaked. You can find the Verizon RUUs here: https://xdaforums.com/verizon-htc-one-m8/general/official-ruu1-55-605-2-t2883845
[One (M8) Q&A, Help & Troubleshooting] TheMadKing:
The data shows 4G/LTE now.

I think so. I mean, it's a symbol, one that I've never seen before. My old One M8 was European, and I haven't spent any time with it without a working SIM card in.

https://imgur.com/a/fzcbI
[One (M8) Q&A, Help & Troubleshooting] redpoint73:
It still has the "SIM missing" icon. So you definitely broke something by flashing the wrong firmware. I'm surprised voice and data work at all.
[One (M8) Q&A, Help & Troubleshooting] TheMadKing:
I'll flash the 4.4.4 RUU zip then

---------- Post added at 06:25 PM ---------- Previous post was at 05:55 PM ----------

I flashed the RUU, everything was alright, and upon booting the phone and entering the setup, the same SIM card missing icon can be seen up there, but once again, the mobile data is working, and the signal bars are there. The setup itself is however giving me a message called Phone activation, which mentions that the SIM card is from an unknown source - the only option given is to leave the setup.
[One (M8) Q&A, Help & Troubleshooting] TheMadKing:
I have no knowledge on the matter, but if the SIM is actually working, couldn't the no SIM icon just be something from Verizon? I have an European GSM sim card. And all my attempts to install European RUU's failed before I flashed the MM Verizon. The phone itself is second hand, and came with Kitkat, but it had no Verizon branding anywhere, hardware or software, which is why I didn't bother to check - it was also S-OFF and unlocked.

I'm thinking about flashing the Marshmallow RUU for Verizon, since I can't update through OTA, and then I'd like to install that ROM recommended by ckpv5.
[One (M8) Q&A, Help & Troubleshooting] redpoint73:
Could be. Did you actually see any message saying "missing SIM" or did you just see the SIM icon with the question mark, and thought of "missing SIM"? Since that icon may mean the SIM is just not recognized as a Verizon one.

An error message saying "no SIM" and no signal (no voice or data) is the usual result of flashing non-Verizon firmware/RUU. Not exactly the same as your situation, obviously. But your mention of "missing SIM" is where I may have gotten mixed up regarding the icon you are seeing.

The getvar info you posted in another thread here, where it indicates 6.12.401.4 for "version-main" means the Euro RUU or firmware was installed, or at least partially installed at some point.

Just because the installed ROM did not have any Verizon branding, does not mean there was no Verizon software. The phone could have (and probably had) a unbranded ROM installed, but still had the Verizon firmware (radio, kernel, etc.).

Further, the phone didn't have any Verizon physical branding, since we often see the back plates swapped to remove US carrier logos. In fact, you will probably see a model number on the back cover that corresponds to some other model (not Verizon) but the getvar info is what you have to go by (product ID "m8_wlv" means Verizon).

That is probably a good idea. ckpv5 always gives excellent advice.
[One (M8) Q&A, Help & Troubleshooting] cytherian:
Thanks -- I understand it now. I'm getting over my angst of restoring all user data, as it seems that it doesn't take all that much time once you get the hang of it. I really don't plan on selling the phone (amazing how fast these phones depreciate), but if I did I'd disclose that the bootloader had been unlocked for customization.
[One (M8) Q&A, Help & Troubleshooting] TheMadKing:
No, I've never seen any messages saying that the SIM was missing. Both in Verizon MM and in Verizon KitKat however, I've received a similar message that basically said that the SIM was coming from an unknown source. Since I've never experienced any issues like this, I've assumed that it could have been a radio issue, but I'm thinking more that it's just Verizon.

Yeah, I've tried to convert it to European unlocked, having no idea that it was a Verizon model in the first place.

Yeah. It is a second hand model, and I'm guessing that the seller tried his best to make it seem as if it was an unbranded model. The phone was S-OFF, it had the SuperCID in place, and in the two minutes I've spent on the original KitKat software before deciding to return it to European, I saw nothing that would have made me think that this was a Verizon model. At some point only, after the European RUU's had failed, did I see the "m8_wlv".

And yes, I'll try to do what ckpv5 has suggested. Thank you both for the help.

Everything seems to be working!
[One (M8) Q&A, Help & Troubleshooting] exad:
To clarify, when I wrote that guide, RUUing would cause the phone to brick or semi brick under certain situations. Hence many of the warnings and precautions. It is possible, at this time, that the risk of bricking is decreased but I have not had an M8 for some time and cannot confirm.
[One (M8) Q&A, Help & Troubleshooting] cytherian:
Yep, understood -- sometimes things change or get discovered after the fact. :) Thanks again for taking the time to write the guide. Anything you miss about the M8? Or is your Google Pixel meeting all of your expectations?

---------- Post added at 12:56 PM ---------- Previous post was at 12:53 PM ----------

I've been reading up a bit on the Xposed framework and it sounds intriguing. Having the ability to introduce features and customization without having to flash an entire ROM is compelling. Is it capable of delivering much of what's included in Sense 8? Or do you need to go with something like s-rom for a good Sense 8 experience?
[One (M8) Q&A, Help & Troubleshooting] Hedwig5:
Hi!

I have an HTC M8 flashed with S.Team-JW-7.5.0, but I have no LTE connection (Germany, O2). Could it have something to do with the Baseband-Version (1.21.213...). Another HTC M8 (original ROM) has Baseband-Version 1.29.2145... and LTE works.

Here is the output of fastboot getvar all

(bootloader) version: 0.5

(bootloader) version-bootloader: 3.19.0.0000

(bootloader) version-baseband: 1.21.21331147A1.19_2G

(bootloader) version-cpld: None

(bootloader) version-microp: None

(bootloader) version-main:

(bootloader) version-misc: PVT SHIP S-ON

(bootloader) serialno: XXX

(bootloader) imei: XXX

(bootloader) imei2: Not Support

(bootloader) meid: 00000000000000

(bootloader) product: m8_ul

(bootloader) platform: hTCBmsm8974

(bootloader) modelid: 0P6B13000

(bootloader) cidnum: 11111111

(bootloader) battery-status: good

(bootloader) battery-voltage: 0mV

(bootloader) partition-layout: Generic

(bootloader) security: on

(bootloader) build-mode: SHIP

(bootloader) boot-mode: FASTBOOT

(bootloader) commitno-bootloader: df77f8b7

(bootloader) hbootpreupdate: 11

(bootloader) gencheckpt: 0

all: Done!

finished. total time: 0.007s

What could I try?
[One (M8) Q&A, Help & Troubleshooting] xunholyx:
Version-main is blank. That points to a very old and outdated version of TWRP. That would be the first problem.

Plus S-ROMs seem to be sketchy. I see a lot of issues posted with S-ROM as the OS installed, although most of them seem to be related to audio problems
[One (M8) Q&A, Help & Troubleshooting] Hedwig5:
So, what would you suggest to try?
[One (M8) Q&A, Help & Troubleshooting] Einwod:
You have supercid, so first download and try sunshine. If it's been paid for before, it should work again for free. Then get the latest version of TWRP and flash an MM firmware.
[One (M8) Q&A, Help & Troubleshooting] 4yush:
What does this icon mean?

It is showing in my status bar but no notification exists
[One (M8) Q&A, Help & Troubleshooting] basamadel52:
help me please

dear,

i have an m8 and i have been forgotten my pattern and the tab recover through my acc isn't available and my volume down is broken so i want you to help me get my data without formatting the mobile and unlocking my mobile

thank you
[One (M8) Q&A, Help & Troubleshooting] Einwod:
Is the bootloader unlocked? Do you have a custom recovery? TWRP?
[One (M8) Q&A, Help & Troubleshooting] redpoint73:
My thoughts would be to try O2 firmware or unbranded Euro firmware/RUU. You may be able to flash while s-on, since you have SuperCID (not sure). But as mentioned, if sunshine was originally used to s-off, the sunshine app should s-off the phone again, at no charge.
[One (M8) Q&A, Help & Troubleshooting] redpoint73:
Never seen that icon before on the stock ROM. Maybe associated with a 3rd party app?
[One (M8) Q&A, Help & Troubleshooting] acharfi:
Please help! I have been trying for months

I can't seem to figure it out, Love this phone, I have tried nearly everything to get this phone to work. One day I decided to update (OTA) and upon completing updates it never booted to the OS again. S-ON, has never been S-OFF and have tried to follow ckvp5's guide and many other guides with no success. I have flashed zip files over and over again but it stays on the HTC logo after O2's pic thing on bootup. Spent too much time trying to fix it, I simply can't give up now, would anyone please guide me or help me!

These are my phone's getvar detials:

(bootloader) version: 0.5

(bootloader) version-bootloader: 3.19.0.0000

(bootloader) version-baseband: 1.29.214500021.12G

(bootloader) version-cpld: None

(bootloader) version-microp: None

(bootloader) version-main: 6.13.206.5

(bootloader) version-misc: PVT SHIP S-ON

(bootloader) serialno: *****************

(bootloader) imei: ****************

(bootloader) imei2: Not Support

(bootloader) meid: 00000000000000

(bootloader) product: m8_ul

(bootloader) platform: hTCBmsm8974

(bootloader) modelid: 0P6B10000

(bootloader) cidnum: O2___001

(bootloader) battery-status: good

(bootloader) battery-voltage: 0mV

(bootloader) partition-layout: Generic

(bootloader) security: on

(bootloader) build-mode: SHIP

(bootloader) boot-mode: FASTBOOT

(bootloader) commitno-bootloader: 76df2b54

(bootloader) hbootpreupdate: 11

(bootloader) gencheckpt: 0

all: Done!

Any help would be greatly appreciated.

Many thanks,

acharfi
[One (M8) Q&A, Help & Troubleshooting] redpoint73:
The description of what you have tried is too vague for us to troubleshoot. If you want us to help, please describe in detail, what you tried, and include:

1) Step by step, what you did

2) Exact file names of what you tried to flash

3) Exact command syntax, for any commands you ran

4) Resulting error messages, or other results (phone status, flash successful, etc.)

5) Bootloader screen says UNLOCKED?

6) TWRP installed? If so, what version number?

I don't know what "many other guides" means, as again the statement lacks any useful details to have any idea what guides you mean. But ckpv5's guide is the best. So I suggest you stick with it, and the problem is most likely just a user error, that we can fix if we have more details. In particular, ckpv5's method (to restore stock TWRP backup) doesn't actually instruct you to flash any zips. So I think that is your main problem (not following the instructions properly).