yashsingh1/xdaforums huggingface dataset:
[HTC One M8 for Windows] 0D0A:
Tried to flash...

I locked my bootloader and tried to flash this puppy... Why not.

No joy though:

C:\Temp\adb>adb reboot bootloader

C:\Temp\adb>fastboot oem rebootRUU
...
(bootloader) Start Verify: 0
OKAY [ 0.021s]
finished. total time: 0.022s

C:\Temp\adb>fastboot devices
HT438SF00530 fastboot

C:\Temp\adb>fastboot flash zip RUU.zip
target reported max download size of 1830711296 bytes
sending 'zip' (850337 KB)...
OKAY [ 24.645s]
writing 'zip'...
(bootloader) zip header checking...
(bootloader) zip info parsing...
FAILED (remote: 24 parsing android-info fail)
finished. total time: 25.064s

android-info fail... what is that.

Anyway, a fastboot reboot got me back to android. No harm, no foul.
[HTC One M8 for Windows] squabbi:
Its reading the android info text file inside the ruu. If you are s-off you can change the model id and cid even, to your current cid and mid.

Hope this helps! :)
[HTC One M8 for Windows] 0D0A:
Well what do you know, my MID is

C:\Temp\adb>fastboot getvar mid
mid: 0P6B20000
finished. total time: 0.004s

and the rom clearly wants it to be 21000...

Thanks!

---------- Post added at 02:27 AM ---------- Previous post was at 01:49 AM ----------

C:\Temp\adb>fastboot getvar mid
mid: 0P6B21000
finished. total time: 0.003s

C:\Temp\adb>fastboot flash zip RUU.zip
target reported max download size of 1830711296 bytes
sending 'zip' (850337 KB)...
OKAY [ 24.634s]
writing 'zip'...
FAILED (remote: not allowed)
finished. total time: 24.643s

I locked my bootloader, perhaps I shouldn't have.
[HTC One M8 for Windows] squabbi:
Yeah! Haha. As long as you still have S-Off you should be good. But if you dont want to go through the HTCDev unlock method you can do the adb method by scotty1223, you'll just need root for that. (and s-off) ;)
[HTC One M8 for Windows] ceesheim:
no tools on xda will help , the rom is encrypted , and the decrypt key should be in the phone :D
[HTC One M8 for Windows] Oditius:
So flashing that file failed. :crying: I was going to try it today and see. Oh well, guess that saves me the time. Spent a while yesterday getting it reunlocked (Tried installing drivers that I downloaded off an instructional video on youtube. Should have known it was trouble when it said "not for this computer" when I installed it.) But my computer did recognize it, but adb didn't see it. So I d/l the one on HTC and all went well. So my spare M8 is ready to try something else that turns up. :D
[HTC One M8 for Windows] the_scotsman:
It was always going to be doubtful, but thanks for trying! It's a start :good:
[HTC One M8 for Windows] 0D0A:
I tried many things. I even flashed back to stock, and then tried to re-flash the rom.

I can't get past this message:

C:\Temp\adb>fastboot flash zip RUU.zip
target reported max download size of 1830711296 bytes
sending 'zip' (850337 KB)...
OKAY [ 23.429s]
writing 'zip'...
(bootloader) zip header checking...
(bootloader) zip info parsing...
[B]FAILED (remote: 24 parsing android-info fail)[/B]
finished. total time: 23.614s

After looking at the NBH longer in a hex editor, there are several sections of readable strings, so I don't believe the file is encrypted after all. If it is, only some sections/blocks of it are.

For the record I tried combinations of Locked and Unlocked bootloader, regular CID and Super CID.

I wonder if the Windows device has the same CID as the android device. Perhaps it is different and we need to set it to something new.

