yashsingh1/xdaforums huggingface dataset:
[One (M9) Android Development] m_abbas25:
when i try to get nougat rom using official RUU i get 132 signature error. because i am s-offed (I assume) so from where i can get nougat ROM need help.

---------- Post added at 07:16 PM ---------- Previous post was at 07:11 PM ----------

Can i extract ROm file from RUU and flash it into my mob will it work?
[One (M9) Android Development] Black-FR:
You could flash the latest n firmware for your device, from this thread and after a successful flash, you could install the latest n RUU.

Or afterwards flash twrp and then flash a custom ROM, which is based on N.

Or extract the system.img and boot.img from the RUU she flash those, after the firmware flash...

Easiest would be the first option.
[One (M9) Android Development] m_abbas25:
i tried 1st method but endded with error 152 image error
[One (M9) Android Development] blueberry60:
You have to flash firmware zip again forcing your device reboot into download mode by pressing volume keys , if it doesn't boot to download mode, you can try on typing same command (or arrow up keyboard to reach same command)
[One (M9) Android Development] m_abbas25:
i done that get to download mode then run RUU but it was ended with error 152
[One (M9) Android Development] blueberry60:
Which firmware have you flashed before? Could you give the link ? Firmware might be incompatible with RUU.
[One (M9) Android Development] m_abbas25:
M9_4.27.531.6_TMUS_FullStock

this one which was already stated in this forum
[One (M9) Android Development] blueberry60:
It's right firmware. Do you also try on this nowipe firmware and afterwards to flash RUU based on 4.27.531.6

firmware_tmous_4.27.531.6_NoWipe.zip
[One (M9) Android Development] nbull:
I can not access to Dowload Mode

Hello everybody,

I have a problem with my HTC one M9, i have Unlocked and S-OFF i had installed viper on my phone and all was working fine, but today my movil reset every time, i tried to enter to download mode with buttons Vol Down and Power, but the movil reset all the time looping so i need to power off and press VOL UP+POWER then i enter to bootloader, but i can enter on my TWR 3 recovery because is the same all the time view the HTC logo and reset looping. When iḿ on bootloader i can connect with my phone with fastboot but when i try to do fastboot flash zip M9_4.14.401.7_Fullstock_wipe.zip it return me this:

target reported max download size of 536870912 bytes
sending 'zip' (137299 KB)...
OKAY [ 3.462s]
writing 'zip'...
FAILED (remote: Flash zip not support in BL, please go download mode)
finished. total time: 3.478s

Can somebody help me with this issue?

Thank you very much in advanced.
[One (M9) Android Development] Sneakyghost:
Yeah do what it says in your log. Bootloader not support blah blah...

Flash in download mode, lol ?

Gesendet von meinem HTC 10 mit Tapatalk
[One (M9) Android Development] nbull:
Yes, i know is necessary download mode to flash, so i asking if someone know how i can restore my download mode, because now its not working, i hope this can be a solution, if not i will have a expensive brick :(
[One (M9) Android Development] Sneakyghost:
Oh. Oops. Yeah well. Errr...

Don't ask me while I'm drunk.

Little hint: unpack the firmware zip, then flash each image file from the zip manually in bootloader (yes, direct image flashing works in bootloader, zip flashing works in download mode).

I don't remember the exact flash command syntax right now, it's almost 2am here, but you can search the HTC10 forum, there are several threads detailing exactly how to do this. I think the syntax should be fastboot flash <target partition> <image name>

Example:

Fastboot flash aboot aboot_signed.img

The list of partition names is somewhere in the HTC10 and/or HTC M9 forums.

BUT: download mode is in the HOSD partition, so if you flash aboot, then HOSD, then Keymaster, your download mode should be working again.

Important: when flashing aboot and HOSD, do NEVER forget Keymaster, or else you might have a real brick!

Gesendet von meinem HTC 10 mit Tapatalk
[One (M9) Android Development] nbull:
---------- Post added 31st March 2017 at 12:04 AM ---------- Previous post was 30th March 2017 at 11:54 PM ----------

[/COLOR]

I did this flash, but now i have a problem with keymaster i have this results:

I dont have keymaster partition, and know i dont know if i will have a brick if i try to download mode, can you help me with this partition, sorry for the inconvenience...
[One (M9) Android Development] Sneakyghost:
No idea mate. Look up the M9 partition name list on XDA. I'm drunk and tired and about to go to sleep now. I'm sure some Americans are still awake and can help you. Sorry.
[One (M9) Android Development] nbull:
Ok, thank you very much for your quickly help

you very much for you quickly help, im very grateful. Thanks ;)

