yashsingh1/xdaforums huggingface dataset:
[One (M9) Original Android Development] Captain_Throwback:
There is no hidden stock recovery in /system on the M9. That reference does not refer to this device. Apparently some devices do that. So, once you flash TWRP, stock recovery is overwritten. The stock recovery mentioned in the restore process would be one acquired from an OTA firmware.zip or RUU.

You'll be able to flash any GSM stock recovery that's floating around to your device if you need to return it for warranty purposes - it just won't be able to install an OTA (which I assume you wouldn't care about since you'd be returning the device).

EDIT: It is possible to modify any stock recovery to work for installing an OTA. It just requires Android Image Kitchen and modifying 2 lines in default.prop in the recovery ramdisk.
[One (M9) Original Android Development] nkk71:
sorry for more OT, but just FYI seems on the M9 you can "fastboot flash recovery <name of file>.img" even with a (re)locked bootloader (provided you are S-OFF)

discussion from here:

http://xdaforums.com/showpost.php?p=61761548&postcount=58

http://xdaforums.com/showpost.php?p=61761675&postcount=59

http://xdaforums.com/showpost.php?p=61762104&postcount=63
[One (M9) Original Android Development] krp5150:
delete
[One (M9) Original Android Development] nkk71:
well, from post #1 (as well as many other places):

NOTE: ONLY AOSP/GPE decryption is supported!! TWRP CANNOT (currently) decrypt HTC Sense ROMs!!

and ViperOneM9 is HTC Sense ROM

.
[One (M9) Original Android Development] minhlc1956:
My phone htc m9 have s-off and super cid, TWRP recovery 2.8.7.1_CPTB-B1. I encountered obstacles when flash a custom rom (LeeDrOid, VeperOne, Eragon, MaximusHD, Android Revolution HD),

Flash rom success message, but when the phone restarts it hangs on the screen HTC because it does not automatically flash the boot.img.

So I have to flash boot.img with pc via fatboot regime.

I have to how to flash a custom rom without flash boot.img with pc?

Hope all the help I sincerely thank
[One (M9) Original Android Development] clsA:
I think your not wanting long enough for the first bootup. My phone sits on the HTC load screen 3 to 5 min sometimes before continuing to bootup.

I have never flashed a boot.img separately and all the roms you tried work for me
[One (M9) Original Android Development] minhlc1956:
Standby time of up to over 10 minutes I still do not get.

When I flash pc boot.img by the time carrying only 3 minutes. I have repeatedly unchanged

Thank you for answer
[One (M9) Original Android Development] Captain_Throwback:
Are you S-ON or S-OFF? And if the latter, is your bootloader also unlocked?
[One (M9) Original Android Development] minhlc1956:
My phone has been unlocked bootloader, s-off, super cid 11111111.

Thank you for answer
[One (M9) Original Android Development] Captain_Throwback:
In that case, I have no idea what the issue is, since it apparently is only occurring on your device. I guess you'll have to continue flashing the boot.img separately if you can't figure out the issue.
[One (M9) Original Android Development] osiedacz:
Successful Restore and OTA on ATT

So after I asked so many questions about how to do it, the time finally came for me to restore my system image and take the OTA. I followed all the steps in the 3rd post and it went off without a hitch. Thank you very much for the support in this thread. In the end I extracted the stock recovery from the 1.32.502.31 RUU and renamed it to recovery.emmc.win so I could flash that image along with the system image. For anyone on ATT and needing the recovery from the 1.32.502.31 ROM, I posted it here:

http://xdaforums.com/showpost.php?p=61912270&postcount=369
[One (M9) Original Android Development] tele_jas:
For some reason, inside Twrp my battery always displays 66%. It was on the charger all night, showed 100%,in android and still on the charger when I rebooted into recovery and showed 66%,battery. the temp changed, just not the battery.

Any suggestions on how to reset this? I did a battery calibration inside my ROM and re-installed Twrp... Still at 66%.
[One (M9) Original Android Development] jollywhitefoot:
It's a bug in TWRP. See post #3
[One (M9) Original Android Development] tele_jas:
And I can't use the noob excuse either, just lazy today... Thanks!
[One (M9) Original Android Development] Captain_Throwback:
Well, I have some bad news.

I will be returning my M9 to HTC, so I'll no longer have one. Thanks for all the support and testing and helping it to get as stable as it has gotten. I'll continue to try and support the thread as best as I can based on my knowledge of the device.

My M8 will once again be my main device.
[One (M9) Original Android Development] p50kombi:
I flashed mine in download mode and no problems...

