Emma on a virtual machine

I just have to ask after struggling with this a couple of hours. Why on earth doesn’t Emma work on a virtual Windows machine.
I have a quemu Windows 11 in which I managed to install drivers, Emma and connect my Xperia X in fastboot mode, and yet it doesn’t work. Emma doesn’t find the phone. Why?

1 Like

I don’t know Win11 at all, and it’s been a while since I’ve done much of anything on Windows, but did you deal with the whole disable-driver-signing thing?
(or maybe that’s n/a for virtual?)

1 Like

You need to connect it in flash mode not in fastboot mode. Hold Volume Up while connecting the USB cable. Emma works fine for me in Virtualbox.

2 Likes

No, I followed the Jolla instruction with no problem. I think Windows even said the driver was signed.

Hmm, to many instructions for me this day. :blush:
But… doing that the phone do not connect at all.

Now I get this error message…

screen_20220725-$001

…and there’s nothing to manual connect.

Well, downloading win 10 to see if that works better.

I did use Emma on Windows 10 in VMWare Player a few months ago to reflash my XA2 Ultra to Android. Worked OK, without any issues.

OK, thanks all for answering.
What a pain, I installed windows three times in the last 14 hours (Vbox and Quickemu).
It turned out that it works great with my X 10 III (Vbox and Quickemu both), but not at all with my X, just don’t ask me why.
In VBox, it shows up in the menu but does not connect, it just disappears from menu when clicking.

screen_20220726-$001

Well, I can put the X in a drawer or keep it on UBtouch. At least I know now I can fix my X 10 III. :smiley:

Btw, It worked fine for the X 10 III also on Windows 11.

When i reflashed my Xperia X on Linux, i found that it used an older flashing mode called “S1”, and i needed a specific tool, possibly called just flashtool(.net). Once i had that, it was almost easy. Could be that Emma doesn’t even support this older mode, or just that the initialization doesn’t like being passed to the vm.

Must be related to vm specifically (or my hardware) because I have reflashed my X with Emma several times on a physical Windows machine. I also remember that I tried on a vm before, years ago, and failed as now.

@eson I’ve seen this same weird thing with Emma on VirtualBox under Linux - it fails to recognize the phone at all.
Unfortunately, you’ll have to get an actual Windows machine for this one.

Note, it has different device IDs when plugged in and when switching to recovery (green light) or fastboot mode, so you have to set up automatic forwarding; and I did everything right, it still wouldn’t find the phone.

2 Likes

It still works perfectly fine with Windows 10 as a guest OS in VMWare Player (some old version 12). I’ve just checked with my 10 III and it was instantly recognized. But it offers only some oldish 62.0.A.3.109 version, though.

Note: it takes pressing the Volume Down button (green LED), not Volume Up as some stated above.

Just connect the phone in flash mode to your VirtualBox VM and add an USB filter rule in the USB settings.

With X 10 III it works fine also on VirtualBox, for me it’s just the old X that doesn’t show up in Emma on a VM.

Does it show up in the host OS?

Yes it does!
For me, this is overplayed, I installed Lineage OS and am not going to keep messing with my old X

My Xperia 10 II lights green when in flash mode, that is entered with vol- and plugging in a USB cable. The resulting USB device can not be passed on with libvirt/qemu. And i think i also tried VirtualBox in the past. The reason seems to be that you essentially disconnect the “computer”-side and connect it to another computer. The phone seems so somehow leave the mode, but the LED stays green.

What worked for me is PCI passthrough of the xHCI (USB3) host controller. This way the USB devices will be connected to the correct computer right away, without a reconnect. When doing that watch out you do not loose your keyboard/mouse etc and try to find out with “lsusb” and “lspci” which host controller you can give to the VM and which one needs to stay on the host.

I did not try actually flashing, but the phone is detected and i see no reason why it should not work. The only funny thing is that emma did not actually list the newer firmwares i was looking for.

What also looks much more promising is actually GitHub - munjeni/newflasher: Flash tool for new Sony flash tool protocol (Xperia XZ Premium and further) and https://forum.xda-developers.com/crossdevice-dev/sony/pc-xperifirm-xperia-firmware-downloader-t2834142
I did manage to download the most recent firmware directly from Linux with a simple “mono XperiFirm-x64.exe”. And the flasher tools also compiled … but again i did not actually try. I assume it would work and in the worst cast one would go the “emma in VM with PCI-passthrough” route.