I hope somebody can help me with this.....
[One (M9) Android Development] nightauthor:
I am running a TMUS m9 on CM13, looking to upgrade to the latest LOS13, I'd do Nougat but I need Xposed, and I was just reading the dev for Xposed say it'll probably quite a while before he gets it finished.

I want to be as up to date as possible,

I am UNLOCKED and S-OFF

CID 11111111

"LK-1.0.0.000" not sure what that means at all, its on the DownloadMode screen.

Radio-01.01_u11440792_97.00.51203G_F

OpenDSP-15.6.1.0522.8994_1026

OS-3.35.401.12

I've had a little bit of trouble with the network connection on my phone, I sometimes have to cycle airplane mode, or go into the NetworkOperators screen and manually select Tmobile. I'm hoping some sort of updating will fix that issue.

Is there MM compatible Tmobile firmware for me to use? Or do I have to use Unlocked firmware?

Should I flash Tmobile firmware if it exists?

Do I need to change my CID to go to Tmobile firmware?

Would I benefit from upgrading or changing the radios? And are radios and firmware baked together?

I appreciate any and all help you guys can provide.
[One (M9) Android Development] nbull:
Hello Sneakyghost,

I know you give me yesterday your knowledge and probably you can not help me more but i dont found how i can flash keymaster partition on my htc M9, so i will be more gratefull if you can try to help me with this issue, because i dont know how i can recover my download mode again, it still at the same point, all the time the terminal reboot when i try to enter on my download mode.

Thank you very much for all your work, it help me more to understand the android system.
[One (M9) Android Development] Sneakyghost:
[MENTION=4987085]xunholyx[/MENTION] informed me last night that there is no keymaster on the M9. I'm currently 300km from home, I'll try to look in my laptop (the gf is driving). I'll get back to you later.
[One (M9) Android Development] Golv:
There are no keymaster.img partition in M9 but there is keymaster.img in firmware.zip (4.28.401.3)
[One (M9) Android Development] nbull:
:good: [MENTION=1102297]Sneakyghost[/MENTION] Thank you another time for your help you are a great men ;)
[One (M9) Android Development] Sneakyghost:
So, I am on the Autobahn with bad Internet on high speeds... lets see if this goes through lol...

Here is my partition list I made two years ago, it was with the old Marshmallow M9 setup:

https://docs.google.com/spreadsheets/d/1yCWtDQ-2tpUzC-JDoVaScllsF3Db96Tr18U1izo7oJM/edit#gid=0

It shows that there is no Keymaster partition.

Now, what I don't know, is how the M9 is setup after running a full Nougat RUU. It could be, that the RUU has re-partitioned the device and that it now has a Keymaster, but I don't have a Nougat based partition list. So I cannot really say. THis makes the whole thing a bit risky.

You can, if you dont mind the risk, boot into Bootloader, then fastboot flash aboot aboot_signed.img and then fastboot flash hosd hosd.img

I am pretty sure that will restore your download mode. BUT: there is a slight risk with this. Right now, I cannot help you much more. You can research the M9 forum though and try to find users who have done this restore-process already and see what they have found out.

Sorry i can't help you more right now.

[EDIT]