I got same message when trying to flash in bootloader
[One (M9) Original Android Development] m03sizlak:
The problem was I was unable to spell recovery. Think I got that sorted out now.
[One (M9) Original Android Development] Warjcowski:
thanks

I haven't seen you since the fuze days. You aren't receiving enough credit for this work. I'm not unlocked and haven't used this yet, but I gave you a little donation.

4562-9204-6676-0361
[One (M9) Original Android Development] Captain_Throwback:
Thanks! Much appreciated :).

I do miss the days of WinMo and my Raphael. That's where it all began for me. Well, mostly. Welcome to the party!
[One (M9) Original Android Development] p50kombi:
Yeah, I know the feeling..

I know you from back then as well..

My first htc was actually a qtek..

Orange spv-c500 I think it was called

sTill have my spv m3000 which I still use as my dutch phone :)
[One (M9) Original Android Development] Jonny:
Getting errors about an incorrect recovery.fstab when flashing test builds of my ROM's (and others, flashed LeeDroid's just to confirm this). I diffed the stock fstab and twrp fstab and they are really different.

Log:

I:emmc_scan_partitions:[partition_count:50] [allocat_num:128]
bad option "flags=display="Cache""
skipping malformed recovery.fstab line: /cache	ext4	/dev/block/bootdevice/by-name/cache	flags=display="Cache"
bad option "flags=display="System""
skipping malformed recovery.fstab line: /system	ext4	/dev/block/bootdevice/by-name/system	flags=display="System"
bad option "flags=display="Recovery""
skipping malformed recovery.fstab line: /recovery	emmc	/dev/block/bootdevice/by-name/recovery	flags=display="Recovery"
bad option "flags=display="Micro"
skipping malformed recovery.fstab line: /external_sd	vfat	/dev/block/mmcblk1p1	/dev/block/mmcblk1	flags=display="Micro SDcard";storage;wipeingui;removable;andsec
bad option "flags=display="USB-OTG";storage;wipeingui;removable"
skipping malformed recovery.fstab line: /usb_otg	vfat	/dev/block/sda1	/dev/block/sda	flags=display="USB-OTG";storage;wipeingui;removable
bad option "flags=display="SD-Ext";wipeingui;removable"
skipping malformed recovery.fstab line: /sd-ext	ext4	/dev/block/mmcblk1p2	flags=display="SD-Ext";wipeingui;removable
recovery filesystem table in updater...
=========================
0 /tmp ramdisk (null) (null) 0
1 /boot emmc /dev/block/bootdevice/by-name/boot (null) 0
2 /data ext4 /dev/block/bootdevice/by-name/userdata (null) -16384
3 /devlog ext4 /dev/block/bootdevice/by-name/devlog (null) 0

Is this something we should worry about or good too ignore?
[One (M9) Original Android Development] Captain_Throwback:
This is dependent on the update-binary being used in the ROM zip. Seems like it's a stock HTC update-binary expecting specific HTC stock recovery content. That's why I provided an AOSP-built update-binary so that these issues wouldn't be issues at all.

However this shouldn't prevent the ROM from flashing, so it probably doesn't really matter.
[One (M9) Original Android Development] Jonny:
Cool, thanks for the explanation :)
[One (M9) Original Android Development] Macropoutsis:
Hey Cap. Good to see you here. I'm getting my m9 tomorrow.:good:
[One (M9) Original Android Development] herwegan:
[MENTION=1162986]Captain_Throwback[/MENTION], nice work mate, you should get more credits for giving the M9 a proper TWRP build! Missed that on the M7 after some time..

Keep it up! :)
[One (M9) Original Android Development] Captain_Throwback:
Uploaded 2.8.6.2 to the Beta folder.

Just a minor update that uses the stock exFAT module instead of exfat-fuse for SD card access. Improves performance a bit, is more reliable, and allows apps like AROMA File Manager to access the external SD properly.

I made sure I changed the version number this time to avoid the confusion the previous beta version seems to have caused. Please let me know if you have any issues with it. Thanks!
[One (M9) Original Android Development] DroidShift79:
thanks for the update

so far:

- flashed flawlessly with fastboot in downloadmode

- I'm able to mount system

- was able to flash a bootanimation
[One (M9) Original Android Development] Captain_Throwback:
http://xdaforums.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133

Everyone go thank [MENTION=631273]Chainfire[/MENTION] for providing a SuperSU zip that accomodates our workaround to keep the system read-only :).