Now I am starting to wonder if the windows system can be "flashed" with the android bootloader.
[HTC One M8 for Windows] squabbi:
Have you tried changing your mid and cid to suit the zip?
[HTC One M8 for Windows] 0D0A:
Yep. I changed my MID and CID to match what is in the first 200 bytes of the nbh file. No joy.
[HTC One M8 for Windows] compu829:
From what I can see, you need to make a proper file called "android-info" and put it in the zip file. If it is expecting it in the nbh itself, you need to modify the name to whatever the equivalent of "Android-info" is. Happy flashing! :D
[HTC One M8 for Windows] Captain_Throwback:
There's no android-info.txt in the zip, because it's not an Android RUU. The bootloader won't parse the zip without it. Unless you add it in, all the attempts at flashing it will surely fail.
[HTC One M8 for Windows] joeblack2k:
c:\miniadb_m8>adb shell

echo -ne '\x30\x00\x50\x00\x36\x00\x42\x00\x32\x00\x31\x00\ x30\x00\x30\x00\x30' | dd of=/dev/block/mmcblk0p5 bs=1 seek=16384

exit

MID = 2100 then

try again :)
[HTC One M8 for Windows] 0D0A:
Yep. Tried that, repeatedly...
[HTC One M8 for Windows] joeblack2k:
did you try injecting the info-android.txt into the zip

my guess is the nbh will overwrite the bootloader so i think it can be flashed in a android fastboot enviroment

its the same as flashing the firmware of your motherboard in windows .. as soon as you reboot, the new firmware will take over

modelid: 0P6B13000

cidnum: T-MOB010

mainver: 1.57.531.7

btype:1

aareport:1

hbootpreupdate:12

DelCache:1

that is the info-android.txt from a official tmobile recovery rom

i guess you have to change the modelid and cidnum

if it works remember to flash twice before reboot

the only thing that is bothering me is that the other htc windows phone also have

UEFI_signed.nbh
[HTC One M8 for Windows] ceesheim:
it would be actually way better if someone with a real m8 for windows try to flash it , to see if that will actually works.

if that works then we know the nbh is "good" then you could test more.
[HTC One M8 for Windows] joeblack2k:
problem is that Windows doesnt have a flash option and we don't have the full .exe ruu flasher from htc
[HTC One M8 for Windows] ceesheim:
you could always try this :)

its the flasher that is used on a wp 8 phone ( x8 I think)
[HTC One M8 for Windows] joeblack2k:
Yeah no luck i tried it all:

oem rebootRUU

MID change

add info_android.txt

i tink we really need the uefi_signed.nbh so that we can flash the bootloader boot into recovery and then flash with the htc windows tool

there is a rumor that europe is getting the wp8 version to thats good news because then i know for sure it has att gsm support :)
[HTC One M8 for Windows] FearlessPixel:
Buy me the W8 and I'll figure it out.
[HTC One M8 for Windows] compu829:
After you get the CID and Model ID right on the android M8, you should try using the Y-Cable Goldcard method to flash ;)
[HTC One M8 for Windows] 0D0A:
RUU.exe

Does anyone know how the RUU flashers vary between models? I may pop open some beyond compare when I get back to the house.

I'd be curious if the code is mostly the same with maybe a few variations or if they are vastly different between models.

To be honest, I would expect them to be mostly the same if not identical within hardware generations and phone class. It would seem to the that the parts that vary should be in the RUU ROM, not the utility that flashes them. But that kind of thinking completely discounts any purposeful DRM/security.
[HTC One M8 for Windows] HD2Owner:
2 examples
[HTC One M8 for Windows] jake.99x3:
Did you attempt to inject the NBH File yet? I'm surprised it didn't brick your phone. I never would have do it lol. You should proably post in the Android Forum that you have a spare m8 that you are willing to use for testing
[HTC One M8 for Windows] compu829:
Lots of interesting goodies in the nbh!
[HTC One M8 for Windows] HD2Owner:
nice find buddy.. but obviously we are missing the needed UEFI_Signed.nbh.

a full ruu*.exe contains it. this is just a recovery zip for actual htc m8 for wp that have uefi installed.
[HTC One M8 for Windows] daorderdillon:
can it work
[HTC One M8 for Windows] HD2Owner:
wp is fully dependent on a device specific UEFI. so a clear no as long as noone has access to it.

