yashsingh1/xdaforums huggingface dataset:
[Sprint HTC One (M9)] nickmilla15:
Hi Everyone! I'm not a Dev (yet), so this is one of my contributions to the Sprint community

This is a DIY root method. By doing it yourself, you will learn some basic knowledge about using cmd windows, using ADB, and using fastboot. All files are in the

Unlock your bootloader - www.htcdev.com Follow the instructions at HTC-Dev to unlock your bootloader.

Flash TWRP Recovery - (refer to the Read Me First Text on how to fastboot flash TWRP Recovery)

Flash SuperSU - (copy to sdcard and flash from TWRP; v2.48 is the first working version)

Using this method will NOT give you S-OFF, but it will help you unlock your bootloader (HTC-DEV method), flash a custom recovery (TWRP for now), and install the Superuser app of your choice.

What's included:

Read Me Text (Instructions, ADB commands, and all the things)

ADB Tool

Latest HTC Drivers v4.2.0.001 and HTC BMP USB Drivers v1.0.5375(32 and 64 bit versions)

TWRP openrecovery v2.8.6.0

SuperSU.apk v2.48

I would like to thank:

TeamWin (for TWRP)

Captain_Throwback for his version of TWRP

Chainfire (for SuperSU)

The Incredible XDA Community

Root Files Below

AFH

DropBox Mirror

Frequently Asked Questions - HTC One-M9-Sprint(M9_Hima)

Disclaimer:

* Standard disclaimer:
* Your warranty is now void. Use at your own risk.
* In other words: It is your choice to use these files.
* I am not responsible for any damage or problems you may have!

I suggest extracting it to a folder on your desktop so you can find it and start by reading the Read Me Text.

I will update this thread as updates become available.
[Sprint HTC One (M9)] nickmilla15:
Driver problems- get HTC Sync Manager HERE

Latest version of SuperSU can be found here: http://download.chainfire.eu/735/SuperSU/BETA-SuperSU-v2.48.zip

If you are having issues with the "Official" TWRP in the folder I recommend this one HERE

Please see the next post (post #3) on how to take an OTA
[Sprint HTC One (M9)] OMJ:
The first thing EVERYONE should do prior to rooting or anything else that modifies system is DO A NANDROID BACKUP!!! You must also use the latest TWRP, preferably [MENTION=1162986]Captain_Throwback[/MENTION] beta version.

On the M9, any changes to system will cause OTAs to fail, even using an older version of TWRP (which mounts the system RW), will cause OTAs to fail. The latest version of TWRP is RO. Captain_Throwback has taken this to the next level by implementing auto detection, if it detects your system is untouched, it is RO allowing you to do a clean backup. If it detects system has been modified, it will allow you to mount system as RW just like in the past.

for reference...

To restore your clean system backup to accept OTAs, you must use fastboot. If you are S-ON, you must be in download mode.

-copy your clean system.emmc.win to your adb/fastboot folder on your pc

-boot into download mode

-use cmd fastboot flash system system.emmc.win

if using Captain_Throwbacks beta TWRP, now when you boot into TWRP, it should detect an untouched system, you can verify this by making sure TWRP does not show "system" in the Mount menu.

If you have installed a pre-2.8.6.0 TWRP or forgot to do a backup or it's corrupted or whatever, [MENTION=544774]solver404[/MENTION] has provided a clean M9_stock_twrp_boot_system.zip

for reference on required fastboot...
[Sprint HTC One (M9)] wytecaztle:
I think this needs a little more detail you can refer to my thread if you would like ;)
[Sprint HTC One (M9)] nickmilla15:
Alright, post #1 has been updated with the links to a zip containing everything necessary (TWRP, superSU, etc) to get your device rooted, and get a custom recovery. I'm still working on the OPs, but it should be (mostly) right, and please look at post #3 by [MENTION=506238]OMJ[/MENTION] on how to restore a backup, and what to do if you'd like to take an OTA
[Sprint HTC One (M9)] ReproOne:
If one would rather just keep stock recovery, but have root for apps like Wifi Tether Router, would the below steps work?