Just saw I have my M9 in my backpack. I ran adb shell cat proc/emmc again with my Nougat install and the partition layout is exactly the same. Nothing has changed. So, chances are, you really only need to flash aboot and hosd manually in Bootloader.

I have to say this though: I am not responsible if you damage your device. I don't know much more than you and the only way to find out is to try, or to research (a.k.a read a lot) here in the M9 forum.
[One (M9) Android Development] nbull:
Thank you very much for the inconvenience you are taking with me. I send you was i did, step by step:

1.- I switch-on my phone and enter on bootloader --> Here i can see ***UNLOCKED *** and *** S-OFF ***

2.- I connected my phone to my computer via Usb

2.1.- I type the next comands:

[root@localhost platform-tools]# ./fastboot flash aboot /home/fernando/Descargas/M9_3.35.401.32_FullStock_wipe/aboot_signed.img

target reported max download size of 536870912 bytes
sending 'aboot' (786 KB)...
OKAY [ 0.056s]
writing 'aboot'...
OKAY [ 0.037s]
finished. total time: 0.093s

[root@localhost platform-tools]# ./fastboot flash hosd /home/fernando/Descargas/M9_3.35.401.32_FullStock_wipe/hosd_signed.img

target reported max download size of 536870912 bytes
sending 'hosd' (22220 KB)...
OKAY [ 0.754s]
writing 'hosd'...
OKAY [ 0.266s]
finished. total time: 1.020s

[root@localhost platform-tools]# ./fastboot getvar all

(bootloader) version:0.5
(bootloader) ramdump-mode:false
(bootloader) variant:MTP eMMC
(bootloader) secure:yes
(bootloader) version-baseband:
(bootloader) version-bootloader:
(bootloader) max-download-size:	0x20000000
(bootloader) partition-type:cache:ext4
(bootloader) partition-size:cache:	0x14000000
(bootloader) partition-type:userdata:ext4
(bootloader) partition-size:userdata:	0x5e0000000
(bootloader) partition-type:system:ext4
(bootloader) partition-size:system:	0x118000000
(bootloader) serialno:FA55JYJ05026
all:
finished. total time: 0.161s
[root@localhost platform-tools]#

As you can see, all was write and finished Ok.

3.- I select with VOL - Boot to download mode and press power button

My phone restart and show me the HTC logo, my phone vibrate and then the screen go black, and return to show me the HTC logo the phone return to vibrate and all the time is a loop with this....

I show you my command fastboot getvar all because i can not see my CID and my MID so i dont know if the error is coming by this.

I tried to flash with M9_4.23.617.1_FullStock with M9_4.14.401.7_FullStock_wipe and with M9_3.35.401.32_FullStock_wipe i dont know if the problem is the version

If someone know how i can solved this i gratefull the help. I will continue reading Xda-forum post for the solution, but its maddening... :(

Regards and thanks to all the comunity
[One (M9) Android Development] Sneakyghost:
Yes something must be missing still. Did you try to run fastboot erase cache in bootloader? Maybe that helps? Oh and also try to fastboot flash boot boot.img in bootloader mode...
[One (M9) Android Development] nbull:
I tried it now, but its the same, i think maybe will be something of the version, or maybe i need to flash anything else...

[edit]

I tried this command:

root@localhost platform-tools]# ./fastboot boot /home/fernando/Descargas/twrp-3.1.0-0-hima.img

And now im on recovery Team Win Recovery 3.1 but if i try to wipe all, the system return me:

Failed to mount '/cache' (Invalid argument)
Could not mount /data and unable to find cryptofooter.

Updating partition details...
Failed to mount '/cache' (Invalid argument)
Failed to mount '/system' (Invalid argument)
Failed to mount '/data' (Invalid argument)
Failed to mount '/devlog' (Invalid argument)
Failed to mount '/carrier' (Invalid argument)
Failed to mount '/cota' (Invalid argument)
Failed to mount '/preload' (Invalid argument)
...done