or if someone is capable to dump it from m8wp with jtag. or writing it from scratch (very difficult/unlikely).
[HTC One M8 for Windows] Oditius:
AT&T is starting to advertise the new M8 for WP... SO it won't be long till it's out, maybe a week or two... :fingers-crossed:

HTC One M8 for Windows
[HTC One M8 for Windows] the_scotsman:
Guys, would prefer it you discussed this in the actual porting thread: http://xdaforums.com/htc-one-m8/general/discussion-porting-wm8-to-android-htc-t2865785 It's in the M8 Android forum, so it makes more sense than taking place in the WP8 forum.

This is technically WP8 development forum, but we're not discussing dev for that phone.

Thanks :)
[HTC One M8 for Windows] 0D0A:
Hmm, my 7Zip will not open the nbh. What version do you have? I looked all over for something that would extract the nbh.
[HTC One M8 for Windows] compu829:
you need this version: http://sourceforge.net/p/sevenzip/discussion/45797/thread/07d5c851/ Open it as "#.e"
[HTC One M8 for Windows] grilledcheesesandwich:
Ok so I extracted to PLAT and EFIESP partitions an from what I can tell there is no way to directly flash this on an android device...... Unless someone can build a custom uefi and have it be a part the android boot loader. or even better virtualize a custom built uefi binary in a custom recovery TWRP or philz touch and dual boot install the Rom into a sandbox.
[HTC One M8 for Windows] 0D0A:
Uefi_sec.mbn?

So I noticed that I have a slightly different filename than the earlier post with the screen shot attachment.

In my file, when I extract the NBH file I see only three files: cmnlib.mbn, dxhdcp2.mbn, and uefi_sec.mbn...

is UEFI_SEC.mbn what we are looking for?
[HTC One M8 for Windows] grilledcheesesandwich:
Shhh. Do give the secret... Jk try using open as # it may produce a different out come.

There is another version of 7zip on a Russian site that has more options during to extraction process to choose to restore file security or not. Forgot the url I will dig it up
[HTC One M8 for Windows] BrianSkibinski:
I see the same thing when opening it in 7zip. A quick glance with hex editor shows they are binaries of some kind, but I don't know enough about them to decode it.

Here's the files: http://www.speedyshare.com/xDq28/uefi-sec.mbn

http://speedy.sh/DmQ5u/cmnlib.mbn

http://www.speedyshare.com/vfyxQ/dxhdcp2.mbn
[HTC One M8 for Windows] 0D0A:
As I understand it *.mbn files are partition archive files for flashing. I have seen several posts with samples of people doing something like:

fastboot flash partitionname somefile.mbn

Usually mixed in with flashing img files.
[HTC One M8 for Windows] grilledcheesesandwich:
Yea I see that to if I only use the contex to open with 7zip if you choose 7zip then highlight open as and choose either # or #e and the n you will be presented will more files. But it's all messed up. My suggestion is to convert a thumb drive to gpt if possible using mini tool or some othe similar Linux style live CD the format it to fat16. Copy the the nbh to the thumb drive in Windows 8.1 and then try mounting it using a a portable version of winimage with winimage in the saame directory as the nbh on a thumb drive and procede to open . Might work.

If not check out Total Mounter it cool image mount utility

---------- Post added at 01:59 AM ---------- Previous post was at 01:47 AM ----------
[HTC One M8 for Windows] grilledcheesesandwich:
[MENTION=2590348]0D0A[/MENTION]

Ok so those 3 files you found you found. If they can be replaced with similar files from android version. It could be one of steps in this process flashing it on android.

---------- Post added at 03:57 AM ---------- Previous post was at 03:23 AM ----------

Those 3 files are part of what I believe to be HTC_MODEM_KEY

---------- Post added at 04:28 AM ---------- Previous post was at 03:57 AM ----------