1) Unlock with HTCDev

2) Only boot into TWRP (not flash it as permanent recovery): Fastboot boot twrp.img

3) Once booted into TWRP, install supersu

Then should OTA updates work, after which you only have to repeat steps 2 & 3?

My intent is to just get root access for apps like WiFi Tether Router.
[Sprint HTC One (M9)] OMJ:
only way to know is to try...I've used fastboot boot in the past, not sure if it still works.

if it doesn't just do this:

-unlock

-flash twrp

-BACKUP!!!

-flash SuperSu

-flash stock recovery

this is actually better, as you want a good backup b4 modifying /system
[Sprint HTC One (M9)] ReproOne:
Do you have a link for the stock recovery. The one in the post above does not appear to be available yet? I'm getting my M9 over the weekend, and I have used the option to just boot to TWRP on the M8. I was hoping someone may have tried that on the M9.
[Sprint HTC One (M9)] nickmilla15:
http://xdaforums.com/showthread.php?t=3066720 ?
[Sprint HTC One (M9)] OMJ:
https://www.androidfilehost.com/?fid=95916177934552130

pull the recovery from that zip
[Sprint HTC One (M9)] ReproOne:
That has TWRP. I was asking for the actual stock recovery.img if one wanted to put that back as recovery. Did I miss something?
[Sprint HTC One (M9)] nickmilla15:
Yeah, you missed the fact that I'm an idiot today haha. I'm really sorry. I guess I forgot what stock recovery meant ?
[Sprint HTC One (M9)] ReproOne:
I believe you are far from an idiot!

I've been reading through all posts before getting my M9 tomorrow.

I intend to unlock the bootloader and then first try to just boot into the newest beta of twrp to install supersu. If that does not work, I am trying to plan ahead and either learn how to backup recovery.img or find the stock of it. Can you assist with that, please?

I basically want root with the ability to accept OTA updates as normal.
[Sprint HTC One (M9)] nickmilla15:
Sending ya a PM ?
[Sprint HTC One (M9)] ReproOne:
I have replied. Thank you!
[Sprint HTC One (M9)] deakelem:
When i use this flash system method via fastboot in download mode using the instructions provided command prompt looks like its going to start the process but then it just sits there. See screenshot
[Sprint HTC One (M9)] hsmith1514:
mine did exactly as you're describing. i had to let it sit for something like 5-10min (i didnt time it), and then it finally progressed. if it doesnt go anywhere for you, make sure you've updated to the newest sdk-tools
[Sprint HTC One (M9)] deakelem:
So i followed the instructions and flashed the untouched system to my phone but when i attempt to take todays ota it fails and says something like reenabled OTA system has been r/w...

I factory reset and everything too and it still does that

Im using the stock recovery but do i need to relock my bl?

Ill try to get a pic of the error once it happens again.. cause it will
[Sprint HTC One (M9)] hsmith1514:
you shouldn't have to relock. i didn't relock mine, and i just finished updating the new OTA about 10 minutes ago. all i did was fastboot flash the original system image, fastboot flash the stock recovery, and then do the OTA.
[Sprint HTC One (M9)] deakelem:
its working now thanks! i was just in a rush and didnt wait for the system to flash all the way like you said it took nearly 10 mins. OTA looks like its good so far

---------- Post added at 04:18 PM ---------- Previous post was at 04:10 PM ----------

well i spoke too soon.. the ota progressed much further but then eventually said system has unexpected contexts.. I flashed untouch system and rebooted and took OTA thats it. So idk why it would say that
[Sprint HTC One (M9)] deakelem:
sorry about the flash.. stupid iphone
[Sprint HTC One (M9)] hsmith1514:
i'm not sure at that point. i thought i had read somewhere that someone else was getting those exact same errors, but i cant even remember if it was in the sprint thread, or the general m9 thread somewhere
[Sprint HTC One (M9)] dasfast:
That was my post in another thread. Same exact error here. I have flashed the stock ruu zip and fastboot flashed the stock image multiple times and no dice on the OTA. I'm giving up on it for now...
[Sprint HTC One (M9)] deakelem:
thanks for the reply.. it makes me wonder if everyone is going to have save problem
[Sprint HTC One (M9)] ReproOne:
The fastboot boot recovery.img did not work. I had to flash TWRP as the recovery.
[Sprint HTC One (M9)] deakelem:
what are you looking to do? flash stock recovery?
[Sprint HTC One (M9)] ReproOne:
I was hoping to just boot to TWRP to flash supersu, instead of flashing TWRP as recovery.

