yashsingh1/xdaforums huggingface dataset:
[One (M9) General] efrant:
Flash the 3.38.631.2 backups from the first post and see if the issue persists. The CM nightly likely messed something up. (Your radio is still there, so I'd bet it's CM.)

In any case, the issue isn't' really related to returning to stock. Maybe ask in the CM Q&A thread, or create a new thread in the Q&A section if the question hasn't been previously addressed.

EDIT: I just saw your last post. So issue is CM related.
[One (M9) General] efrant:
If you are ever in Montreal, I can S-OFF your device for free. (Only takes a minute.) I'm occasionally in Kingston as well.

Your radio seems fine from what you posted. It's CM nightly related.
[One (M9) General] schergr:
Had the same thought. I was just cross posting over there.
[One (M9) General] randomblackguy:
Im having an issue returning to stock. I have a HTC One M9. Not s-off. running leedroid. My phone was updated to marshmallow before I rooted and install twrp

I'm trying to return it to stock as ive lost my baseband and my IMEI is blank

Its a bell phone.

On leedroid it wont let me make it s-off

so what can i do to get back to stock?

any help would be appreciated.
[One (M9) General] SaHiLzZ:
restore a stock firmware from twrp backup..if there is a backup.
[One (M9) General] randomblackguy:
Still trying to revert to stock

Im running Leedroid

Based on this information.

Ive tried

The most recent TWRP

Ive also tried version twrp-2.8.7.1_CPTB-B1-hima.img

Tried to flash

Quote:

CID - BM___001 & MID - 0PJA11000

Bell 1.32.666.30 - TWRP - HBOOT 1.00:

Quote:

Fastboot output

(bootloader) product: htc_himaulatt

(bootloader) version: 1.0

(bootloader) version-main: 1.32.666.30

(bootloader) boot-mode: download

(bootloader) version-bootloader: 1.0.0.0000

(bootloader) mid: 0PJA11000

(bootloader) cid: BM___001

Im not S-off.

How can i make it back to stock?

Any help would be appreciated

Htc download mode

***unlocked***

htc_himaulatt pvt S-OO

lK-1.0.0.0000

Radio-01.01_U11440801_96.01.51207G_F

OpenDSP-15.6.1.00522.8994_1026

OS-3.38.666.2

December 22 2015, 17:05:26(682500)

I hope this information can help

---------- Post added at 02:36 AM ---------- Previous post was at 02:32 AM ----------

I'm not entirely new to all of this. Ive rooted every phone and tablet ive ever owned with no problems. 3 Nexus 4s Nexus 7, Lg G3, G4, Nexus 6p, Nexus 9 s3, s6, Tab2....... This is the only device to give me problems.
[One (M9) General] SaHiLzZ:
You need to find a twrp backup that is 3.38.666.x. Flashing 1.x can screw up your phone.

Have you tried running sunshine on ARHD or Viper?
[One (M9) General] SaHiLzZ:
You can try to restore the Rogers 3.x firmware in the OP as well to try Soff using sunshine.

If that doesn't work, I may know a way to point you to Soff, PM me if interested/needed.
[One (M9) General] randomblackguy:
I am now S-Off

do you recommend i turn my phone into a developer version by changing the CID or would you recommend another course of action?
[One (M9) General] SaHiLzZ:
How did you get Soff? Another ROM or Rogers backup?

Course of action, that depends what's your goal.
[One (M9) General] randomblackguy:
i flashed VIPER and used sunshine. My goal is to get back to stock. Im hoping getting back to stock will fix this blank IMEI problem im having.

---------- Post added at 04:26 PM ---------- Previous post was at 04:25 PM ----------