Now, using the official TWRP 2.8.6.0 or either of my Beta versions, SuperSU should install with no problem. I do still recommend using the latest Beta version, though ;).
[One (M9) Original Android Development] Captain_Throwback:
Alright, one last update for today (2.8.6.3 Beta) - thanks to [MENTION=4878287]_that[/MENTION], got the custom init working properly so now the device and model IDs are detected and reported properly by getprop :).

Again, not a major update or anything, just getting closer to perfect ;).
[One (M9) Original Android Development] Electronic Punk:
Quick one.

I was testing various roms earlier and as part of that I used TWRP to wipe data.

After that backups or new installed had numerous errors with all kinds of apps but mainly SytemUI.apk and caused me massive pain.

I actually had to RUU again to get it back.

Any idea if there is something amiss there with this?
[One (M9) Original Android Development] Captain_Throwback:
I have no idea. I've restored data with no issue, but I haven't flashed a plethora of ROMs, either.
[One (M9) Original Android Development] Macropoutsis:
Hey Cap. I can't find the link to the latest beta (2.8.6.3 Beta). If you can link me. Much appreciated. :D

Edit: Never mind. I found it.
[One (M9) Original Android Development] kautious619:
Wrong place to ask
[One (M9) Original Android Development] fearomoon:
i messed it up :( installed 2.8.6.3 and did a nandroid backup....flashed leedroid with Aroma error 7. restored nandroid backup an now i'm stuck at boot Screen with green htc logo...please help
[One (M9) Original Android Development] DroidShift79:
Hi mate, I'm still confused about the different twrp versions. Even more after chainfire brought out SuperSU 2.48.

At the moment I'm still on your second beta version. You told, official twrp now works, also you brought a new beta. What's the difference?

One more thing to clear up, plz. Is there now a version of twrp / SuperSU which keeps the ability of Ota? Thx for your help
[One (M9) Original Android Development] Sneakyghost:
And that decision was based on what exactly? Sad to hear. Really. Hoped you would be there for the ride.
[One (M9) Original Android Development] Captain_Throwback:
Based on they wanted it back ;). I would've kept it indefinitely, otherwise.
[One (M9) Original Android Development] Sneakyghost:
Oh I was just about getting mad at you for returning it. So, yea, I understand :D

We need your help with TWRP here or else its gonna be a flashing nightmare in a couple of months :p
[One (M9) Original Android Development] Captain_Throwback:
Hopefully M isn't too much of a deviation from what we've come to expect for the M9 as far as updates go. If it isn't, all good. If it is, that's when support becomes tricky without a device.
[One (M9) Original Android Development] nkk71:
In best maritime tradition, I wish you clear horizons.

You've been an inspiration!
[One (M9) Original Android Development] aly19:
Kind of stuck here.

I flashed TWRP 2.8.7.0 and it does not give me a way to flash SuperSU. I believe it is because it is TWRP with the system partition in read-only mode. How do I go about changing it so I can flash SuperSU?

Thank you
[One (M9) Original Android Development] osiedacz:
There is a check box at the bottom of the mount menu.
[One (M9) Original Android Development] Captain_Throwback:
What do you mean, it doesn't give you a way to flash? When you go to install the zip, what happens?
[One (M9) Original Android Development] aly19:
I did try flashing the beta SuperSu Zip but for some reason It still reboots during the flash and does not root the phone
[One (M9) Original Android Development] aly19:
Apparently I am unable to write anything to system from TWRP, even if I mount system in the mount menu. Not sure how to get TWRP to work correctly.
[One (M9) Original Android Development] Captain_Throwback:
Did you uncheck the "Mount system read-only" box?
[One (M9) Original Android Development] aly19:
Yeah that is unchecked
[One (M9) Original Android Development] Captain_Throwback:
Don't know what to tell you, then. No one else has reported this problem, and without a log I really don't have a clue. Sorry I can't help. Have you tried just flashing a rooted ROM? Does that also fail?
[One (M9) Original Android Development] meat-rack:
I'm having the same problem. It looks like it starts to install and then just reboots the phone. No error or nothing.
[One (M9) Original Android Development] jollywhitefoot:
I had a similar issue and I checked the read only box, and then unchecked it and everything was fine after that.
[One (M9) Original Android Development] aly19:
I'll give that a try, thanks
[One (M9) Original Android Development] dragonesdenano:
I have the same. Cant flash zips.

Was in dev edition 5.1 base stock with root.

Then was making a rom with old aroma so got stuck.

Reverted nandroid stock 5.1 w root.

Now the problem is i cant flash zips.

