Commit Graph
5 Commits
Author SHA1 Message Date
Ole André Vadla Ravnås 202a6ad40a agent: Dedupe resolver matches sharing an address 2026-05-21 00:37:25 +02:00
Ole André Vadla Ravnås 32c7e3d557 tracer: Reword Java hint, show compiler errors
- Agent now says "The 'frida-java-bridge' package is required
  for Java tracing." when the module can't be imported, and
  "No Java runtime detected in this process." when the bridge
  is loaded but the target isn't a JVM. Neither conflates the
  two cases.
- Surface the actual compiler diagnostics from Engine.loadPackage
  when propagating an installed package fails, so "Compilation
  failed" doesn't stand alone in the log.
- Replace the inline error row with a rounded banner carrying a
  package icon, caption text, and a bordered Install button.
  The GTK side already renders a flat button + label in a row
  so string matching is the only update there.
2026-04-16 15:03:02 +02:00
Ole André Vadla Ravnås 2d7cb2ed58 tracer: Support Java method hooks via the bridge
Add a javaMethod anchor kind and the matching java-method scope
so the tracer can target JVM methods. Resolution uses
Java.enumerateMethods through the bridge; attachment replaces
each method's implementation and restores it on detach.

The bridge isn't bundled into our agent, since only one copy
can live in a process at a time. Instead it's marked external
so frida-compile leaves the imports as runtime lookups, and our
agent does `await import("frida-java-bridge")` on demand. If
the user hasn't installed the package via the Packages panel,
we surface a message pointing them there.

To let frida-compile honour the external, LumaBundleCompiler
grew a --external <name> flag that forwards to
BuildOptions.externals. Both the Xcode Run Script phase and the
GTK Makefile now pass --package [email protected] (for
TypeScript types) alongside --external frida-java-bridge (so
the runtime code isn't embedded).

Java resolves to no native address, so ProcessNode.resolve and
the instruction annotation map throw / skip rather than trying
to materialise one. The seed code for new Java hooks matches
frida-tools' pattern: log args via JSON.stringify.
2026-04-16 14:33:59 +02:00
Ole André Vadla Ravnås 126843ce10 tracer: Support objc/swift/debug-symbol scopes
Extend the resolver path so traced targets can be described by more
anchor kinds than just module exports. The agent now exposes a
unified resolveTargets RPC on top of Frida's ApiResolver (module,
objc, swift) plus DebugSymbol.findFunctionsMatching, and a
lookupAnchorAddress entry point that resolves a stored anchor back
to an address.

AddressAnchor gains objcMethod, swiftFunc, and debugSymbol cases
with matching Codable round-tripping. ProcessNode.resolve routes
the new cases through the agent; the sync fast-path only handles
anchors that don't require the target runtime.

Both Add-Hook UIs keep using scope:"function" for now so behaviour
is unchanged; Stage 2 will expose a scope picker. The search-result
rows now carry a pre-resolved AddressAnchor instead of reconstructing
module+export pairs, and subtitle switches are exhaustive over the
new cases.
2026-04-16 12:46:07 +02:00
Ole André Vadla Ravnås 92357bfd80 Add LumaCore package + cross-platform scaffolding
Lay the groundwork for a GTK/Adwaita frontend by extracting
shared infrastructure into a LumaCore Swift package. Agent
sources and LumaBundleCompiler move to top-level locations
so both the Xcode project and SPM can reference them.

New structure:
- Package.swift: root manifest with LumaCore lib + compiler
- Sources/LumaCore/: engine, persistence, models, and
  platform-abstracted token store
- Sources/LumaBundleCompiler/: moved from LumaBundleCompiler/
- Agent/: moved from Luma/Agent/
- LumaGtk/: skeleton GTK app package
2026-04-06 18:59:29 +02:00