Unable to mount Storage
Failed to mount '/data' (Invalid argument)

Full SElinux support is present.
E:failed to write /dev/block/mmcblk0p32: I/O error
Unable to mount /data/media/TWRP/.twrps

MTP Enabled
Failed to mount '/data' (Invalid argument)
Failed to wipe dalvik

Updating partition details...

Failed to mount '/cache' (Invalid argument)
Failed to mount '/system' (Invalid argument)
Failed to mount '/data' (Invalid argument)
Failed to mount '/devlog' (Invalid argument)
Failed to mount '/carrier' (Invalid argument)
Failed to mount '/cota' (Invalid argument)
Failed to mount '/preload' (Invalid argument)
...done
Unable to mount storage

Now i can enter to terminal shell and file manager so i can i do anything with this to repair my Download mode?

I extract my partition table from /proc/emmc i attached here, if you need to know more of my deviced now i can extract all the info from my terminal so feel free to request me it, only need your great help and knowledge to can repair my phone.

Thanks to everybody of this comunity i dont know this comunity before but its great, and can learn more things about kernels and systems of devices, im happy with that :)
[One (M9) Android Development] xunholyx:
Try flashing this.

fastboot flash hosd hima_uhl_n70_hosd_signed.img

fastboot reboot download then hopefully you'll get to download mode and you can flash the firmware succesfully
[One (M9) Android Development] nbull:
Thank you [MENTION=4987085]xunholyx[/MENTION] i tried this but fastboot reboot download not work, it showm me the help of fastboot, and if i try to go to download mode from my phone its all the time looping and not enter :(

Do you have more ideas to try? My mobile is spanish, maybe i need another diferent hosd.imge Thank you
[One (M9) Android Development] m_abbas25:
Okay i have extracted system.img and boot.img files how i can flash it? Command please
[One (M9) Android Development] Black-FR:
You could install those, via twrp.

Go to "install" and select "install image"... then select the files and install them.
[One (M9) Android Development] m_abbas25:
Have to install twrp? Can't do it with fastboot? Without root?
[One (M9) Android Development] Black-FR:
You don't need root, to flash twrp.

Just a unlocked bootloader (or S-OFF locked/unlocked) is needed.
[One (M9) Android Development] m_abbas25:
Okay but is their any way through fastboot. Simple command like mention earlier for firmware
[One (M9) Android Development] Black-FR:
Yes,

fastboot flash boot name_of the_boot.img

and

fastboot flash system name_of the system.img
[One (M9) Android Development] m_abbas25:
Thanks i will try and let you all know
[One (M9) Android Development] cobrax2:
guys, where is 4.28.401.3?

thanks
[One (M9) Android Development] Sneakyghost:
Well if you provide me with the original HTC OTA file from that update, or the RUU of that version, I'll be making the firmware packs for it as soon as I can.

I just don't have the time to look for that stuff at the moment. But I have my laptop with me most of the time and can maybe create the packs quickly if I get the link for the source material.
[One (M9) Android Development] schinge:
You can download the OTA from 4.14.401.7 to 4.28.401.3 here: http://fotadl.htc.com/OTA_HIMA_UHL_...4.14.401.7_release_498156dijh85zl0cg08djx.zip
[One (M9) Android Development] Golv:
Last ZIP RUU 4.28.401.3

modelid: 0PJA10000

cidnum: HTC__001

cidnum: HTC__J15

cidnum: HTC__102

cidnum: HTC__M27

cidnum: HTC__002

cidnum: HTC__032

cidnum: HTC__016

cidnum: HTC__031

cidnum: HTC__A07

cidnum: HTC__Y13

mainver: 4.28.401.3​

HERE
[One (M9) Android Development] cobrax2:
cool, maybe [MENTION=1102297]Sneakyghost[/MENTION] can extract the fw?

thanks
[One (M9) Android Development] Sneakyghost:
Sneakyghost will. Give him time. He's a busy man. Last time I talked to him, he said he was busy renovating his flat and going to work and helping his girlfriend and stuff...

Thanks mate. I'll be using this RUU.zip to make my packages and leave credit to you. Much appreciated!

_________________________________________________

Recent Additions

WARNINGS:

NoWipe tested and working!

FullStock Not tested!

NOTES:

The Nougat (Android 7) releases for the HTC One M9 all contain several images that seem to serve no purpose and do not get flashed. Instead, these files throw an error ("WARN") or warning. The flashes end with status "OK" and the phone will work fine. These errors even turn up with the official RUU's. The only reasonable explanation is, that HTC is using a generic build tree for their Qualcomm devices which just contains all partitions, even those, which don' get used. So, please just ignore those warnings.

I have heard of some people not having IMEI show or radio work after Nougat update. I am rather sure this is just an incompatibility. Please make sure to run a matching Nougat ROM before reporting this.. Theoretically, if ROM and Firmware match, everything should work as expected.

CREDITS:

[MENTION=4445238]Golv[/MENTION] for providing the RUU. Thanks mate!

Other stuff

...yawn...
[One (M9) Android Development] shivadow:
Sorry to butt in but can I just flash the latest nowipe 401 from sdcard and be done with it?. I'm rooted, s-off, international. Do i need to flash anything at all afterwards or will it just "work"?.

Beamed in by telepathy.
[One (M9) Android Development] Sneakyghost:
Depends on what you were running before and which package you choose.

If you had nougat before and flash the NoWipe, you'll be fine.

If you had marshmallow, you'll need to flash a nougat ROM afterwards. No matter what package.

In any case, prepare for a non-booting phone. Don't expect it to work without hiccups, as always.
[One (M9) Android Development] Minnesinger:
@Sneakyghost

4.30.617.2 is available. Can't track down the RUU (yet) but might this be what you need?

System Dump 4.30.617.2

*Credit to Blueberry60
[One (M9) Android Development] Golv:
To extract firmware we need ruu.exe or ruu.zip
[One (M9) Android Development] Sneakyghost:
Both would do. Also, the OTA file will be enough if I have the previous update as well.

Regarding system dump: that is only one partition and does not contain firmware.
[One (M9) Android Development] cobrax2:
thanks man!
[One (M9) Android Development] cobrax2:
something went wrong, i used no wipe version but it did wipe to factory default :(

there was some twrp script i think, as after i rebooted, it went automatically into twrp did something really quick and rebooted again

then... language selection

good thing i had a backup from this morning
[One (M9) Android Development] Golv:
Ruu.exe is live:
[One (M9) Android Development] Sneakyghost:
Yes that sometimes happens with this nougat firmware. I've had that myself in the past. Doubt I can do anything about that.
[One (M9) Android Development] Behold_this:
First, /system/app has absolutely nothing to do with firmware, no reason to even bring it up. Second, you're CID is not 621, CIDs are 8 digits long. Perhaps you mean HTC__621. Third, you're s-on, so you cannot flash a modified package whatsoever. Even if you knew your correct CID, you cannot add it. That would break the signature of the firmware.zip thus making it useless to you as a s-on user.

You can only flash a signed firmware.zip or rom.zip specifically intended for your device. Meaning the package must have native support for your model number and CID. If you don't meet those minimum requirements you can't flash firmware.
[One (M9) Android Development] jasonlee0315:
Thanks for the reply.

Yes , I meant the HTC__621 , I've found a Taiwan ROM with CID HTC__621，can I use the sdcard method to go back to stock?

Should I relock my bootloader and flash stock recovery first?

EDIT:

I've successfully flashed the firmware which is extracted from the latest OTA in Taiwan.

Of course I went through lots of error and FAILED when flashing by CMD,like...SD Mount...etc.

But the result was good after one half hours flashing......
[One (M9) Android Development] Tecardo:
Can you explain it more clearly?
[One (M9) Android Development] yves.alexis:
i am a little lost. which base will i be on if i flash M9_1.32.161.7_Vodafone_NoWipe_TWRP_2864_rename_to_ROM

i am now on 1.32.161.17 and i d like to finally arrive to 0.17

i m s off
[One (M9) Android Development] Sneakyghost:
Please specify what you want more clearly. If you're on a 161.17, that is newer than 161.7. Why would you go back?

[EDIT]

I was asked about "software status:modified" and what triggers that (the old ***TAMPERED*** flag).

I had to say I don't know because I never bothered to find out.

I ran through all these steps now:

SDCard RUU flash to restore it to "software status:official" (we knew already that works, besides [MENTION=3437245]scotty1223[/MENTION]'s method)

Fastboot oem lock to relock my device.

Now:

- Unlock with HTCDev: didn't trigger "modified"

- Flash of TWRP: didn't trigger "modified"

- Flash of ViperOneM9_1.3.0 with secure boot.img: didn't trigger "modified"

- Flash of ViperOneM9 unsecure boot.img: didn't trigger "modified"

SDCard RUU flash to restore it to complete stock again.

Fastboot oem lock to relock my device

Fastboot oem writesecurflag 3 to put back to S-ON.

Now:

- Unlock with HTCDev: didn't trigger "modified"

- Flash of TWRP: didn't trigger "modified"

- Flash of ViperOneM9_1.3.0 with secure boot.img: didn't trigger "modified"

- Flash of ViperOneM9 unsecure boot.img: didn't trigger "modified"

- SunShine S-OFF: triggered the "modified" flag again! :D

There we go. What was it? I asked Beaups on SunShine IRC and here's what he said:
[One (M9) Android Development] shivasrage:
Hey Sneaky

Only want to say thanks for your batch-tool really appreciate it.

This way I want to say splash coverter doesnt work for me.

In white screen always appeared permission denied.

So I opened splash_coverter.bat and changed the line:

adb shell dd if=/dev/block/mmcblk0p15 of=/sdcard/mmcblk0p15

to

adb shell su dd if=/dev/block/mmcblk0p15 of=/sdcard/mmcblk0p15

Dunno if its correct but now its working for me.

Only wanted to let you know if someone else had this littele issue. :)

greetz
[One (M9) Android Development] Sneakyghost:
Hey, thanks for testing. What ROM did you test that on?

On Viper, the script works like this:

:raw2png
echo pulling partition 15 and converting to PNG
[COLOR="Lime"]adb shell dd if=/dev/block/mmcblk0p15 of=/sdcard/mmcblk0p15[/COLOR]
adb wait-for-device
adb pull /mnt/sdcard/mmcblk0p15 mmcblk0p15
adb wait-for-device
[COLOR="Red"]adb shell su -c setenforce 0
adb shell rm /mnt/sdcard/mmcblk0p15[/COLOR]
ffmpeg -f rawvideo -pix_fmt rgb565 -s 1080x1920 -i mmcblk0p15 -f image2 -vframes 1 splash1.png
del mmcblk0p15
move /y .\splash1.png ..\dump\Splash1.png
cls
COLOR 0A
echo.
echo.
echo. done, Splash1.png in /dump folder!
echo.
echo.
pause
goto TOP

For the pull to sdcard, for some odd reason the write to sdcard works without SU, for the removal of the pulled file later, I manually needed to toggle SELinux to permissive (red lines) for it to actually be able to access SDCard.

I will insert the permissive and SU line before the pull command and retest. Thanks.
[One (M9) Android Development] shivasrage:
Thanks for reply...

It´s been tested on LEE_Droid 7.3.2 with ElementalX test kernel (set to permissive)

greetz

Edit.

One more qestion:

Is it normal that M9 after flashing firmware( after Fail 90 preupdate) boots into android also

with your batch tool?

I thought your tool restarts the second flash automatically or am I wrong with that?

thanks