That way my stock recovery would have stayed in tact.

I had to flash TWRP as recovery though, booting to it temp did not work.

---------- Post added at 01:50 AM ---------- Previous post was at 01:08 AM ----------

When I try to fastboot boot TWRP.IMG (the beta TWRP for ONE M9), I get the following message:

C:\Program Files (x86)\Android\sdk\platform-tools>fastboot boot twrp-recovery-2.

8.6.4-hima.img

downloading 'boot.img'...

OKAY [ 2.902s]

booting...

It just hangs in trying to boot. Any ideas on how to just fastboot boot TWRP.IMG?
[Sprint HTC One (M9)] BUBBA DUB'S:
Is anyone else waiting for more development before unlocking the bootloader and flashing a twrp recovery? Or am I just noob'ishly falling behind?

Also I don't know if it will work, but on my last phone (evo LTE) I used flash imagie GUI to install twrp
[Sprint HTC One (M9)] CTR0:
Hey there! I'm currently in the process of resetting my phone back to stock like you did. I'm at the same point as you,

"/dev/block/bootdevice/by-name/system has been remounted R/W reflash device to reenable OTA updates"

Not quite sure where to go from here. First time android user. I have the full OS from the first page (its what I used to flash the recovery back to stock). How might I go using that to get a system to flash it with? I wish it were so simple, but nothing in there is specifically labeled "system"

EDIT: Found it inside my backup. gives me an error saying "Invalid Sparse file format at header magi" and crashes my fastboot

EDIT 2: Yup. Seems Im stuck at this point. my fastboot crashes instantly when I give it that command. Tried it through minimal ADB and the regular ADB installer with no dice. Any ideas?
[Sprint HTC One (M9)] jpwhre:
i'm stuck too. i did unlock just fine, to save me headaches i did an adb backup.ab before i unlocked knowing it would completely wipe device and internal storage and it did. while using beta twrp OMJ linked to above, it doesn't show system when i select mount. but when i try to do a backup, it fails saying my system is 0kb and when i select reboot, it says at top NO OS are you sure you want to reboot and i did anyway, rebooted to download mode. holy crap, after unlock and flashing recovery, it wiped EVERYTHING and the search began for some way to get something back on device and booted again. tried adb sideload as i have no micro sd (well somewhere, but in middle of moving and things are packed up) and sideload failed. tried to reboot, and back to download mode again, so i selected reboot to bootloader, and from there selected reboot. and it booted, wth, put it back into recovery and still wont backup, says nothing there. currently siting at wiped state, only selected wifi connection, other than that, i skipped everything in setup. have unlock, have recovery, have not flashed SU and rooted as i want to do a backup and have a clean sys to restore for future OTA usage.

also getting this failure

C:\Program Files (x86)\Minimal ADB and Fastboot>adb restore C:\Users\Michael\Desktop\M9\backup\mybackup.ab
adb: unable to open file C:\Users\Michael\Desktop\M9\backup\mybackup.ab
[Sprint HTC One (M9)] OMJ:
it is completely normal for the auto detect twrp to report no OS (just ignore it), it will report this when system is untouched & not mounted
[Sprint HTC One (M9)] nickmilla15:
Wouldn't the command to boot into twrp be "fastboot boot recovery twrp.img"? Just based on some syntax I know...
[Sprint HTC One (M9)] ReproOne:
No, I believe it is fastboot boot recovery.img.

---------- Post added at 10:12 AM ---------- Previous post was at 10:06 AM ----------