OEM_IMAGE_UUID_STRING=Q_SENTINEL_{9FC53B6A-6588-4A76-AF69-E02D378CCDC3_20140703_1632.QC_IMAGE_VERSION_STRING=RPM.BF.1.2.C-00004.IMAGE_VARIANT_STRING=AAAAANAAR.OEM_IMAGE_VERSION_STRING=vincent_w_nb2.Enab.
[HTC One M8 for Windows] joeblack2k:
cmnlib.mbn, dxhdcp2.mbn, and uefi_sec.mbn

those are drivers you can inject them.. but we still need a "img" and a filesystem

i still hope that the nbh contains the efi and the system.img
[HTC One M8 for Windows] grilledcheesesandwich:
Do you think ruuveal would work? And unruu?
[HTC One M8 for Windows] iiTz_android:
Guys I was talking to a mate who was telling that the windows phones when need to go into ruu rename the UEFI signed .nbh plus he sent me this link to show me what they do...http://forums.wpcentral.com/htc-8s/300796-how-reinstall-wp-8-0-a.html

Just thought this might help:D
[HTC One M8 for Windows] md1008:
Wouldn't we still need a wp boot loader
[HTC One M8 for Windows] domineus:
YUP!

We may also need possibly ultrashot's kitchen too...
[HTC One M8 for Windows] NJGSII:
Wouldn't flashing the Ruu just overwrite the bootloader and replace it one that can load Windows phone?
[HTC One M8 for Windows] KuroTheBang:
Yes, seen from the way of flashing GPE over Sense (and vice-versa) it also overrides the HBoot
[HTC One M8 for Windows] md1008:
I am no expert but I would think with out a wp boot loader it would be impossible for the file to even be read. I am also not sure replacing android BL is the way we want to go if we ever want to go back to android(and we likely would) best shot is a modified boot loader possibly on the sd card as to not replace our current android bootloader
[HTC One M8 for Windows] david black:
Just posting here so I can up on W8M8 porting. I really hope it can happen one day. I've recently started learning Java and writing rudimentary Android apps; I'd love to start learning (and using) a Windows phone.
[HTC One M8 for Windows] AR2186:
I have one, happy to do what I can to try and help, short of bricking the phone. That said, very rudimentary knowledge of development, etc so you're going to need to do some instructing on what to do / try. Have a Microsoft dev account, so can easily dev unlock / sideload apps and possibly extract some files for you (there is a webserver app I sideloaded last year on my 928 to do some digging in the registry, so maybe that comes in handy). If there is any way I can extract the UEFI file from the phone I will try.

I also have a rooted / s-off Verizon M7 running one of the Google Play Edition mimicking ROMS but I'd love to see Windows ported to it. Don't use it a ton, so willing to potentially brick it in the pursuit of progress. Let me know if I can be of help, PM is probably better but will try to respond in the forum as well.

I've attached a few pictures in case it might be helpful.

1. Picture of result of holding Power + Volume Down through the restart (may have hit volume down at bootloader)

2. Picture of result of Power + Volume Down to restart to Bootloader, then Volume Up

3. Screenshot of dialing ##634# in the Dialer - shows options for Diagnostic Mode and

4. Screenshot of dialing ##778# in the Dialer - shows
[HTC One M8 for Windows] Oditius:
And I have a spare M8 that is Sim UNLOCKED, Bootloader UNLOCK, S-OFF, Rooted and SuperCID... If that will help..
[HTC One M8 for Windows] Stephen:
Thread cleaned,

OT posts have been removed. Remember this is a development forum, can we get back on topic nose please?

Many thanks,

Ghost
[HTC One M8 for Windows] thals1992:
I've added some pictures in the ZIP that I've got in the WP8 Dev and Hacking forum. Didn't think I'd actually find a device specific forum for the WP variant. Its also linked in my signature.
[HTC One M8 for Windows] zhiarw:
will it brick my phone??

i mean some one flashed it on android device ?

i have wwe soff and super cid

will i be able to get back after conversion?

i have GSM it will flash vrison radio so i have to flash my radio after flashing

or frimware will just not fit
[HTC One M8 for Windows] md1008:
To the best of my knowledge no one has successfully been able to flash wp8 onto our device
[HTC One M8 for Windows] Macropoutsis:
Hi fellas. What is needed is something like this. This is for an old windows phone to dual boot into android. If someone can work with this, I would think it's our best shot.
[HTC One M8 for Windows] IAmBrock:
If I wanted to dual boot which will be easier to dual boot on WP M8 or Android M8
[HTC One M8 for Windows] rudyo78427:
Have you tried to flash this via the RUU mode from fast boot? using the fastboot commands below the xXXX.zip would be the actual RUU zip file on the ADB folder directory of where you should have it.

Fastboot oem rebootRUU (will get black screen with HTC only showing)

fastboot flash zip XXXxXX.zip

:fingers-crossed:
[HTC One M8 for Windows] Xanthos58:
With that logic it would be possible to use an android rug on Windows
[HTC One M8 for Windows] riteshbendre:
Ok,

I havent gone through all the posts, but I wanted to know one thing!

I have an M8 for Android, was wondering if flashing One M8 for Windows RUU can help boot to WP8.1 ??
[HTC One M8 for Windows] HD2Owner:
no. just no. :laugh:
[HTC One M8 for Windows] DeeZZ_NuuZZ:
do you really believe and think it will be that easy and possible? :D haha
[HTC One M8 for Windows] compu829:
as long as the certificate info blown into the eFUSEs matches between the Android and Windows versions, You should be able to Goldcard flash using the Y-Cable method. that will put the whole nbh onto the device.
[HTC One M8 for Windows] AdamOutler:
I have an extra HTC One (m8) with a bad power button. I have to stick something in there to make a connection. If anyone has a well thought out, risky idea, I'm game to try it.
[HTC One M8 for Windows] ceesheim:
as i understand a crucial part is missing "UEFI signed .nbh" and without that .nbh there is nothing to flash in the first place because, even if you get the .nbh posted on the first post flashed on the phone the os will not boot because the bootchain isn't correct.

if there was a JTAG dump of a m8 for windows then it could maybe work , but i also didn't see that :(
[HTC One M8 for Windows] TheXev:
Is Goldcard flashing more complicated then it was under Windows 7 Phones? I accidentally flashed a HTC Arrive (GoldC) bootloader to my HTC Trophy (SparkW), and was able to recover my Trophy with Goldcard after changing my Goldcard to work with the the HTC Arrive bootloader (I caught the mistake fast as soon as it booted up, so the phone never booted past the loader... prob saved me a complete bricking).

Are there new checks in place that prevent cross flashing via Goldcard with a simple file name (my googlefu is failing me atm), or has no one discovered the proper name of the image on either the M8 or WPM8? I'll likely be buying the WPM8 soon, and will start investigating this matter once I have it.
[HTC One M8 for Windows] compu829:
[MENTION=2839535]TheXev[/MENTION] on the Windows side, goldcard functions just the same as it used to on the Windows Phone 7-based devices. The name of the file for goldcard flashing is "W8ULDIAG.nbh"
[HTC One M8 for Windows] TheXev:
I've read this entire thread again, and I'd just like to note that this image does flash on my true Windows based M8. Maybe I'll try attacking it from the other side, and try loading android on it?

Earlier in this thread, a link to ACDU was posted. I used that, and held both vol buttons on my M8 for Windows as I powered it on (don't start it with the USB cable already inserted, it doesn't like that for some reason). I'll record a video of the process from the Windows perspective because I have no clue if its similar to the Android side or not.

Restoring seemed to work perfectly in Windows 8.1, so all of my apps and settings came back right away! Since I don't have much to lose I'll do it again with video. :)