Tried old and beta recovery, no luck
[One (M9) Original Android Development] nkk71:
try checking the recovey log (/tmp/recovery.log) after flashing the rom (but while still in twrp), maybe you can spot the error there
[One (M9) Original Android Development] dragonesdenano:
I got it working...

What i did was to restore again same nand, this time select system image.

Now aroma is fine and rom booting. No reboot, nothing wierd so far.

Well, not a week with my m9 and learning from zero:p

Thanks for the help:thumbup::)
[One (M9) Original Android Development] nkk71:
nice :D good to hear... and yep, the M9 is a new beast indeed, a lot has changed from previous HTCs :cyclops:
[One (M9) Original Android Development] onyx_64:
Thanks a lot for all the info and guides! I was able to TWRP my phone (which is BL-unlocked), backup system image and Root it! HTC has come a long way (of complicating things) since the last one i owned many years ago. I do have a few lingering questions though, for which i was not able to find an answer yet:

1:

<faq>

8. How do I restore stock system so that I can accept an OTA?

Check the "Mount system as read-only" box in the Mount menu.

Restore stock "System Image" backup (This will only work if you've made a System Image backup prior to making any modifications to /system). As of the official 2.8.6.1 version, it is no longer necessary to fastboot flash the stock system image.

</faq>

I didnt quite get this part. Are they suggesting that i no longer need to restore stock images back, for installing an OTA from 2.8 onwards? isnt fastboot flashing the stock system image same as restoring the unmodified stock sys image?

2: Do i ever need to have a backup of Boot partition, for OTA or anythign else? I only backed up system image, and skipped everythign else. I never see any mention of anyone having to restore Boot partition.

3: Once i am rooted, will the auto-system update figure out i am eligible for newer OTAs? And if it does detect, how do i prevent it (or accidentally myself) from installing it? Is there some app i can freeze in Titanium backup or something? It would be best if the system can detect an OTA but cannot install it. :)

Thanks!
[One (M9) Original Android Development] jollywhitefoot:
1) The fastboot part of that refers to old instructions and you can ignore that. For you, boot to recovery, go to mount, place a check next to Mount System read-only, then go to restore and select the system image backup you just made.

2) To restore to stock to take OTA, you don't need to backup boot. For general backups though, it's a good idea to backup Boot, System & Data.

3) Once you are rooted, if you're still using a stock ROM, it will notify and download updates, but they will not install until you restore the original system image backup. I mean, you can select to install the OTA, and the phone will reboot to recovery and attempt to install it, but the update will fail before it does anything.
[One (M9) Original Android Development] onyx_64:
hey, Thanks again, jollywhitefoot. :) Appreciate the quick reply.

>> I mean, you can select to install the OTA, and the phone will reboot to recovery and attempt to install it, but the update will fail before it does anything

I guess that is all I'd need.. as long as the phone doesnt brick itself or run into bootloops after trying to install the OTA, I'll be fine!
[One (M9) Original Android Development] ShadowRAM:
Alternate way to get the OTA

I had some trouble getting the System image out of the RUU and I didn't take a good backup before I rooted the first time on 1.32. I tried the available system images online and that resulted in boot loops. I really didn't want to have to reconfigure everything after doing the RUU but it was my only option however I figured a way to not lose my settings (mostly).

*Backup all partitions with TWRP

*RUU to current version (1.32.x)

*Boot into download

*fastboot flash TWRP 2.8.7.0

*Boot into recovery (and keep system read only when prompted)

*Restore Data and Android Secure partitions

