Commit Graph
13 Commits
Author SHA1 Message Date
Ole André Vadla Ravnås 4aa17098b2 core: Speed up and simplify the VM picker
templates and availability spawned `emulator -list-avds` on every
render, so opening the boot sheet -- and clicking a template, which
re-queries them all -- stuttered for seconds. Cache the listing and
warm it off the main thread when the picker or sheet appears.

Collapse the two per-architecture Android entries into one; the
chosen AVD now decides the architecture, retiring the message that
wrongly claimed Frida could only instrument the other one.
2026-09-27 17:55:08 +02:00
Ole André Vadla Ravnås b6e2fff8a2 core: Fail when a machine's device can't be added
Shut the machine down again when booting, and record the ready snapshot
before re-adding the device when marking it ready.
2026-09-26 21:54:46 +02:00
Ole André Vadla Ravnås f6ae01c34f core: Tell a System.map from a kernel image
QEMU hands over a System.map, which LinuxKernelImage cannot read, so no
barebone device was added. Let each machine say which kind it has.
2026-09-26 21:54:46 +02:00
Ole André Vadla Ravnås cce9f40a4f core: Take the kernel image as an object
frida-core now reads a kernel once and answers what it names, so the
image config carries that rather than a path, and the vsock probe asks
it for the symbol instead of searching the image for the word.

That probe was never a symbol lookup: kallsyms stores its names
compressed, so the match came from whatever else in the kernel happens
to spell vsock. It took an LZ4 inflater of its own to look, which goes
with it.
2026-09-17 19:41:59 +02:00
Ole André Vadla Ravnås 87485eb0e5 core: Reach the emulator's hostlink on Windows
The emulator bridges a guest's vsock to a host UNIX socket, which
Windows has none of, so the guest is reached over the virtio-serial
hostlink there whatever its kernel offers. That channel is opened
through QMP, which QEMU serves over a named pipe on Windows -- and it
holds the machine still until something connects to that pipe, then
gives the pipe up for good once the connection goes.

So the pipe is opened here, as soon as QEMU is spawned and before the
guest is waited on, and held for the barebone backend to adopt by
handle. Waiting for adb first would have deadlocked: the guest cannot
boot until the pipe is answered.

The transport carries the QMP address as a string now rather than a
socket URL, since each host spells it differently.

Also drops the single-core launch, which nothing turned out to need.
2026-09-17 13:13:47 +02:00
Ole André Vadla Ravnås eb5026309e core: Map the Android emulator debug stub
Add the androidEmulator debug stub and the pipe-over-vsock agent
transport, and map both onto their barebone config: the connection
carries the hosting QEMU's pid so the backend can instrument its
gdbstub, and the guest dials out to a host socket for the hostlink.
2026-09-16 19:17:40 +02:00
Ole André Vadla Ravnås ee2fbf0868 Reach the guest agent over its named fabric
Adopt the reworked Barebone config, where a guest names how its
hostlink is reached and the agent takes its image as bytes.
2026-09-08 18:54:43 +02:00
Ole André Vadla Ravnås ceb1baf2dd Settle a machine while it is stopping
Keep a stopping machine listed until its shutdown returns, guard
against a second stop, and let the button say so and go quiet
instead of firing again.
2026-09-08 18:54:43 +02:00
Ole André Vadla Ravnås 3dce25db4c Give a machine's device a stable id
The device took whichever id Frida handed out, so it changed every
time a machine was stopped and started, and a persisted session could
no longer find the device it named. Derive the id from the machine, so
it is the same one across a restart of the machine or of Luma.
2026-09-08 18:54:43 +02:00
Ole André Vadla Ravnås d149fe593f Snapshot a machine free of its session
A ready snapshot held two things that belong to the session that took
it, not to the machine, and a boot resuming from it could carry
neither.

The agent connection plugs a virtio-serial port into the guest for the
hostlink. QEMU cannot load a snapshot holding that port into a machine
that has yet to make one, so a resuming boot died the moment the state
came back and the debugger it hosts refused every connection. Pull the
port before savevm, the way the restore path already pulls it before
loadvm.

The agent itself lives in guest memory. A snapshot that kept it would
have a resuming boot inject a second agent on top of the first. Let
the agent leave and reclaim its memory before the snapshot, then give
the machine a fresh one, so what comes back is a clean guest.
2026-09-08 18:54:43 +02:00
Ole André Vadla Ravnås 4d218f1e2d Give Linux one template with an arch choice
The three Alpine templates said the same thing three times. Fold them
into one Linux template whose architecture is a parameter, defaulting
to the machine's own. A template now carries a variant per
architecture -- its agent flavor and starter images -- and resolves
the right one from the chosen parameters, so the boot dialogs offer
the starter kit and agent that fit the selection.
2026-09-08 18:54:43 +02:00
Ole André Vadla Ravnås 232ed749ee Boot an Alpine guest with the Linux agent
QEMU's virt machine puts PCI configuration space where nobody
can guess, so the agent is told where; the kernel's own console
driver takes the port the hostlink wants, so it is kept out.

Work on frida-core itself is picked up through FRIDA_SWIFT_ROOT,
the way the Pharo VM and the shader toolchain already are.
2026-09-08 18:54:43 +02:00
Ole André Vadla Ravnås 0e933206fb Boot virtual machines from the target picker
Add a machine abstraction to LumaCore, with QEMU as its first
backend: templates mirroring frida-core's test guests, a QMP client,
and a display that maps QEMU's surface over D-Bus rather than
copying frames.

Leave readiness to the user: drive the guest, mark it ready, and come
back to that snapshot later. Keep the machine in the project, so
booting it again resumes where it was marked. Hand the stub to
addBareboneDevice, so it joins the picker beside the other devices.

Show the display while booting, and afterwards in a Machines panel,
which the side panel now models as an enum to share its slot.
2026-08-20 14:52:52 +02:00