*edit* I slapped together a video. I apologize for some of the editing, but some of my MIED info would have displayed otherwise. :/

I'd be willing to try flashing Android to it if I could change the model number on the phone itself. :/
[HTC One M8 for Windows] Edu616:
Hi there just wondering, is there a way to flash w8 on my vzw htc one m8? I'm already S-Off, rooted and right now have lollipop on it, but I have alway wanted to try windows phone! Any help would be nice if it's possible.
[HTC One M8 for Windows] TheXev:
I wish I had the Android version of the phone as well. I get the feeling if you change the model number on the android version, and then attempt to flash the Windows rom from the recovery screen. it might work to turn an Android version into a Windows version. As for going the other way with Windows=>Android, We'd prob need a unlocked bootloader just to be able to terminal into the thing and change the model number so you could flash a different rom.

Still, I'd be worried about MIED etc being wiped in the processes, and I have yet to find a reliable way to back that information up or modify it using CDMA Workshop (which I own a legit copy of) or QPST. I can't even change something as simple as the DUN settings to bypass the tethering lock on VZW (which I can't see any reason why it wouldn't work since it worked on 3G phones.. just use the 4G username instead of the 3G big woop).

I dunno, does DFT have a Windows Verzion M8 in hand? Maybe they can create a HSPL bootloader to make that kind of stuff possible. :/
[HTC One M8 for Windows] iquit040:
just a heads up