*Reboot and let the phone download the OTA (won't be rooted anymore)

*Boot into download

*fastboot flash stock recovery img (see firmware zips here http://xdaforums.com/sprint-one-m9/development/ruu-sprint-htc-one-m9-1-32-651-17-t3073355)

*Reboot and let OTA run (2.6.x)

Afterward I formatted a USB drive to exFat and with an OTG cable did the full System image 2.6 before rooting it again. Hopefully that is helpful for anyone else who is stuck. :D
[One (M9) Original Android Development] Rolando88:
Latest version 2.8.7.0

i just flashed the latest version 2.8.7.0

But on top it still says 2.8.6.0 also after reboot into recovery, please help

Did it work or not!?!
[One (M9) Original Android Development] 2WildFirE:
For me it works, no problem here

Powered by SkyDragon ROM
[One (M9) Original Android Development] Rolando88:
anybody suggetions? i cannot restore my backup and cannot create new one....
[One (M9) Original Android Development] tele_jas:
Doesn't sound like it actually flashed to me.

How did you flash it? Fastboot or the TWRP app? You might try the other way of whatever you tried?

I actually use Flashify (you can find in the PlayStore) to flash new TWRP images and have never had a problem.
[One (M9) Original Android Development] Rolando88:
thanks bro! flashify fixed my issue everything works again!
[One (M9) Original Android Development] DeadPotato:
I'm a bit confused and at this point I don't know what am I doing wrong, I can flash new custom ROMs with root access, but I can't root the stock ROM. After using MaximusHD for a while I wanted to go back to stock, so I restored the nandroid backup I had. The backup restored successfully, but whenever I try to install the supersu zip TWRP resets the phone and once it gets to the OS the system is not rooted.

I can start flashing it, but as soon as it reaches the "restoring files" message TWRP resets and can't get it to be rooted. Any ideas what am I doing wrong? I tried to restore the nandroid over itself, mounted the system partition with the read only check and even disabled the OEM lock from developer options. I'm using TWRP 2.8.7.0 and supersu beta 2.49.
[One (M9) Original Android Development] teddy0209:
I think you have to uncheck the mount as read only to be able to modify the system.... ???
[One (M9) Original Android Development] DeadPotato:
I think that was the only and the most basic thing that I didn't do :eek: that's the problem of being a flashaholic, ORD causes lack of sleep, abrupt changes of humor and hours of frustration :silly: I'll try again later, atm I'm testing ARHD + ElementalX :p
[One (M9) Original Android Development] sourabhsrinivas:
Uh, i have a problem

Okay so I restored from the twrp backup but I still can't do ota updates

can anyone help?
[One (M9) Original Android Development] iElvis:
You have to be 100% stock to take an ota. No root, no custom recovery.
[One (M9) Original Android Development] k1moe:
Go back to stock with your RUU and you're receiving the needed OTAs.

tapatalked..
[One (M9) Original Android Development] vegetaleb:
I have leedroid rom installed on my m9, if I do a factory reset in twrp it will delete the installed rom too or it will return it to defaut like if I just installed it?
[One (M9) Original Android Development] liam_davenport:
Don't factory reset will remove stuff and mess your rom up
[One (M9) Original Android Development] vegetaleb:
What to then if I want to sell it? The buyer doesn't mind the root but I want to wipe my accounts and personal informations
[One (M9) Original Android Development] k1moe:
Run your RUU and you're completely stock. If you're s-off you can lock your bootloader and all is fine for selling your device..

Edit: Sorry for off-topic.

tapatalked..
[One (M9) Original Android Development] vegetaleb:
Can I just wipe internal memory in twrp then reinstall the rom from external sd (clean install)? It will delete everything and the rom will be back to full default, no?
[One (M9) Original Android Development] liam_davenport:
Sorry should of asked if custom rom or not but just RUU to stock and everything will be gone
[One (M9) Original Android Development] k1moe:
If "full default" means stock then you have to run your RUU. But if you want to sell your device with an custom rom you can simply erase all data via recovery and install your custom rom via recovery like ever...

tapatalked..
[One (M9) Original Android Development] mswlogo:
Download link does not work in OP.

Near the bottom there is another link to official TWRP but I want 2.8.7.0 built by Captain right?

It's always so confusing having two of the same version with different features. But I was not sure if Captains changes are now rolled into official TWRP?

For now I downloaded 2.8.7.1 Beta which is built by Captain. But I prefer not use Betas.
[One (M9) Original Android Development] bzhmobile:
Official releases here:

2.8.7.1 Beta is not really a beta, it's very stable ;)
[One (M9) Original Android Development] Captain_Throwback:
The Betas are explained at the bottom of the 3rd post, including which features are included that aren't in the official. I'm not sure why that is confusing.

And the only reason I use the term "Beta" is to differentiate my builds from the "official" builds. The only real difference are the additional patches I've included that haven't yet been included in the official. There's not really anything inherently "beta" about them.
[One (M9) Original Android Development] casey00:
Help

target reported max download size of 800000000 bytes

sending 'recovery' (36288 KB)...

OKAY [ 2.718s]

writing 'recovery'...

(bootloader) HOSD CL#560065

FAILED (remote: 9: SD_SECURITY_FAIL recovery and bootloader isn't BL_UNLOCK)

finished. total time: 3.770s
[One (M9) Original Android Development] Boostjunky:
I don't understand what you need help with. The error message is clear, isn't it?

FAILED (remote: 9: SD_SECURITY_FAIL recovery and bootloader isn't BL_UNLOCK)