yashsingh1/xdaforums huggingface dataset:
[One (M9) Original Android Development] Captain_Throwback:
You answered your own question, didn't you? I said system has to be unmodified, and then you said you modified system, so...:rolleyes:.

Also, a recovery log would be helpful to see the actual issue, but it seems pretty obvious. The FAQ on the first page explains this...
[One (M9) Original Android Development] jt85:
[MENTION=1162986]Captain_Throwback[/MENTION] when I connect my device to adb it doesn't show up when adb devices is entered, nor does my computer or htc sync recognize my device. If in BL, DL or Rec partitions it'll show my device in those portions when devices cmd is given in adb but if I'm not in either of tthese the adb shows no devices listed. When trying to the RUU.exe on my computer it either doesn't recognize my device and says please connect a device or says that my battery is below 30% and tells me to charge device to 30% even though when I check the devices battery it is well above 30%. I would like to pull the info (fw,sw, kn, etc.), but when I give cmd getvar local,boot,Rec,etc it says complete but has no absolutely zero info its blank after the variable when it tries to display the info. I apologize for asking a much but I am lost. I wonder if when I tried to flash the twrp img to boot through their app if it replaced my boot.img with twerps recovery img? If i try to just use the power button to power the device on it goes straight to the BL menu or says failed to load to recovery. Thanks again and a billion for all your wisdom and quick response!
[One (M9) Original Android Development] Captain_Throwback:
Um, it has nothing to do with the "TWRP method." Again, did you read the FAQ on the first page? About how OTAs work?

Seems you have a corrupted OTA zip. You'd have to let Android re-download it and try to install it again once you restore stock system.
[One (M9) Original Android Development] uagent:
I can confirm that decryption works on stock Nougat on the M9 Unlocked edition (Himaul_att) Thanks [MENTION=2605798]nkk71[/MENTION] and Captain_Throwback!
[One (M9) Original Android Development] weinberk:
Thanks for your hard work on this Captain (And you too nkk71!!)

I've got this flashed on my VZW variant of the m9 with Cyanogen 13 (RIP). Encrypted the installation using a 5 digit pin. It successfully encrypted, and TWRP recognizes it as encrypted, but unfortunately decryption within TWRP fails.
[One (M9) Original Android Development] Captain_Throwback:
Does it work in the previous TWRP?
[One (M9) Original Android Development] weinberk:
Nope. That's why I had my breath held on this one.

Also 4 digit pin didn't work on the last either. Tested that just to eliminate a longer length pin being the issue.
[One (M9) Original Android Development] nkk71:
Can you upload a recovery.log after trying to decrypt.
[One (M9) Original Android Development] weinberk:
Sure!! Will send it to you in a PM.

Thanks so much for offering your help.

FYI, getting TWRP to save the recovery log was strange. First it tried to save to /data/media/recovery.log. It said successful, but I couldn't find that path anywhere. I then tried again, this time checking the kernel backup too checkbox, then, and only then, did it save to the sd card's root folder. I'm guessing because it couldn't write to data since it is encrypted. A bit of a catch 22 here...

And wile you're at it - my TWRP security wish list:

1) Remote wipe. if a remote wipe is issued by Google's device manager or something else with admin rights (like Microsoft Exchange), it would be nice if TWRP would honor and execute this. If I lose my phone, I want to be able to wipe it clean.