I didn't read through every line of the thread but there are all kinds of things that get in the way on the RUU's I have found even on the m7 and android m8. Even when having s-off, super cid, matching cid and mid, the hboot can cause an RUU to not flash. On my spare m7 I converted the att blue one to t-mobile, to developer, and back to att. Even when the mid and cid matched, if the hboot was newer even if it wasn't from the same "model" the RUU would fail to restore. If i flashed an hboot from the same carrier / model, the next attempt would work. Same with super CID. I will mess around with a windows m8 later today that I will most likely pick up off someone with a trade and see what I can do with it.
[HTC One M8 for Windows] Decree:
Has this gotten any further? (wp8.1 to vzw android m8) this is the best lead, and most lead I've found in 3 hours. Updates would be sweet.
[HTC One M8 for Windows] pokechampion:
Do you think it's possible to make a rawprogram0.xml out of this info? It's one of the last pieces I need for a port
[HTC One M8 for Windows] compu829:
[MENTION=2557973]pokechampion[/MENTION] I think this zip will help you... ;) it is from the CDMA version of the Karbonn Wind W4, which is a clone of the Archos 40 Cesium. I uses a Qualcomm Snapdragon x0x processor (Snapdragon 200 to be precise).

good luck!
[HTC One M8 for Windows] pokechampion:
Thank you! I'll try to adapt this to the partition size of the M8. I already have MPRG8974.mbn and an UEFI mbn file, I think I need a partition layout xml to create 8974_msimage and rawprogram0.xml to actually flash it.

To recap what are the theoretical steps to port WP to Android M8:

1. Brick device to QDLOAD mode (flash a boot.img from a different phone should do).

2. Repartition the eMMC with QPST and put UEFI on it. (the things I need above)

3. Flash WP with ffu or HTC RUU.
[HTC One M8 for Windows] compu829:
[MENTION=2557973]pokechampion[/MENTION] That was exactly what I was thinking about doing, but I don't have Verizon so I never bothered to pick up an android one to mess with. I do recommend making sure the Variant ID matches the Windows one before you start down this path. You also might want to check out the stuff that is publically available at https://dev.windowsphone.com/en-US/OEM/docs/Phone_Bring-Up/Phone_bring-up to make sure you have all the bits before you start down this path.
[HTC One M8 for Windows] pokechampion:
Now that you mention Variant ID, I think that might be a problem too. I have a Canadian M8, the reason why I want to make this WP instead of buying a Verizon one is because I'm using a network similar to T-Mobile, and the T-Mobile M8 is impossible to find.

Also quick follow up, after a few hours trying to brick the M8, I must give it to HTC, they really made this phone bulletproof. Maybe today I'll go nuts and kill hboot to see if it gets into Emergency Download mode
[HTC One M8 for Windows] compu829:
On my 8X, there is a key combo you can press when the phone is off that will trigger that mode...I wonder if it will work for you? http://xdaforums.com/showpost.php?p=41177639&postcount=132
[HTC One M8 for Windows] pokechampion:
On the Android M8 I think it will just boots to hboot