Does anyone know of a place to download the recent OTA recovery.img (1.32.651.17) as well as the initial release recovery.img (1.32.651.30)?
[Sprint HTC One (M9)] OMJ:
did u look in the RUU thread? :)
[Sprint HTC One (M9)] jpwhre:
So how do I do a backup so I can proceed?
[Sprint HTC One (M9)] ReproOne:
I did, and perhaps I am missing it. However, I do not see where to just get recovery.img from the updates. Do I extract them from the firmware files listed there?
[Sprint HTC One (M9)] CTR0:
Right. With complete disregard for data loss, is there a way for me to reset my phone to factory? Right now I'm at locked bootloader (easy to unlock), with a supposedly factory recovery and system, yet it says my system has unexpected contents.
[Sprint HTC One (M9)] OMJ:
u have to DL the whole firmware & extract, it's not that big

fastboot flash both recovery & untouched system in download mode, then try again
[Sprint HTC One (M9)] CTR0:
Tried that initially. Im running stock recovery and untouched system on my phone. Bootloader still reads software status as modified and update wont take.
[Sprint HTC One (M9)] barleysoda:
I am in the same boat. I have tried everything and read everything and I can't get it too take. I cant seem to get the RUU to flash either. I have stock recovery and unmod system and still no go on the OTA. I guess I wait for a ROM with the OTA.
[Sprint HTC One (M9)] solver404:
I am also having multiple issues with fastboot flashing and sdcard ruu, initially frustrating. S-off (hopefully this week if we are lucky) will put this device in check and the ota will still be there. Plus, htc will have a ruu up before too long. This will all smooth out soon unlike that LG mess we were dealing with.. haha.

Keep digging at it bud, but not to where it gets you frustrated- that defeats the purpose of it all.
[Sprint HTC One (M9)] mswlogo:
Yup !! you are not alone. Already glad I waited for OTA, since that was a breeze.

I'd prefer wait until latest RUU (with OTA in it) is available, a ROM built on that RUU (instead of a dump) and ideally Sunshine S-OFF (hopefully it won't require htcdev unlock like M8).

But that all could be weeks.

