So I was missing Windows 10 Phone, so I fired up the emulator

First you can download it here:

https://www.microsoft.com/en-us/download/details.aspx?id=53424

In my “C:\Program Files (x86)\Windows Kits\10\Emulation\Mobile\10.0.14393.0” directory I have a modest 2GB file called flash.vhd which contains the phone image. I copy it to where I run my VM’s and run it with the XDE emulator:

"C:\Program Files (x86)\Microsoft XDE\10.0.14393.0\"xde /memsize 3072 /vhd FLASH.vhd

And I’m running in no time, I login, load some apps, then I notice the storage:

What is this, a phone for ants?

What?! the disk image is a paultry 10GB. I guess the idea is that you wouldn’t actually try to load up the emulator like it’s your daily driver, rather you load YOUR app and only YOUR app, and just pretend that this isn’t some weird offshoot nostalgia machine.

Well needless to say something needs to be done about this storage situation.

I look and find this package, vhdutils. I had to go to some sketchy site, but it did include source. I should put this somewhere more legit to take away from all those weird squatters.

Update from the future I put VHD-Utilities over on GitHub, along with downloadable EXE’s. I can’t get the original site to load in wayback to give credit to whomever wrote it.

30/09/2021 09:09 pm 6,995,017,728 FLASH.vhd

So with stuff installed onto my phone I’m almost at 7GB physical 7.6 virtual space. I could go all crazy with 128 or 256GB but it’d largely be stuff I bought… which of course thanks to the magical world of DRM won’t play.

Yeah I guess you are welcome that I bought all those movies, and stuff but sure I wasn’t going to watch them on this phone… emulator. Thanks. thanks again.

So the resize vhd is quick. brutal. and efficient. I go with 64GB, because, why not? I could probably just grow it again if I needed to.

resizevhd.exe v:\Windows10-Phone\FLASH.vhd 68719476736

Now for the fun part. We need to attach the vhd, and resize the volume. I hope you like diskpart.

In the MMC I attach the disk image.. it’ll pop a few folders as it’s got a bunch of drive letters. I’ve never explored a phone, I don’t know if the ARM images are just as weird.

Even more strange, it’s MBR!

So if you were thinking, lots of partitions, and a clear win for GPT, sadly this isn’t it.

Sadly there is no free partitions (although one hiding could be deleted…?) And the UI doesn’t support expanding a logical drive (the green container). But diskpart does.

As indicated above the emulator’s vhd is disk3. You can see it’s the 64GB disk. Select it.

Next list the volumes. The Data disk (J:) is what we want so select Volume 10.

Literally just ‘select volume 10’ and ‘extend’. Don’t tell me this is difficult.

Listing the volumes again will show a 59GB Data partition. Congratulations we did it!

Back in the MMC, you’ll see it as well how the Data partition, along with the green extended partition is now taking up the entire disk. So we can now Detach the VHD, and run the emulator again!

Nice!

And just like that we now have plenty of free space on the emulator.

I downloaded some games, and some music. It’s nice to be back home.

It’s not an extensive list as I didn’t game much on my phone but here is what I know works:

  • Final Fantasy 1
  • Heroes of Larkwood
  • Skulls of the Shogun
  • Sonic CD
  • FL Studio
  • Candy Crush Saga
  • Pixel Dungeon +

Halo Spartan Asslt just closes, and Asphalt 8: Airborne doesn’t get the screen size right so it’s impossible to click enough buttons.

Sonic CD on Windows Phone 10

It’s nice that sonic runs, (haha) although using a mouse makes it impossible to control.

Now one fun thing is that the emulator is x86, nor ARM based so I converted the VHD to a VMDK, ran it under VMware, and YES it RUNS… sort of.

Perhaps a format that never was to be, the Phone/Tablet but it boots quickly and is so responsive. Windows without most of the .. Windows bits. I guess the real experiment will have to be will it run on a Surface?

It’s all 32bit anyways, and such an evolutionary dead end. Pitty.

8 thoughts on “So I was missing Windows 10 Phone, so I fired up the emulator

  1. The ARM images aren’t just as weird, they’re even weirder, they have several partitions for bootloaders etc on top of efiesp+mainos+data.

    • Phones need certain unique partitions for things like the baseband firmware and IMEI/TrustZone/SEC/SecurityCore stuff.

      Good thing is that GPT, unlike other partition schemes doesn’t allow you to allocate any “hidden” space outside the partitions from the OS/Umode (and that’s why, for example, GPT dynamic disks have an specific MSR partition to allocate the LDM disk database, unlike on MBR dynamic disks). All space has to be allocated from and to partitions/volumes on a GPT disk. So at least you can see what is going really there, and dump the data from the flash safely without data loss.

        • Probably the emulator delivers BIOS boot only (which is a contradiction, as I really dunno there was ever a phone development platform using BIOS, even as x86-32 atom/baytrail devices… But they would think may not matter, as the emulator itself is to develop solely umode UWP phone apps which shouldn’t be affected by firmware platform differences, not BSPs or drivers (for that there are other products and prepackaged services)).

  2. Also, there are some ARM64 windows phone images around, but nobody ever actually used it in a production device, mainly due to ARMv7 compatibility stuff using extra space…

Leave a Reply to neozeed Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.