2) Wipe after X pin entries. That'll >help< stop brute force decryption.
[One (M9) Original Android Development] nkk71:
No need thanks, already have mine, sorry for the hassle. :o
[One (M9) Original Android Development] weinberk:
I do not accept your apology. The only way to have my absolute forgiveness for this terrible hassle is to get TWRP working with CM encryption :D
[One (M9) Original Android Development] FlatOutRU:
I turned on encryption on rom and TWRP doesnt accept nor graphics pattern not normal password( if i change to it)
[One (M9) Original Android Development] Captain_Throwback:
What ROM? And where's the log?
[One (M9) Original Android Development] drakeNas:
Sorry, i'm wondering what is the most stable version of supersu for nougat m9?
[One (M9) Original Android Development] Captain_Throwback:
Have you tried the latest Beta release (v2.79 SR2)? If that one doesn't work, you'll have to use v2.65, but I tested the Beta, and it worked fine for me on Nougat.
[One (M9) Original Android Development] FlatOutRU:
ICE 5.0.0 v26, gonna attach in a few hours since i reflashed rom and need to encrypt again
[One (M9) Original Android Development] Captain_Throwback:
And you are using the TWRP from the Downloads tab of this thread, correct?
[One (M9) Original Android Development] FlatOutRU:
I`m using the one i've downloaded from https://twrp.me/ . Gonna try 3.0.3.0 unofficial

attached log from 3.0.2
[One (M9) Original Android Development] FlatOutRU:
Just flashed 3.0.3.0 and it worked flawlessly from 1st try :P
[One (M9) Original Android Development] Captain_Throwback:
It really does help when people read the FAQ...:rolleyes:
[One (M9) Original Android Development] FerrisE:
[TWRP] Recovery failing all operations

Issue Resolved
[One (M9) Original Android Development] Captain_Throwback:
P.S. Phones cannot just encrypt themselves...
[One (M9) Original Android Development] Afeef.mlk:
From where can I download 3.0.3.0 built for htc m9 Europe ?
[One (M9) Original Android Development] Boskoel03:
https://xdaforums.com/devdb/project/?id=8915#downloads
[One (M9) Original Android Development] luispauchos:
M9 bricked

I have htc one m9 s-off, bootloader locked, twrp installed, bricked, cant turn on or pass htc logo, i think i wiped all the phone, i cant install a rom by micro sd, i have reboot from factory but never enter to main screen, i cant unlock bootloader because pc cant recognize because it now doesnt turn on, i need to know if there is a way to solve this.
[One (M9) Original Android Development] teddy0209:
You have twrp so you can restore from a twrp backup. If you don't have your own backup, you can download from the compilation thread in the general section.
[One (M9) Original Android Development] Afeef.mlk:
This recovery will work on every model of M9 regardless of himauhl or himaul ? I have a HTC M9 Europe model with 401 firmware. Which model is this himaul or himauhl ?
[One (M9) Original Android Development] Captain_Throwback:
Just try it ;).
[One (M9) Original Android Development] Afeef.mlk:
It might brick my phone ?
[One (M9) Original Android Development] Black-FR:
He wouldn't tell you, to try it, if it would brick your device....

And latest twrp, works well on my WWE m9.
[One (M9) Original Android Development] weinberk:
[MENTION=2605798]nkk71[/MENTION] - any luck on this?

Thanks
[One (M9) Original Android Development] nkk71:
Haven't had a chance to deal with it tbh, trying to get other things "official" :o
[One (M9) Original Android Development] weinberk:
Thanks! I've been out of the loop for the last month, just wanted to make sure that I didn't miss a reply somewhere.
[One (M9) Original Android Development] mrsmtt:
Hi, is there any avaiable theme for the latest TWRP (303X) ? The one in FAQ section has been removed (i mean the file not the link).. It isn't really necessary anyway i'm just asking :)
[One (M9) Original Android Development] computerslayer:
I think I am mis-understanding how to properly take an OTA. I'm going to try to summarize the steps from this post in bullet points and ask a couple of questions at the same time.

Taking an OTA with TWRP 3.0.3-0_unofficial (only applicable if your system is completely stock & has never been mounted r/w)

Download the OTA (download only, do not install yet)

Make a copy of the OTA zip and place it elsewhere on the device

Extract the file "firmware.zip" from the OTA zip archive

S-OFF required for these steps

(If you are S-ON leave the firmware zip untouched and flash it that way. Then you'll have to re-flash TWRP.)

Extract the complete contents of the firmware zip archive

Create a zip file with all of the extracted files except for the recovery.img file (this will prevent TWRP from being overwritten)

Rename the new zip file 0PJAIMG.zip

Place that zip file at the root of your SD card

Having completed the steps above, install the OTA as normal (tap "Install Now" w/in Android)

Watch as the system reboots into recovery and the OTA install begins. You'll see some red text in the console at the end of the install but it'll complete successfully.

OPTIONAL - Take a fresh "System Image" backup in case you decide to modify system later.

Reboot to download mode, and install the firmware zip. (It reboots once by itself to update aboot, and finishes updating after then)

OPTIONAL - When powering back on, hold Volume Down to get back to download mode, this time cancelling the update and rebooting to bootloader, then back to recovery (TWRP). Re-root with SuperSU*, flash systemless Xposed or whatever and when you're done, reboot.

If you've re-rooted and/or flashed (systemless) Xposed, it'll optimize apps, which will take a while, but once it's finally back up, you'll be all updated, without ever having flashed a stock recovery, and fully rooted once again :)

If you are S-ON, don't forget that you'll need to re-flash TWRP as the firmware zip archive replaced TWRP with the stock recovery.

*You can obviously root using whatever method you'd like. I'm no longer using SuperSU - I'm currently using Magisk combined with phh's open-source root.

First question - did I summarize this correctly? I'm hoping that I got it right - and that perhaps this might be included in the FAQ of the readme thread and/or the 1st post of this thread.

Second question - Why is it necessary to install the firmware zip archive manually if it is included in the OTA? I would have assumed it would installed when the rest of the OTA is applied, but it sounds like I'm missing something. Color me curious. I'd love to know more about that.

Thanks for your consideration - and for a great piece of software.
[One (M9) Original Android Development] Captain_Throwback:
Yes, your summary is correct. I have it linked in my HTC 10 FAQ but I never got around to linking it here. On the release post for the only TWRP here that can do it, I do link to the relevant post, so I think that's enough for now.

To answer your other question, you have to install the firmware because TWRP won't. Stock recovery, though, does. So, if you want to keep TWRP and have it install the OTA, you need to perform the extra step of flashing the firmware manually.
[One (M9) Original Android Development] computerslayer:
Excellent! Thank you.
[One (M9) Original Android Development] sblonci65:
Good job.
[One (M9) Original Android Development] zukenp:
We cant install twrp recovery(and for that reason custom roms) without S-OFF ?
[One (M9) Original Android Development] teddy0209:
You can, unlocked BL is just the requirement...

Though you can do more with S-OFF...
[One (M9) Original Android Development] grim489:
Yeah like conversion software version seven point o. Looking at life through the eyes of a tire hub

:D
[One (M9) Original Android Development] Afeef.mlk:
While making a backup through twrp 3.0.3.0 there are two options 1. System 2. System image.

What is the difference between them and what should I select ?
[One (M9) Original Android Development] teddy0209:
System img, you can use it to return to stock.../untouched
[One (M9) Original Android Development] Afeef.mlk:
Oh I just flashed ICE rom and only backed up system (not system image). Now if I ever want to return back to stock what will I have to do ? Do I need to download that system image from somewhere ?
[One (M9) Original Android Development] teddy0209:
Yes you can download a system.img, as long it's the same as your installed firmware...
[One (M9) Original Android Development] Afeef.mlk:
Previously I was on 4.14.401.7 firmware. That means that I will have to download same firmware version system image ? Also the one back up that I made, will it work ?
[One (M9) Original Android Development] teddy0209:
Yes, same version... Its got to be system.img to return to stock/untouched... That backup you made will work, but it won't be stock/untouched anymore...
[One (M9) Original Android Development] Afeef.mlk:
Ok thanks. So that means that my backup will work but to be able to install stock OTA updates, i will have to install system.img.

Also when I go to twrp to backup something, system image option still shows some size (same as that was on stock rom) may be that means that my system image is still there (not deleted) ?
[One (M9) Original Android Development] bdarius:
Hello. Is it possible to mount internal memory with 'Mount USB storage'? Whenever I select internal storage, the microSD card gets mounted. Using 3.0.3-0 version.
[One (M9) Original Android Development] ioni2ioni:
Hello comunity. Please help me, i'quite desperate here! I installed TWRP 2.8.6.3 beta and theh i flashed ARHD 4. but no susper su because i read this ROM has root acces. now i am stock in htc green screen. what can i do? i can't go in fastboot mode or recovery thank you
[One (M9) Original Android Development] vizzy:
I had this issue. Hold volume up and power which turns the phone off, then press down and power to get into download mode. Then navigate to bootloader then recovery. And go into advanced (I think) then terminal command, then somewhere in the topic captain wrote a command line, type that into the terminal. Then go back into the recovery and reflash the rom.

Edit; this is the command line I typed, from page 1 of the topic.

mount -t ext4 /dev/block/bootdevice/by-name/system /system

That worked for me anyway ..... It may of been coincidence. But this solved about an hours worth of issues
[One (M9) Original Android Development] ioni2ioni:
thenk you. i will try
[One (M9) Original Android Development] user602:
[MENTION=1162986]Captain_Throwback[/MENTION]

I'm getting a "secure connection failed" error on the basketbuild page you linked for the beta downloads. Do you have an alternate link? Thanks!
[One (M9) Original Android Development] Captain_Throwback:
I don't. Please try the link again. It's working for me (now, at least). Perhaps try a different browser if you continue to have an issue.
[One (M9) Original Android Development] Joloxx9:
Is 2.8.6.3 version stable and can I use it to do backups, install roms/mods and restoring system without issues or I should wait few days for update? Thanks in advance
[One (M9) Original Android Development] Captain_Throwback:
As long as you read Post 2, you are qualified to use the Beta version. It is stable. It's only Beta because it wasn't built through the official build system.

But make sure you read the entire post before doing anything.
[One (M9) Original Android Development] Joloxx9:
Ok Thanks mate I will read it :)
[One (M9) Original Android Development] user602:
Thanks. I got it to work last night but got too distracted setting up my M9 (with the help of your recovery) to update my post. :D

In my case, Firefox gave me the error, but Internet Explorer be could access the site normally. :good:
[One (M9) Original Android Development] XperiaNexus333:
Clarification

So, in order to restore my stock back up made on 2.8.6.3

1. Extract system.emmc.win from restore file to Android tools on pc

2. Restore stock backup in twrp

3.Boot to download mode and run that command

?

Sorry, I'm a little confused. I've had HTC Desire HD, M7 and M8, I've never struggled like this before.
[One (M9) Original Android Development] Captain_Throwback:
1. Copy system.emmc.win from TWRP backup folder to folder containing fastboot on your PC

2. Boot the device into download mode and run that command

Not sure where you got your #2 from?
[One (M9) Original Android Development] XperiaNexus333:
Well, I would still need to run the "restore" option in twrp right? I'm on a custom ROM right now so I figured I would need to restore all data contained in the restore file in twrp GUI. In addition to the fastboot command. When I try to just restore the file by itself, I get system UI crashes and the is no internal storage. The only things I can run are user installed apps.
[One (M9) Original Android Development] Captain_Throwback:
At no point are you wiping any data, so I don't understand why you'd be restoring any data? Or do I misunderstand what you're trying to accomplish?
[One (M9) Original Android Development] XperiaNexus333:
I need to restore my stock back up. I flashed a custom rom, the battery life is better sink so now I want to get back to stock. I think I would have to perform a wipe at that point?
[One (M9) Original Android Development] Captain_Throwback:
If all you want to do is restore a backup, that's all you have to do. The fastboot step is related to people that want to receive and OTA.

Your issues seems to be unrelated to your backup. You file contexts just need to be restored. From a root prompt (adb or terminal), run the below command.

restorecon -FR /data/media

That should fix your issue.
[One (M9) Original Android Development] XperiaNexus333:
Can I do this with the terminal in the advanced menu of TWRP?
[One (M9) Original Android Development] Captain_Throwback:
Well, that's a terminal with a root prompt, so it's very possible it'll work. Try it and see what happens ;).
[One (M9) Original Android Development] XperiaNexus333:
You are the MAN!!!! THANK YOU! I never take OTA updates until I am S-Off.
[One (M9) Original Android Development] MCube74:
I flashed the TWRP 2.8.6.3 and was able to root fine.

My question is I want to make nandroid backups with my USB OTG. Was wondering if TWRP 2.8.6.3 support USB OTG? I tried and my USB OTG is not being detected. However, it detects fine in regular use when using the phone.

Is it because MTP support is not available in the TWRP 2.8.6.3 Beta?
[One (M9) Original Android Development] fearomoon:
I flashed 2.8.6.3 and did a backup of my stock phone. I don't know why but despite i mounted "System" it did not back up. I missed to check it and now my stock backup is useless. Phone won't boot after restore. I've got T-Mobile Germany 1.32.111.15. Is it possible to use "System"-Files from a different Backup with a different Version (1.32.111.6)?

I want to try to copy the System wims into my backup and restore it. Will it work?
[One (M9) Original Android Development] Fain11:
See the Captain's answer!
[One (M9) Original Android Development] Captain_Throwback:
No, you can't mount internal storage with that option. Internal Storage only gets mounted via MTP.
[One (M9) Original Android Development] zambalik:
hi,

i have updated to nougat via ota from stock with bootloader currently locked and s-on. is this procedure still valid for the nougat with the same twrp version?
[One (M9) Original Android Development] Afeef.mlk:
Yes. I followed a YouTube video (by sakitech) for unlocking bootloader and installing TWRP, and it worked on nougat.

Use twrp 3.0.3-0
[One (M9) Original Android Development] phen0m2016:
Hi,

I currently returned to Stock Recovery in order to take the Nougat OTA on my HTC One M9. I'm already on Android 7.0 (Nougat) (4.14.401.7) :D. Now, I wanted to backup my Stock Recovery prior to flashing TWRP. I tried what this post mentioned:

UPDATE: As of 3.x firmware, the M9 now supports the fastboot boot function from the bootloader! Now you can fastboot boot TWRP, and then select "Recovery" to back up stock recovery.

But got an error. The phone got to displaying "Flash images success (1/1), Start downloading" and remained stuck there.

Any ideas on why didn't it work?

Any help appreciated
[One (M9) Original Android Development] Captain_Throwback:
You're in Download mode. You need to be in Bootloader, like what you quoted says.
[One (M9) Original Android Development] phen0m2016:
Yes, that was it. Now it worked. Thanks Captain_Throwback!
[One (M9) Original Android Development] phen0m2016:
Hi,

Is S-OFF required to flash TWRP v3.0.3-0_UNOFFICIAL on Stock Android 7.0 (Nougat) (4.14.401.7)??

Got this when trying to flash TWRP via ADB:

>> fastboot flash recovery recovery.img

target reported max download size of 536870912 bytes

sending 'recovery' (20016 KB)...

OKAY [ 0.458s]

writing 'recovery'...

FAILED (remote: cannot flash this partition in s-on state)

finished. total time: 0.482s
[One (M9) Original Android Development] jpwhre:
Does your device have a locked bootloader?
[One (M9) Original Android Development] Captain_Throwback:
Flash it in Download mode.
[One (M9) Original Android Development] phen0m2016:
Nope, just like my signature says, it's unlocked.
[One (M9) Original Android Development] Captain_Throwback:
Got a build coming up for you shortly that should fix decryption.
[One (M9) Original Android Development] weinberk:
That would be OUTSTANDING!! Thanks for staying on top of this and for your persistence.
[One (M9) Original Android Development] Captain_Throwback:
https://xdaforums.com/devdb/project/dl/?id=23426

There you go. That should decrypt Lineage-based Marshmallow ROMs. I tested it with the default password and with a 5x5 pattern. This will be the new "best TWRP to use" going forward.
[One (M9) Original Android Development] weinberk:
Fantastic work! SUCCESS! This will make a significant different to the way I operate! Thank you.
[One (M9) Original Android Development] wick0704:
***delete***

Sorry for my stupid.
[One (M9) Original Android Development] Captain_Throwback:
3.1.0 Official is out.
[One (M9) Original Android Development] Afeef.mlk:
How to update ? I am on 3.0.3-0 unofficial on my himauhl.
[One (M9) Original Android Development] blocka:
Easy, Install the TWRP App from the market and flash that way.

https://twrp.me/app/
[One (M9) Original Android Development] Afeef.mlk:
Have you tried that way ?

Also will my backups still work if i update TWRP ?
[One (M9) Original Android Development] blocka:
Yeah i updated this morning, so easy :)
[One (M9) Original Android Development] Afeef.mlk:
Thanks I just updated today. Worked like a charm :)
[One (M9) Original Android Development] weinberk:
Remote Wipe

[MENTION=1162986]Captain_Throwback[/MENTION] / [MENTION=2605798]nkk71[/MENTION]

3.1.0 installed perfectly over your last unofficial release which fixed decryption. I feel like I have a whole new phone - thanks for that! Glad my pestering (sorry) was for a request worthwhile enough to make it into a formal release (and into the change log).

Questions: which was asked before, but that was before decryption was working, so it was essentially moot-

Google's Device Manager and other applications have a security feature that will reboot a lost phone and wipe it. That's great, but if the device is encrypted, TWRP hangs the process up prompting for a password. Do you think it would be possible for TWRP to check to see if the wipe flag is set (or however that works) so that the phone will be wiped even if it's encrypted?

Thanks
[One (M9) Original Android Development] Captain_Throwback:
I guess I'm not sure why this is really a problem. TWRP already does respect the wipe command from Android. So even if the device gets booted into TWRP, and stopped at the decryption prompt, if the user is able to enter the correct password, the device will still get wiped. If the person doesn't have your password, the only way to use the device is to format data anyway. So I guess I don't really understand the potential security issue here?
[One (M9) Original Android Development] Kisakuku:
The user knows the password, but does not enter it when the device reboots into recovery on its own?..
[One (M9) Original Android Development] Captain_Throwback:
In which case, data will still be encrypted and inaccessible. And if they ever do enter the correct password, that wipe command will still be sitting there ;).
[One (M9) Original Android Development] Kisakuku:
So it persists between recovery reboots? Makes sense)
[One (M9) Original Android Development] Captain_Throwback:
The wipe command only gets removed when the wipe is completed.