99.9% of the reason I want root is for Tethering.
[Sprint HTC One (M9)] BUBBA DUB'S:
:cool: alright alright alright... But yea Bubba is still fresh out the box with current update 1.32.651.30, if anyone need me to do anything to help out, holla at Mr. Dub's
[Sprint HTC One (M9)] OMJ:
welcome to the world of S-ON :(
[Sprint HTC One (M9)] jpwhre:
:crying:
[Sprint HTC One (M9)] itc518:
I got the ota before I rooted, I checked after rooting and I am still on .30
[Sprint HTC One (M9)] WosVrt:
htc one m9 root help

iUse TWRP 3.0.2 and SuperSU 2.76 on my M9 and now it's stuck at in a never ending boot loop.

iCan still access download mode, bootloader, and recovery mode

but i'm not able to pull my device up when typing adb devices into the command window.

How do iGo about restoring my phone so that iCan start the process over?

If i'm not mistaken the issue is with the TWRP is used, iNeed an updated version, correct?:confused:
[Sprint HTC One (M9)] jpwhre:
Try http://xdaforums.com/sprint-one-m9/development/ruu-sprint-htc-one-m9-1-32-651-17-t3073355 use twrp side load to put file on device and run it in download mode.
[Sprint HTC One (M9)] WosVrt:
iTried that after running the RUU provided from HTC for the 3.41.651.4 ROM for HTC One M9. iGot error 155 during the update process the phone was stuck in the update screen until iPowered down using all 3 buttons. Now the phone boots straight to the bootloader & displays SECURITY WARNING text.

How should i go about fixing this?
[Sprint HTC One (M9)] jpwhre:
This is going to be your best bet to start with. You must use an sd card. Use pc/laptop to get it downloaded and put on sd card.
[Samsung Galaxy Light Questions & Answers] sgltm:
I want to install stock OS for my Samsung Galaxy Light, but the system partition has been formatted. I can boot into Team Win Recovery Project, and I've downloaded the stock image tar.md5 file. Can Team Win restore OS from a tar.md5 file? Would ODIN work when Team Win Recovery Project is installed?
[Samsung Galaxy Light Questions & Answers] timmetal6669:
Either would Work. Theoretically anyway. The for sure way is through of odin. Let me know if you have any problems.
[Samsung Galaxy Light Questions & Answers] Deleted member 6722106:
It does require Odin
[Samsung Galaxy Light Questions & Answers] Paget96:
Use odin for this. you have nice tutorials on youtube. :

Regards

Paget96
[Samsung Galaxy Light Questions & Answers] ecatsab:
Can someone point me to where the stock images are for the SG Light TMO addition
[Samsung Galaxy Light Questions & Answers] _PAG_:
Hello do you have tmobile or metropcs? If you have metro then use sammobile but I dont know for tmobile
[Samsung Galaxy Light Questions & Answers] DaManWitDaPlan:
Hi, all! I'm having an issue with reformatting my girlfriend's SGH-T399. Hoping someone here can help.

Basically, her story is the phone tried to auto-update OTA and got stuck on "Upgrading apps (4/4)". Now, when rebooting, the phone is stuck on the "Samsung Galaxy Light" logo screen.

The phone can boot into download mode, but can't boot into recovery (goes straight to download) which makes me think somehow the recovery partition was corrupted or some such issue. I've tried re-installing the stock firmware through Odin, but Odin always gets stuck on "Initializing", which is another problem I can't seem to find a fix for. I've also tried using Kies, but Kies always gets stuck at 0% when trying to upgrade the phone's firmware.

To be clear, I can get Odin and Kies to recognize the phone and start the formatting process, but neither progresses at all once the process actually begins. We'd be happy with getting stock firmware back, or with installing a custom rom such as LightWave, CM, anything. This is her only phone and we really need to get it up and running again. Any help is appreciated. :)

Thanks in advance!!
[Samsung Galaxy Light Questions & Answers] _PAG_:
Hi this happened on my device too. Pretty much the same thing except I have sgh t399n. To fix flash TWRP through Odin as you did the first time, here https://www.androidfilehost.com/?fid=95916177934519351 and then flash any ROM. You could flash lightwave or CyanogenMod. If you had a backup use it. I downloaded someone else's backup but I can't find any backup for T-Mobile so just flash a ROM after flashing twrp.
[Samsung Galaxy Light Questions & Answers] DaManWitDaPlan:
Hey! Thanks for the reply, but in my case, no dice :( Odin still hangs up on Initializing... Any other ideas?
[Samsung Galaxy Light Questions & Answers] _PAG_:
Try updating with kies
[Samsung Galaxy Light Questions & Answers] DaManWitDaPlan:
Hey, _PAG_. Yeah that was the first thing I tried. Like I said in my first post, Kies will download the phone's firmware and then get stuck at 0% during installation... :( any other ideas?
[Samsung Galaxy Light Questions & Answers] _PAG_:
Wait but Odin doesn't work completely or just doesn't work with TWRP. Do you have it as run as administrator. Right click the Odin file then click run as administrator and allow. If that doesn't work do you have the Samsung drivers? And last do you have windows or mac?
[Samsung Galaxy Light Questions & Answers] AcreaperJB:
http://shabbypenguin.com/?developer=Galaxy_Light_(SGH-T399)&folder=Stock

also read: http://androidforums.com/threads/guide-restore-your-galaxy-light-to-stock-mja.846767/

before flashing
[Samsung Galaxy Light Questions & Answers] DaManWitDaPlan:
Odin has not worked for any package I've tried thus far. It always gets stuck on "Initializing". I am running as an administrator. As far as I know, all my samsung drivers are up to date. I'm running Windows 7 and both Windows and Odin recognize the device. I've tried this on 2 separate Win 7 pcs, so I don't believe the issue is with my setup but rather with the phone itself.

Hey, AcreaperJB. That's the first guide I tried to follow. Like I said before, Odin works fine until "Initialization" at which point no other messages appear and Odin simply hangs. I've let it sit there for over an hour and there's no change. :(

Any other ideas? :(
[Samsung Galaxy Light Questions & Answers] AcreaperJB:
Download a different version of Odin? usually helps
[Samsung Galaxy Light Questions & Answers] DaManWitDaPlan:
I've tried both 3.10.6 and 3.07, and I believe another version that was included with that SGH-T399 stock flashing guide... And I guess I should say as well, I tried the Kies solution with both Kies 2.6 and Kies 3 with no luck.
[Samsung Galaxy Light Questions & Answers] AcreaperJB:
Maybe try following this:

http://xdaforums.com/showthread.php?t=1722082

And make a flashable zip from it?
[Samsung Galaxy Light Questions & Answers] _PAG_:
If he uses this he can be free to use this http://androidforums.com/threads/samsung-galaxy-light-sgh-t399n-stock-rom.923545/

Its .zip not .tar.md5 so its a little different but you still extract it but don't rename.
[Samsung Galaxy Light Questions & Answers] AcreaperJB:
Well he might as well use this then! also thanks extracting that firmware file on linux is a ****ing pain, this is easier to work with.
[Samsung Galaxy Light Questions & Answers] _PAG_:
The only problem is that its for metro devices.
[Samsung Galaxy Light Questions & Answers] AcreaperJB:
:/ well ****.
[Samsung Galaxy Light Questions & Answers] _PAG_:
If I had a backup of the galaxy light t399 I could make a stock ROM for it. Similar to the metro one that I made but it looks like android admirer already made one http://androidforums.com/threads/samsung-galaxy-light-sgh-t399n-stock-rom.923545/
[Samsung Galaxy Light Questions & Answers] DaManWitDaPlan:
Hmm... even with a stock rom, would that help with Odin hanging at Initialization? I've tried flashing stock, TWRP, and LightWave. Each one stalls Odin on the "Initialization" message. :(
[Samsung Galaxy Light Questions & Answers] _PAG_:
Do you have auto reboot and repartition disabled. Reset time enabled? And did you select PDA? Try that with running as administrator and flash TWRP 2.8.4.0 or any other. Then flash the stock rom
[Samsung Galaxy Light Questions & Answers] AcreaperJB:
I made a Stock ROM, try it but have a backup ready.

Also it's deodexed

https://www.androidfilehost.com/?fid=24052804347774930
[Samsung Galaxy Light Questions & Answers] _PAG_:
Tmobile or Metro?
[Samsung Galaxy Light Questions & Answers] AcreaperJB:
built from a tmo firmware, not sure it would work on metro.

Besides I think there's a metro ROM in this thread?
[Samsung Galaxy Light Questions & Answers] _PAG_:
Yeah I was just asking. I already know about the metro rom. How could I not know if I made it
[Samsung Galaxy Light Questions & Answers] AcreaperJB:
lol didn't know I was talking to the guy himself
[Samsung Galaxy Light Questions & Answers] bdl401:
Is this rom fully working stable?

---------- Post added at 03:37 AM ---------- Previous post was at 03:35 AM ----------

Does this rom function fully? Is it stable?

---------- Post added at 03:39 AM ---------- Previous post was at 03:37 AM ----------

Is this rom fully working stable?
[Samsung Galaxy Light Questions & Answers] AcreaperJB:
Should be, 35+ppl downloaded it, I just made a thread for it though, like I said I don't have the device but it should boot. Like I always say though, always have a backup.
[Samsung Galaxy Light Questions & Answers] bdl401:
Is it kit kat or jellybean and is it metro or T-Mobile?
[Samsung Galaxy Light Questions & Answers] AcreaperJB:
Here's the post

It's KK, for TMO
[Samsung Galaxy Light Questions & Answers] bdl401:
It says 4.2.2 which is jellybean
[Samsung Galaxy Light Questions & Answers] AcreaperJB:
sorry my bad it's late :/
[Samsung Galaxy Light Questions & Answers] bdl401:
Could you make a deodexed stock for metro kitkat 4.4.2?
[Samsung Galaxy Light Questions & Answers] AcreaperJB:
http://androidforums.com/threads/samsung-galaxy-light-sgh-t399n-stock-rom.923545/
[Samsung Galaxy Light Questions & Answers] bdl401:
Thank you so much! Deodexed always operates faster and better