I changed my CID to 11111111 and my MID to developer. so could i now download the developer RUU?
[One (M9) General] SaHiLzZ:
You can keep Bell cid and flash an older ruu
[One (M9) General] randomblackguy:
Is there any benefit to keeping bell cid?
[One (M9) General] randomblackguy:
I read there are no canadian RUUs only twrp backups. is that correct?
[One (M9) General] efrant:
There are Canadian RUUs (although I haven`t seen one for Bell). See here: http://androidruu.com/?developer=M9
[One (M9) General] zzzer51:
Hi all!

Here's my phone info:

(bootloader) kernel: lk

(bootloader) product: htc_himaulatt

(bootloader) version: 1.0

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

(bootloader) version-main: 3.38.666.2

(bootloader) boot-mode: download

(bootloader) version-baseband: 01.01_U11440801_96.01.51207G_F

(bootloader) version-bootloader: 1.0.0.0000

(bootloader) mid: 0PJA11000

(bootloader) cid: BM___001

It is S-ON.

Unfortunately I can't find a RUU / backup with version 3.38.666.2 so everything I have tried failed.

Any help would be greatly appreciated!

Thanks! :cowboy:
[One (M9) General] SaHiLzZ:
Whats the goal? Options:

1. restore rogers 3.x TWRP

2. install a custom rom

3. s-off, then go nuts.
[One (M9) General] zzzer51:
Thanks ! I chose option #3 and did go nuts :cowboy:
[One (M9) General] noneabove:
Hey [MENTION=1566190]efrant[/MENTION]

I ran into an issue with one of the RUUs you had posted into google drive as linked in OP. It's the 3rd one, version 2.11.631.2. For whatever reason, it's failing with code 22 (both through fastboot and through placing it on the SD card and installing it from download mode). The main concern, is that it seemed to have gotten far enough such that I can no longer install the 1.32 versions, as it thinks that it has version 2.11.x.x installed and therefore the RUU fails with error code 19. Do you have any updated RUUs that I could try or know why this issue may be coming up?
[One (M9) General] efrant:
Not sure what would be causing your issue. When you boot into download mode, what does it say your firmware version is? 2.11 or 1.32? Depending on which version it says, what I would do is flash TWRP (the latest version starting with a 2) and take the TWRP backup that I posted (in the same Google drive) corresponding to your firmware version and restore it. (I posted how-to instructions are in post 256 and in an earlier post I believe.) That should get you back to full stock and then you can take the OTA updates to the latest version.

As I said, that should work fine, but i all else fails, you will have to get S-OFF to return to stock. (If you are in Montreal I can help, otherwise, the SunShine app would be your other option.)
[One (M9) General] noneabove:
I should be more specific, it won't boot in its current state and the bootloader is relocked (was trying to get OTA updates working again), which also means i can't get it back unlocked sadly.. But the download mode says the firmware version is 2.11, however it can never actually finish the install, it always fails right near the end with error code 22 (which i read means it's corrupt, but i suppose it could be anything)
[One (M9) General] efrant:
A few points:

1) The bootloader doesn't need to be locked or re-locked to get OTA updates. OTA updates work fine with an unlocked bootloader;

2) As long as you can boot into download mode, you should still be able to unlock the bootloader. Whether it boots into Android or not is not really relevant.

3) Once you unlock the bootloader, flash TWRP and restore the images I mentioned. Once you do that, you'll be fully stock. Then it should boot fine and you should receive OTA updates fine.
[One (M9) General] noneabove:
Unfortunately when I try to get the token I get:

(bootloader) [KillSwitch] : /dev/block/bootdevice/by-name/frp

(bootloader) [KillSwitch] Last Byte is 0X00, disable unlock

(bootloader) [KillSwitch] oem unlock Turn Off!

since (i think) android semi-installed which means the oem unlock in developer options got reset. If I can get my hands on the original unlock_code.bin maybe I can still flash that, unless there's a different way to unlock relocked bootloaders that I don't know about (sorry, normally a nexus junkie, but it's my friends M9 that he messed with)
[One (M9) General] efrant:
Oooh. :(

That FRP feature that Google implemented is a real pain. (Since they implemented that, I always recommend that people keep their bootloaders unlocked unless they are fully stock.)

Unfortunately, in your case, I don't think you have any option besides getting S-OFF via a javacard/clip.
[One (M9) General] noneabove:
Yup that seems to be what it's coming down to sadly. Might try to get rogers to replace it (highly doubtful since it's 100% our own faults, but they might not realize) but other than that gonna have to find a javacard or send it to sunshine. or replace it
[One (M9) General] efrant:
Not sure where you're located, but I'm sure there are many repair shops that have a javacard available. I have one, and as I said, if you are in Montreal, I can do it for you.
[One (M9) General] noneabove:
I'm actually not far from montreal, only an hour away, might be worth the trek, I'll let you know what my friend says, might take you up on that!
[One (M9) General] efrant:
Don't panic, it's fixable... :)

Follow my instructions in post 256, which I'll post here again for you (adjusted somewhat for your situation):

1) Have an exFAT formated sdcard in your device.

2) Download TWRP and flash it to your device. Since you are on a firmware version that starts with 2, you need a TWRP recovery that starts with 2, so the one you flashed before (twrp-2.8.7.1_CPTB-B1-hima.img) is fine.

3) Boot into TWRP and make sure that the setting to keep "system" as read-only is enabled. (Look under the mounts menu.)

3) Do a backup of the boot partition in TWRP to your sdcard.

4) Go to the folder where TWRP saved the file and delete ALL the files in there. (We just need the proper folder structure.)

5) Download the 2.11.631.2 system_image, boot and recovery images from my link in the first post (or here) to the folder that you just emptied.

6) Restore the backup in TWRP. (They should work fine the exact way they are named.)

7) Done. You should now be fully stock. Reboot into Android, and you should get (and be able to install) the OTA update.
[One (M9) General] HumbleTech001:
Sorry for the late reply,(I am outside Canada and internet sucks here).

1) I followed all steps till step 5 successfully but when I boot into TWRP (twrp-2.8.7.1_CPTB-B1-hima.img), and on rebooting to recovery for the first time, it (twrp) doesn't prompt me to set system to "read only".. so I went to mount>>>and then ticked "system partition read only".

Then when I tried to restore the image, it fails saying "can not restore system -- mounted read only".

2) Note: Also what partitions should I choose to mount from "Select partitions to Mount" menu ??

Cache, data and micro sd card are already selected by default.

Please help. Thanks alot

New Update: I had by accident selected the backup from internal storage (I had no idea it was there).. that's why I got the error I described above.

Now I selected the system image from sd card and was able to successfully restore the stock images !!!

I have no words to thank you [MENTION=1566190]efrant[/MENTION] !!! I mean it... :) Thank you thank you thank you !!

I have some stuff to ask though:

(1) ->>> Now I downloaded an OTA and tried to install it.. but it rebooted my phone like 15 times to "install" the OTA. It did successfully install the OTA though. Is that normal ?? did I do something wrong ??

(2) ->>>My bootloader is still unlocked and twrp is gone obviously.. so when I go to "recovery". I see the red triangle and the arrow.. is it normal ?? did I do something wrong again ??

(3) ->>> Also next time if I wanted to restore to the stock version, can you please tell me which partitions to choose

from the "mount menu" in twrp ?? (i.e. system, boot, cache, data etc)

(4) ->>> Should I leave my sd card in "exFat" format and keep using it in exfat format.. or do I have to change it back to FAT32 or something ??.

Thanks again !!
[One (M9) General] efrant:
(1) That's perfectly normal. It reboots quite a few times before everything is updated.

(2) When you performed the restore that I had mentioned, it overwrote the TWRP that you flashed with the stock recovery. (If you did not overwrite TWRP with the stock recovery, the OTA update would fail.) That's the way it works. If you want to flash TWRP, go ahead (as you can find the stock recovery in my link in the first post for the latest Rogers ROM that you are on). Make sure that it is a version of TWRP that starts with 3, now that you are on a firmware version that starts with 3. Note that if you want to take the next OTA (when it becomes available), you will need the stock recovery, and you will need an untouched system, i.e., if you flash TWRP and don't leave system as read-only, you will need to restore the stock system_image. As for the bootloader, the lock state has no bearing on OTA updates, you will receive them and they will install whether you bootloader is unlocked or not. Unless you need the added security, I would personally leave it unlocked -- it will save you a lot of hassle in case something messes up.

(3) Follow the same procedure, just use the 3.38.631.2 images from my link in the first post. (Or create your backup yourself: need to back up boot, recovery and system_image, not system. But again, if you mounted system read/write rather than read-only, a backup won't work, because the signature on the image would have already changed.)

(4) No real need to change it to Fat32. exFat is essentially the same as Fat32, but it supports file sizes bigger than 4GB.
[One (M9) General] HumbleTech001:
I got it !! :highfive: Will do exactly as you said :)

You are awesome !! Thank you so much for everything again..
[One (M9) General] efrant:
One thing I forgot to explain: the red triangle is the splash screen for the stock recovery. To access the menu, I believe you hold down the power key and, while holding the power key down, press the volume up key. (At least that's how I did it on my previous phones -- I haven't had the stock recovery on my M9 at all...)
[One (M9) General] HumbleTech001:
Hey buddy.. Umm I know that one.. In order to access the stock recovery, hold the power button and then press the VOLUME UP button on m9 and it will take you to the stock recovery menu. I was just not used to seeing the red triangle :D

One more thing.. I keep losing my app data (like game progress etc because I do a lot of restore stuff all the time).. is Titanium backup a reliable backup method to backup your app data ?? or do you have any good (by good I mean "working") apps for such a thing in mind please ??. :highfive:
[One (M9) General] ByzLat:
Trouble restoring to stock

So I was trying to root my videotron htc m9 today. Everything was going well until I flashed the latest version of superuser (apparently only till 2.64 works). This caused a bootloop and I got out of it by flashing CM13. Now, my phone won't read my sim card because the basebands got messed up. What i'm trying to do now is go back to stock and retry rooting again properly so I can use my sim card.

I found the videotron nandroid backup file in the OP of this thread but don't know how to install it. I adb pushed it onto my phone but twrp won't restore using that.

What am I doing wrong ? does the file need to be unzipped or zipped?

My phone is currently working perfectly except the SIM card, bootloader unlocked, S-ON (sunshine app says need to go on closer to stock rom to S-OFF), TWRP accessible (I selected read and write, was that a mistake?).

Can someone please explain how to go back to stock? I need to get phone connectivity soon coz i'm about to go back to Mumbai(for work) where the only internet I have is through my phone. Thanks in advance.
[One (M9) General] efrant:
I posted instructions in post 297. Those were for Rogers, but they are the same for videotron, just use the videotron backups from the first post.
[One (M9) General] ByzLat:
Thanks a lot, absolute lifesaver you are.
[One (M9) General] Darkzero204:
I'm having troubles going back to factory stock with S-OFF

So I just got S-OFF and I'm trying my best to get my phone to go back to how I got it out of the box, I'm surprised I haven't bricked it yet

everytime when I drag the twrp recovery to the backups folder in my internal sdcard it says the file is too large and can't be transfered, I've also tried the RUU.app to set it back to stock

but it failed and said USB device isn't properly connected, when it 100% is, when I use the app it just shows 0% and then a full green bar with no %.

UNLOCKED

htc_hiamaulatt PVT S-OFF

CID-TELUS001

LK-1.0.0.0000

RADIO-0.1.1_U11440801_98.04.60115G_F

OPENDSP-15.6.1.00522.8994_1026

OS-3.40.661.2

JAN 21 2016,17:40:48(689476)

I'm extremely desperate and in need of help to get my phone

working and to get the SIM Card to read again. Please help. I've read through the posts and everything and followed the steps but I'm either having issues or I'm missing something.
[One (M9) General] efrant:
Follow my instructions a few posts up (post 297), but use your Telus back-ups. Note that you need to use an external (exfat formatted) sdcard, not your internal storage.
[One (M9) General] Darkzero204:
This will be able to get my SIM Card reading again and IMEI to appear?? ::o
[One (M9) General] efrant:
It should, yes.

Since you are S-OFF, you could also change your CID and use an unlocked/developer version RUU (found here), but then it will no longer have any Telus branding...
[One (M9) General] SaHiLzZ:
And that what I would suggest too, Dev RUU. Unless for some reason, it needs to go back to 'out of the box from telus'.
[One (M9) General] HumbleTech001:
Need help removing TWRP

Hi [MENTION=1566190]efrant[/MENTION]

I have all backups, factory images and everything for my phone. I want to remove twrp(2.8) so that I can do an OTA.

It's the same phone i.e. HTC m9 unrooted, with bootloader unlocked.

What partition should I flash to remove twrp ?? Need quick reply please.

NOTE: twrp is mounted as read-only

Thanks !

UPDATE: never mind.. I did it.. I flashed the recovery with stock recovery image and its all set !!
[One (M9) General] SorakQc:
Could you tell me where the OTA update is located once it's downloaded to the phone please Flippy please?

Edit : Nevermind, just read it... Sorry :/
[One (M9) General] TRSHD:
Hey everyone. I feel extremely ashamed to post here, but it seems I'm in way over my head...

Here's the situation:

I HAD a rooted, S-ON, 6.0 Videotron firmware and everything was good. I decided to try a new ROM. Followed the instructions and everything installs flawlessly.

Problem: my SIM card isn't recognized anymore. So, I decide to flash my TWRP backups back onto the phone. I fully wiped it beforehand. Now, I'm stuck with a brand spanking "as-new" phone that still WON'T recognize my SIM card...

Any help would be welcome. Whatever extra setup info you need, ask!

Thank you for any and all help you'd be able to provide.
[One (M9) General] SaHiLzZ:
Do you have a baseband version in settings, about devices?

If not, you need to run an RUU. If you can't find an RUU matching for videotron, you would try to S-OFF, then follow the process to convert to a developer edition version, which involved running an RUU, and hopefully that fixes that.
[One (M9) General] TRSHD:
Nope, no baseband, "unknown" version... I did find many Videotron RUU's, but I don't have the $25 to get S-OFF, full time student on a VERY strict budget... I'm screwed, aren't I?
[One (M9) General] SaHiLzZ:
Luckily efrant had offered Cheap SOFF, and he is in Montreal. PM him.
[One (M9) General] TRSHD:
Really? Ok, let me try to contact him. Thanks again, really appreciate the help!
[One (M9) General] TRSHD:
Well, this is just my day... For some reason, my XDA account isn't letting me send PM's! I've tried twice and the messages don't show up in my "sent" folder...

*somebody shoot me...*
[One (M9) General] efrant:
I received both you PMs... :) Have been very busy today. I will reply soon.

P.S. There should be a setting to save sent PMs -- yours may be off.
[One (M9) General] TRSHD:
Oh crap... Never noticed that! Sorry for the 2 messages then! :P
[One (M9) General] isnip:
hi XDA! I'm having trouble with installing an OTA. I had CM installed previously. I factory reset in TWRP, wipe system, flash my sense backup, and have the sense ROM working fine. However, I also flashed the recovery that came with my phone but it's refusing to perform an OTA.

Package expects build fingerprint of
htc/himaulatt_telus_ww/htc_himaulatt:5.1/LMY47O/579410.5:user/release-keys or
htc/himaulatt_telus_wwe/htc_himaulatt:5.1/LMY47O/579410.5:user/release-keys; this device has
htc/himaulatt_telus_wwe/htc_himaulatt:5.1/LMY47O/579410.5:user/release-keys
[B]E: Error in @/cache/recovery/block.map
(Status 7)[/B]

Installation aborted.
OTA failed! Please power off the device to keep it in this state and file a bug report!

htc_himaulatt
OS - 2.11.661.5

I installed a recovery for 2.11.661.2 because the 2.11.661.5 OTA had no recovery file. I used this recovery.

What can I do?

I've tried flashing the stock image, boot into download mode, flash the stock recovery, then boot the device, but it still does not work.
[One (M9) General] gravyflex:
My current situation is this:

{quote}

If your phone is S-ON, you can only use RUU of the same version or higher, but not of lower version.

{quote}

I had flashed twerp and installed HD Revolution ROM but stupidly relocked the phone in trying to fix my baseband issues. Now I cant boot into Android anymore.

My goal is to go back to stock. My goal is to use RRU 0PJAIMG_HIMA_UL_L50_SENSE70_ATT_BM_1.32.666.30_Radio_01.01_U11440221_62.05.50320G_F_release_427045_signed.zip which was posted on here.

I plan to rename and place on my SD CARD - but I'm unsure if I need to flash the stock recovery first or will the RRU overwrite twerp?

$ ./fastboot getvar all
(bootloader) kernel: lk
(bootloader) product: htc_himaulatt
(bootloader) version: 1.0
(bootloader) version-main: 3.38.666.2
(bootloader) boot-mode: download
(bootloader) version-baseband: 01.01_U11440801_96.01.51207G_F
(bootloader) version-bootloader: 1.0.0.0000
(bootloader) mid: 0PJA11000
(bootloader) cid: BM___001

I appreciate any guidance that can be provided.
[One (M9) General] 2WildFirE:
Pls don't show imei numbers.
[One (M9) General] SaHiLzZ:
Your main version is 3.38, but the file you are flashing is 1.32, this wont work.

Your best option is to S-OFF, and then flash this RUU back. Without S-OFF, you can't downgrade the HBOOT/Main-Ver.
[One (M9) General] flyingsolow:
Thanks efrant for post 297. :D

My first attempt failed because I didn't follow your instructions. After a few hours of other stuff, I came back and tried again and it worked great.

Some notes on what I did wrong in case it will help someone else. I acquired the emmc.win files and didn't quite understand how those files being put in a backup folder would work so instead I assumed flashing them would work, which resulted in a bootloop since my system image was messed. Tried a bunch of other stuff which didn't help. I then tried to re-install TWRP. I initially tried version 3.x.y.z, but clearly your note indicates 2.x.y.z is needed. I then followed your instructions of putting the files in the backup folder and restoring and it worked great.

Note when installing the 6.0 Marshmallow update the phone reboots like 10 times and you will be scared that you're stuck in a bootloop. It took me 20-30 mins.
[One (M9) General] efrant:
I helped you out once before, and it seemed to have worked for you, no? Why would you then do something different?

Here are some of the things you did wrong:

1) Trial and error flashing of random builds will not help. You needed to flash the system/boot/recovery images for the firmware which you already had on your device, not try each one to see which one works.

2) The reason the OTA update detected that your device was modified was because of one of two things: you didn't flash the right version or, if you did flash the right version, you did not leave it as read-only. It has nothing to do with your bootloader being unlocked, or your device being S-OFF, or the little "software status" label saying modified.

3) You should not revert to S-ON. There are very few instances that would require you to go back to S-ON.

So, to help you solve your issue, do the following:

1) unlock your bootloader via htc-dev

2) follow the steps I've mentioned (multiple times) previously in this thread.

The only thing I'm not sure of is if you messed something up by while changing the "software status" to original. If something did get messed up, and the steps I previously mentioned don't work, then you will need to get S-OFF again and flash an RUU.