Compare commits

...
821 Commits
Author SHA1 Message Date
Ole André Vadla Ravnås 7b7d9acf8c subprojects: Prepare for release 2025-06-19 23:25:44 +02:00
Ole André Vadla Ravnås 215076a0fa subprojects: Bump outdated 2025-06-19 23:23:46 +02:00
Ole André Vadla Ravnås 3d47bf73b4 package-manager: Only report installed packages
The toplevel packages that were left untouched should not be included.

Also simplify the install() logic while at it.
2025-06-19 23:22:22 +02:00
Ole André Vadla Ravnås 7d84a44c7f package-manager: Fix the lockfile up-to-date path 2025-06-19 22:55:19 +02:00
Ole André Vadla Ravnås ef7e0a88e0 package-manager: Fix two stylistic inconsistencies 2025-06-19 22:53:09 +02:00
Ole André Vadla Ravnås 1f95416a77 subprojects: Prepare for release 2025-06-19 21:03:42 +02:00
Ole André Vadla Ravnås 80c7ec2dce meson: Fix build when libsoup is a subproject 2025-06-19 20:23:30 +02:00
Ole André Vadla Ravnås 69c68fdf7f subprojects: Bump outdated 2025-06-19 20:18:51 +02:00
Ole André Vadla Ravnås 7070042128 compiler: Make backend a shared library on Android
To avoid dynamic linking issues due to thread-local storage. This was
caused by our previous hack where we pretended Android was GOOS=linux
to work around the Go toolchain refusing `-buildmode=c-archive` for
GOOS=android.
2025-06-19 20:17:06 +02:00
Ole André Vadla Ravnås 9a4ce30be5 post-process: Support skipping ELF-cleaner step
It seems to corrupt shared library ELFs generated by the Go toolchain.
2025-06-19 20:08:47 +02:00
Ole André Vadla Ravnås 7731aea6f7 linux: Split out useful primitives into base
- check_kernel_version()
- FileDescriptor
- PidFileDescriptor
- MemoryFileDescriptor
2025-06-19 20:08:47 +02:00
Ole André Vadla Ravnås 3f8ace5f7b subprojects: Prepare for release 2025-06-18 23:34:57 +02:00
Ole André Vadla Ravnås d1e8aaa8e6 subprojects: Bump outdated 2025-06-18 23:33:44 +02:00
Ole André Vadla Ravnås 28a1084e7d compiler: Bump @frida/net to 5.0.0 2025-06-18 23:16:34 +02:00
Ole André Vadla Ravnås ac62e5d96d package-manager: Fix manifest progress
It should not have details, so it ends up in the toplevel progress
group, as far as UIs are concerned.
2025-06-18 22:56:43 +02:00
Ole André Vadla Ravnås 05bdfde104 package-manager: Add url property to Package
Only present in search results.
2025-06-18 19:49:44 +02:00
Ole André Vadla Ravnås 938e724f2d package-manager: Fix a stylistic inconsistency 2025-06-18 19:48:05 +02:00
Ole André Vadla Ravnås bf1d417445 Add PackageManager
To aid in discovering and installing Frida-specific packages without the
need for Node.js + npm. Power users and package maintainers will still
typically be using npm though. The goal is to streamline the consumption
of bridges and other Frida-specific packages.
2025-06-17 12:40:37 +02:00
Ole André Vadla Ravnås d9317e6265 base: Add FS namespace with filesystem helpers 2025-06-17 10:28:26 +02:00
Ole André Vadla Ravnås 01fd21f004 buffer: Add BufferReader.skip() 2025-06-17 10:28:26 +02:00
Ole André Vadla Ravnås e576f36f05 buffer: Allow trailing NULs in read_fixed_string() 2025-06-17 10:28:26 +02:00
He Li 9a7623a448 compiler: Fix missing shim assets (#1176)
Previously, the embeddedShims glob only matched files up to two directory
levels deep. This caused imports like:

    open node_modules/@frida/assert/internal/util/comparisons.js:
    file does not exist

This change adds an extra glob pattern that matches one more directory
level, allowing shim assets located one level deeper to be found correctly.
2025-06-17 10:27:49 +02:00
Ole André Vadla Ravnås 7dc0b5e4ee subprojects: Prepare for release 2025-06-13 16:28:17 +02:00
Ole André Vadla Ravnås a18eab4afa subprojects: Bump outdated 2025-06-13 16:27:21 +02:00
WorksButNotTested 8a30f241d1 ci: Fix builds of helpers and labrats 2025-06-13 16:25:05 +02:00
WorksButNotTested 78fbe5a20b tests: Disable slow test on armbe8 2025-06-13 16:25:05 +02:00
Ole André Vadla Ravnås e667582d54 android: Bump frida-java-bridge in system-server 2025-06-13 16:22:25 +02:00
Ole André Vadla Ravnås f5dd273c8c subprojects: Prepare for release 2025-06-10 22:09:49 +02:00
Ole André Vadla Ravnås 5438597c19 subprojects: Bump outdated 2025-06-10 22:05:53 +02:00
WorksButNotTested bb1f944f43 ci: Fix emulator error propagation 2025-06-10 22:05:07 +02:00
Ole André Vadla Ravnås 294df78147 darwin: Bump frida-objc-bridge in internal agents 2025-06-10 22:04:16 +02:00
Ole André Vadla Ravnås 2f1d24f96f android: Bump frida-java-bridge in system-server 2025-06-10 22:02:29 +02:00
Ole André Vadla Ravnås 918c83d25c compiler: Update package-lock.json 2025-06-10 21:07:51 +02:00
Ole André Vadla Ravnås a580d22bb6 agents: Switch esbuild platform to node
Internal agent bundles were still built with `--platform=neutral`, so
esbuild ignored each package’s package.json metadata. Modules that
rely on Node-style resolution could therefore fail to bundle.
2025-06-10 21:04:44 +02:00
Ole André Vadla Ravnås 238b81c26d compiler: Switch esbuild platform to node
Neutral mode ignores package.json, so modules that rely on "main" or
"exports" fields were left unresolved. Setting PlatformNode lets esbuild
read package.json and resolve such modules correctly.

No functional change for code that was already valid under Neutral; it
just unbreaks packages that expect Node semantics.

Kudos to @hsorbo for helping track this one down.
2025-06-10 20:59:21 +02:00
Ole André Vadla Ravnås 413ba51568 plist: Fix XML output of empty dicts/arrays
Apple’s encoder emits <dict/> and <array/> for empty collections; we were
producing <dict></dict> and <array></array>. The stricter form makes it
harder to compare plists byte-for-byte.

Our to_xml() now emits the self-closing tags so its XML output matches
Apple’s encoder.
2025-06-10 20:48:55 +02:00
Ole André Vadla Ravnås 3767957065 plist: Fix offsetIntSize for binary output
When to_binary() builds a bplist, the trailer’s offset-size field must
encode the offset of the offset table itself. We were deriving
offsetIntSize from the last object’s offset, so a plist whose table began
at 0x100 or beyond could still advertise size = 1 and be rejected by
Core Foundation as corrupt.

Size is now chosen from offset_table_offset. The XML path (to_xml())
is unaffected.

Kudos to @mrmacete for helping track this one down.
2025-06-10 20:41:36 +02:00
Ole André Vadla Ravnås ec3b864007 subprojects: Prepare for release 2025-06-07 13:32:23 +02:00
Ole André Vadla Ravnås 93fc48d20e subprojects: Bump outdated 2025-06-07 13:30:19 +02:00
Ole André Vadla Ravnås 4f120d9e46 meson: Simplify the Vala flags logic 2025-06-07 13:29:46 +02:00
Ole André Vadla Ravnås f9ee24038b gadget: Correct QuickJS big-endian bytecode check 2025-06-07 13:27:49 +02:00
Ole André Vadla Ravnås 5692298b03 subprojects: Bump outdated 2025-06-07 11:23:12 +02:00
Ole André Vadla Ravnås 375be6181a compiler: Rename conflictful Go symbols in backend
To avoid conflicts when we're linked into a Go binary.
2025-06-07 11:22:36 +02:00
Ole André Vadla Ravnås e5fa1b1fab api: Add version defines and macros 2025-06-07 11:20:23 +02:00
Ole André Vadla Ravnås 8e76c7257b subprojects: Prepare for release 2025-06-06 22:11:36 +02:00
Ole André Vadla Ravnås 282927b5b6 subprojects: Bump outdated 2025-06-06 22:10:29 +02:00
Ole André Vadla Ravnås fe235491a5 compiler: Make the DeviceManager optional
It is no longer used, but we cannot drop the constructor argument
without breaking API.
2025-06-06 22:09:40 +02:00
Ole André Vadla Ravnås 46d4d1223a subprojects: Prepare for release 2025-06-06 14:11:13 +02:00
Ole André Vadla Ravnås 6f8d8cba28 linux: Fix the system-server.js build system logic 2025-06-06 13:26:51 +02:00
Ole André Vadla Ravnås 2ee3926912 subprojects: Bump outdated 2025-06-06 12:38:22 +02:00
Ole André Vadla Ravnås 11f93e20b8 compile-js-agent: Remove commented “npm link” example
As it is no longer relevant.
2025-06-06 12:37:32 +02:00
Ole André Vadla Ravnås ad15eb2b01 darwin: Switch reportcrash.js bundling to ESBuild 2025-06-06 12:36:27 +02:00
Ole André Vadla Ravnås 26c9cf3cc5 darwin: Switch osanalytics.js bundling to ESBuild 2025-06-06 12:34:21 +02:00
Ole André Vadla Ravnås 8176ea1361 linux: Switch system-server.js bundling to ESBuild 2025-06-06 12:29:35 +02:00
Ole André Vadla Ravnås ecc63e5591 barebone: Simplify the ESBuild invocation 2025-06-06 12:27:23 +02:00
Ole André Vadla Ravnås ac5898a547 barebone: Fix ESM-handling
Where we failed to await the returned Promise, so any errors would end
up being swallowed.
2025-06-06 11:38:16 +02:00
Ole André Vadla Ravnås 055360cbb6 barebone: Remove bridge globals 2025-06-06 11:37:07 +02:00
Ole André Vadla Ravnås c9b18a5f4b barebone: Switch runtime bundling to ESBuild 2025-06-06 11:36:28 +02:00
Ole André Vadla Ravnås eb55aef18e subprojects: Prepare for release 2025-06-05 22:05:20 +02:00
Ole André Vadla Ravnås 11ba9175d0 subprojects: Bump outdated 2025-06-05 21:11:15 +02:00
Ole André Vadla Ravnås 6dd7e203bf ci: Fix a stylistic inconsistency 2025-06-05 20:07:22 +02:00
Ole André Vadla Ravnås 3a312faa1e ci: Fix the Windows build step 2025-06-05 19:27:22 +02:00
Ole André Vadla Ravnås 6f97782eff meson: Warn when Compiler backend is auto-disabled 2025-06-05 19:21:48 +02:00
Ole André Vadla Ravnås 412e525210 cgo: Fix path logic when consumed as a subproject 2025-06-05 19:21:16 +02:00
Ole André Vadla Ravnås c6e8ef5a29 ci: Clean up and fix Compiler backend enable logic 2025-06-05 19:14:45 +02:00
Ole André Vadla Ravnås 0df0eefdc9 cgo: Treat arm64e as unsupported
As cgo does not yet support it.
2025-06-05 19:08:26 +02:00
Ole André Vadla Ravnås dc60f8bf10 ci: Simplify the Compiler backend enable logic 2025-06-05 19:01:31 +02:00
Ole André Vadla Ravnås 2b9f3764c5 ci: Disable Compiler backend for the emulator job 2025-06-05 18:55:35 +02:00
Ole André Vadla Ravnås 89e01be599 ci: Skip tests on macOS for now
So we can get back to a green baseline.
2025-06-05 18:49:26 +02:00
Ole André Vadla Ravnås 228a37fabf ci: Fix the compiler backend option passed in 2025-06-05 18:36:03 +02:00
Ole André Vadla Ravnås 40ec5e03cc subprojects: Bump outdated 2025-06-05 17:02:16 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 6acb6da386 ci: Explicitly enable compiler
So it's not silently disabled in cases where cgo should be available.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-06-05 17:00:49 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 9b9c91c1f2 ci: Improve naming of the Go toolchain steps
Co-authored-by: Håvard Sørbø <[email protected]>
2025-06-05 17:00:49 +02:00
Ole André Vadla Ravnås c5809da386 ci: Temporarily remove the FreeBSD/arm64 job
Until we have a working runner for it.
2025-06-05 17:00:49 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 6b76a1b2d4 ci: Fix the native Windows/x86 job
Which was building for x86_64 instead of x86.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-06-05 17:00:49 +02:00
Ole André Vadla Ravnås 3da7b8bbd0 submodules: Bump releng 2025-06-05 17:00:49 +02:00
Ole André Vadla Ravnås adc93c3bf8 ci: Add native job for Windows/arm64 2025-06-05 17:00:49 +02:00
Ole André Vadla Ravnås b85397b690 ci: Install MinGW in the Windows native jobs 2025-06-05 17:00:49 +02:00
Ole André Vadla Ravnås b22326f233 ci: Add Go to the build jobs 2025-06-05 17:00:49 +02:00
Ole André Vadla Ravnås 531cfb17c0 ci: Remove trailing whitespace 2025-06-05 17:00:49 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 0a4bb7aed5 compiler: Normalize paths passed to typescript-go
So it also works on Windows.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-06-05 17:00:49 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 274898d39c compiler: Fix handling of TypeScript diagnostics
Where ESBuild Message entries without notes were incorrectly handled.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-06-05 17:00:49 +02:00
Ole André Vadla RavnåsandHåvard Sørbø c6c30833c8 compiler: Avoid Go alignment bug on Windows/x86_64
Where C arguments passed on the stack that are smaller than 8 bytes are
incorrectly laid out when calling into the Go runtime.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-06-05 17:00:49 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 7b30a9c516 compiler: Fix cross-platform build issues
Co-authored-by: Håvard Sørbø <[email protected]>
2025-06-05 17:00:49 +02:00
Ole André Vadla Ravnås 32220057a8 meson: Allow compiler backend w/o local backend
Now that it no longer needs it for script execution.
2025-06-02 09:39:34 +02:00
Ole André Vadla RavnåsandHåvard Sørbø b7284691ca compiler: Move to ESBuild and typescript-go
For massively improved performance, and to reduce our maintenance burden
by no longer having to maintain a bundler.

Also add options to configure the output and bundle format, and support
disabling type checks.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-06-01 23:46:10 +02:00
Ole André Vadla Ravnås 71a1b0f800 subprojects: Bump outdated 2025-06-01 11:04:52 +02:00
Ole André Vadla Ravnås b8b42a904b submodules: Bump releng 2025-06-01 11:04:51 +02:00
WorksButNotTested fdb4c5107c ci: Add jobs that test on armbe8 and arm64be (#1162) 2025-05-29 21:30:35 +02:00
Francesco Tamagni 8108d4d954 Plug Interceptor singleton leaks (#1167) 2025-05-29 21:29:15 +02:00
Ole André Vadla Ravnås 44a9757589 subprojects: Prepare for release 2025-05-29 17:32:06 +02:00
Ole André Vadla Ravnås 8c939d4954 subprojects: Bump outdated 2025-05-29 17:30:09 +02:00
Francesco Tamagni 8bb0dd14a4 device: Allow agent sessions to detach before release (#1164)
To be robust against scenarios where an out-of-order detach could lead
to indefinite hang at release time.
2025-05-29 17:22:57 +02:00
Ole André Vadla Ravnås 59619f57ca subprojects: Prepare for release 2025-05-28 23:17:01 +02:00
Ole André Vadla Ravnås 5ed7378bb0 subprojects: Bump outdated 2025-05-28 23:16:07 +02:00
londek 4d2bba4b2a darwin: Fix the launchd agent (#1166)
Which was still using an old GumJS API that is now gone.
2025-05-28 23:11:27 +02:00
Ole André Vadla Ravnås e2e2eaab82 subprojects: Prepare for release 2025-05-24 21:03:20 +02:00
Ole André Vadla Ravnås d286cbb09c subprojects: Bump outdated 2025-05-24 21:01:59 +02:00
Ole André Vadla Ravnås c910622a6a compile-js-agent: Explicitly run the build script
To ensure incremental compilation works consistently, as `npm install`
will not always run the `prepare` script.
2025-05-24 21:00:59 +02:00
Ole André Vadla Ravnås 7599500a3b compile-js-agent: Add commented “npm link” example 2025-05-24 20:59:14 +02:00
Ole André Vadla Ravnås fe4db7e37f compile-js-agent: Improve error-reporting
By capturing both stdout and stderr.
2025-05-24 20:58:33 +02:00
Ole André Vadla Ravnås 6064d0c084 Fix agents generated by latest frida-compile
We need to explicitly declare internal agents as ESM now that the
TypeScript compiler is more conformant and ends up generating CommonJS
glue code.

This fixes our Darwin and Android agents, as well as the Barebone
backend's script runtime.
2025-05-24 20:50:43 +02:00
Ole André Vadla Ravnås f970529e08 subprojects: Prepare for release 2025-05-22 21:39:32 +02:00
Ole André Vadla Ravnås 031614ddc2 compiler: Fix asset bundling logic on Windows
Where virtual paths were stored with the wrong path separator.
2025-05-22 21:20:34 +02:00
Ole André Vadla Ravnås 71d82bcebc subprojects: Bump outdated 2025-05-22 18:22:36 +02:00
Ole André Vadla Ravnås 9c7759cb53 tests: Adjust profile-compiler.sh to new layout 2025-05-22 18:20:21 +02:00
Ole André Vadla Ravnås 11b3e1415f Upgrade to frida-compile 18
Now with TypeScript 5.8.3, latest frida-fs, etc.
2025-05-22 18:17:44 +02:00
Ole André Vadla Ravnås 420370257e subprojects: Prepare for release 2025-05-20 23:12:10 +02:00
Ole André Vadla Ravnås 36948a3f22 subprojects: Bump outdated 2025-05-20 23:10:16 +02:00
Ole André Vadla Ravnås 9fd3a7e104 compiler: Bump @frida/rollup-plugin-node-polyfills
Which was depending on the old frida-fs.
2025-05-20 23:08:11 +02:00
Ole André Vadla Ravnås cf1766d199 subprojects: Prepare for release 2025-05-20 22:40:50 +02:00
Ole André Vadla Ravnås 67fa4db816 Bump frida-compile and frida-fs 2025-05-20 22:39:22 +02:00
Ole André Vadla Ravnås 8e9363cfb5 subprojects: Bump outdated 2025-05-20 22:06:37 +02:00
Ole André Vadla Ravnås 710de8f174 submodules: Bump releng 2025-05-20 22:06:36 +02:00
Ole André Vadla Ravnås 350cfb2d30 subprojects: Prepare for release 2025-05-17 23:48:11 +02:00
Ole André Vadla Ravnås 95ca3422ce subprojects: Bump outdated 2025-05-17 23:46:48 +02:00
Ole André Vadla Ravnås 01cc4d15ac android: Bump frida-java-bridge to 7.0.1 2025-05-17 23:41:13 +02:00
Ole André Vadla Ravnås f8943edf87 darwin: Bump frida-objc-bridge to 8.0.4 2025-05-17 23:40:27 +02:00
Ole André Vadla Ravnås 80ff031073 base: Bump interface versions to match major version 2025-05-17 22:53:42 +02:00
Ole André Vadla Ravnås d133485443 subprojects: Prepare for release 2025-05-17 19:45:33 +02:00
Ole André Vadla Ravnås 56be2c35ad subprojects: Bump outdated 2025-05-17 19:10:44 +02:00
Ole André Vadla Ravnås 9c70e82545 meson: Require Node.js for Darwin and Android too
Now that these have agents built using frida-compile.
2025-05-17 19:07:58 +02:00
Ole André Vadla Ravnås a51fe412c2 subprojects: Bump outdated 2025-05-17 11:46:33 +02:00
Ole André Vadla Ravnås 87916f44b6 Move off deprecated GumJS APIs
Which are now gone.
2025-05-17 11:44:20 +02:00
Ole André Vadla Ravnås e58274b2a0 barebone: Upgrade Module API implementation 2025-05-17 11:43:11 +02:00
Ole André Vadla Ravnås f920aec415 git: Ignore Barebone's script-runtime.js 2025-05-17 11:42:35 +02:00
Ole André Vadla Ravnås f310cd876d Bump @types/frida-gum in internal agents 2025-05-17 11:41:49 +02:00
Ole André Vadla Ravnås dfce66b4b2 compiler: Bump @types/frida-gum 2025-05-17 11:03:37 +02:00
Ole André Vadla Ravnås cc554570f0 ios: Add frida-objc-bridge to agents
Now that the bridges are no longer baked into GumJS.
2025-05-17 09:55:14 +02:00
Ole André Vadla Ravnås 8311484510 android: Add frida-java-bridge to agent
Now that the bridges are no longer baked into GumJS.
2025-05-17 09:55:10 +02:00
Ole André Vadla Ravnås d1b3cb273c barebone: Factor out JS agent build logic 2025-05-17 09:27:33 +02:00
Ole André Vadla Ravnås 4f05cb60ce subprojects: Prepare for release 2025-05-14 15:26:46 +02:00
Ole André Vadla Ravnås 58b8a29938 subprojects: Bump outdated 2025-05-14 15:25:26 +02:00
Ole André Vadla Ravnås 524fa7c68a subprojects: Bump outdated 2025-05-14 09:40:18 +02:00
Ole André Vadla Ravnås fad0ea0209 submodules: Bump releng 2025-05-14 09:40:18 +02:00
Ole André Vadla Ravnås 0d6c0c4e60 subprojects: Prepare for release 2025-05-09 17:43:28 +02:00
Ole André Vadla Ravnås 1403ce084c subprojects: Bump outdated 2025-05-09 17:42:23 +02:00
Ole André Vadla Ravnås 6e29f7b3b6 fruity: Keep TcpTunnelConnection keypair alive
Now that TcpTunnelConnection no longer holds a reference of its own.
2025-05-09 17:33:38 +02:00
Ole André Vadla Ravnås 65d58b8a71 fruity: Use Apple's CoreDeviceProxy as fallback
So we can support systems where NCM is problematic.
2025-05-09 16:06:49 +02:00
Ole André Vadla Ravnås 80a3cb7a89 fruity: Add TcpTunnelConnection.open_stream() 2025-05-09 16:05:12 +02:00
Ole André Vadla Ravnås 59ad0989a7 fruity: Move lockdown service bits to UsbmuxTransport 2025-05-09 15:28:38 +02:00
Ole André Vadla Ravnås 0bdea096d1 fruity: Retransmit mDNS-SD request every 250 ms
Just in case we transmit it too early, we may need to retransmit.
2025-05-09 14:53:17 +02:00
Ole André Vadla Ravnås 3b62211346 subprojects: Prepare for release 2025-05-09 11:55:56 +02:00
Ole André Vadla Ravnås 7bd2507326 subprojects: Bump outdated 2025-05-09 11:54:51 +02:00
Ole André Vadla Ravnås 63739cc623 fruity: Handle OPACK boolean and compact integers
Support for the latter is needed during pairing on iOS 18.4.1.
2025-05-09 11:54:07 +02:00
Ole André Vadla Ravnås ab3026a1ed fruity: Improve portable tunnel error-handling
When we use lockdown to determine if the iDevice supports tunnels, and
that fails due to lack of lockdown-level pairing, simply assume that the
OS supports it.
2025-05-09 11:32:12 +02:00
Ole André Vadla Ravnås 6b712f2262 fruity: Add timeout to the Linux netif wait logic 2025-05-09 11:30:32 +02:00
Ole André Vadla Ravnås e3607bf260 fruity: Handle NetworkManager DISCONNECTED+CARRIER
So we actually wait until the device is ready when it quickly passes
through state=DISCONNECTED with reason=CARRIER.
2025-05-09 11:03:01 +02:00
Ole André Vadla Ravnås c58ad9bec6 fruity: Initiate pairing on macOS too, if needed 2025-05-09 09:52:42 +02:00
Ole André Vadla Ravnås 46a42f8c3d fruity: Move to XpcObjectReader.check_nserror() 2025-05-09 09:51:21 +02:00
Ole André Vadla Ravnås bc9d168581 xpc-object-reader: Add check_nserror() 2025-05-09 09:51:03 +02:00
Ole André Vadla Ravnås 9c8290b51b fruity: Tweak macOS CreateAssertion error handling
So we provide a clean error message when it fails.
2025-05-09 08:52:25 +02:00
Ole André Vadla Ravnås 086af542c9 subprojects: Prepare for release 2025-05-08 22:43:14 +02:00
Ole André Vadla Ravnås badd66adaf subprojects: Bump outdated 2025-05-08 22:41:26 +02:00
Ole André Vadla Ravnås b1bda6f351 subprojects: Prepare for release 2025-05-08 21:30:56 +02:00
Ole André Vadla Ravnås 7b43736e43 api: Install our GLib .gir files if needed
I.e. on systems without such infrastructure in place.
2025-05-08 19:21:15 +02:00
Ole André Vadla Ravnås 5cf879aac8 subprojects: Bump outdated 2025-05-08 17:06:24 +02:00
Ole André Vadla Ravnås b983f9b3fc bus: Remove the device property
Which wasn't meant to be exposed in the first place.
2025-05-07 19:32:46 +02:00
Ole André Vadla Ravnås 55e5cfa7e7 device-manager: Fix crash on early close()
In situations where HostSessionService start() gets cancelled.
2025-05-07 15:44:05 +02:00
Ole André Vadla Ravnås b8319f21e2 web-service: Fix handling of TLS connections
The remote address logic did not take them into account.
2025-05-07 15:21:02 +02:00
Ole André Vadla Ravnås 326190263d gadget: Unseal internal classes
To fix compiler warnings.
2025-05-07 14:41:45 +02:00
Ole André Vadla Ravnås 9acb2dcacd api: Include Injector type struct in the .h 2025-05-07 14:40:23 +02:00
Ole André Vadla Ravnås 2dcabf6a12 api: Hide AgentMessageSink in the .gir 2025-05-03 13:42:08 +02:00
Ole André Vadla Ravnås dce1c12de9 meson: Provide {GLib,GObject}-2.0.gir
For language bindings consuming us as a subproject.

This is a stopgap until we improve our SDKs so .gir assets are included.
2025-04-30 16:39:46 +02:00
Ole André Vadla Ravnås 1d9b0a4787 api: Fix up FridaBase references in the .gir 2025-04-30 16:29:34 +02:00
Ole André Vadla Ravnås f286a57c9c subprojects: Prepare for release 2025-04-25 22:35:55 +02:00
Ole André Vadla Ravnås 7cdc1fa5cd subprojects: Bump outdated 2025-04-25 22:34:26 +02:00
WorksButNotTested b3f7cfec01 linux: Update helpers for armbe8, arm64be and arm64beilp32 (#1160) 2025-04-17 18:36:28 +02:00
Ole André Vadla Ravnås 92f7b0b2a3 subprojects: Bump outdated 2025-04-17 18:15:36 +02:00
WorksButNotTested 7445ad2067 tests: Support big-endian arm64 2025-04-17 18:10:58 +02:00
WorksButNotTested a55e4dc331 tests: Fix labrat support to cover all systems (#1149) 2025-04-17 14:54:26 +02:00
WorksButNotTested 482f0ebebe tests: Skip slow tests on big-endian ARM (#1148) 2025-04-17 14:47:42 +02:00
Ole André Vadla Ravnås 4df7f6f422 subprojects: Prepare for release 2025-04-17 13:53:44 +02:00
Ole André Vadla Ravnås 96a3766f22 subprojects: Bump outdated 2025-04-17 13:52:03 +02:00
Ole André Vadla Ravnås 759dc3aae1 subprojects: Prepare for release 2025-04-16 20:26:45 +02:00
Ole André Vadla Ravnås 23e1dff791 subprojects: Bump outdated 2025-04-16 20:25:26 +02:00
Ole André Vadla Ravnås 08a9ccfe55 subprojects: Bump outdated 2025-04-16 20:16:43 +02:00
Ole André Vadla Ravnås 9f87f61f8e subprojects: Prepare for release 2025-04-14 17:59:46 +02:00
Ole André Vadla Ravnås e323cb1b88 subprojects: Bump outdated 2025-04-14 17:58:21 +02:00
Ole André Vadla Ravnås ef0bb9e844 darwin: Update injector dyld init detection for iOS 18.4 2025-04-14 17:56:53 +02:00
Shane G 35acf74f95 fruity: Update injector dyld init detection for iOS 18.4 (#1154) 2025-04-11 22:32:30 +02:00
Francesco Tamagni 3041f010fd network-stack: Reduce delay between writes
By flagging as writable as soon as some space is available, without
waiting for the low watermark.
2025-04-11 22:29:22 +02:00
Francesco Tamagni 310a3673bf network-stack: Fix TCP write chunk length (#1156) 2025-04-11 11:53:58 +02:00
Francesco Tamagni 270578183b network-stack: Always send enqueued data
This change makes sure `pcb.output()` is called even when no more
space is available on the queue, preventing stall.
2025-04-11 10:27:22 +02:00
Ole André Vadla Ravnås 0da9c2b3a1 subprojects: Prepare for release 2025-04-09 21:50:18 +02:00
Ole André Vadla Ravnås 615eb44e7d subprojects: Bump outdated 2025-04-09 21:48:38 +02:00
Ole André Vadla Ravnås bb3da1d561 network-stack: Fix TcpConnection transmit logic 2025-04-08 22:39:06 +02:00
Ole André Vadla Ravnås d391dc98ce network-stack: Improve VirtualStream locking
To improve batching and avoid unnecessary scheduling on Frida's thread.
2025-04-08 12:04:52 +02:00
Ole André Vadla Ravnås 4b34cb09a4 virtual-stream: Allow update_pending_io() w/o lock
For convenience when a subclass doesn't want to update any other state
before calling it.
2025-04-08 12:03:41 +02:00
Ole André Vadla Ravnås afd27c4235 subprojects: Prepare for release 2025-04-07 19:32:42 +02:00
Ole André Vadla Ravnås 794048e84e subprojects: Bump outdated 2025-04-07 19:31:49 +02:00
Francesco Tamagni 2b7c49c752 channel: Break read loop on empty buffer (#1150) 2025-04-07 19:29:40 +02:00
Ole André Vadla Ravnås 903d941ff0 device-manager: Fix teardown logic
Where we would also stop() the HostSessionService in cases where it
hadn't been start()ed.
2025-04-07 13:12:21 +02:00
Ole André Vadla Ravnås e5b422b8db subprojects: Prepare for release 2025-04-07 10:08:54 +02:00
Ole André Vadla Ravnås aac74e662e subprojects: Bump outdated 2025-04-07 10:08:01 +02:00
Ole André Vadla Ravnås ddab33010d subprojects: Prepare for release 2025-04-05 14:46:58 +02:00
Ole André Vadla Ravnås a2a77cdfa5 subprojects: Bump outdated 2025-04-05 11:14:07 +02:00
Ole André Vadla Ravnås 672bf55778 freebsd: Unseal Binjector to fix compilation
The C glue code depends on its fields for now.
2025-04-05 11:13:38 +02:00
Ole André Vadla Ravnås 722949d5fa subprojects: Prepare for release 2025-04-05 11:10:31 +02:00
Ole André Vadla Ravnås 5fed974dc5 subprojects: Bump outdated 2025-04-05 09:38:34 +02:00
Ole André Vadla Ravnås 7d2c0682e3 qnx: Unseal Qinjector to fix compilation
The C glue code depends on its fields for now.
2025-04-05 09:36:50 +02:00
Ole André Vadla Ravnås fcb66f61da subprojects: Prepare for release 2025-04-05 08:52:16 +02:00
Ole André Vadla Ravnås 23f1086bac subprojects: Bump outdated 2025-04-05 08:50:59 +02:00
Ole André Vadla Ravnås a0cf6a940b meson: Provide Gio-2.0.gir for convenience
So users won't need any GObject Introspection packages installed when
they're building language bindings and consuming us as a subproject.
2025-04-03 15:19:55 +02:00
Ole André Vadla Ravnås 0a4ee7acbb meson: Fix frida_girdir for the uninstalled case
It should point at the directory containing the refined .gir, not the
raw one from the Vala compiler.
2025-04-03 15:15:26 +02:00
Ole André Vadla Ravnås b8aeff0854 api: Seal classes not meant to be subclassed
Except for inner classes, as that results in C compiler warnings.
2025-04-03 12:23:57 +02:00
Ole André Vadla Ravnås 6a1f43f052 api: Fix vapi entries for sealed classes 2025-04-03 10:12:39 +02:00
Ole André Vadla Ravnås 87c293c831 api: Drop some accidentally exposed types 2025-04-02 18:40:57 +02:00
Ole André Vadla Ravnås 3e75fc9b84 subprojects: Prepare for release 2025-03-31 21:22:52 +02:00
Ole André Vadla Ravnås 1b6ca8fe46 subprojects: Bump outdated 2025-03-31 20:17:34 +02:00
Ole André Vadla Ravnås 9e35e245b1 host-session: Add support for remote services
So they are no longer exclusively an out-of-band local API. This means
that ControlService/frida-server can serve service sessions.
2025-03-31 20:10:49 +02:00
Ole André Vadla Ravnås 4a8c0bb13b api: Expose sealed classes 2025-03-31 20:10:49 +02:00
Ole André Vadla Ravnås 7c39f1783a stream: Factor out IOStream commonalities 2025-03-31 20:10:49 +02:00
Ole André Vadla Ravnås 194f025a98 host-session: Add support for remote channels
So they are no longer exclusively an out-of-band local API. This means
that ControlService/frida-server can serve channels.
2025-03-31 20:10:46 +02:00
Ole André Vadla Ravnås e6b2a6d6dd session: Remove unused ObjectPath constant 2025-03-30 16:26:58 +02:00
Ole André Vadla Ravnås e66b93b647 host-session: Factor out duplicated local logic 2025-03-28 17:18:35 +01:00
Ole André Vadla Ravnås 4a887eaed5 host-session: Rename BaseDBusHostSession to LocalHostSession
For clarity.
2025-03-28 17:18:17 +01:00
Ole André Vadla Ravnås 180075a7a0 control-service: Fix session logic for remote device 2025-03-28 15:29:14 +01:00
Ole André Vadla Ravnås 20ebf7fa15 host-session-provider: Add unlink_agent_session()
To support use-cases such as ControlService, where one specific client
gets disconnected and we need to tear down its agent sessions.
2025-03-28 15:29:11 +01:00
Ole André Vadla Ravnås 1018aca28d compiler: Bump frida-compile 2025-03-25 20:14:26 +01:00
Ole André Vadla Ravnås 93870b9f66 compiler: Bump @types/frida-gum 2025-03-24 17:33:23 +01:00
Ole André Vadla Ravnås 259ce04fe6 subprojects: Prepare for release 2025-03-21 14:20:50 +01:00
Ole André Vadla Ravnås 4cdfa4b09c subprojects: Bump outdated 2025-03-21 14:19:27 +01:00
Ole André Vadla Ravnås 7b54e41f88 droidy: Fix the MAX_MESSAGE_LENGTH declaration
The new maximum exceeds the range of a uint16.
2025-03-21 14:18:59 +01:00
Ole André Vadla Ravnås c7b1e17c3e subprojects: Prepare for release 2025-03-21 13:57:14 +01:00
Ole André Vadla Ravnås e844297a61 subprojects: Bump outdated 2025-03-20 20:38:52 +01:00
Ole André Vadla Ravnås 30b00eaa64 subprojects: Bump outdated 2025-03-20 17:00:25 +01:00
Ole André Vadla Ravnås 2109c38e06 submodules: Bump releng 2025-03-20 17:00:25 +01:00
Ole André Vadla Ravnås 1a3da37cf8 compiler: Bump @types/frida-gum 2025-03-20 16:59:53 +01:00
Jan S. 3d9fab2b0d fruity: Fix Input/Output Error on Windows (#1144)
By skipping devices with an empty UDID.
2025-03-19 15:12:07 +01:00
philippmao c58212fe8c droidy: Support more than ~8 ADB-connected devices (#1145)
By bumping the message size limit.
2025-03-19 15:07:44 +01:00
Ole André Vadla Ravnås bce2650980 subprojects: Bump outdated 2025-03-19 10:51:37 +01:00
Ole André Vadla Ravnås 0f03a0ee19 submodules: Bump releng 2025-03-19 10:51:36 +01:00
Ole André Vadla Ravnås d9b4d20adf linux: Include linux/unistd.h for syscall constant
Which, depending on the libc, may not be implicitly included.
2025-03-18 19:11:03 +00:00
Ole André Vadla Ravnås a8db90d6a5 subprojects: Bump outdated 2025-03-18 19:51:10 +01:00
Ole André Vadla Ravnås edcb76f066 submodules: Bump releng 2025-03-18 19:51:09 +01:00
Ole André Vadla Ravnås 1f72d5f102 subprojects: Prepare for release 2025-03-13 19:09:35 +01:00
Ole André Vadla Ravnås 8336d42b94 server: Create DeviceManager without local backend
Since we're pulling it in manually in order to run the frida-helper
in-process, we want to avoid having both implementations.

This reduces our footprint from 58M down to 49M on macOS, up from 46M
before the --device feature.
2025-03-13 19:06:33 +01:00
Ole André Vadla Ravnås 9404147517 device-manager: Support running w/o local backend
So consumers that don't need it can get a smaller footprint.
2025-03-13 19:01:20 +01:00
Ole André Vadla Ravnås ed464e9ccf subprojects: Bump outdated 2025-03-13 15:07:33 +01:00
Ole André Vadla Ravnås ce6178e125 server: Add --device for serving a specific device 2025-03-13 14:43:36 +01:00
Ole André Vadla Ravnås 0e69ec3e77 control-service: Support serving a specific Device 2025-03-13 14:42:57 +01:00
Ole André Vadla Ravnås 4eba770491 subprojects: Bump outdated 2025-03-13 14:09:11 +01:00
WorksButNotTested dc022e4bbe linux: Build helpers for arm64be and arm64beilp32 (#1141) 2025-03-13 13:47:09 +01:00
WorksButNotTested df04bb40c3 linux: Add support for arm64beilp32 (#1140) 2025-03-12 14:26:54 +01:00
WorksButNotTested 0f685ea496 linux: Support building helpers for armbe8 (#1139) 2025-03-12 10:07:43 +01:00
WorksButNotTested 48bfb1e054 linux: Add support for arm64be 2025-03-12 09:33:04 +01:00
Ole André Vadla Ravnås ab8a0a3927 compiler: Bump @types/frida-gum 2025-03-12 08:55:15 +01:00
Ole André Vadla Ravnås 9594e1a8b8 linux: Handle compat ranges during injection
So our spurious range detection doesn't make an incomplete candidate,
and we might end up picking the wrong one.
2025-03-03 23:38:47 +01:00
Ole André Vadla Ravnås 60a6770dba darwin: Fix racy leakage of memory during teardown
Where DarwinHelperBackend.close() would cancel dispatch sources, but
return before the cancel handler got a chance to run. While this leak
typically happened on teardown and wasn't necessarily a big deal
locally, the worse part was that we also leaked large regions of memory
in remote processes that we uninjected from just before teardown.
2025-02-28 17:34:49 +01:00
Ole André Vadla Ravnås c5376242e9 darwin: Fix HelperBackend MainContext assumptions
We should not blindly dispatch to the default one, but take note at
construction time.

This is to avoid surprises down the road, and to improve consistency
across the codebase.
2025-02-28 17:34:49 +01:00
Ole André Vadla Ravnås 17d6161435 linux: Avoid spurious .so ranges during injection
By checking that the mapping starts at file offset zero, and considering
all candidates ranked by the number of mappings, and whether executable
mappings exist in a given cluster.

Now that Gum.Module objects live longer, and may have an Gum.ElfModule
that has the ELF mapped, there's a much higher likelihood of running
into such spurious ranges.
2025-02-20 10:18:44 +01:00
Ole André Vadla Ravnås 26d9b9b6b1 fruity: Fix crash in the Linux getifaddrs() logic
Which failed to handle interfaces without an address.
2025-02-20 08:48:30 +01:00
Ole André Vadla Ravnås 1ed5590c77 submodules: Bump releng 2025-02-18 11:15:09 +01:00
Ole André Vadla Ravnås 25a283e43b ci: Fix the linux-x86 job
Now that ubuntu-latest refers to a newer Ubuntu release, we need to
move to the newer lib32stdc++ package version that matches that of
the gcc-multilib package.
2025-02-18 11:12:51 +01:00
Ole André Vadla Ravnås 04e04166b7 subprojects: Bump outdated 2025-02-18 11:12:51 +01:00
Ole André Vadla Ravnås 2c6c52d22a darwin: Port to the new ModuleResolver API 2025-02-18 11:12:51 +01:00
Ole André Vadla Ravnås ba7d01f232 subprojects: Prepare for release 2025-01-27 20:54:28 +01:00
Ole André Vadla Ravnås 8a16d42652 subprojects: Bump outdated 2025-01-27 20:51:53 +01:00
Ole André Vadla Ravnås 9c13120d67 fruity: Fix lockdown over CoreDevice regression
Introduced by the recent change in d1df792, where our RSDCheckin
includes an EscrowBag in order to support networked lockdown with
services such as “com.apple.crashreportmover”.

Turns out this broke support for quite a few other services, as the
presence of an EscrowBag requires that the particular service is able
to talk to AppleKeyStoreUserClient.

Not yet sure how to handle this. For now we'll maintain a list of
services that lack such privileges, so we can omit the EscrowBag for
those.

Kudos to @as0ler for reporting and helping troubleshoot.
2025-01-27 19:35:52 +01:00
Ole André Vadla Ravnås e70812a1e0 subprojects: Prepare for release 2025-01-23 20:46:57 +01:00
Ole André Vadla Ravnås 283381ca9e subprojects: Bump outdated 2025-01-23 20:31:30 +01:00
Mohamed Amine Amor 72a96226ce linux: Avoid risky code swaps with memfd regions
As they may not be writable, and unlike regular regions, ptrace() won't
help us in case of a missing writable bit.
2025-01-23 19:13:59 +01:00
Mohamed Amine Amor b6577afe81 linux: Relax injector's libc matching for Android
Due to how APEXes are bind-mounted.
2025-01-23 19:13:59 +01:00
Ole André Vadla Ravnås d1df7922bc fruity: Support networked lockdown for CoreDevice
Where we need to provide the remote unlock host key as part of the
RSDCheckin.

Kudos to @as0ler and @mrmacete for reporting and helping get to the
bottom of this one.
2025-01-23 18:41:01 +01:00
Ole André Vadla Ravnås af9c36ce6e xpc: Add support for Data objects 2025-01-23 15:27:47 +01:00
Ole André Vadla Ravnås da58033e9b subprojects: Prepare for release 2025-01-17 16:49:07 +01:00
Ole André Vadla Ravnås 702f3e83eb subprojects: Bump outdated 2025-01-17 16:46:54 +01:00
WorksButNotTested 7644f3dc6d linux: Revive support for ARM BE8 (#1130) 2025-01-17 16:30:59 +01:00
Ole André Vadla Ravnås 24d2d6f055 subprojects: Prepare for release 2025-01-14 19:35:29 +01:00
Ole André Vadla Ravnås 47d44f07ae subprojects: Bump outdated 2025-01-14 19:33:17 +01:00
Ole André Vadla Ravnås 8119fc7569 submodules: Bump releng 2025-01-14 19:33:17 +01:00
Ole André Vadla Ravnås 57409c8056 windows: Port injector to new Gum.Module API 2025-01-14 18:09:55 +01:00
Ole André Vadla Ravnås f497a764b6 subprojects: Prepare for release 2025-01-13 22:20:39 +01:00
Ole André Vadla Ravnås 20b7856fae subprojects: Bump outdated 2025-01-13 22:18:02 +01:00
Ole André Vadla Ravnås f2a81c03e3 subprojects: Prepare for release 2025-01-10 02:04:08 +01:00
Ole André Vadla Ravnås 79b34b9772 subprojects: Bump outdated 2025-01-10 02:02:04 +01:00
Ole André Vadla Ravnås 2fb702ba80 subprojects: Bump outdated 2025-01-09 23:35:23 +01:00
Ole André Vadla Ravnås 262d8f91e5 submodules: Bump releng 2025-01-09 23:35:22 +01:00
Ole André Vadla Ravnås 7638290dcb agent: Exclude OS/arch symbols in version script
Newer toolchains, such as the default toolchain on FreeBSD 14.2,
don't like references to symbols that don't exist. Instead of
listing JNI_OnLoad, which is only defined for Android builds,
we use a separate version script for Android instead.
2025-01-09 23:34:01 +01:00
Ole André Vadla Ravnås 1e0f37faf6 subprojects: Prepare for release 2025-01-09 13:18:38 +01:00
Ole André Vadla Ravnås fb46efaa12 compiler: Bump @types/frida-gum 2025-01-09 13:16:05 +01:00
Ole André Vadla Ravnås bb4a906c16 subprojects: Bump outdated 2025-01-08 19:06:43 +01:00
Ole André Vadla Ravnås 34eff8e9d6 darwin: Fix iOS/tvOS compilation issues
By porting the remaining bits to the new Gum.Module API.
2025-01-06 16:37:55 +01:00
Ole André Vadla Ravnås f28e5d4493 subprojects: Bump outdated 2025-01-06 16:03:28 +01:00
Ole André Vadla Ravnås 6f3434b454 subprojects: Bump outdated 2025-01-06 01:11:39 +01:00
Ole André Vadla Ravnås 90c2420bae submodules: Bump releng 2025-01-06 01:11:38 +01:00
Ole André Vadla Ravnås 95394935cd Port to the new Gum.Module API 2025-01-06 01:09:07 +01:00
Ole André Vadla RavnåsandHåvard Sørbø a2ffb76ff3 ncm: Cap datagram count to 16 for performance
The layout computation could end up working its way down from a very
high number. Though we probably should optimize the layout computation,
there's no point for now.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-12-17 23:38:37 +01:00
Ole André Vadla Ravnås c1472f9cb8 Create FUNDING.yml 2024-12-12 13:37:04 +01:00
Ole André Vadla Ravnås aabe70d041 subprojects: Bump outdated 2024-12-09 00:58:03 +01:00
Ole André Vadla Ravnås abc464bf49 subprojects: Prepare for release 2024-12-09 00:52:26 +01:00
Ole André Vadla Ravnås b6d7c7259f subprojects: Prepare for release 2024-12-09 00:32:18 +01:00
Ole André Vadla Ravnås 78750a4644 subprojects: Bump outdated 2024-12-09 00:28:54 +01:00
Ole André Vadla RavnåsandHåvard Sørbø a68dc36d2d fruity: Boost NCM performance with multi-transfers
Co-authored-by: Håvard Sørbø <[email protected]>
2024-12-08 22:45:07 +01:00
Ole André Vadla Ravnås de54b7e4cf subprojects: Bump outdated 2024-12-08 16:31:53 +01:00
Ole André Vadla Ravnås 1f292bb856 submodules: Bump releng 2024-12-08 16:31:52 +01:00
Ole André Vadla Ravnås 2025b7aaad fruity: Enable lwIP TCP timestamps and SACK
To align with the Linux IP stack's defaults.
2024-12-08 03:23:34 +01:00
Ole André Vadla Ravnås 534d860a42 meson: Bump lwIP TCP MSS to 4036
For better TCP tunnel performance.
2024-12-08 03:22:06 +01:00
Ole André Vadla Ravnås db28eb0e70 fruity: Fix crash on USB op creation during teardown 2024-12-08 03:20:39 +01:00
Ole André Vadla RavnåsandHåvard Sørbø 8d0b735a75 fruity: Improve userspace NCM driver to perform batching
As we observed packet loss in bursty situations, and implementing
batching avoids it.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-12-08 01:55:38 +01:00
Ole André Vadla Ravnås 930776dcca compat: Create relative subproject symlinks
So the source tree can be moved without breaking things.
2024-12-07 16:08:52 +01:00
Ole André Vadla Ravnås 7a38663672 compat: Fix subproject symlink_to() error-handling 2024-12-07 15:55:22 +01:00
Ole André Vadla RavnåsandHåvard Sørbø 3779ce9f64 vapi: Add SocketAddressUnion to libngtcp2.vapi
Co-authored-by: Håvard Sørbø <[email protected]>
2024-12-05 15:24:13 +01:00
Ole André Vadla RavnåsandHåvard Sørbø b5065e275d fruity: Improve USB device handling on non-macOS
- Do not open a given USB device if kernel NCM is available, as opening
  may fail and won't actually do anything useful in the end.
- Throw when a kernel NCM interface lacks an IPv6 address, instead of
  silently degrading to legacy mode.
- Replace retry logic with a fixed 250 ms delay, applied when a device
  arrives after starting, or during a mode-switch.
- Change USB device configuration if needed.
- Wait for kernel NCM interface to be ready. For now this is limited to
  Linux systems with either NetworkManager or networkd.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-12-05 15:23:24 +01:00
Ole André Vadla RavnåsandHåvard Sørbø a682e51f37 fruity: Only assume jailed if connection refused
Bubble up all other errors.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-12-05 15:23:06 +01:00
Ole André Vadla RavnåsandHåvard Sørbø bdf120016a api: Avoid redundant writes to output files
Modify the output logic to skip writing to files if the contents remain
unchanged, preventing unnecessary file updates. This means quicker
incremental builds.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-12-05 15:23:00 +01:00
Ole André Vadla RavnåsandHåvard Sørbø 61eb12f718 meson: Avoid parsing API multiple times
As Meson's custom_target() supports multiple outputs.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-12-05 15:22:54 +01:00
Ole André Vadla RavnåsandHåvard Sørbø e149f5e332 fruity: Avoid USB access in case of kernel NCM
So we won't run into permission issues, and avoid unneccessary work.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-11-26 23:04:10 +01:00
Ole André Vadla RavnåsandHåvard Sørbø ef4fa0de7d fruity: Account for frida-server bind() delay
Where we just opened the tunnel, but frida-server hasn't yet noticed the
new interface and had a chance to bind() on it. This means we should
wait a bit and try again. Otherwise we may end up falling back to
usbmuxd, and use a less desirable transport. And if we're really
unlucky, even that could fail, and we'd end up falling back to jailed
mode.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-11-26 22:02:47 +01:00
Ole André Vadla RavnåsandHåvard Sørbø 1bd9d389b8 fruity: Fix direct channel reliability
Where we might establish the HostSession connection through usbmuxd, and
proceed to establish direct connections through the tunnel. This is
usually fine, except when an Apple service happens to bind to the same
port inside the tunnel. In that case we'd end up talking to that instead
of the broker port, which is listening on INADDR_ANY.

Kudos to @mrmacete for helping track this one down.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-11-26 19:43:42 +01:00
Ole André Vadla Ravnås b32408c607 device: Fix the constructor logic
Broken by the refactoring in 2790745.
2024-11-24 15:32:58 +01:00
Ole André Vadla Ravnås a8e01c2940 Fix some stylistic inconsistencies 2024-11-24 15:32:14 +01:00
Ole André Vadla Ravnås cd6366a4eb tests: Fix the HostSession suite 2024-11-24 00:58:28 +01:00
Ole André Vadla Ravnås 2c1cf1ec58 api: Add GIR attributes 2024-11-24 00:34:32 +01:00
Ole André Vadla Ravnås 279074501c api: Avoid exposing internal types 2024-11-24 00:33:17 +01:00
Ole André Vadla Ravnås 20cfd56a7a api: Generate a proper gir
- Needed types in frida-base included.
- Internal types omitted.
2024-11-23 23:54:20 +01:00
Ole André Vadla Ravnås d03bda5545 api: Omit APIs involving HostSession 2024-11-23 15:14:37 +01:00
Ole André Vadla Ravnås 951796196c api: Refactor generate.py to improve readability 2024-11-23 15:14:33 +01:00
Ole André Vadla Ravnås 312e38b2ec fruity: Improve TcpTunnelConnection teardown
So the VirtualNetworkStack is torn down right away upon the remote end
closing the connection, instead of once close() is called.

Also ensure any pending write operation is cancelled at that point.
2024-11-22 14:50:31 +01:00
Ole André Vadla Ravnås 36a8ffbb99 subprojects: Prepare for release 2024-11-14 00:30:38 +01:00
Ole André Vadla Ravnås aeb2c0f6e4 subprojects: Bump outdated 2024-11-14 00:28:54 +01:00
Ole André Vadla Ravnås d5591cc453 submodules: Bump releng 2024-11-14 00:28:54 +01:00
lx866 20f4df23a8 android: Revive injector's handling of shared libc ranges
So we still do the right thing if the target process' lowest libc.so
range is a shared mapping, for example:

    HNFRI:/ # grep libc.so /proc/22001/maps
    6e3e1cd000-6e3e2c7000 r--s 00000000 07:08 38 /apex/com.android.runtime/lib64/bionic/libc.so
    71eb6c2000-71eb6ff000 r--p 00000000 07:08 38 /apex/com.android.runtime/lib64/bionic/libc.so
    71eb6ff000-71eb781000 r-xp 0003d000 07:08 38 /apex/com.android.runtime/lib64/bionic/libc.so
    71eb781000-71eb786000 r--p 000bf000 07:08 38 /apex/com.android.runtime/lib64/bionic/libc.so
    71eb786000-71eb787000 rw-p 000c3000 07:08 38 /apex/com.android.runtime/lib64/bionic/libc.so

Originally implemented in 5e8314f, but lost in the injector rewrite.
2024-11-14 00:21:58 +01:00
JunGe-Y 89033cd1e8 compat: Fix compilation when using non-UTF-8 locales (#1122) 2024-11-13 23:55:57 +01:00
Ole André Vadla Ravnås a027f5b08e fruity: Skip jailed fallback in case of timeout 2024-11-13 20:37:07 +01:00
Ole André Vadla Ravnås 848f4b52e1 fruity: Expect networked device to respond quickly
When connecting to its pairing service, it should be reasonable to
assume that the TCP connection set up completes within two seconds.

This improves the UX when a device has gone to sleep, and its mDNS
records haven't yet timed out.
2024-11-13 20:35:42 +01:00
Ole André Vadla Ravnås e0524ad90b network-stack: Add open_tcp_connection_with_timeout() 2024-11-13 20:28:09 +01:00
Ole André Vadla Ravnås 5ce8ce0531 fruity: Always try USB transport first
As a network transport may be slower (best-case) or unavailable
(worst-case).
2024-11-13 20:15:52 +01:00
Ole André Vadla Ravnås 8f04f2f677 fruity: Fix TcpTunnelConnection teardown logic
Where it turns out IOStream.close_async() may throw other errors than
just IOError. This is a bug in gio-2.0.vapi, but still, once fixed there
we still want to catch (and ignore) all errors.

Kudos to @mrmacete for helping track this one down.
2024-11-13 18:03:38 +01:00
Ole André Vadla RavnåsandHåvard Sørbø f0593c2aec fruity: Fix QuicTunnelConnection teardown logic
And improve the ngtcp2 bindings.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-11-13 16:32:04 +01:00
Ole André Vadla RavnåsandHåvard Sørbø ec582967e8 fruity: Fix hang when a USB op starts at teardown
Which would result in such transfers never completing, as our USB worker
is no longer processing libusb events.

Kudos to @mrmacete for helping track this one down.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-11-13 13:23:39 +01:00
Ole André Vadla RavnåsandHåvard Sørbø 4fce1c4321 fruity: Gracefully close TunnelConnection
Co-authored-by: Håvard Sørbø <[email protected]>
2024-11-06 13:39:42 +01:00
Ole André Vadla Ravnås 667c7491b5 fruity: Relax NCM interface presence check
One operational network interface is sufficient.
2024-11-06 10:47:39 +01:00
Ole André Vadla RavnåsandHåvard Sørbø 85de7a01fb fruity: Add support for the TCP tunnel protocol
And use it by default, to match Apple's new behavior.

The FRIDA_FRUITY_TUNNEL_PROTOCOL environment variable can be used to
revert back to QUIC.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-11-06 10:47:03 +01:00
Ole André Vadla Ravnås 8fdff55b80 subprojects: Bump outdated 2024-11-06 10:21:11 +01:00
Ole André Vadla Ravnås a420358565 submodules: Bump releng 2024-11-06 10:21:10 +01:00
Ole André Vadla RavnåsandHåvard Sørbø 2457ac45f6 fruity: Fix edge-case in tunnel logic for older OS versions
When usbmuxd is not available, we would try to set up a tunnel
connection. This would then fail when the OS is too old for CoreDevice
support, and we would erroneously cache the Tunnel implementation in its
unopened state. This meant it could be used as if it was opened, causing
undefined behavior.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-10-28 15:01:40 +01:00
Ole André Vadla Ravnås e797e829d8 fruity: Fix CoreDevice UDID logic for modern devices 2024-10-26 08:54:27 +02:00
WorksButNotTested aa95167156 linux: Pick other temp dir when $TMPDIR is noexec 2024-10-21 22:40:47 +02:00
Ole André Vadla Ravnås 03d609c1a5 linux: Improve helpers Makefile to use internal Meson 2024-10-21 14:55:20 +02:00
Harry Gunnarsson 36619e51e7 linux: Support overriding config when building helpers 2024-10-21 14:55:20 +02:00
Harry Gunnarsson e2b462823c linux: Improve injector's MUSL compatibility
The loader string could look different on different platforms.
2024-10-21 14:32:52 +02:00
Andrew Werner e8ee891924 linux: Allocate stack for injector's remote calls
For some target programs it's not reasonable to assume that any hijacked
thread has a large stack. For example, in Go, stacks are often small and
are allocated on the heap. The injector bootstrap program uses kilobytes
of stack. In order to side-step this problem, this patch changes the
boostrapper to allocate an auxiliary stack for remote calls to use and,
for the bootstrapper and loader, uses it.

The calls to mmap and munmap don't use much stack, so they are fine.

Fixes #544.
2024-10-21 14:07:00 +02:00
Andrew Werner d0fe3a1ae9 linux: Rebuild helper bin files
This commit utilizes the containers created in [frida/docker-images#2]
to rebuild all the Linux injector helper binaries for all the
architectures. It uses a new script to rebuild them and hooks up CI to
rebuild them and make sure that they are all the same as what is checked
in. This should allow us to make changes to these binaries without any
pain and with the confidence that what is checked in matches the source.

[frida/docker-images#2]: https://github.com/frida/docker-images/pull/2
2024-10-20 17:09:55 +02:00
Ole André Vadla Ravnås b223fc4235 darwin: Update to the new RpcClient.call() API 2024-10-20 16:42:12 +02:00
Ole André Vadla Ravnås 5ad248a894 android: Update to the new RpcClient.call() API 2024-10-20 16:40:56 +02:00
Yoav ShaiandOle André Vadla Ravnås d774d0e064 gadget: Support loading assets from APK on Android
On Android, when apps have `extractNativeLibs` set to `false`, the
configuration and potentially script files for frida-gadget are not
extracted and cannot be read from the filesystem.

Co-authored-by: Ole André Vadla Ravnås <[email protected]>
2024-10-20 16:40:15 +02:00
WorksButNotTested e11938c11f inject: Support binary data on stdin and stdout 2024-10-20 12:11:31 +02:00
WorksButNotTested fb0049af86 barebone: Support binary data in Script.post() 2024-10-20 12:11:31 +02:00
WorksButNotTested 2fe6922b25 rpc-client: Support binary data in call() 2024-10-20 12:11:31 +02:00
Ole André Vadla Ravnås c96d94f796 subprojects: Prepare for release 2024-10-14 15:32:15 +02:00
Ole André Vadla Ravnås a8b710bc54 subprojects: Bump outdated 2024-10-14 15:30:11 +02:00
Håvard SørbøandOle André Vadla Ravnås 2b0c4da879 fruity: Fix use-after-free in TcpConnection
The error callback might be called at a point where the PCB has already
been freed. This meant that us clearing its user data would result in a
use-after-free where a NULL pointer was written into the unknown.

Co-authored-by: Ole André Vadla Ravnås <[email protected]>
2024-10-14 13:24:37 +00:00
Håvard SørbøandOle André Vadla Ravnås d0129614cd fruity: Fix DTXArgumentList.parse() GValue init
Where we were using the wrong setter when encountering an object. This
was caught by GLib's runtime checks, but this went unnoticed because we
usually build without them.

Co-authored-by: Ole André Vadla Ravnås <[email protected]>
2024-10-14 13:22:41 +00:00
Håvard SørbøandOle André Vadla Ravnås 12348209da payload: Fix AddressSanitizer build regression
Co-authored-by: Ole André Vadla Ravnås <[email protected]>
2024-10-14 13:19:56 +00:00
Ole André Vadla Ravnås 0451ce09b2 subprojects: Prepare for release 2024-10-11 11:18:27 +02:00
Ole André Vadla Ravnås 0fa9765871 subprojects: Bump outdated 2024-10-11 11:16:06 +02:00
ajwerner 71e1068150 ci: Download proper ndk version (#551)
We were relying on the version built into the image being correct. It is
now too new.
2024-10-11 11:13:44 +02:00
Francesco Tamagni 690cc30260 control-service: Fix null dereference on incoming connection (#1060) 2024-10-11 11:12:15 +02:00
Ole André Vadla Ravnås 557aefc898 subprojects: Prepare for release 2024-10-10 22:07:51 +02:00
Ole André Vadla Ravnås 088edc09d7 subprojects: Bump outdated 2024-10-10 22:06:52 +02:00
Ole André Vadla Ravnås 19f6a2f378 compiler: Bump @types/frida-gum 2024-10-10 21:30:42 +02:00
Ole André Vadla Ravnås 16c9035bca subprojects: Prepare for release 2024-10-10 20:18:24 +02:00
Ole André Vadla Ravnås fbb46912db subprojects: Bump outdated 2024-10-10 20:08:54 +02:00
Ole André Vadla Ravnås 11aa03695f submodules: Bump releng 2024-10-10 20:08:53 +02:00
Håvard SørbøandOle André Vadla Ravnås a23fba6ee9 fruity: Bail on iOS tunnel service versions pre-17
Instead of crashing.

Co-authored-by: Ole André Vadla Ravnås <[email protected]>
2024-10-10 18:02:07 +00:00
Ole André Vadla RavnåsandHåvard Sørbø 364bf65c59 control-service: Fix reliability on CoreDevice systems
Where having a single transport broker listening on all interfaces may
result in an early TCP RST when trying to communicate with it from
inside a tunnel. The exact cause of this is not known, but we have
confirmed that having one broker per dynamic interface/tunnel does
resolve the issue. We also observed that listening on all interfaces,
but restricted to IPv6, also avoids the issue.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-10-10 19:03:41 +02:00
Ole André Vadla RavnåsandHåvard Sørbø dcdfcf53d1 fruity: Fix USB mode parsing on iOS < 16
Where the mode is a 3 byte blob.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-10-10 18:46:44 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 2698d7dd1d meson: Fix i/tvOS compilation with GLib as a subproject
Co-authored-by: Håvard Sørbø <[email protected]>
2024-10-10 18:45:28 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 208aec031c web-service: Close connections of removed dynamic interfaces
To avoid them sticking around until we run out of file-descriptors.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-10-08 13:15:10 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 03e70d26b7 socket: Transition GSource callbacks to Source.REMOVE
Co-authored-by: Håvard Sørbø <[email protected]>
2024-10-08 13:14:20 +02:00
Ole André Vadla Ravnås b22507ed32 meson: Disable Fruity and friends on FreeBSD
As we currently rely on a libusb API that only exists in our libusb.
2024-10-05 19:53:26 +00:00
Ole André Vadla Ravnås 1c4902e72d fruity: Use USB product string as transport name 2024-10-05 19:36:34 +00:00
Ole André Vadla RavnåsandHåvard Sørbø e5eaedaf85 fruity: Bubble up USB permission errors
Co-authored-by: Håvard Sørbø <[email protected]>
2024-10-05 19:36:31 +00:00
Ole André Vadla Ravnås 944380225a subprojects: Bump outdated 2024-10-05 17:24:56 +02:00
Ole André Vadla Ravnås f84f2887d2 submodules: Bump releng 2024-10-05 17:24:55 +02:00
Ole André Vadla Ravnås e67d513d06 subprojects: Bump outdated 2024-10-05 16:14:44 +02:00
Ole André Vadla Ravnås 558628ad5a submodules: Bump releng 2024-10-05 16:14:43 +02:00
Ole André Vadla Ravnås 9c27b7b453 subprojects: Bump outdated 2024-10-05 16:12:48 +02:00
Ole André Vadla Ravnås 441636acd1 submodules: Bump releng 2024-10-05 16:12:47 +02:00
Ole André Vadla Ravnås 3238e2268a network-stack: Fix racy TCP data loss upon peer closure
Where the closure resulted in us letting go of the PCB, and the recv()
logic would return early because the PCB was gone. At that point there
might still be data left in the RX buffer, but the application wouldn't
see it.
2024-10-03 10:45:36 +02:00
Ole André Vadla Ravnås 66099c705f network-stack: Handle abrupt disposal of TcpConnection
Where we would free the PCB TCB but fail to notify any live TcpIOSource
instances and blocked TcpInputStream.read() calls.
2024-09-20 19:06:33 +02:00
Ole André Vadla Ravnås ca8519cec7 network-stack: Fix race in TcpInputStream.read()
Where the notify::pending-io signal fires after the call to
is_readable() but before our signal handler is connected.
2024-09-20 19:01:04 +02:00
Ole André Vadla Ravnås 416d2ea388 subprojects: Prepare for release 2024-09-19 00:00:49 +02:00
Ole André Vadla Ravnås 02e83a6d4a subprojects: Bump outdated 2024-09-18 23:57:30 +02:00
Ole André Vadla Ravnås 539f359a1f fruity: Handle USB TunnelConnection dropping
Which happens on e.g. an iOS userspace reboot.
2024-09-18 23:49:56 +02:00
Ole André Vadla Ravnås 24dc7f4a3d fruity: Fix unreliable modeswitch activation
Where its Promise could be resolved more than once.
2024-09-18 23:14:35 +02:00
Ole André Vadla Ravnås f48ced3a4a subprojects: Prepare for release 2024-09-18 14:33:15 +02:00
Ole André Vadla Ravnås 54829052bd subprojects: Bump outdated 2024-09-18 14:31:38 +02:00
Ole André Vadla Ravnås 73abf705b1 submodules: Bump releng 2024-09-18 14:31:37 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 7e21f5cb1d fruity: Advertise our RemoteXPC protocol support
Like macOS does, but with most of the properties omitted.

We do this to more closely mimic macOS' behavior, and to avoid an error
ending up in the syslog:

    Invalid or missing remote device connection version flags

Co-authored-by: Håvard Sørbø <[email protected]>
2024-09-18 14:30:21 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 24a1f79b02 fruity: Handle iDevice not paired with anyone
Where the pairVerify step fails early.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-09-18 14:25:55 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 2d990888d9 fruity: Fix teardown when using our NCM driver
Co-authored-by: Håvard Sørbø <[email protected]>
2024-09-17 18:34:21 +02:00
Ole André Vadla Ravnås 0fd255d3a4 fruity: Fix error marshaling in find_tunnel() for non-macOS 2024-09-17 17:15:35 +02:00
Ole André Vadla Ravnås fc500a19d9 fruity: Fix a stylistic inconsistency 2024-09-17 17:12:12 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 7280bbdbf7 fruity: Reuse NCM peer when tunnel setup fails
Co-authored-by: Håvard Sørbø <[email protected]>
2024-09-17 13:25:25 +02:00
Ole André Vadla Ravnås 9539981511 subprojects: Prepare for release 2024-09-06 22:59:50 +02:00
Ole André Vadla Ravnås 3005ab2aa5 subprojects: Bump outdated 2024-09-06 22:58:46 +02:00
Ole André Vadla Ravnås 140c5cf2cd subprojects: Prepare for release 2024-09-06 21:57:05 +02:00
Ole André Vadla Ravnås 6bb27c17e9 subprojects: Bump outdated 2024-09-06 21:54:47 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 0f2d9c8b40 network-stack: Fix deadlock in perform_on_lwip_thread()
Where in the case of already being on the lwIP thread, we would enqueue
the request and then perform whichever is the oldest pending request. So
when there was already one or more requests pending, we would perform
that request instead. Then next we would join() our request, assuming it
had completed, and end up deadlocking the lwIP thread.

Kudos to @mrmacete for reporting and helping track this one down.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-09-06 15:16:48 +02:00
Ole André Vadla Ravnås 5606120f6a subprojects: Bump outdated 2024-08-30 23:00:20 +02:00
ajwerner 2376f425a3 linux: Handle process gone when detaching (#543)
This is an attempt to handle the situation where the process has gone
away and we're shutting down. I've observed the system looping
attempting to move the state out of ATTACHED. It's possible that the
state machine here needs to be made more complex (ALREADY_ATTACHED is
misleading).

Informs #478.
2024-08-30 22:37:41 +02:00
Ole André Vadla Ravnås 1f9e24e1ea windows: Revive the system session 2024-08-26 12:26:25 +02:00
Ole André Vadla Ravnås 694118cccc subprojects: Bump outdated 2024-08-26 01:51:50 +02:00
Ole André Vadla Ravnås 9d51496124 submodules: Bump releng 2024-08-26 01:51:49 +02:00
Ole André Vadla Ravnås 27849af528 subprojects: Bump outdated 2024-08-25 23:54:37 +02:00
Ole André Vadla Ravnås 9df97f9e6b windows: Add support for arm64 2024-08-25 23:52:42 +02:00
Ole André Vadla Ravnås 79126f0065 subprojects: Bump outdated 2024-08-25 13:41:41 +02:00
Ole André Vadla Ravnås 4b0d1eab04 meson: Add frida-netif to the public frida-core
It's needed by ControlService.
2024-08-25 13:40:51 +02:00
Ole André Vadla Ravnås 31188db39a subprojects: Prepare for release 2024-08-22 15:40:45 +02:00
Ole André Vadla Ravnås de09ec42d5 subprojects: Bump outdated 2024-08-22 15:39:00 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 34c1548ced tunnel-connection: Ensure JSON request ends up in its own UDP packet
When opening the tunnel, it seems problematic if a datagram and stream
data end up in the same UDP packet. We make our dummy-datagram larger to
avoid this.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-08-22 15:35:07 +02:00
Ole André Vadla RavnåsandHåvard Sørbø b753294acb tunnel-connection: Wire up missing stream close logic
Co-authored-by: Håvard Sørbø <[email protected]>
2024-08-22 15:35:00 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 498c9be83e tunnel-connection: Consistently avoid writes after connection is gone
Which would result in a crash.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-08-22 15:32:30 +02:00
Ole André Vadla RavnåsandHåvard Sørbø bbcbe91b3e network-stack: Handle perform_on_lwip_thread() from the lwIP thread
Instead of deadlocking.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-08-22 15:29:11 +02:00
Ole André Vadla Ravnås ce80773d21 subprojects: Prepare for release 2024-08-20 21:50:41 +02:00
Ole André Vadla Ravnås e06da4d410 subprojects: Bump outdated 2024-08-20 21:48:20 +02:00
Francesco Tamagni 120dc491c4 tunnel-interface-observer: Fix start() crash on i/tvOS
When SCDynamicStoreCopyKeyList() fails.
2024-08-20 21:12:49 +02:00
Ole André Vadla Ravnås 2ebec1addf subprojects: Prepare for release 2024-08-02 14:05:13 +02:00
Håvard Sørbø 6a1e373ba2 fruity: Make find_usbmux_device() non-throwing 2024-08-02 14:03:03 +02:00
Ole André Vadla Ravnås 100b7a63d7 fruity: Guard against lockdown open<->close loop 2024-08-02 14:03:03 +02:00
Håvard Sørbø b3f2d1e7cc fruity: Fix invalidation of closed lockdown client 2024-08-02 14:03:03 +02:00
Håvard Sørbø 313cdc89f8 lockdown-client: Bubble up CONNECTION_CLOSED error 2024-08-02 14:03:03 +02:00
Ole André Vadla Ravnås 3c8221dd55 subprojects: Bump outdated 2024-07-29 11:00:36 +02:00
Ole André Vadla Ravnås dca8509960 submodules: Bump releng 2024-07-29 11:00:36 +02:00
Ole André Vadla Ravnås 78ff6e5b08 subprojects: Prepare for release 2024-07-23 10:14:56 +02:00
Ole André Vadla Ravnås 6537809897 subprojects: Bump outdated 2024-07-23 10:11:56 +02:00
Ole André Vadla Ravnås ead2ff6701 submodules: Bump releng 2024-07-23 10:11:56 +02:00
xiofee d55232fe52 fruity: Fix crash when enumerating network interfaces on Windows (#538)
Some don't have a unicast address, and need to be ignored.
2024-07-23 10:11:26 +02:00
Ole André Vadla Ravnås dab3b91f9e subprojects: Prepare for release 2024-07-22 11:49:03 +02:00
Ole André Vadla Ravnås 71f7b2f16a subprojects: Bump outdated 2024-07-22 11:37:45 +02:00
Ole André Vadla Ravnås 4cf806641f submodules: Bump releng 2024-07-22 11:37:44 +02:00
Ole André Vadla Ravnås e34a533a35 fruity: Handle devices without tunnel support on non-macOS
In the portable CoreDevice backend.
2024-07-22 11:28:23 +02:00
Ole André Vadla Ravnås 6b56c88295 fruity: Use UsbmuxDevice from USB transport if present
So we can reach the loopback interface, and for better performance.
2024-07-19 23:10:15 +02:00
Ole André Vadla Ravnås d810111f1e fruity: Expose name from USB transport if present
It has a more descriptive name in case of UsbmuxTransport.
2024-07-19 23:09:42 +02:00
Ole André Vadla Ravnås 3d17ad39da subprojects: Prepare for release 2024-07-17 22:43:10 +02:00
Ole André Vadla Ravnås 429607e7e3 xpc-client: Wire up cancellable in request()
As we can't cancel the request itself, we have to cancel the connection.
2024-07-17 22:34:24 +02:00
Ole André Vadla Ravnås 6ef660718a subprojects: Bump outdated 2024-07-17 22:10:01 +02:00
Ole André Vadla Ravnås cf61fda141 subprojects: Prepare for release 2024-07-16 15:24:54 +02:00
Ole André Vadla Ravnås b272dda27d subprojects: Bump outdated 2024-07-16 15:20:35 +02:00
Ole André Vadla Ravnås 300d176e85 ci: Re-enable tests on macOS 2024-07-16 15:14:43 +02:00
Ole André Vadla Ravnås e7f045bbe9 darwin: Await ObjC init on macOS Sequoia and iOS 18
By making use of notifyObjCInit() if available.
2024-07-16 11:45:16 +02:00
Ole André Vadla Ravnås 0b6abfeb7c darwin: Handle dyld restart on macOS Sequoia and iOS 18 2024-07-16 11:12:02 +02:00
Ole André Vadla Ravnås c17c6e31bc tests: Avoid relying on executable name on Darwin 2024-07-16 11:06:55 +02:00
Ole André Vadla Ravnås 0825aab1d0 fruity: Improve CoreDevice pairing support
- Fix support for multiple pairing relationships.
- Keep the in-memory peer store up-to-date, so new pairing relationships
  don't require a process restart to be able to match them up with
  pairing services on the network.
2024-07-15 14:41:03 +02:00
Ole André Vadla Ravnås be65296610 ncm: Fix a stylistic inconsistency 2024-07-15 13:24:16 +02:00
Ole André Vadla Ravnås 0a6002a3ce ncm: Avoid using a broken kernel NCM driver
Where only one of the two network interfaces exist, i.e. the tethering
interface.
2024-07-15 13:03:49 +02:00
Ole André Vadla Ravnås a3deb22999 ncm: Detach all drivers before changing configuration
We would previously only try to detach for the data interface, which
makes no sense if that interface is on a different configuration.
2024-07-15 12:54:14 +02:00
Ole André Vadla Ravnås 5aeb800a7a subprojects: Prepare for release 2024-07-13 00:34:04 +02:00
Ole André Vadla Ravnås a01f5dcd3d subprojects: Bump outdated 2024-07-13 00:06:51 +02:00
Ole André Vadla Ravnås 23b15b5f4b ncm: Switch USB device configuration if needed 2024-07-12 15:31:43 +02:00
Ole André Vadla Ravnås f1fdd980aa fruity: Add support for networked devices on Windows
By making use of DnsServiceBrowse() if the OS supports it -- which means
Windows 10 and newer.
2024-07-12 15:29:15 +02:00
Ole André Vadla Ravnås 05a68332f6 network-stack: Fix TcpConnection use-after-free
When lwIP notifies us about the PCB being closed or an error, we must
clear its user data so any future callbacks don't end up using the
TcpConnection after it's gone.
2024-07-12 00:06:17 +02:00
Ole André Vadla Ravnås 13521724f7 fruity: Remove commented-out variable 2024-07-11 23:57:55 +02:00
Ole André Vadla Ravnås 6c700a511e fruity: Split out DnsPacketReader 2024-07-11 23:14:01 +02:00
Ole André Vadla Ravnås 02ccafe516 fruity: Move LinuxPairingBrowser to ResolveService
Which is simpler and avoids some roundtrips to systemd-resolved.
2024-07-11 23:09:08 +02:00
Ole André Vadla Ravnås fb672d7a0b ci: Move the macOS x86_64 job to macos-latest
As the macos-11 runner is gone.

Also skip running tests on macOS entirely for now, as a stopgap until
__CFInitialize() has been dealt with.
2024-07-11 15:13:14 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 81fbfe2ab5 fruity: Add support for networked devices on Linux
By making use of systemd-resolved for mDNS-SD lookups.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-11 15:09:12 +02:00
Ole André Vadla Ravnås 3aef106ec2 fruity: Fix the LWIP.NetworkInterface bindings
Where we would end up passing in a copy of the struct and have e.g.
neighbor discovery timers make use of dangling pointers.
2024-07-11 15:09:12 +02:00
Ole André Vadla Ravnås 370f1836a7 dtx: Fix teardown of DTXConnection vs. DTXChannel
So channels never make use of the connection once it's gone.
2024-07-11 15:09:12 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 70bb82bb5d fruity: Remove forgotten .pcap debug output
Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-11 15:09:12 +02:00
Ole André Vadla Ravnås dc43be94c5 buffer: Add BufferReader 2024-07-11 15:09:12 +02:00
Ole André Vadla Ravnås 7c7367b010 buffer: Add content validation to read_fixed_string()
To support parsing untrusted data.
2024-07-11 15:09:12 +02:00
Ole André Vadla Ravnås a9073c07eb buffer: Add content validation to read_string()
To support parsing untrusted data.
2024-07-11 15:09:12 +02:00
Ole André Vadla Ravnås fd5a274680 subprojects: Prepare for release 2024-07-08 14:27:06 +02:00
Ole André Vadla Ravnås d3f949a51c subprojects: Bump outdated 2024-07-08 14:25:06 +02:00
Ole André Vadla Ravnås 6d3ea5f589 fruity: Clean up OS-specific bits 2024-07-08 14:24:29 +02:00
Ole André Vadla Ravnås 3f6b41dc8c fruity: Handle libusb failing to initialize
Which may happen due to insufficient privileges, stripped down
environments such as containers, etc.
2024-07-08 10:26:46 +02:00
Ole André Vadla Ravnås 2c23afacfd subprojects: Prepare for release 2024-07-06 00:07:28 +02:00
Ole André Vadla Ravnås 51bf048d5b subprojects: Bump outdated 2024-07-06 00:06:32 +02:00
Ole André Vadla RavnåsandHåvard Sørbø be6a2b305c socket: Fix Host header logic in negotiate_connection()
Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-06 00:04:35 +02:00
Ole André Vadla Ravnås 5625a08fd9 device: Fix property getters for id and name
When Device is created with a custom value for either.

Due to typos the getters ended up recursing until stack overflow.
2024-07-05 23:35:47 +02:00
Ole André Vadla Ravnås 684739a1e6 subprojects: Prepare for release 2024-07-05 15:32:45 +02:00
Ole André Vadla RavnåsandHåvard Sørbø e0c36e6826 fruity: Retry RSD port lookup on failure
Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-05 15:31:42 +02:00
Ole André Vadla RavnåsandHåvard Sørbø eeb0c7a50a fruity: Fix gadget upload when no usbmux connection is available
By listening on all interfaces, not just loopback, so we can connect to
it across the tunnel.

Also switch to IPv6 while at it.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-05 15:22:40 +02:00
Ole André Vadla RavnåsandHåvard Sørbø f2dc84324a fruity: Skip fetching dyld symbols if libSystem is initialized
We only need them for early instrumentation.

This means we can attach to a running app not spawned by Frida, even on
latest iOS versions where dyld restarts.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-05 14:22:26 +02:00
Ole André Vadla RavnåsandHåvard Sørbø b9d07f0bfb fruity: Wire up MacOSCoreDeviceTransport event handling
Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-05 13:55:34 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 8b54716bfc fruity: Ensure provider name doesn't mutate
In case of a transport departing and taking the string storage with it.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-05 13:51:59 +02:00
Ole André Vadla Ravnås 68bfde7ae0 xpc-object-reader: Add get_uuid_value() 2024-07-05 13:50:57 +02:00
Ole André Vadla RavnåsandHåvard Sørbø bcdcc090b6 device: Refactor construction and property wiring
We can compute some of the properties from the provider.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-05 13:50:19 +02:00
Ole André Vadla Ravnås 2a1a80abd9 fruity: Tweak ordering of system parameters 2024-07-05 10:44:44 +02:00
ea6307d60b fruity: Add os.build and hardware to system parameters (#534)
Co-authored-by: Ole André Vadla Ravnås <[email protected]>
Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-05 10:10:17 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 2bf45ececd fruity: Await ObjC runtime initialization on iOS >= 18
By making use of notifyObjCInit() if available.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-04 15:20:51 +02:00
Ole André Vadla RavnåsandHåvard Sørbø d6b502eb3e fruity: Add support for dyld restart on iOS >= 18
Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-04 14:56:51 +02:00
Ole André Vadla Ravnås 0de45afe2f meson: Auto-disable external device backends for 32-bit host machines 2024-07-04 13:49:25 +02:00
Ole André Vadla Ravnås 7262e55468 macos: Replace logging with TODOs in the CoreDevice transport 2024-07-04 13:36:01 +02:00
Ole André Vadla RavnåsandHåvard Sørbø def974818f socket: Support IPv6 addresses in negotiate_connection()
Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-04 12:51:58 +02:00
Ole André Vadla Ravnås d5312d288f pipe: Fix tvOS build regression
We need to make sure we include the Mach headers before CoreFoundation
does, so our version availability overrides are used.
2024-07-04 11:16:06 +02:00
Ole André Vadla Ravnås 7e9fb1e1c6 subprojects: Bump outdated 2024-07-03 23:20:05 +02:00
Ole André Vadla RavnåsandHåvard Sørbø e415a2ec83 fruity: Fix the macOS CoreDevice connection type logic
Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-03 14:20:35 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 248127623f tests: Add manual XPC application launching test
Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-03 13:45:09 +02:00
Ole André Vadla RavnåsandHåvard Sørbø f246b4e17d xpc-service: Support type-annotating request parameters
Represented using a `(type, value)` tuple.

This means uint64 and UUID values can be passed in.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-03 13:42:48 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 7c4633358b fruity: Improve open_channel() to support tcp:service-name
Useful for e.g. `com.apple.coredevice.openstdiosocket`.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-03 13:35:08 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 85d063ab9b fruity: Revive HostChannelProvider implementation
Removed by accident in 08e5d37348.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-03 13:33:25 +02:00
Ole André Vadla RavnåsandHåvard Sørbø a6650efecb xpc: Make add_uuid_value() expect a raw UUID
Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-03 13:31:54 +02:00
Ole André Vadla RavnåsandHåvard Sørbø d382734bca value: Remove unused UUID functionality
Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-03 13:30:29 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 08e5d37348 fruity: Rework to support userspace NCM
To support systems without a compatible NCM driver, such as contemporary
Linux kernels, Windows, etc.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-03 11:20:16 +02:00
Ole André Vadla Ravnås 6317446c37 xpc-client: Add post() 2024-07-03 11:14:41 +02:00
Ole André Vadla Ravnås 7048e851b0 xpc-client: Handle closure in open state 2024-07-03 11:14:41 +02:00
Ole André Vadla Ravnås 7d22da8d3d meson: Summarize backends and more of the features 2024-07-03 11:14:41 +02:00
Ole André Vadla Ravnås 1f164564ef meson: Auto-disable external device backends on non-desktop 2024-07-03 11:14:41 +02:00
Ole André Vadla Ravnås 47a2e6728b submodules: Bump releng 2024-07-03 11:14:36 +02:00
Ole André Vadla Ravnås b19333420c web-service: Listen on dynamic interfaces last
So that specifying e.g. 0.0.0.0 takes precedence and won't cause start()
to fail.
2024-07-03 10:47:09 +02:00
Ole André Vadla Ravnås 29ec9f0c98 tunnel-interface-observer: Fix confusing variable name
The tunnel isn't only for development tools.
2024-07-03 10:43:02 +02:00
Ole André Vadla Ravnås cbcb7f37bf gadget: Integrate TunnelInterfaceObserver
So we listen on Apple's CoreDevice tunnel network interfaces on iOS and
tvOS.
2024-07-02 22:50:09 +02:00
Ole André Vadla Ravnås f53230bd7a control-service: Integrate TunnelInterfaceObserver
So we listen on Apple's CoreDevice tunnel network interfaces on iOS and
tvOS.
2024-07-02 22:50:09 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 39486a5331 netif: Add TunnelInterfaceObserver for iOS and tvOS
For observing Apple's CoreDevice tunnel network interfaces. Intended for
ControlService (frida-server) and frida-gadget to be able to listen on
such interfaces as they arrive and depart.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-02 22:50:05 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 67f6895e13 base: Add an iterable CFArray wrapper
Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-02 22:26:15 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 1b80ce0779 vapi: Improve the CoreFoundation bindings
Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-02 22:26:15 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 9bd3c3974f web-service: Support dynamic network interfaces
By providing a DynamicInterfaceObserver with the desired behavior.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-02 22:26:12 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 055fe8744a socket: Remove the partial NECP integration
It's not a good fit for keeping track of network interfaces.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-07-02 14:00:35 +02:00
Ole André Vadla RavnåsandHåvard Sørbø a0f7df8d0e socket: Sketch a partial NECP integration
In pursuit of notifications when network interfaces arrive and depart.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-06-28 14:14:01 +02:00
Ole André Vadla Ravnås 4b5fe35b00 devkit: Also install frida-core.gir 2024-06-07 09:54:32 +02:00
Håvard Sørbø 9330f02ca5 xpc-service: Fix handling of request() with arrays (#532)
Where we forgot to call begin/end to actually generate an array, and
would end up generating an invalid XPC object.
2024-06-06 22:46:35 +02:00
Ole André Vadla Ravnås 5d23227efc subprojects: Prepare for release 2024-06-04 14:14:40 +02:00
Ole André Vadla Ravnås 300a55b75c subprojects: Bump outdated 2024-06-04 14:12:37 +02:00
Ole André Vadla Ravnås f2e071ed78 subprojects: Prepare for release 2024-06-04 13:41:11 +02:00
Ole André Vadla Ravnås bc7f73b492 subprojects: Bump outdated 2024-06-04 13:38:40 +02:00
f91a3c92fe darwin: Avoid thread_set_state() during injection (#530)
So we don't get killed by the system on e.g. macOS >= 14.5.

We can create the thread in running state. There is no need to keep it
suspended until we have created the dispatch source.

Co-authored-by: Håvard Sørbø <[email protected]>
Co-authored-by: Ole André Vadla Ravnås <[email protected]>
2024-06-04 13:36:31 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 6eacc889cd fruity: Perform RSDCheckin on services that need it
In this way we retain backwards-compatibility for open_channel() of
lockdown services when a CoreDevice tunnel is available.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-06-04 12:27:57 +02:00
Ole André Vadla RavnåsandHåvard Sørbø d21ba21aea fruity: Stop caching the LockdownClient
To avoid issues with multiple consumers.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-06-04 11:34:55 +02:00
Ole André Vadla Ravnås cfcdc26d29 subprojects: Prepare for release 2024-05-31 22:52:22 +02:00
Ole André Vadla Ravnås 69555bbbb6 subprojects: Bump outdated 2024-05-31 22:50:47 +02:00
Ole André Vadla Ravnås d2d014c081 subprojects: Prepare for release 2024-05-31 15:42:49 +02:00
Ole André Vadla Ravnås 8f9c30953b subprojects: Bump outdated 2024-05-31 15:41:33 +02:00
Ole André Vadla Ravnås 2396ad5717 fruity: Remove temporary debug helpers
Useful during bring-up, but not so much anymore.
2024-05-31 14:14:27 +02:00
Ole André Vadla Ravnås ded45c9c93 fruity: Remove the xpc-test program
It has served its purpose. We now have tests that can be run instead.
2024-05-31 14:10:28 +02:00
Ole André Vadla Ravnås 8d375b5e46 fruity: Avoid leaking Posix types into the public API 2024-05-31 14:08:52 +02:00
Ole André Vadla Ravnås 1722429383 subprojects: Bump outdated 2024-05-31 06:45:37 +02:00
Ole André Vadla Ravnås ffd23574a9 submodules: Bump releng 2024-05-31 06:45:36 +02:00
Ole André Vadla Ravnås 5a8bd3fbaf meson: Add new Fruity private requirements to .pc 2024-05-31 00:06:55 +02:00
Ole André Vadla Ravnås 56605717ad meson: Fix build when glib-networking is a subproject 2024-05-30 23:15:15 +02:00
Ole André Vadla Ravnås d8a7c7d3fb subprojects: Bump outdated 2024-05-30 21:58:55 +02:00
Ole André Vadla Ravnås 39725e427b ci: Fix apt-get steps in the native and cross jobs
Need to update the database before installing.
2024-05-30 21:58:13 +02:00
Ole André Vadla Ravnås 7fe3a00543 subprojects: Bump outdated 2024-05-30 21:50:35 +02:00
Ole André Vadla Ravnås 41c31ba0a0 subprojects: Bump outdated 2024-05-30 21:42:28 +02:00
Ole André Vadla Ravnås c8e1ebdb7c ci: Allow Corellium test steps to fail for now
Until we figure out the stability issue.
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 3a678a3553 meson: Fix build when connectivity deps are subprojects
Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 2048115cb3 meson: Change connectivity option default to enabled
So fallbacks trigger, and we build with the same features irrespective
of whether we build with a Frida SDK present.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 82a68e55cc fruity: Add RemoteXPC support
With two platform integrations:

- macOS: where we use Apple's tunnel, by talking to remotepairingd and
  creating an assertion to ensure the tunnel is up and stays up for as
  long as we need it. The challenging part here was figuring out the
  device-side RemoteServiceDiscovery (RSD) port inside the tunnel, as
  it appears no API exposes it. Our solution is to ask the kernel for
  a list of TCP sockets, and picking out the ones where the foreign
  address is the device-side IPv6 address inside the tunnel, **and**
  where the process that created the socket is remoted. This seems to
  consistenly result in us finding a single socket, connected to the RSD
  port, but we try all of them in case this behavior ends up changing.
- Linux: where we open our own tunnel, assuming the iDevice has been
  mode-switched (e.g. by usbmuxd), and the Linux CDC NCM driver has been
  patched something along the lines of:
  https://lore.kernel.org/all/[email protected]/T/

We don't yet have a platform integration for Windows, as Apple's
software doesn't currently set up a tunnel. The official driver also
appears to keep the USB device busy, meaning we can't easily trigger
a mode-switch. This is an area that needs more research.

Another area that needs future improvement is that we only support
cabled connectivity on macOS. This should be easy to improve on once we
have updated frida-server and frida-gadget so they listen on tunnel
interfaces whenever they appear.

Kudos to @doronz88 for figuring out most of the protocol bits that we
needed.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø e0d6c29c41 meson: Add wrap for lwip
Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 1f820ae2ac meson: Add wrap for ngtcp2
Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø c0bc5f5bd9 base: Add helpers for handling JSON and GLib.Variant
Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 7ab0cf75ea fruity: Fix spawn() on jailed iOS 17
The jailed equivalent of 827eee33cc.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 2175cc756a dtx: Use more appropriate GValue setter for NSObject
Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 90d60683dd dtx: Make DTXArgumentList elements visible to consumers
Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø cf09ba46e4 dtx: Allow notification payload to be of any type
The value is not always an NSDictionary, e.g. in case of a DTTapMessage.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø ed9fcb10c1 dtx: Fix channel code interpretation for inbound invokes
Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 333ca2f852 dtx: Bump max message size to 128 MB
Screenshots can be quite large, and we might in theory be asked to fetch
large files.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø c9e541cc0e keyed-archive: Add support for decoding DTTapMessage
And its subclasses.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 3e86270d77 keyed-archive: Add support for encoding NSArray
Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 8a21929415 keyed-archive: Add NSArray.add_object()
Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 4865ea07eb keyed-archive: Add support for decoding NSData
Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 28f7895704 keyed-archive: Improve NSNumber support
So boolean/float/double values are treated distinctly from int64.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 859d6cd7de plist: Fix support for float and double in to_binary()
Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-30 21:28:33 +02:00
Ole André Vadla Ravnås b71c861b1d subprojects: Bump outdated 2024-05-30 20:51:53 +02:00
Ole André Vadla Ravnås b486936b33 submodules: Bump releng 2024-05-30 20:51:53 +02:00
Ole André Vadla Ravnås 5b587f587f base: Add Numeric.int64_{hash,equal}() 2024-05-29 23:18:13 +02:00
Ole André Vadla Ravnås 39e2c7bf81 subprojects: Prepare for release 2024-05-21 12:50:31 +02:00
Ole André Vadla Ravnås 2b82c21df1 subprojects: Bump outdated 2024-05-21 12:48:55 +02:00
Ole André Vadla Ravnås e45989dbdf subprojects: Prepare for release 2024-05-20 22:54:26 +02:00
Ole André Vadla Ravnås 204b16a4b7 compat: Escape spaces in depfile paths
Quoting isn't supported, so we should be escaping the spaces instead.
2024-05-20 22:50:29 +02:00
Ole André Vadla Ravnås d9f33a918e meson: Find DbgHelp and SymSrv using Gum's variables 2024-05-20 22:41:48 +02:00
Ole André Vadla Ravnås 082b100ab9 subprojects: Bump outdated 2024-05-20 22:40:31 +02:00
Ole André Vadla Ravnås 20cdf64312 meson: Fix vapidir exported in our .pc 2024-05-20 22:39:15 +02:00
Ole André Vadla Ravnås 0bb558e2a1 meson: Refactor the (un)installed variables logic 2024-05-20 22:37:59 +02:00
Ole André Vadla Ravnås 04f22126a7 subprojects: Prepare for release 2024-05-18 23:04:59 +02:00
Ole André Vadla Ravnås 59deab2ea9 subprojects: Bump outdated 2024-05-18 22:57:58 +02:00
Ole André Vadla Ravnås 1b9e347650 submodules: Bump releng 2024-05-18 22:57:58 +02:00
Ole André Vadla Ravnås 5e149a3f2d compat: Forward yielding built-in options when subproject
So that the parent project's machine-neutral built-in options such as
`prefix` are used.
2024-05-18 22:50:57 +02:00
Ole André Vadla Ravnås a867b71193 subprojects: Prepare for release 2024-05-17 07:26:28 +02:00
Ole André Vadla RavnåsandHåvard Sørbø c0fb9c61ef darwin: Hint at macOS boot arguments when helper crashes
See #524 for more information.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-15 12:11:21 +02:00
Ole André Vadla Ravnås a287a4c4a6 subprojects: Bump outdated 2024-05-14 21:30:45 +02:00
Ole André Vadla Ravnås 145f293d70 submodules: Bump releng 2024-05-14 21:30:45 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 29a0e9a790 barebone: Factor out uint64 helpers to base
Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-14 14:47:12 +02:00
Ole André Vadla Ravnås 868483aa44 buffer: Make the constructors more ergonomic
It's more common to override the byte order than to override the pointer
size.
2024-05-14 14:41:02 +02:00
Håvard Sørbø 70581cde0f buffer: Fix the read_string() size logic
We need to determine the size before calling substring(), to avoid
violating the API contract.
2024-05-14 14:34:13 +02:00
Ole André Vadla RavnåsandHåvard Sørbø fa71e1f995 buffer: Add read_fixed_string()
Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-14 14:33:42 +02:00
Ole André Vadla Ravnås 6fbb7d9747 unwind-sitter: Fix unused-code warnings 2024-05-14 14:20:26 +02:00
Ole André Vadla Ravnås fa7696e09f linux: Fix inject_library_blob() on modern Android
Turns out we weren't setting the file-descriptor's SELinux context in
the memfd code-path.

Kudos to @romainthomas for reporting.

Fixes #480.
2024-05-14 12:24:25 +02:00
Ole André Vadla Ravnås 7a02f1ce4b subprojects: Bump outdated 2024-05-14 06:47:27 +02:00
Ole André Vadla Ravnås 1ac04c8336 submodules: Bump releng 2024-05-14 06:47:27 +02:00
Yannis Juglaret 298bed528c windows: Use RW/RX permissions for injection
- Use a dedicated memory page for the injected code.
- Use RW permissions when writing the injected code and data.
- Switch the code page to RX permissions after writing.

This makes Frida injection compatible with more software. In particular,
Mozilla Firefox rejects thread startup if the start address is RWX.
2024-05-13 13:33:02 -07:00
Francesco Tamagni ab28e3369d darwin: Massage libunwind around Frida hooks (#515)
The problem this change intends to solve is that, currently, with code
like this:

    NSURL * url = nil;
    @try
    {
        [NSBundle bundleWithURL:url];
    }
    @catch (id err)
    {
        NSLog (@"No worries mate!");
    }

If there's any Frida hook, either via Interceptor or via NativeCallback
swizzling like ObjC.implement(), anywhere in the call stack between the
raise and the catch of the exception, libunwind fails to find the
exception handler. This leads to uncaught exceptions which wouldn't
happen without instrumentation.

When libunwind fails to unwind it usually means it can't resolve the
unwind info, and it can happen for two different reasons:

1. libunwind asks dyld, via _dyld_find_unwind_sections(), but if
   frida-agent is injected then dyld doesn't know about it and libunwind
   gives up on the first instruction pointer to any of frida-agent's
   code on the stack (as normally happens for swizzling-like hooks).
2. In case of Interceptor, for function-aware hooks, the original return
   address on the stack is replaced with the one needed to implement
   onLeave() which belongs to a runtime-generated code thunk, therefore
   missing its mapping to unwind info.

This solution addresses the two above problems directly, via the new
UnwindSitter component:

1. By hooking _dyld_find_unwind_sections() to provide the right unwind
   info for the "invader".
2. By hooking UnwindCursor::setInfoBasedOnIPRegister() to call
   gum_invocation_stack_translate() on the return address to restore the
   original one on the stack at unwind-time.

All of this can be disabled via the `unwind-sitter:off` frida-agent
option.
2024-05-13 22:29:20 +02:00
Francesco Tamagni 05df3f7ae6 darwin: Take Interceptor and Cloak locks in TSM
To extend the ThreadSuspendMonitor scope to prevent deadlock scenarios
where threads holding the Cloak or Interceptor lock get suspended.
2024-05-13 06:31:32 -07:00
Ole André Vadla Ravnås 5623ac5821 subprojects: Bump outdated 2024-05-13 15:15:36 +02:00
Ole André Vadla Ravnås 438d02359f subprojects: Bump outdated 2024-05-10 07:40:35 +02:00
Ole André Vadla Ravnås 3cc3013118 submodules: Bump releng 2024-05-10 07:40:35 +02:00
Ole André Vadla Ravnås 7ddd751168 compat: Fix depfile autogen when Ninja emits quotes
Which happens when a path contains spaces.
2024-05-09 09:17:50 +02:00
Ole André Vadla Ravnås c5052da99e compat: Improve depfile autogen to preserve absolute paths
As relative paths cannot be generated for files on different Windows
drives.
2024-05-09 07:57:04 +02:00
Ole André Vadla Ravnås d9240e8a10 subprojects: Bump outdated 2024-05-09 00:27:11 +02:00
Ole André Vadla Ravnås 0041614b60 compat: Generate a proper depfile with all inputs
Turns out compile_commands.json only lists a subset of the inputs, so we
would end up generating an incomplete depfile, causing unreliable
incremental builds.

So to solve this, we instead query Ninja for the inputs of each target.
This also gives us better granularity, as previously all of the outputs
would have the same inputs, and would all get invalidated if only one of
them changed.
2024-05-09 00:26:07 +02:00
Ole André Vadla Ravnås 7dfeeb907e payload: Work around GLib.Private warning on Darwin 2024-05-08 23:28:21 +02:00
Ole André Vadla Ravnås 12e89223f6 tests: Demote Compiler tests to slow mode on iOS
They're too memory-hungry for the Corellium instance used by our CI.
2024-05-08 22:51:51 +02:00
Ole André Vadla Ravnås d04bdc8522 tests: Relax System test to not expect icons on iOS
There seems to be an issue retrieving them on Corellium.
2024-05-08 22:51:51 +02:00
Ole André Vadla Ravnås 1fdc33ed62 tests: Align iOS/tvOS entitlements with frida-server 2024-05-08 22:15:29 +02:00
Ole André Vadla RavnåsandHåvard Sørbø f3f88c0a9f ci: Add Gadget assets to the iOS test bundle
Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-08 15:52:30 +02:00
Ole André Vadla Ravnås e2190da932 ci: Fix Compiler tests on Android
By setting TMPDIR so the tests are able to create temporary files.
2024-05-08 15:52:30 +02:00
Ole André Vadla RavnåsandHåvard Sørbø d7c01dd473 ci: Limit Android tests to arm64 for now
Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-08 15:52:30 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 00a460f178 ci: Limit macOS tests to macOS 11 for now
Calling __CFInitialize() early has become problematic, and we will have
to deal with that later.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-08 15:52:30 +02:00
Ole André Vadla Ravnås 6c26d8fd24 ci: Fix Apple certificate setup on macOS 13
The base64 tool doesn't support the long form options.
2024-05-08 15:52:30 +02:00
Ole André Vadla Ravnås 03ab29581c ci: Do macOS/x86_64 on macos-13, arm64 on -latest
So that tests built for x86_64 run without emulation, and for arm64
we're always testing on the latest OS.
2024-05-08 15:52:30 +02:00
Ole André Vadla Ravnås 88e9e104f8 ci: Fix the mobile job for Android
The macos-latest runner image has Android NDK r26, whereas we need r25.
2024-05-08 15:52:30 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 7d20dbe75d tests: Detect whether iOS/tvOS arm64e cross-arch can be tested
Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-08 15:52:12 +02:00
Ole André Vadla Ravnås 88722317c6 tests: Disable connectivity tests on Android for now 2024-05-08 15:52:08 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 7232beff5f meson: Fix frida-helper entitlements on iOS and tvOS
They were accidentally omitted after the build system restructuring.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-08 15:12:18 +02:00
Ole André Vadla Ravnås 999ea4511f darwin: Handle all exceptions during early instrumentation
So we can fail early in case of a crash, instead of waiting for the
timeout.
2024-05-08 13:58:45 +02:00
Ole André Vadla Ravnås de336045bc darwin: Fix racy teardown of InjectInstance dispatch source
Need to cancel the source and wait for the cancellation handler to be
called before releasing the Mach port being monitored.
2024-05-08 13:55:15 +02:00
Ole André Vadla Ravnås ce67d0d15d tests: Make log file names more succinct 2024-05-08 13:55:01 +02:00
Ole André Vadla Ravnås 83e8f8927c tests: Make temporary file names unique
To avoid clashes when Meson spawns multiple instances of the runner.
2024-05-08 13:54:58 +02:00
Ole André Vadla Ravnås 25a662c68a darwin: Fix racy teardown of SpawnInstance dispatch source
Need to cancel the source and wait for the cancellation handler to be
called before releasing the Mach port being monitored.
2024-05-08 13:54:52 +02:00
Ole André Vadla Ravnås a8b72883c8 compat: Omit 64-bit compat for 32-bit host archs
It just isn't useful anymore. There used to be a need for this back when
wanting to build a plugin for a 32-bit only tool, so that it would still
be able to interact with 64-bit targets. Those days are long gone.
2024-05-08 13:54:49 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 366c587350 compat: Add Meson summary entry
To make it less opaque what's actually going to be built, especially
when set to auto.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-08 13:54:39 +02:00
Ole André Vadla RavnåsandHåvard Sørbø bc68df266c compat: Add support for multilib GCC on Linux
Co-authored-by: Håvard Sørbø <[email protected]>
2024-05-08 13:54:35 +02:00
Ole André Vadla Ravnås cc2ef2a43c compat: Fail if explicitly enabled and toolchain is missing 2024-05-08 13:54:29 +02:00
Ole André Vadla Ravnås 8cf0c6bf81 compat: Bubble up error details to Meson 2024-05-08 13:54:25 +02:00
Ole André Vadla Ravnås 299b671348 compat: Enable for Linux/x86{,_64} by default 2024-05-08 13:54:22 +02:00
Ole André Vadla Ravnås 56fc62272f compat: Only build for Linux if we have a compiler 2024-05-08 13:54:18 +02:00
Ole André Vadla Ravnås f70b645d13 tests: Ensure Gadget is built before running tests 2024-05-08 13:54:09 +02:00
Ole André Vadla Ravnås ae89d494c9 tests: Omit Gadget suite when Gadget is disabled 2024-05-08 13:54:03 +02:00
Ole André Vadla Ravnås c372d7d820 tests: Wire up macOS/arm64(e) cross-arch logic 2024-05-08 13:54:00 +02:00
Ole André Vadla Ravnås 0c5dc1fcb4 labrats: Add macOS/arm64e executables 2024-05-08 13:53:56 +02:00
Ole André Vadla Ravnås 8d58fe8c58 labrats: Add include needed for PATH_MAX on Apple OSes 2024-05-08 13:53:50 +02:00
Ole André Vadla Ravnås 883ac6eaf5 meson: Fix the cross-arch testability check 2024-05-08 13:53:45 +02:00
Ole André Vadla Ravnås c9a57c2b66 meson: Make the compat checks a bit clearer 2024-05-08 13:53:41 +02:00
Ole André Vadla Ravnås c43019a855 compat: Add support for MinGW-w64 2024-05-08 13:53:33 +02:00
Ole André Vadla Ravnås 115cdad39f compat: Support having a triplet per set of outputs 2024-05-08 13:53:27 +02:00
Ole André Vadla Ravnås ab946b6171 compat: Migrate to make full use of host_config 2024-05-08 13:53:24 +02:00
Ole André Vadla Ravnås 8f4d63e705 meson: Add host_config detection for MSVC and MinGW 2024-05-08 13:53:20 +02:00
Ole André Vadla Ravnås 0c1b2c7bf6 tests: Skip the Compiler suite on QNX
Due to temporary files being tricky, and this feature not being that
useful on QNX anyway.
2024-05-08 13:53:08 +02:00
Ole André Vadla Ravnås d3008d6eec compat: Pass allowed prebuilds to configure()
So the nested build uses the same preference.
2024-05-08 13:53:03 +02:00
Ole André Vadla Ravnås 5e3052400c submodules: Bump releng 2024-05-08 13:52:59 +02:00
Ole André Vadla Ravnås fdde6db25e meson: Lower GLib requirement to 2.72
To make it possible to use the system GLib on GitHub's Linux runners,
where the latest is Ubuntu 22.04 LTS.
2024-05-02 20:27:38 +00:00
Ole André Vadla Ravnås 485333d430 subprojects: Bump outdated 2024-05-02 13:30:39 +02:00
Ole André Vadla Ravnås 211d37b331 submodules: Bump releng 2024-05-02 13:30:38 +02:00
Ole André Vadla Ravnås 69bf559d8e linux: Assert that memfd write() succeeds
For now, until we improve our error-handling.
2024-05-02 11:21:28 +00:00
Ole André Vadla Ravnås 252e3e440b meson: Disable C compiler warnings on GCC < 5 2024-05-02 11:17:26 +00:00
Ole André Vadla Ravnås b0b27b9b90 compat: Limit forwarding of machine-specific options
Only forward them if they're either for the build machine, or
they're project options for the host machine.
2024-05-01 14:28:08 +02:00
Ole André Vadla Ravnås 9367cc56e0 compat: Omit when building for Apple's simulators
There's no point in supporting arm64e there.
2024-05-01 14:15:09 +02:00
Ole André Vadla Ravnås 0f4f45c07f subprojects: Bump outdated 2024-05-01 08:02:46 +02:00
Ole André Vadla Ravnås 0405390f11 submodules: Bump releng 2024-05-01 08:02:46 +02:00
Ole André Vadla Ravnås c20559aac8 subprojects: Bump outdated 2024-04-30 21:57:51 +00:00
Ole André Vadla Ravnås 5b43b0ba83 submodules: Bump releng 2024-04-30 21:57:51 +00:00
Ole André Vadla Ravnås 6eed206d68 compat: Omit tvOS for now
As the state of our arm64e support there is unknown.
2024-04-30 12:40:28 +02:00
Ole André Vadla Ravnås 2add9b66ef subprojects: Bump outdated 2024-04-30 12:35:38 +02:00
Ole André Vadla Ravnås 4c838088db meson: Fix host_os_family value for Android 2024-04-30 12:35:13 +02:00
Ole André Vadla Ravnås 2dc28fc617 subprojects: Bump outdated 2024-04-30 11:47:35 +02:00
Ole André Vadla RavnåsandHåvard Sørbø c47f3fa64e meson: Fix host_os value for Apple Simulator OSes
Co-authored-by: Håvard Sørbø <[email protected]>
2024-04-30 11:46:46 +02:00
Ole André Vadla Ravnås d1f43fde5f subprojects: Bump outdated 2024-04-30 11:28:30 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 9b9a5a96c6 compat: Fix forwarding of own project options when subproject
Co-authored-by: Håvard Sørbø <[email protected]>
2024-04-30 11:27:07 +02:00
Ole André Vadla Ravnås 7205721b69 darwin: Move off deprecated GModule API 2024-04-30 11:25:58 +02:00
Ole André Vadla Ravnås cb175ddc23 meson: Simplify by using host_machine.subsystem()
Available in newer versions of Meson.
2024-04-30 11:25:35 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 6bfd56e159 compiler: Reduce resource compression for dev builds
Co-authored-by: Håvard Sørbø <[email protected]>
2024-04-29 12:56:32 +00:00
Ole André Vadla Ravnås 1e5c2f6f87 subprojects: Bump outdated 2024-04-29 12:00:38 +00:00
Ole André Vadla Ravnås 4529365390 submodules: Bump releng 2024-04-29 12:00:38 +00:00
Ole André Vadla RavnåsandHåvard Sørbø 4fcfcb3ccd payload: Ensure dup3() is declared on Linux
Older libc versions don't have it.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-04-29 11:51:39 +00:00
Ole André Vadla Ravnås 16d14e1179 subprojects: Bump outdated 2024-04-28 14:42:02 +02:00
Ole André Vadla Ravnås 1138153f32 submodules: Bump releng 2024-04-28 14:42:02 +02:00
Ole André Vadla Ravnås da417fd46b subprojects: Bump outdated 2024-04-27 09:42:49 +02:00
Ole André Vadla Ravnås 43585e8242 submodules: Bump releng 2024-04-27 09:42:49 +02:00
Ole André Vadla Ravnås c063bb76bd subprojects: Bump outdated 2024-04-27 09:35:36 +02:00
Ole André Vadla Ravnås 122c6ba7d0 submodules: Bump releng 2024-04-27 09:35:36 +02:00
Ole André Vadla Ravnås 1ae221f271 subprojects: Bump outdated 2024-04-26 00:02:47 +02:00
Ole André Vadla Ravnås 3956c7475b submodules: Bump releng 2024-04-26 00:02:47 +02:00
Ole André Vadla Ravnås a027796b46 subprojects: Bump outdated 2024-04-25 16:32:01 +02:00
Ole André Vadla Ravnås 3df08e881f meson: Fix devkit build when subproject
Where Meson catches us trying to use a file outside the subproject.
2024-04-25 16:30:42 +02:00
Ole André Vadla Ravnås 4e39c2a071 subprojects: Bump outdated 2024-04-24 23:52:00 +02:00
Ole André Vadla Ravnås 8ce8aec627 submodules: Bump releng 2024-04-24 23:51:59 +02:00
Ole André Vadla Ravnås a167ba9532 subprojects: Bump outdated 2024-04-24 13:34:34 +02:00
Ole André Vadla Ravnås 1641371c1e submodules: Bump releng 2024-04-24 13:34:34 +02:00
Ole André Vadla Ravnås cb4a2030cd detect-version: Improve naming 2024-04-24 10:48:25 +02:00
Ole André Vadla Ravnås deab91ad63 meson: Wire up project version detection 2024-04-24 10:41:11 +02:00
Ole André Vadla Ravnås fd72a88a68 compat: Fix query_releng_location() 2024-04-24 10:24:26 +02:00
Ole André Vadla Ravnås 98c8b623b4 compat: Refactor the releng location logic 2024-04-24 10:16:56 +02:00
Ole André Vadla Ravnås e84fa8d77e meson: Fix the test() argument list 2024-04-24 00:02:44 +02:00
Ole André Vadla Ravnås c99afc8bf9 meson: Drop exec bit and shebang from scripts
As we don't need this.

Also fix a few remaining cases of find_program() being misused.
2024-04-23 23:31:31 +02:00
Ole André Vadla Ravnås 4efa44f025 subprojects: Bump outdated 2024-04-23 11:57:22 +02:00
Ole André Vadla Ravnås d1af79dfb1 submodules: Bump releng 2024-04-23 11:57:21 +02:00
Ole André Vadla Ravnås 1d8a0f9f96 subprojects: Bump outdated 2024-04-23 11:28:31 +02:00
Ole André Vadla Ravnås 46c4a602d9 submodules: Bump releng 2024-04-23 11:28:30 +02:00
Ole André Vadla Ravnås d55c59cd2f meson: Compute version from VCS tags if unspecified 2024-04-22 22:55:04 +02:00
Ole André Vadla Ravnås 88a06bcf69 subprojects: Bump outdated 2024-04-22 15:55:15 +02:00
Ole André Vadla Ravnås d1f5106e23 submodules: Bump releng 2024-04-22 15:55:15 +02:00
Ole André Vadla RavnåsandHåvard Sørbø e81e1c61d8 subprojects: Pin frida-gum to latest revision
Co-authored-by: Håvard Sørbø <[email protected]>
2024-04-22 15:48:25 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 880bd81b4d subprojects: Pin to versions in releng/deps.toml
Co-authored-by: Håvard Sørbø <[email protected]>
2024-04-22 15:47:55 +02:00
Ole André Vadla Ravnås 5a82d7734e meson: Post-process Android binaries using termux-elf-cleaner
Our legacy build system used to do this in a driver wrapper script.
2024-04-21 23:55:03 +02:00
Ole André Vadla Ravnås 03b5a8db47 meson: Fix a minor stylistic inconsistency in post-process.py 2024-04-21 23:53:28 +02:00
Ole André Vadla Ravnås 52005fdd08 base: Fix the p2p AgentSession registration logic
The refactoring in commit 4efb90a451 ended
up breaking p2p support entirely. Instead of registering an AgentSession
on the connection, we would register an AgentMessageTransmitter.
2024-04-21 13:58:49 +02:00
Ole André Vadla Ravnås 4bbd03496b meson: Handle libnice being a subproject
In which case Meson won't implicitly add --pkg=nice for us.
2024-04-19 23:51:54 +02:00
Ole André Vadla Ravnås 3f44bcaf9b vapi: Add gthread-2.0 placeholder 2024-04-19 23:39:46 +02:00
Ole André Vadla Ravnås 88f7af3e59 meson: Fix usrsctp check when it's a subproject
The current compiler.has_member() implementation's handling of the
`dependencies` keyword argument only supports external dependencies,
at least for now.

Given that the list of OSes we support where sconn_len is defined is
rather small, we might as well just mirror a subset of the logic in
usrsctp's header file.
2024-04-19 23:35:24 +02:00
Ole André Vadla Ravnås 59e756cc73 meson: Add fallback options for usrsctp 2024-04-19 11:58:52 +02:00
Ole André Vadla Ravnås bb7bab541f meson: Add wrap for libnice 2024-04-19 11:58:21 +02:00
Ole André Vadla Ravnås 93a562e3cb meson: Fix the compiler snapshot autogen logic 2024-04-19 10:59:55 +02:00
Ole André Vadla Ravnås 76c2a8670a meson: Fail early if Node.js or npm are missing or outdated
And improve consistency of argument ordering in the scripts.
2024-04-19 10:26:30 +02:00
Ole André Vadla Ravnås fec91cec76 meson: Fix confusing helper script main() argv usage 2024-04-18 23:07:55 +02:00
Ole André Vadla Ravnås 59dbda7bcc meson: Use provided directory for intermediate files
To avoid polluting build directories with files unknown to Meson, which
means it can't invalidate them when needed.
2024-04-18 22:43:36 +02:00
Ole André Vadla Ravnås 88229da0a3 meson: Declare remaining compiler data outputs 2024-04-18 22:36:48 +02:00
Ole André Vadla Ravnås b89e0a18cf meson: Use shutil.copy() for consistency
Should only use shutil.copyfile() when the metadata must be dropped.
2024-04-18 22:34:43 +02:00
Ole André Vadla Ravnås a685672422 meson: Improve the generated .pc metadata
- Clarify names and descriptions.
- Use Frida version instead of the project version.
2024-04-18 11:43:33 +02:00
Ole André Vadla Ravnås ecc52da19d compat: Forward options to all subprojects 2024-04-18 11:20:26 +02:00
Ole André Vadla Ravnås be98c35dc8 compat: Grab subprojects from parent when subproject 2024-04-18 11:19:49 +02:00
Ole André Vadla Ravnås 0007ffe406 compat: Relax releng directory check
As we don't really care if it's a directory or a symlink.
2024-04-18 11:15:20 +02:00
Ole André Vadla Ravnås 4e6018b38b compat: Remove TODO that has since been fixed 2024-04-17 23:59:06 +02:00
Ole André Vadla Ravnås aea565c7f5 meson: Tweak the frida_version option description 2024-04-17 23:52:42 +02:00
Ole André Vadla Ravnås 1504a1b40e submodules: Bump releng 2024-04-17 23:34:52 +02:00
Ole André Vadla Ravnås 04aba3636b meson: Revise the Frida version logic
- Add frida_version option, replacing the old way of looking for a
  FRIDA_VERSION preprocessor define. This allows a parent project to
  pass this option to us when we're a subproject.
- Propagate the option to Gum in case we end up building it.
2024-04-17 23:33:35 +02:00
Ole André Vadla Ravnås a0e2d53abc meson: Set project version to 0.0.0
To make it clear this project doesn't have its own release cycle.
2024-04-17 23:28:47 +02:00
Ole André Vadla Ravnås 9282b08972 compat: Wire up MachineSpec.config for Windows
Where MSVC vs MinGW is important, and the CRT flavor in the former case.
2024-04-16 23:34:54 +02:00
Ole André Vadla RavnåsandAli Sabil ef3325f998 compat: Fix the call_internal_meson() stdio logic
We shouldn't perform stdio redirection when the caller is doing it.

Co-authored-by: Ali Sabil <[email protected]>
2024-04-16 23:30:29 +02:00
Ole André Vadla Ravnås 0ca94b5919 submodules: Bump releng 2024-04-15 16:03:59 +02:00
Ole André Vadla Ravnås f14e65ef47 compat: Suppress configure() progress feedback 2024-04-11 12:30:14 +02:00
Ole André Vadla Ravnås d659875c40 submodules: Bump releng 2024-04-11 12:24:36 +02:00
Ole André Vadla Ravnås 1eba812781 compat: Ensure submodules are checked out
In the case when we're a subproject, our parent project doesn't have
releng, and we don't have releng checked out.
2024-04-11 11:52:20 +02:00
Ole André Vadla Ravnås e3ac0b1a85 compat: Remove unused function 2024-04-11 11:49:32 +02:00
Ole André Vadla Ravnås 7948a7134b compat: Move to using Meson wrappers in-process
To avoid issues where wrapper scripts mess with git submodules.
2024-04-11 08:19:11 +02:00
Ole André Vadla Ravnås aaca42b65a submodules: Bump releng 2024-04-11 08:18:55 +02:00
Ole André Vadla Ravnås b44d93756f compat: Only use parent project's releng if it exists
We cannot assume that the parent project uses the same infrastructure.
2024-04-11 06:42:31 +02:00
Ole André Vadla Ravnås 7dacb16e96 meson: Pass --pkg-config to mkdevkit.py
We should not be relying on it being on the PATH. And, when building
with our SDKs, we need the argument that defines the SDK prefix.
2024-04-10 14:35:23 +02:00
Ole André Vadla Ravnås ddd178ea90 meson: Move to the new mkdevkit.py option encoding 2024-04-10 14:32:16 +02:00
Ole André Vadla Ravnås 8285158dd0 meson: Use project's mkdevkit.py when subproject 2024-04-10 14:32:15 +02:00
Ole André Vadla Ravnås 4feef30d2c submodules: Bump releng 2024-04-10 14:21:47 +02:00
Ole André Vadla Ravnås 1ea6dffb7a meson: Expose vapidir in internal dep and .pc 2024-04-09 13:35:35 +02:00
Ole André Vadla Ravnås 9d19215263 meson: Expose the same variables to internal dep as .pc 2024-04-09 13:32:55 +02:00
Ole André Vadla Ravnås 5983c4cff6 meson: Fix a minor stylistic inconsistency 2024-04-09 13:30:37 +02:00
Ole André Vadla Ravnås 2f02e356ee meson: Move to new Gum dep variable naming and semantics 2024-04-09 13:29:32 +02:00
Ole André Vadla RavnåsandHåvard Sørbø d0379f0649 compiler: Eat stdout/stderr during agent generation
Co-authored-by: Håvard Sørbø <[email protected]>
2024-04-08 13:48:25 +02:00
Ole André Vadla RavnåsandHåvard Sørbø a8ccc63281 compat: Fix releng and Meson imports when subproject
Co-authored-by: Håvard Sørbø <[email protected]>
2024-04-08 13:47:11 +02:00
Ole André Vadla Ravnås fac71657e5 submodules: Bump releng 2024-04-07 14:41:20 +02:00
Ole André Vadla Ravnås 309811928f submodules: Bump releng 2024-04-07 08:58:37 +02:00
Ole André Vadla Ravnås 77c71d75e1 compat: Fix forwarding of options when subproject 2024-04-07 08:22:59 +02:00
Ole André Vadla Ravnås fb94038271 compat: Tweak order of classes and constants 2024-04-07 07:17:55 +02:00
Ole André Vadla Ravnås eafaa22e5b compat: Adapt to the new releng env API 2024-04-07 07:14:37 +02:00
Ole André Vadla Ravnås 002beb85a4 submodules: Bump releng 2024-04-07 07:13:36 +02:00
Ole André Vadla Ravnås 41b87c1d47 meson: Add architecture compatibility automation
For supporting targets with a different architecture, such as 32-bit
processes on a 64-bit system.

Up until now this required multiple build directories, and passing in
options to specify where the other helper and agent binaries reside.

This was however quite painful, as it required a meta build system to
automate these steps. Getting incremental builds working reliably was
also quite difficult. It also exposed the user to platform-specific
implementation details.
2024-03-27 14:02:27 +01:00
Ole André Vadla Ravnås 42bc0706f0 gadget: Rename raw target to frida-gadget-raw
So that the `frida-gadget` target name becomes unique and there's no
need to suffix it with `:custom`. In this way we can refer to it through
a Makefile wrapper.
2024-03-27 14:02:26 +01:00
Ole André Vadla Ravnås 36711566bb agent: Rename raw target to frida-agent-raw
So that the `frida-agent` target name becomes unique and there's no
need to suffix it with `:custom`. In this way we can refer to it
through a Makefile wrapper.
2024-03-27 14:02:25 +01:00
Ole André Vadla Ravnås 1b9590182b submodules: Bump releng 2024-03-27 14:02:23 +01:00
Ole André Vadla Ravnås 2e45025f43 linjector: Make inject_library_file_with_template() public
As it's needed by LinuxHostSession.
2024-03-27 13:44:21 +01:00
Ole André Vadla Ravnås fe9dafe57c meson: Improve helper and agent options logic
- When passing in an already built helper/agent, allow specifying just
  one of modern/legacy, and having the other one default to an internal
  binary if the architecture matches. Each option can also be set to an
  empty string for it to not be embedded at all.
- Ensure embed-$flavor.py target depends on the helper/agent target when
  the internally built binary is used.
2024-03-22 22:49:13 +01:00
Ole André Vadla Ravnås 0dd73fd8f7 git: Update gitignore 2024-03-22 11:45:07 +01:00
Ole André Vadla Ravnås d96c5fd497 submodules: Bump releng 2024-03-21 23:26:02 +01:00
Ole André Vadla Ravnås 686a255a02 submodules: Bump releng 2024-03-21 22:27:15 +01:00
Ole André Vadla Ravnås ae1f27a3eb msvs: Drop the MSVS build system
Maintaining it alongside our Meson build system is too much of a burden.
2024-03-21 22:00:25 +01:00
Ole André Vadla Ravnås 477b094bdd submodules: Bump releng 2024-03-20 22:24:47 +01:00
Ole André Vadla Ravnås 84084b1f51 submodules: Bump releng 2024-03-20 12:51:54 +01:00
Ole André Vadla Ravnås eb2383433e submodules: Bump releng 2024-03-20 10:40:06 +01:00
Ole André Vadla Ravnås d8e0ad51de meson: Install the generated .gir 2024-03-19 23:07:59 +01:00
Ole André Vadla Ravnås 1e6d6652a2 embed-helper: Fix the lipo invocation 2024-03-19 22:42:13 +01:00
Ole André Vadla Ravnås 66b8e9ce7b submodules: Bump releng 2024-03-19 22:07:38 +01:00
Ali Sabil ac6c5729bf meson: Mark the labrat files as dependencies to the test suite (#511) 2024-03-19 21:59:30 +01:00
Ole André Vadla Ravnås cae3f27f91 submodules: Bump releng 2024-03-19 21:58:38 +01:00
Ole André Vadla Ravnås 35ba4a6783 submodules: Bump releng 2024-03-14 15:14:41 +01:00
Ole André Vadla Ravnås 5827e47b74 meson: Omit .vapi from publicly visible dependency
So that consuming projects don't need a Vala compiler to use us as a
subproject.
2024-03-14 15:07:10 +01:00
Ole André Vadla Ravnås 489eed918b meson: Simplify some bits by using newer syntax 2024-03-14 15:05:37 +01:00
Ole André Vadla Ravnås 2e8a1bd3f3 meson: Fix a stylistic inconsistency 2024-03-14 14:38:24 +01:00
Ole André Vadla Ravnås 51384094d2 meson: Verify that our Vala compiler is being used
To avoid confusing errors later in the build process.
2024-03-14 13:41:39 +01:00
Ole André Vadla RavnåsandHåvard Sørbø a21aadc2b5 base: Fix racy crash in custom GSource implementations
When thread A is in a GSource finalizer blocked on unregister_source(),
meaning its ref count is zero, thread B would be walking the Gee.Map of
sources to potentially update their ready time. Thread B would be doing
this with the recursive lock held, but since the loop had an owned
GSource variable, it would result in each source being reffed and
subsequently unreffed. This meant that the ref count would once again go
from one down to zero, triggering a second call to the finalizer. This
would in turn call unregister_source(), instantly acquire the recursive
lock a second time, and mutate the Map that is currently being iterated.

So to avoid all of this we make sure that we use an unowned variable for
the source while iterating. The alternative would have been to make a
copy of the Map before walking it, but that's unnecessary overhead,
along with the redundant ref count updates it would entail.

Co-authored-by: Håvard Sørbø <[email protected]>
2024-03-14 12:38:31 +01:00
Ole André Vadla Ravnås 6c753d4f21 submodules: Bump releng 2024-03-14 12:24:12 +01:00
Ole André Vadla Ravnås fbb962b099 test-agent: Re-enable monitor features
They were previously disabled to avoid a bug on R^X systems, back when
Interceptor didn't correctly suspend threads.
2024-03-14 12:00:41 +01:00
Ole André Vadla Ravnås 8328d8bdb3 test-agent: Move thread suspend awareness test to slow mode
For now, until the deadlock it reproduces has been fixed. What happens
is that the suspended thread holds Gum's dlmalloc lock in the moment
when it gets suspended. So when the thread that suspended it carries on
and calls a hooked function, it ends up needing to allocate memory, and
deadlocks trying to get the dlmalloc lock.
2024-03-14 09:38:54 +01:00
Ole André Vadla Ravnås cb5eaff241 ci: Add CI 2024-03-14 00:24:08 +01:00
Ole André Vadla Ravnås 747f285ea0 linux: Fix unreliable exec transition logic
The file-descriptors aren't necessarily closed until the second trap,
which meant we could get stuck waiting.
2024-03-14 00:24:08 +01:00
Ole André Vadla Ravnås 5c7bffe952 session-glue: Add missing windows.h include 2024-03-14 00:24:08 +01:00
Ole André Vadla Ravnås 4e7445de62 vapi: Add libselinux.vapi
Migrated from our selinux repo, so we can evolve it with less friction.
2024-03-14 00:24:08 +01:00
Ole André Vadla Ravnås aa728b7b80 subprojects: Remove wraps covered by Gum 2024-03-14 00:24:08 +01:00
Ole André Vadla Ravnås 70023a5601 meson: Overhaul the build system
- Replace shell scripts with Python scripts.
- Generalize scripts to avoid duplication.
- Use Meson's fs module instead of depending on UNIX tools.
- Support command arrays more widely.
- Add support for MSVC.
- Add support for building devkits.
- Add support for picking backends to include.
- Wire up tests.
- Move to native path-building syntax.
2024-03-14 00:24:08 +01:00
Ole André Vadla Ravnås c3fdf7aa74 submodules: Bump releng 2024-03-14 00:24:00 +01:00
Ole André Vadla Ravnås 3d2140bc65 tests: Assume Gadget test runs from local build directory 2024-03-14 00:10:36 +01:00
Ole André Vadla Ravnås e24662eaf7 submodules: Bump releng 2024-03-13 23:15:59 +01:00
Ole André Vadla Ravnås e0c205ca45 android: Fix child-gating of execl() and friends
By instead hooking the internal __execve() if we can find it.
2024-03-09 00:46:20 +01:00
Ole André Vadla Ravnås 46d7ef18c9 Port to the new Gum vapi 2024-03-09 00:46:07 +01:00
Ole André Vadla Ravnås 44879c9d92 tests: Merge Android test runner scripts into one
Which uses the local build directory only.
2024-03-09 00:46:03 +01:00
Ole André Vadla Ravnås a8bcbb5bff submodules: Bump releng 2024-03-08 20:47:37 +01:00
Ole André Vadla Ravnås 97fbc5aea0 agent: Fix hang in child-gating fork() scenarios
Reproducible in situations where pidfd_getfd() is available but not
permitted, such as inside Docker containers.

The hang was caused by the agent's control file-descriptor being cloaked
twice. Creating a GSocket wrapping a file-descriptor results in it
getting cloaked automatically, so we shouldn't manually cloak it in this
case.

The stale cloak entry meant that our FileDescriptorGuard close() hook
would prevent our loader from actually closing the other end of the
socketpair(). Since the injector hasn't copied that file-descriptor due
to EPERM, we would get stuck waiting instead of failing and using our
fallback strategy.
2024-03-08 14:48:33 +00:00
Ole André Vadla Ravnås 60a70aa27d agent: Fix fd_guard nullability 2024-03-08 14:47:29 +00:00
Håvard SørbøandOle André Vadla Ravnås 98f5773815 modulate: Gracefully handle missing symbols
Which may happen in case of compiler runtime code on some systems. This
is still fine as we don't need to reorder those specific entries, only
our own.

Co-authored-by: Ole André Vadla Ravnås <[email protected]>
2024-03-08 13:04:48 +00:00
Ole André Vadla Ravnås 3cbefad1cd linux: Fix dangerous casts from void * to uint64
Where sign-extension may occur on 32-bit architectures, depending on the
compiler.
2024-03-08 12:56:29 +00:00
Ole André Vadla Ravnås 7999a19eb4 linux: Fix early instrumentation on certain 32-bit systems
Where the MSB of `r_brk` is set, and the cast from `void *` to `uint64`
results in sign extension.
2024-03-08 12:56:24 +00:00
Ole André Vadla Ravnås cd684d6586 linux: Fix unreliable injection when libc is absent
Such as early in the process lifetime, and in targets without an RTLD.

The range chosen by our ProcessCodeSwapScope could happen to overlap
with the program's ELF header, which we would subsequently parse and
then carry on to fail in spectacular ways.

So for the case when libc is absent, instead of attempting the full
bootstrap right away, only perform mmap() and then return. Since we
now allocate enough for both the bootstrapper and the loader, we can
eliminate the second mmap() in the case when libc is already there.
2024-03-08 12:56:20 +00:00
Ole André Vadla Ravnås 463d69dbdc helpers: Improve Makefile to support isolated build envs 2024-03-08 12:56:12 +00:00
Ole André Vadla Ravnås bb6ba98351 tests: Fix hang on exit
By ensuring that Test.Process.kill() actually kills on system where
we're using GSubprocess.
2024-03-08 12:56:05 +00:00
Ole André Vadla Ravnås 245920be09 tests: Print error message when compiler test fails 2024-03-08 12:56:00 +00:00
Ole André Vadla Ravnås 258c23fb60 tests: Remove fragile assertion about time spent 2024-03-08 12:55:56 +00:00
Ole André Vadla Ravnås 51793d49ba tests: Remove MSVS build system special cases 2024-03-08 12:55:50 +00:00
Ole André Vadla Ravnås 1478112b6c tests: Remove bad assertion in provider_available test 2024-03-08 12:55:41 +00:00
Ole André Vadla Ravnås 6ea9403d33 host-session-service: Fix start() and stop() with zero backends 2024-03-08 12:55:35 +00:00
Ole André Vadla Ravnås 01221fa78d meson: Accept c99 if gnu99 is not available 2024-03-08 12:55:25 +00:00
Ole André Vadla Ravnås c578b1b3d7 resource-compiler: Simplify the toolchain help output 2024-03-08 12:55:22 +00:00
Ole André Vadla Ravnås 0ed777f864 resource-compiler: Quote .incbin paths
So the .S output is usable on Windows, and paths containing quotes won't
result in the code failing to assemble.
2024-03-08 12:55:17 +00:00
Ole André Vadla Ravnås 8020c9506e resource-compiler: Improve machine support
Previously only the MSVS build system made use of --machine, but we
now pass this option in other cases too, to avoid special-casing based
on the toolchain being used.
2024-03-08 12:55:12 +00:00
Ole André Vadla Ravnås 0ebdf63f4d submodules: Bump releng 2024-03-08 12:55:06 +00:00
s1341 319c70ed51 compiler: Bump @types/frida-gum (#502) 2024-03-07 00:09:22 +01:00
Yotam a613f181d6 meson: Add wrap files for more of our dependencies (#440) 2024-03-06 21:54:27 +01:00
Ole André Vadla Ravnås f6be92347c meson: Sync scripts with releng/meson-scripts 2024-02-27 14:45:14 +01:00
Ole André Vadla Ravnås 75698b8b3f submodules: Bump releng 2024-02-27 14:44:30 +01:00
Ole André Vadla Ravnås bf32d2e9bf submodules: Bump releng 2024-02-27 13:33:10 +00:00
Ole André Vadla Ravnås 63d16f57c7 meson: Add missing backend libs when used as a subproject 2024-02-26 23:34:25 +01:00
Ole André Vadla Ravnås 56c8d2d205 compiler: Fix warning when building without backend 2024-02-26 23:10:32 +01:00
Ole André Vadla Ravnås ea3728373b compiler: Support building without its backend
To reduce compilation times when used as a subproject in a consumer that
doesn't need the compiler, such as frida-node.
2024-02-26 22:59:36 +01:00
Ole André Vadla Ravnås 188e9d5605 meson: Add more granular control over built features
- gadget, server, portal, inject: enabled by default unless used as a
  subproject.
- tests: enabled by default unless used as a subproject, or we are
  unable to run host binaries.
2024-02-26 22:56:02 +01:00
Ole André Vadla Ravnås aa52b894fc meson: Rename options file to the new preferred name 2024-02-26 22:04:18 +01:00
Ole André Vadla Ravnås 19e162c282 meson: Require Meson >= 1.1.0 2024-02-26 22:03:54 +01:00
Ole André Vadla Ravnås 3596457983 meson: Remove redundant option default values 2024-02-26 21:44:27 +01:00
Ole André Vadla Ravnås 8aa80adfad meson: Add missing dependencies when used as a subproject 2024-02-26 21:40:58 +01:00
Ole André Vadla Ravnås a075acaf49 meson: Improve the config.h include logic
- Use the full path to avoid ambiguity when used as a subproject.
- Handle MSVC.
2024-02-26 21:28:26 +01:00
Ole André Vadla Ravnås 98bb927618 meson: Add support for being used as a subproject 2024-02-26 16:06:59 +01:00
Ole André Vadla Ravnås cceb78b308 meson: Add wrap for frida-gum 2024-02-26 15:32:30 +01:00
Ole André Vadla Ravnås 869a527a18 build: Add wrapper scripts to simplify building 2024-02-26 15:30:47 +01:00
Ole André Vadla Ravnås 534dee39b2 libc-shim: Add missing _GNU_SOURCE define
Now that we no longer set this define project-wide.
2024-02-22 14:48:24 +00:00
Ole André Vadla Ravnås 52596edbd6 msvs: Re-enable warnings for Vala-generated code
To align with Meson's new behavior.
2024-02-22 14:31:28 +01:00
Ole André Vadla Ravnås de5708cd49 windows: Move off deprecated GLib APIs 2024-02-22 14:20:47 +01:00
Ole André Vadla Ravnås 862df8a116 p2p-glue: Move off deprecated GLib APIs 2024-02-22 14:20:47 +01:00
Ole André Vadla Ravnås eaebc8fcb5 spawn-monitor: Make internal caller TLV static
To avoid running out of resources after many instantiations.
2024-02-21 23:38:07 +01:00
Ole André Vadla Ravnås 6a8fcf501a linux: Remove unused format string parameter 2024-02-21 16:14:00 +01:00
Ole André Vadla Ravnås 28eaf9bd92 meson: Do not define _GNU_SOURCE
The Vala compiler does it for us where needed.
2024-02-21 16:13:25 +01:00
Ole André Vadla Ravnås 7ae6bf3202 socket: Move to the new libsoup 3.2 APIs 2024-02-21 16:12:59 +01:00
Ole André Vadla Ravnås d70321265c Move off deprecated GLib APIs 2024-02-21 16:12:39 +01:00
Ole André Vadla Ravnås 6749b837d3 resource-compiler: Remove unused variable 2024-02-21 16:11:45 +01:00
429 changed files with 295853 additions and 14882 deletions

No files matched your search

+1
View File
@@ -0,0 +1 @@
/.github/workflows/ @oleavr
+1
View File
@@ -0,0 +1 @@
github: frida
@@ -0,0 +1,39 @@
name: Set up Apple codesigning certificates
description: Set up certificates needed for codesigning when building for Apple OSes
inputs:
certificates-p12:
required: true
description: The certificates to use for codesigning, as a base64-encoded .p12
certificates-password:
required: true
description: The password for the .p12
keychain-password:
required: true
description: The keychain password to use
runs:
using: composite
steps:
- name: Install the Apple certificates
env:
CERTIFICATES_P12: ${{ inputs.certificates-p12 }}
CERTIFICATES_PASSWORD: ${{ inputs.certificates-password }}
KEYCHAIN_PASSWORD: ${{ inputs.keychain-password }}
run: |
CERTIFICATE_PATH=$RUNNER_TEMP/apple-certificates.p12
KEYCHAIN_PATH=$RUNNER_TEMP/frida-signing.keychain-db
echo -n "$CERTIFICATES_P12" | base64 -d -o $CERTIFICATE_PATH
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security import $CERTIFICATE_PATH -P "$CERTIFICATES_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
rm $CERTIFICATE_PATH
(
MACOS_CERTID=$(security find-identity -v -p codesigning | grep "Developer ID Application: " | awk '{ print $2 }')
IOS_CERTID=$(security find-identity -v -p codesigning | grep "Apple Development: " | awk '{ print $2 }')
echo MACOS_CERTID=$MACOS_CERTID
echo IOS_CERTID=$IOS_CERTID
echo WATCHOS_CERTID=$IOS_CERTID
echo TVOS_CERTID=$IOS_CERTID
) >> $GITHUB_ENV
shell: bash
+482
View File
@@ -0,0 +1,482 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
FRIDA_CORE_OPTIONS: '--with-devkits=core --enable-tests'
jobs:
native:
strategy:
matrix:
include:
- { id: windows-arm64, runner: '"windows-11-arm"', sys: CLANGARM64, pkg: 'mingw-w64-clang-aarch64-clang' }
- { id: windows-x86_64, runner: '"windows-latest"', sys: MINGW64, pkg: 'mingw-w64-x86_64-gcc' }
- { id: windows-x86, runner: '"windows-latest"', sys: MINGW32, pkg: 'mingw-w64-i686-gcc' }
- { id: macos-x86_64, runner: '"macos-latest"' }
- { id: macos-arm64, runner: '"macos-latest"' }
- { id: linux-x86_64, runner: '"ubuntu-latest"' }
- { id: linux-x86, runner: '"ubuntu-latest"' }
fail-fast: false
runs-on: ${{ fromJSON(matrix.runner) }}
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install MinGW toolchain for cgo support
if: ${{ startsWith(matrix.id, 'windows-') }}
id: msys2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
install: ${{ matrix.pkg }}
- name: Install Go toolchain
uses: actions/setup-go@v5
with:
go-version-file: 'src/compiler/go.mod'
cache-dependency-path: 'src/compiler/go.mod'
- name: Set up Apple certificates
if: ${{ startsWith(matrix.id, 'macos-') }}
uses: ./.github/actions/setup-apple-certificates
with:
certificates-p12: ${{ secrets.APPLE_CERTIFICATES_P12 }}
certificates-password: ${{ secrets.APPLE_CERTIFICATES_PASSWORD }}
keychain-password: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
- name: Relax macOS security policy to avoid prompts
if: ${{ startsWith(matrix.id, 'macos-') }}
run: sudo security authorizationdb write system.privilege.taskport allow
- name: Install gcc-multilib
if: matrix.id == 'linux-x86'
run: |
sudo apt-get update
sudo apt-get install gcc-multilib lib32stdc++-13-dev
- name: Build
if: ${{ startsWith(matrix.id, 'windows-') }}
run: |
.\configure `
--host=${{ matrix.id }} `
--enable-compiler-backend `
${{ env.FRIDA_CORE_OPTIONS }}
.\make
env:
MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }}
- name: Build
if: ${{ !startsWith(matrix.id, 'windows-') && matrix.id != 'linux-x86' }}
run: |
./configure \
--enable-compiler-backend \
${{ env.FRIDA_CORE_OPTIONS }}
make
- name: Build
if: matrix.id == 'linux-x86'
run: |
CC="gcc -m32" CXX="g++ -m32" STRIP="strip" \
./configure \
--build=linux-x86 \
--host=linux-x86 \
--enable-compiler-backend \
${{ env.FRIDA_CORE_OPTIONS }}
make
- name: Upload devkit
if: ${{ !startsWith(matrix.id, 'linux-') }}
uses: actions/upload-artifact@v4
with:
name: core-devkit-${{ matrix.id }}
path: build/src/devkit/
- name: Test
if: ${{ matrix.id != 'windows-arm64' && !startsWith(matrix.id, 'macos-') }}
run: make test
cross:
strategy:
matrix:
include:
- { id: windows-x86_64-mingw, opts: '--host=x86_64-w64-mingw32 --without-prebuilds=sdk:host', pkg: g++-mingw-w64-x86-64 }
- { id: windows-x86-mingw, opts: '--host=i686-w64-mingw32 --without-prebuilds=sdk:host', pkg: g++-mingw-w64-i686 }
- { id: linux-mips, opts: '--host=mips-linux-gnu', pkg: g++-mips-linux-gnu }
- { id: linux-mipsel, opts: '--host=mipsel-linux-gnu', pkg: g++-mipsel-linux-gnu }
- { id: linux-mips64, opts: '--host=mips64-linux-gnuabi64', pkg: g++-mips64-linux-gnuabi64 }
- { id: linux-mips64el, opts: '--host=mips64el-linux-gnuabi64', pkg: g++-mips64el-linux-gnuabi64 }
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install toolchain
run: |
sudo apt-get update
sudo apt-get install ${{ matrix.pkg }}
- name: Install Go toolchain
uses: actions/setup-go@v5
with:
go-version-file: 'src/compiler/go.mod'
cache-dependency-path: 'src/compiler/go.mod'
- name: Build
run: |
./configure \
${{ matrix.opts }} \
${{ !contains(matrix.id, 'mips') && '--enable-compiler-backend' || '' }} \
${{ env.FRIDA_CORE_OPTIONS }}
make
- name: Upload devkit
if: ${{ !startsWith(matrix.id, 'linux-') }}
uses: actions/upload-artifact@v4
with:
name: core-devkit-${{ matrix.id }}
path: build/src/devkit/
manylinux:
strategy:
matrix:
arch: [x86, x86_64, x86_64-musl, armhf, arm64, arm64-musl, mips, mipsel, mips64, mips64el]
fail-fast: false
runs-on: ubuntu-latest
container: ghcr.io/frida/x-tools-linux-${{ matrix.arch }}:latest
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Go toolchain
uses: actions/setup-go@v5
with:
go-version-file: 'src/compiler/go.mod'
cache-dependency-path: 'src/compiler/go.mod'
- name: Build
run: |
./configure \
--host=$XTOOLS_HOST \
${{ !startsWith(matrix.arch, 'mips') && '--enable-compiler-backend' || '' }} \
${{ env.FRIDA_CORE_OPTIONS }}
make
- name: Upload devkit
uses: actions/upload-artifact@v4
with:
name: core-devkit-linux-${{ matrix.arch }}
path: build/src/devkit/
- name: Test
if: matrix.arch == 'x86' || matrix.arch == 'x86_64'
run: make test
emulator:
strategy:
matrix:
arch: [armbe8, arm64be]
fail-fast: false
runs-on: ubuntu-latest
container: ghcr.io/frida/x-tools-linux-${{ matrix.arch }}:latest
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
run: |
./configure --host=$XTOOLS_HOST --without-prebuilds=sdk:host --enable-tests
make
- name: Run custom container
uses: addnab/docker-run-action@v3
with:
image: docker:stable
options: -v ${{ github.workspace }}:/workspace:delegated
run: |
cat <<EOF > /workspace/initscript
#!/bin/sh
dmesg -n1
mount -t proc none /proc
mount -t sysfs none /sys
mount -t tmpfs none /tmp
mount -t devtmpfs none /dev
mount -t 9p -o rw,sync,dirsync,relatime,trans=virtio,msize=131072,version=9p2000.L host0 /workspace
ip link set lo up
ip addr add 192.168.76.20/24 dev eth0
ip link set eth0 up
ip route add default via 192.168.76.2 dev eth0
export LD_LIBRARY_PATH=/lib:/lib64:/libilp32
/sbin/entropy
cat /etc/motd
export PS1='\u@frida:\w\$ '
/root/frida-tests
status=\$?
echo "exit status: \$status"
if [ \$status -eq 0 ]; then
echo EXIT_OK
elif [ \$status -gt 128 ]; then
signal=\$((\$status - 128))
echo "EXIT_FAIL (terminated by signal \$signal)"
else
echo "EXIT_FAIL (exit code \$status)"
fi
EOF
cat <<EOF > /workspace/launch.sh
#!/bin/sh
LOGFILE=/workspace/qemu.log
: > "\$LOGFILE"
timeout 120 qemu-system-aarch64 \
-M virt \
-machine virtualization=true \
-machine type=virt \
-cpu cortex-a72 \
-smp 4 \
-kernel /root/Image.gz \
-initrd /root/initramfs.img \
-append 'earlyprintk=serial,ttyAMA0 console=ttyAMA0 coredump_filter=0x3f' \
-m 4096M \
-net nic,id=eth \
-net user,id=mynet,net=192.168.76.0/24 \
-virtfs local,path=/workspace/,mount_tag=host0,security_model=passthrough,id=host0 \
-nographic \
-no-reboot \
>> "\$LOGFILE" 2>&1 &
QEMU_PID=\$!
echo "QEMU started with PID \$QEMU_PID"
tail -n 0 -f "\$LOGFILE" | while read line; do
echo "\$line"
echo "\$line" | grep "EXIT_OK" >/dev/null 2>&1
if [ \$? -eq 0 ]; then
echo "Success signal received from guest. Killing QEMU..."
kill -9 "\$QEMU_PID"
cat -n "\$LOGFILE"
exit 0
fi
echo "\$line" | grep "EXIT_FAIL" >/dev/null 2>&1
if [ \$? -eq 0 ]; then
echo "Failure signal received from guest. Killing QEMU..."
kill -9 "\$QEMU_PID"
cat -n "\$LOGFILE"
exit 1
fi
if ! kill -0 "\$QEMU_PID" 2>/dev/null; then
echo "QEMU process has exited."
cat -n "\$LOGFILE"
exit 1
fi
done
EOF
cat <<EOF > /workspace/Dockerfile.ci
FROM ghcr.io/frida/x-tools-linux-be-target:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y \
cpio
RUN mkdir /tmp/initramfs
WORKDIR /tmp/initramfs
RUN cpio --extract < /root/initramfs.img
RUN mkdir /tmp/initramfs/workspace
COPY initscript /tmp/initramfs/init
RUN chmod +x /tmp/initramfs/init
COPY build/tests /tmp/initramfs/root/
RUN find . | cpio -o --format=newc -R root:root > /root/initramfs.img
COPY launch.sh /root/launch.sh
RUN chmod +x /root/launch.sh
ENTRYPOINT ["/root/launch.sh"]
EOF
docker build -t ci-image -f /workspace/Dockerfile.ci /workspace
docker run --rm -v /workspace:/workspace ci-image
mobile:
strategy:
matrix:
id:
- ios-arm64
- android-x86
- android-x86_64
- android-arm
- android-arm64
fail-fast: false
runs-on: ${{ startsWith(matrix.id, 'ios-') && 'macos-latest' || 'ubuntu-latest' }}
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Go toolchain
uses: actions/setup-go@v5
with:
go-version-file: 'src/compiler/go.mod'
cache-dependency-path: 'src/compiler/go.mod'
- name: Set up Apple certificates
if: startsWith(matrix.id, 'ios-')
uses: ./.github/actions/setup-apple-certificates
with:
certificates-p12: ${{ secrets.APPLE_CERTIFICATES_P12 }}
certificates-password: ${{ secrets.APPLE_CERTIFICATES_PASSWORD }}
keychain-password: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
- uses: nttld/setup-ndk@v1
if: startsWith(matrix.id, 'android-')
id: setup-ndk
with:
ndk-version: r25c
- name: Add NDK to env
if: startsWith(matrix.id, 'android-')
run: echo ANDROID_NDK_ROOT=${{ steps.setup-ndk.outputs.ndk-path }} >> $GITHUB_ENV
- name: Build
run: |
./configure \
--host=${{ matrix.id }} \
--enable-compiler-backend \
${{ env.FRIDA_CORE_OPTIONS }}
make
- name: Upload devkit
uses: actions/upload-artifact@v4
with:
name: core-devkit-${{ matrix.id }}
path: build/src/devkit/
- name: Package tests
run: |
mkdir -p /tmp/pkg
cd build
case ${{ matrix.id }} in
ios-*)
shlibext=.dylib
;;
android-*)
shlibext=.so
;;
esac
cp -a tests/frida-tests tests/labrats lib/agent/frida-agent$shlibext /tmp/pkg/
case ${{ matrix.id }} in
ios-*)
cp -a lib/gadget/frida-gadget.dylib ../tests/test-gadget-standalone.js /tmp/pkg/
;;
esac
tar -C /tmp/pkg -czf /tmp/runner.tar.gz .
- name: Test on Corellium iOS device
if: matrix.id == 'ios-arm64'
continue-on-error: true
uses: frida/corellium-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
gateway: corellium.frida.re
device: ios-12.5.7-arm64
upload: /tmp/runner.tar.gz
run: |
cd /usr/local
rm -rf opt/frida
mkdir -p opt/frida
cd opt/frida
tar xf $ASSET_PATH
./frida-tests
- name: Test on Corellium Android device
if: matrix.id == 'android-arm64'
continue-on-error: true
uses: frida/corellium-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
gateway: corellium.frida.re
device: android-8.1.0-arm64
upload: /tmp/runner.tar.gz
run: |
cd /data/local/tmp
tar xf $ASSET_PATH
TMPDIR=/data/local/tmp ./frida-tests
qnx-armeabi:
runs-on: ubuntu-latest
container: ghcr.io/frida/qnx-tools:latest
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
run: |
CFLAGS="--sysroot=$QNX_TARGET/armle-v7" \
./configure --host=arm-unknown-nto-qnx6.5.0eabi ${{ env.FRIDA_CORE_OPTIONS }}
make
- name: Upload devkit
uses: actions/upload-artifact@v4
with:
name: core-devkit-qnx-armeabi
path: build/src/devkit/
- name: Test
run: |
mkdir -p /tmp/pkg
cd build
cp -a tests/frida-tests tests/labrats lib/agent/frida-agent.so /tmp/pkg/
tar -C /tmp/pkg -cf /tmp/runner.tar .
/opt/sabrelite/run.sh /tmp/runner.tar /opt/frida/frida-tests
# This job is used to check that the Linux helpers are built correctly for all
# supported architectures. We do this because the binary artifacts are checked
# in, and we want to ensure that they are up-to-date with respect to the source
# for all architectures.
check-linux-helpers:
strategy:
matrix:
arch: [x86, x86_64, arm, armbe8, arm64, arm64be, arm64beilp32, mips, mipsel, mips64, mips64el]
fail-fast: false
runs-on: ubuntu-latest
container: ghcr.io/frida/core-linux-helpers-${{ matrix.arch }}:latest
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
run: |
./src/linux/helpers/rebuild.sh ${{ matrix.arch }}
- name: Check for unexpected changes
run: |
git config --global --add safe.directory "$(realpath .)"
status_output=$(git status --porcelain tests/labrats/{resident-agent,simple-agent}-linux-${{ matrix.arch }}.so tests/labrats/{forker,sleeper,spawner}-linux-${{ matrix.arch }})
if [ -n "$status_output" ]; then
echo "Unexpected changes detected:"
echo "$status_output"
echo "Diff:"
git diff
exit 1
else
echo "No unexpected changes detected."
fi
# This job is used to check that the Linux labrats are built correctly for all
# supported architectures. We do this because the binary artifacts are checked
# in, and we want to ensure that they are up-to-date with respect to the source
# for all architectures.
check-labrats:
strategy:
matrix:
arch: [x86, x86_64, arm, armbe8, arm64, arm64be, arm64beilp32, mips, mipsel, mips64, mips64el]
fail-fast: false
runs-on: ubuntu-latest
container: ghcr.io/frida/core-linux-helpers-${{ matrix.arch }}:latest
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
run: |
./tests/labrats/rebuild.sh ${{ matrix.arch }}
- name: Check for unexpected changes
run: |
git config --global --add safe.directory "$(realpath .)"
status_output=$(git status --porcelain src/linux/helpers/{bootstrapper,loader}-${{ matrix.arch }}.bin)
if [ -n "$status_output" ]; then
echo "Unexpected changes detected:"
echo "$status_output"
echo "Diff:"
git diff
exit 1
else
echo "No unexpected changes detected."
fi
+10 -4
View File
@@ -1,12 +1,18 @@
*.user
/lib/xnu/build/
/lib/xnu/FridaKernelAgent.xcodeproj/project.xcworkspace/xcuserdata/
/lib/xnu/FridaKernelAgent.xcodeproj/xcuserdata/
/build/
/deps/
/src/barebone/helpers/memory-scanner/target/
/src/barebone/helpers/target/
/src/barebone/node_modules/
/src/barebone/script-runtime.js
/src/compiler/node_modules/
/src/darwin/agent/osanalytics/node_modules/
/src/darwin/agent/osanalytics/osanalytics.js
/src/darwin/agent/reportcrash/node_modules/
/src/darwin/agent/reportcrash/reportcrash.js
/src/droidy/helper/build/
/src/fruity/helpers/build/
/src/linux/agent/system-server/node_modules/
/src/linux/agent/system-server/system-server.js
/src/linux/helpers/build/
/src/linux/helpers/ext/
/subprojects/*
+3
View File
@@ -0,0 +1,3 @@
[submodule "releng"]
path = releng
url = https://github.com/frida/releng.git
+6
View File
@@ -0,0 +1,6 @@
all: .DEFAULT
.DEFAULT:
@gmake ${.MAKEFLAGS} ${.TARGETS}
.PHONY: all
+16
View File
@@ -0,0 +1,16 @@
PYTHON ?= $(shell which python3 >/dev/null && echo python3 || echo python)
all $(MAKECMDGOALS):
@$(PYTHON) \
-c "import sys; sys.path.insert(0, sys.argv[1]); from releng.meson_make import main; main()" \
"$(shell pwd)" \
./build \
$(MAKECMDGOALS)
git-submodules:
@if [ ! -f releng/meson/meson.py ]; then \
git submodule update --init --recursive --depth 1; \
fi
-include git-submodules
.PHONY: all $(MAKECMDGOALS)
+669
View File
@@ -0,0 +1,669 @@
from __future__ import annotations
import argparse
import base64
from collections import OrderedDict
from dataclasses import dataclass, field
import itertools
import locale
import os
from pathlib import Path
import pickle
import platform
import shlex
import shutil
import subprocess
import sys
import tempfile
import traceback
from typing import Any, Literal, Mapping, Optional, Sequence, Tuple
REPO_ROOT = Path(__file__).resolve().parent.parent
NINJA = os.environ.get("NINJA", "ninja")
Role = Literal["project", "subproject"]
def main(argv):
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers()
command = subparsers.add_parser("setup", help="setup everything needed to compile")
command.add_argument("role", help="project vs subproject", choices=["project", "subproject"])
command.add_argument("builddir", help="build directory", type=Path)
command.add_argument("top_builddir", help="top build directory", type=Path)
command.add_argument("frida_version", help="the Frida version")
command.add_argument("host_os", help="operating system binaries are being built for")
command.add_argument("host_arch", help="architecture binaries are being built for")
command.add_argument("host_config", help="configuration binaries are being built for")
command.add_argument("compat", help="support for targets with a different architecture",
type=parse_compat_option_value)
command.add_argument("assets", help="whether assets are embedded vs installed and loaded at runtime")
command.add_argument("components", help="which components will be built",
type=parse_array_option_value)
command.add_argument("compilers", help="compiler command arrays", nargs="+")
command.set_defaults(func=lambda args: setup(args.role,
args.builddir,
args.top_builddir,
args.frida_version,
args.host_os,
args.host_arch,
args.host_config if args.host_config else None,
args.compat,
args.assets,
args.components,
parse_compilers(args.compilers)))
command = subparsers.add_parser("compile", help="compile compatibility assets")
command.add_argument("privdir", help="directory to store intermediate files", type=Path)
command.add_argument("state", help="opaque state from the setup step")
command.set_defaults(func=lambda args: compile(args.privdir, pickle.loads(base64.b64decode(args.state))))
args = parser.parse_args()
if "func" in args:
try:
args.func(args)
except subprocess.CalledProcessError as e:
print(e, file=sys.stderr)
print("Output:\n\t| " + "\n\t| ".join(e.output.strip().split("\n")), file=sys.stderr)
sys.exit(1)
else:
parser.print_usage(file=sys.stderr)
sys.exit(1)
def parse_compat_option_value(v: str) -> set[str]:
vals = parse_array_option_value(v)
if len(vals) > 1:
for choice in {"auto", "disabled"}:
if choice in vals:
raise argparse.ArgumentTypeError(f"the compat '{choice}' choice cannot be combined with other choices")
return vals
def parse_array_option_value(v: str) -> set[str]:
return {v.strip() for v in v.split(",")}
def parse_compilers(compilers: list[str]) -> Compilers:
cc = pop_cmd_array_arg(compilers)
cpp = pop_cmd_array_arg(compilers)
return Compilers(cc, cpp)
def pop_cmd_array_arg(args: list[str]) -> list[str]:
result: list[str] = []
first = args.pop(0)
assert first == ">>>"
while True:
cur = args.pop(0)
if cur == "<<<":
break
result.append(cur)
if len(result) == 1 and not result[0]:
return None
return result
def setup(role: Role,
builddir: Path,
top_builddir: Path,
frida_version: str,
host_os: str,
host_arch: str,
host_config: Optional[str],
compat: set[str],
assets: str,
components: set[str],
compilers: Compilers):
try:
outputs: Mapping[str, Sequence[Output]] = OrderedDict()
outputs[OutputGroup(arch=None)] = [Output("arch_support_bundle", "arch-support.bundle", Path("compat"), "")]
releng_location = query_releng_location(role)
ensure_submodules_checked_out(releng_location)
configure_import_path(releng_location)
auto_detect = "auto" in compat
if auto_detect:
if host_os in {"windows", "macos", "linux", "ios", "tvos", "android"}:
summary = f"enabled by default for {host_os}-{host_arch}"
compat = {"native", "emulated"}
else:
summary = f"disabled by default for {host_os}-{host_arch}"
compat = set()
elif "disabled" in compat:
summary = "disabled by user"
compat = set()
else:
summary = "enabled by user"
missing: list[MissingFeature] = []
if "native" in compat:
have_toolchain = True
other_label: Optional[str] = None
other_triplet: Optional[str] = None
extra_environ: dict[str, str] = {}
if host_os == "windows" and host_arch == "x86_64" and host_config == "mingw":
other_label = "x86"
have_toolchain, other_triplet = detect_mingw_toolchain_for("x86")
elif host_os == "linux" and host_arch == "x86_64" and host_config is None:
other_label = "x86"
other_triplet = "i686-linux-gnu"
have_toolchain = shutil.which(other_triplet + "-gcc") is not None
if not have_toolchain:
with (tempfile.NamedTemporaryFile(mode="w", encoding="utf-8", suffix=".c") as probe_c,
tempfile.NamedTemporaryFile(delete=False) as probe_executable):
try:
probe_c.write("int main (void) { return 0; }")
probe_c.flush()
p = subprocess.run(compilers.cc + ["-m32", probe_c.name, "-o", probe_executable.name],
capture_output=True)
if p.returncode == 0:
extra_environ["CC"] = shlex.join(compilers.cc + ["-m32"])
extra_environ["CXX"] = shlex.join(compilers.cpp + ["-m32"])
have_toolchain = True
finally:
try:
os.unlink(probe_executable.name)
except:
pass
if not have_toolchain:
if not auto_detect:
raise ToolchainNotFoundError(f"unable to locate toolchain for {other_triplet}")
missing.append(MissingFeature(other_label, other_triplet))
if host_os == "windows" and host_arch == "x86_64" and have_toolchain:
group = OutputGroup("x86", other_triplet, extra_environ)
outputs[group] = [
Output(identifier="helper_legacy",
name=HELPER_FILE_WINDOWS.name,
file=HELPER_FILE_WINDOWS,
target=HELPER_TARGET),
Output(identifier="agent_legacy",
name=AGENT_FILE_WINDOWS.name,
file=AGENT_FILE_WINDOWS,
target=AGENT_TARGET),
]
if "gadget" in components:
outputs[group] += [
Output(identifier="gadget_legacy",
name=GADGET_FILE_WINDOWS.name,
file=GADGET_FILE_WINDOWS,
target=GADGET_TARGET),
]
if host_os in {"macos", "ios"} and host_arch in {"arm64e", "arm64"} and host_config != "simulator":
if host_arch == "arm64e":
other_arch = "arm64"
kind = "legacy"
else:
other_arch = "arm64e"
kind = "modern"
group = OutputGroup(other_arch)
outputs[group] = [
Output(identifier=f"helper_{kind}",
name=f"frida-helper-{other_arch}",
file=HELPER_FILE_UNIX,
target=HELPER_TARGET),
Output(identifier=f"agent_{kind}",
name=f"frida-agent-{other_arch}.dylib",
file=AGENT_FILE_DARWIN,
target=AGENT_TARGET),
]
if "gadget" in components:
outputs[group] += [
Output(identifier=f"gadget_{kind}",
name=f"frida-gadget-{other_arch}.dylib",
file=GADGET_FILE_DARWIN,
target=GADGET_TARGET),
]
if "server" in components and assets == "installed":
outputs[group] += [
Output(identifier=f"server_{kind}",
name=f"frida-server-{other_arch}",
file=SERVER_FILE_UNIX,
target=SERVER_TARGET),
]
if host_os == "linux" and host_arch == "x86_64" and have_toolchain:
group = OutputGroup("x86", other_triplet, extra_environ)
outputs[group] = [
Output(identifier="helper_legacy",
name=HELPER_FILE_UNIX.name,
file=HELPER_FILE_UNIX,
target=HELPER_TARGET),
Output(identifier="agent_legacy",
name=AGENT_FILE_ELF.name,
file=AGENT_FILE_ELF,
target=AGENT_TARGET),
]
if "gadget" in components:
outputs[group] += [
Output(identifier="gadget_legacy",
name=GADGET_FILE_ELF.name,
file=GADGET_FILE_ELF,
target=GADGET_TARGET),
]
if host_os == "android" and host_arch in {"arm64", "x86_64"}:
group = OutputGroup("arm" if host_arch == "arm64" else "x86")
outputs[group] = [
Output(identifier="helper_legacy",
name=HELPER_FILE_UNIX.name,
file=HELPER_FILE_UNIX,
target=HELPER_TARGET),
Output(identifier="agent_legacy",
name=AGENT_FILE_ELF.name,
file=AGENT_FILE_ELF,
target=AGENT_TARGET),
]
if "gadget" in components:
outputs[group] += [
Output(identifier="gadget_legacy",
name=GADGET_FILE_ELF.name,
file=GADGET_FILE_ELF,
target=GADGET_TARGET),
]
if "emulated" in compat:
if host_os == "windows" and host_arch == "arm64":
for kind, emulated_arch in [("modern", "x86_64"), ("legacy", "x86")]:
if host_config == "mingw":
found, emulated_triplet = detect_mingw_toolchain_for(emulated_arch)
if not found:
if not auto_detect:
raise ToolchainNotFoundError(f"unable to locate toolchain for {emulated_triplet}")
missing.append(MissingFeature(emulated_arch, emulated_triplet))
continue
else:
emulated_triplet = None
outputs[OutputGroup(emulated_arch, emulated_triplet, extra_environ)] = [
Output(identifier=f"helper_emulated_{kind}",
name=HELPER_FILE_WINDOWS.name.replace(".exe", f"-{emulated_arch}.exe"),
file=HELPER_FILE_WINDOWS,
target=HELPER_TARGET),
Output(identifier=f"agent_emulated_{kind}",
name=AGENT_FILE_WINDOWS.name.replace(".dll", f"-{emulated_arch}.dll"),
file=AGENT_FILE_WINDOWS,
target=AGENT_TARGET),
]
if host_os == "android" and host_arch in {"x86_64", "x86"}:
outputs[OutputGroup("arm")] = [
Output(identifier="agent_emulated_legacy",
name="frida-agent-arm.so",
file=AGENT_FILE_ELF,
target=AGENT_TARGET),
]
if host_arch == "x86_64":
outputs[OutputGroup("arm64")] = [
Output(identifier="agent_emulated_modern",
name="frida-agent-arm64.so",
file=AGENT_FILE_ELF,
target=AGENT_TARGET),
]
raw_allowed_prebuilds = os.environ.get("FRIDA_ALLOWED_PREBUILDS")
allowed_prebuilds = set(raw_allowed_prebuilds.split(",")) if raw_allowed_prebuilds is not None else None
state = State(role, builddir, top_builddir, frida_version, host_os, host_config, allowed_prebuilds, outputs)
serialized_state = base64.b64encode(pickle.dumps(state)).decode('ascii')
if missing:
summary = ", ".join([f"{m.label} disabled due to missing toolchain for {m.triplet}" for m in missing])
variable_names, output_names = zip(*[(output.identifier, output.name) \
for output in itertools.chain.from_iterable(outputs.values())])
print("ok")
print(summary)
print(f"{','.join(variable_names)}")
print(f"{','.join(output_names)}")
print(DEPFILE_FILENAME)
print(serialized_state)
except Exception as e:
print(f"error {e}")
print("")
print(traceback.format_exception(e))
class ToolchainNotFoundError(Exception):
pass
@dataclass
class Compilers:
cc: list[str]
cpp: list[str]
@dataclass
class State:
role: Role
builddir: Path
top_builddir: Path
frida_version: str
host_os: str
host_config: Optional[str]
allowed_prebuilds: Optional[set[str]]
outputs: Mapping[OutputGroup, Sequence[Output]]
@dataclass
class OutputGroup:
arch: Optional[str]
triplet: Optional[str] = None
extra_environ: dict[str, str] = field(default_factory=dict)
def __eq__(self, other):
if isinstance(other, OutputGroup):
return other.arch == self.arch
return False
def __hash__(self):
return hash(self.arch)
@dataclass
class Output:
identifier: str
name: str
file: Path
target: str
@dataclass
class MissingFeature:
label: str
triplet: str
def compile(privdir: Path, state: State):
releng_location = query_releng_location(state.role)
subprojects = detect_relevant_subprojects(releng_location)
if state.role == "subproject":
grab_subprojects_from_parent(subprojects, releng_location)
configure_import_path(releng_location)
from releng.env import call_meson
from releng.machine_spec import MachineSpec
from releng.meson_configure import configure
from releng.meson_make import make
def call_internal_meson(argv, *args, **kwargs):
if "stdout" not in kwargs and "stderr" not in kwargs:
silenced_kwargs = {
**kwargs,
"stdout": subprocess.PIPE,
"stderr": subprocess.STDOUT,
"encoding": locale.getpreferredencoding(),
}
else:
silenced_kwargs = kwargs
return call_meson(argv, *args, **silenced_kwargs)
options: Optional[Sequence[str]] = None
build_env = scrub_environment(os.environ)
build_env["FRIDA_RELENG"] = str(releng_location)
top_builddir = state.top_builddir
depfile_lines = []
for group, outputs in state.outputs.items():
if group.arch is None:
for o in outputs:
(state.builddir / o.name).write_bytes(b"")
continue
workdir = (privdir / group.arch).resolve()
if not (workdir / "build.ninja").exists():
if options is None:
options = load_meson_options(top_builddir, state.role, set(subprojects.keys()))
version_opt = next((opt for opt in options if opt.startswith("-Dfrida_version=")), None)
if version_opt is None:
options += [f"-Dfrida_version={state.frida_version}"]
host_machine = MachineSpec(state.host_os, group.arch, state.host_config, group.triplet)
configure(sourcedir=REPO_ROOT,
builddir=workdir,
host_machine=host_machine,
environ={**build_env, **group.extra_environ},
allowed_prebuilds=state.allowed_prebuilds,
extra_meson_options=[
"-Dcompiler_backend=disabled",
"-Dhelper_modern=",
"-Dhelper_legacy=",
"-Dagent_modern=",
"-Dagent_legacy=",
"-Dagent_emulated_modern=",
"-Dagent_emulated_legacy=",
*options,
],
call_meson=call_internal_meson,
on_progress=lambda progress: None)
make(sourcedir=REPO_ROOT,
builddir=workdir,
targets=[o.target for o in outputs],
environ=build_env,
call_meson=call_internal_meson)
for o in outputs:
shutil.copy(workdir / o.file, state.builddir / o.name)
output_relpath = (workdir / o.name).relative_to(top_builddir).as_posix()
input_paths = shlex.split(subprocess.run([NINJA, "-t", "inputs", o.file],
cwd=workdir,
capture_output=True,
encoding="utf-8",
check=True).stdout)
input_entries = []
for raw_path in input_paths:
path = Path(raw_path)
if not path.is_absolute():
path = Path(os.path.relpath(workdir / path, top_builddir))
input_entries.append(escape_depfile_path(path.as_posix()))
depfile_lines.append(f"{output_relpath}: {' '.join(input_entries)}")
(state.builddir / DEPFILE_FILENAME).write_text("\n".join(depfile_lines), encoding="utf-8")
def load_meson_options(top_builddir: Path,
role: Role,
subprojects: set[str]) -> Sequence[str]:
from mesonbuild import coredata
return [f"-D{adapt_key(k, role)}={v.value}" for k, v in coredata.load(top_builddir).options.items()
if option_should_be_forwarded(k, v, role, subprojects)]
def adapt_key(k: "OptionKey", role: Role) -> "OptionKey":
if role == "subproject" and k.subproject == "frida-core":
return k.as_root()
return k
def option_should_be_forwarded(k: "OptionKey",
v: "coredata.UserOption[Any]",
role: Role,
subprojects: set[str]) -> bool:
from mesonbuild import coredata
our_project_id = "frida-core" if role == "subproject" else ""
is_for_us = k.subproject == our_project_id
is_for_child = k.subproject in subprojects
if k.is_project():
if is_for_us:
if k.name == "compiler_backend":
return False
tokens = k.name.split("_")
if tokens[0] in {"helper", "agent"} and tokens[-1] in {"modern", "legacy"}:
return False
if k.subproject and k.machine is not coredata.MachineChoice.HOST:
return False
return is_for_us or is_for_child
if coredata.CoreData.is_per_machine_option(k):
return k.machine is coredata.MachineChoice.BUILD
if k.is_builtin():
if k.name in {"buildtype", "genvslite"}:
return False
if not str(v.value):
return False
if not is_for_child and role == "subproject" and k.subproject in {"", our_project_id}:
if not coredata.BUILTIN_OPTIONS[k.as_root()].yielding:
return k.subproject == our_project_id
return True
if k.module == "python":
if k.name == "install_env" and v.value == "prefix":
return False
if not str(v.value):
return False
return is_for_us or is_for_child
def scrub_environment(env: Mapping[str, str]) -> Mapping[str, str]:
from releng.env import TOOLCHAIN_ENVVARS
clean_env = OrderedDict()
envvars_to_avoid = {*TOOLCHAIN_ENVVARS, *MSVS_ENVVARS}
for k, v in env.items():
if k in envvars_to_avoid:
continue
if k.upper() == "PATH" and platform.system() == "Windows":
v = scrub_windows_devenv_dirs_from_path(v, env)
clean_env[k] = v
return clean_env
def scrub_windows_devenv_dirs_from_path(raw_path: str, env: Mapping[str, str]) -> str:
raw_vcinstalldir = env.get("VCINSTALLDIR")
if raw_vcinstalldir is None:
return raw_path
vcinstalldir = Path(raw_vcinstalldir)
clean_entries = []
for raw_entry in raw_path.split(";"):
entry = Path(raw_entry)
if entry.is_relative_to(vcinstalldir):
continue
if "WINDOWS KITS" in [p.upper() for p in entry.parts]:
continue
clean_entries.append(raw_entry)
return ";".join(clean_entries)
def escape_depfile_path(path: str) -> str:
return path.replace(" ", "\\ ")
def query_releng_location(role: Role) -> Path:
if role == "subproject":
candidate = REPO_ROOT.parent.parent / "releng"
if candidate.exists():
return candidate
return REPO_ROOT / "releng"
def ensure_submodules_checked_out(releng_location: Path):
if not (releng_location / "meson" / "meson.py").exists():
subprocess.run(["git", "submodule", "update", "--init", "--recursive", "--depth", "1", "releng"],
cwd=releng_location.parent,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
encoding="utf-8",
check=True)
def detect_relevant_subprojects(releng_location: Path) -> dict[str, Path]:
subprojects = detect_relevant_subprojects_in(REPO_ROOT, releng_location)
gum_location = subprojects.get("frida-gum")
if gum_location is not None:
subprojects.update(detect_relevant_subprojects_in(gum_location, releng_location))
return subprojects
def detect_relevant_subprojects_in(repo_root: Path, releng_location: Path) -> dict[str, Path]:
result = {}
for f in (repo_root / "subprojects").glob("*.wrap"):
name = f.stem
location = releng_location.parent / "subprojects" / name
if location.exists():
result[name] = location
return result
def grab_subprojects_from_parent(subprojects: dict[str, Path], releng_location: Path):
for name, location in subprojects.items():
subp_here = REPO_ROOT / "subprojects" / name
if subp_here.exists():
continue
try:
subp_here.symlink_to(Path("..") / ".." / name, target_is_directory=True)
continue
except OSError as e:
if not getattr(e, "winerror", None) == 1314:
raise e
subprocess.run(["git", "worktree", "add", subp_here],
cwd=location,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
encoding="utf-8",
check=True)
def configure_import_path(releng_location: Path):
sys.path.insert(0, str(releng_location / "meson"))
sys.path.insert(0, str(releng_location.parent))
def detect_mingw_toolchain_for(arch: str) -> Tuple[bool, Optional[str]]:
triplet = MINGW_ARCHS.get(arch, arch) + "-w64-mingw32"
found = shutil.which(triplet + "-gcc") is not None
return (found, triplet)
STATE_FILENAME = "state.dat"
DEPFILE_FILENAME = "compat.deps"
HELPER_TARGET = "frida-helper"
HELPER_FILE_WINDOWS = Path("src") / "frida-helper.exe"
HELPER_FILE_UNIX = Path("src") / "frida-helper"
AGENT_TARGET = "frida-agent"
AGENT_FILE_WINDOWS = Path("lib") / "agent" / "frida-agent.dll"
AGENT_FILE_DARWIN = Path("lib") / "agent" / "frida-agent.dylib"
AGENT_FILE_ELF = Path("lib") / "agent" / "frida-agent.so"
GADGET_TARGET = "frida-gadget"
GADGET_FILE_WINDOWS = Path("lib") / "gadget" / "frida-gadget.dll"
GADGET_FILE_DARWIN = Path("lib") / "gadget" / "frida-gadget.dylib"
GADGET_FILE_ELF = Path("lib") / "gadget" / "frida-gadget.so"
SERVER_TARGET = "frida-server"
SERVER_FILE_UNIX = Path("server") / "frida-server"
MSVS_ENVVARS = {
"PLATFORM",
"VCINSTALLDIR",
"INCLUDE",
"LIB",
}
MINGW_ARCHS = {
"x86": "i686",
"arm64": "aarch64",
}
if __name__ == "__main__":
main(sys.argv)
+122
View File
@@ -0,0 +1,122 @@
helper_modern = get_option('helper_modern')
helper_legacy = get_option('helper_legacy')
helper_compat = ''
helper_emulated_modern = get_option('helper_emulated_modern')
helper_emulated_legacy = get_option('helper_emulated_legacy')
helper_depends = []
agent_modern = get_option('agent_modern')
agent_legacy = get_option('agent_legacy')
agent_compat = ''
agent_emulated_modern = get_option('agent_emulated_modern')
agent_emulated_legacy = get_option('agent_emulated_legacy')
agent_depends = []
gadget_compat = ''
gadget_depends = []
server_compat = ''
server_depends = []
no_overridden_compat_bits = \
helper_modern == 'auto' and helper_legacy == 'auto' \
and helper_emulated_modern == 'auto' and helper_emulated_legacy == 'auto' \
and agent_modern == 'auto' and agent_legacy == 'auto' \
and agent_emulated_modern == 'auto' and agent_emulated_legacy == 'auto'
if no_overridden_compat_bits
build_py = [python, files('build.py')]
components = []
if build_gadget
components += 'gadget'
endif
if build_server
components += 'server'
endif
setup_result = run_command(build_py,
'setup',
meson.is_subproject() ? 'subproject' : 'project',
meson.current_build_dir(),
meson.global_build_root(),
frida_version,
host_os,
host_abi,
host_config,
','.join(get_option('compat')),
get_option('assets'),
','.join(components),
'--',
'>>>', cc.cmd_array(), '<<<',
'>>>', cpp.cmd_array(), '<<<',
check: true
)
setup_output = setup_result.stdout().strip()
if setup_output.startswith('error ')
error('compat/build.py setup failed:', setup_output.substring(6))
endif
lines = setup_output.split('\n')
assert(lines[0] == 'ok')
compat_summary = lines[1]
varnames = lines[2].split(',')
outputs = lines[3].split(',')
depfile = lines[4]
state = lines[5]
if host_os_family == 'darwin'
install = false
install_dir = asset_dir
else
install = true
install_dir = []
foreach varname : varnames
if varname != 'arch_support_bundle' and (get_option('assets') == 'installed' or varname.startswith('gadget_'))
install_dir += varname.endswith('_modern') ? asset_dir_modern : asset_dir_legacy
else
install_dir += false
endif
endforeach
endif
arch_support = custom_target('arch-support',
output: outputs,
command: [
build_py,
'compile',
'@PRIVATE_DIR@',
state,
],
depfile: depfile,
install: install,
install_dir: install_dir,
)
i = 0
foreach output : arch_support.to_list()
outpath = output.full_path()
varname = varnames[i]
set_variable(varname, outpath)
if varname.startswith('helper_')
helper_compat = outpath
helper_depends += arch_support
elif varname.startswith('agent_')
agent_compat = outpath
agent_depends += arch_support
elif varname.startswith('gadget_')
gadget_compat = outpath
gadget_depends += arch_support
elif varname.startswith('server_')
server_compat = outpath
server_depends += arch_support
elif varname != 'arch_support_bundle'
assert(false, f'unexpected variable name: @varname@')
endif
i += 1
endforeach
else
compat_summary = 'not available due to externally provided helper/agent assets'
endif
Vendored Executable
+18
View File
@@ -0,0 +1,18 @@
#!/bin/sh
[ -z "$PYTHON" ] && PYTHON=$(which python3 >/dev/null && echo python3 || echo python)
cd $(dirname $0)
srcroot=$(pwd)
if [ ! -f releng/meson/meson.py ]; then
git submodule update --init --recursive --depth 1 || exit $?
fi
cd - >/dev/null
exec "$PYTHON" \
-c "import sys; sys.path.insert(0, sys.argv[1]); from releng.meson_configure import main; main()" \
"$srcroot" \
"$@"
+22
View File
@@ -0,0 +1,22 @@
@setlocal
@echo off
rem:: Based on: https://github.com/microsoft/terminal/issues/217#issuecomment-737594785
goto :_start_
:set_real_dp0
set dp0=%~dp0
set "dp0=%dp0:~0,-1%"
goto :eof
:_start_
call :set_real_dp0
if not exist "%dp0%\releng\meson\meson.py" (
pushd "%dp0%" & git submodule update --init --recursive --depth 1 & popd
if %errorlevel% neq 0 exit /b %errorlevel%
)
endlocal & goto #_undefined_# 2>nul || title %COMSPEC% & python ^
-c "import sys; sys.path.insert(0, sys.argv[1]); from releng.meson_configure import main; main()" ^
"%dp0%" ^
%*
-949
View File
@@ -1,949 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B7DC9B02-A5FF-4AA1-B2A2-DC1653168D44}</ProjectGuid>
<RootNamespace>frida</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)src;$(IntDir)data;$(IntDir)..\frida-base-32;$(IntDir)..\frida-pipe-32;$(IntDir)..\frida-helper-backend-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<Lib>
<AdditionalDependencies>frida-base-32.lib;frida-pipe-32.lib;frida-helper-backend-32.lib;$(IntDir)data\frida-data-compiler-blob.obj;$(IntDir)data\frida-data-helper-blob.obj;$(IntDir)data\frida-data-agent-blob.obj;$(IntDir)data\frida-data-barebone-blob.obj;gum-32.lib;gumjs-inspector.lib;setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(IntDir)..\frida-base-32;$(IntDir)..\frida-pipe-32;$(IntDir)..\frida-helper-backend-32;$(IntDir)..\gum-32;$(IntDir)..\gumjs-inspector;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)src;$(IntDir)data;$(IntDir)..\frida-base-32;$(IntDir)..\frida-pipe-32;$(IntDir)..\frida-helper-backend-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<Lib>
<AdditionalDependencies>frida-base-32.lib;frida-pipe-32.lib;frida-helper-backend-32.lib;$(IntDir)data\frida-data-compiler-blob.obj;$(IntDir)data\frida-data-helper-blob.obj;$(IntDir)data\frida-data-agent-blob.obj;$(IntDir)data\frida-data-barebone-blob.obj;gum-32.lib;gumjs-inspector.lib;setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(IntDir)..\frida-base-32;$(IntDir)..\frida-pipe-32;$(IntDir)..\frida-helper-backend-32;$(IntDir)..\gum-32;$(IntDir)..\gumjs-inspector;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)src;$(IntDir)data;$(IntDir)..\frida-base-64;$(IntDir)..\frida-pipe-64;$(IntDir)..\frida-helper-backend-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<Lib>
<AdditionalDependencies>frida-base-64.lib;frida-pipe-64.lib;frida-helper-backend-64.lib;$(IntDir)data\frida-data-compiler-blob.obj;$(IntDir)data\frida-data-helper-blob.obj;$(IntDir)data\frida-data-agent-blob.obj;$(IntDir)data\frida-data-barebone-blob.obj;gum-64.lib;gumjs-inspector.lib;setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(IntDir)..\frida-base-64;$(IntDir)..\frida-pipe-64;$(IntDir)..\frida-helper-backend-64;$(IntDir)..\gum-64;$(IntDir)..\gumjs-inspector;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)src;$(IntDir)data;$(IntDir)..\frida-base-64;$(IntDir)..\frida-pipe-64;$(IntDir)..\frida-helper-backend-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<Lib>
<AdditionalDependencies>frida-base-64.lib;frida-pipe-64.lib;frida-helper-backend-64.lib;$(IntDir)data\frida-data-compiler-blob.obj;$(IntDir)data\frida-data-helper-blob.obj;$(IntDir)data\frida-data-agent-blob.obj;$(IntDir)data\frida-data-barebone-blob.obj;gum-64.lib;gumjs-inspector.lib;setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(IntDir)..\frida-base-64;$(IntDir)..\frida-pipe-64;$(IntDir)..\frida-helper-backend-64;$(IntDir)..\gum-64;$(IntDir)..\gumjs-inspector;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="src\helper.resources">
<FileType>Document</FileType>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-helper-32\frida-helper-32.exe;$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-helper-64\frida-helper-64.exe;%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-helper-32\frida-helper-32.exe;$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-helper-64\frida-helper-64.exe;%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-helper-32\frida-helper-32.exe;$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-helper-64\frida-helper-64.exe;%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-helper-32\frida-helper-32.exe;$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-helper-64\frida-helper-64.exe;%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Serializing Helper resources</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)data\windows.stamp</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Serializing Helper resources</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)data\windows.stamp</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Serializing Helper resources</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)data\windows.stamp</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Serializing Helper resources</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)data\windows.stamp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">mkdir "$(IntDir)data" 2&gt;NUL
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\helper.resources" -o "$(IntDir)data\frida-data-helper" "$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-helper-32\frida-helper-32.exe" "$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-helper-64\frida-helper-64.exe" || exit 1
REM. &gt; "$(IntDir)data\windows.stamp"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">mkdir "$(IntDir)data" 2&gt;NUL
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\helper.resources" -o "$(IntDir)data\frida-data-helper" "$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-helper-32\frida-helper-32.exe" "$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-helper-64\frida-helper-64.exe" || exit 1
REM. &gt; "$(IntDir)data\windows.stamp"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">mkdir "$(IntDir)data" 2&gt;NUL
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\helper.resources" -o "$(IntDir)data\frida-data-helper" "$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-helper-32\frida-helper-32.exe" "$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-helper-64\frida-helper-64.exe" || exit 1
REM. &gt; "$(IntDir)data\windows.stamp"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">mkdir "$(IntDir)data" 2&gt;NUL
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\helper.resources" -o "$(IntDir)data\frida-data-helper" "$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-helper-32\frida-helper-32.exe" "$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-helper-64\frida-helper-64.exe" || exit 1
REM. &gt; "$(IntDir)data\windows.stamp"
</Command>
</CustomBuild>
<CustomBuild Include="src\agent.resources">
<FileType>Document</FileType>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-agent-32\frida-agent-32.dll;$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-agent-64\frida-agent-64.dll;$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-32.dll;$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-64.dll;$(SolutionDir)frida-gum\ext\symsrv\symsrv-32.dll;$(SolutionDir)frida-gum\ext\symsrv\symsrv-64.dll;%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-agent-32\frida-agent-32.dll;$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-agent-64\frida-agent-64.dll;$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-32.dll;$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-64.dll;$(SolutionDir)frida-gum\ext\symsrv\symsrv-32.dll;$(SolutionDir)frida-gum\ext\symsrv\symsrv-64.dll;%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-agent-32\frida-agent-32.dll;$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-agent-64\frida-agent-64.dll;$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-32.dll;$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-64.dll;$(SolutionDir)frida-gum\ext\symsrv\symsrv-32.dll;$(SolutionDir)frida-gum\ext\symsrv\symsrv-64.dll;%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-agent-32\frida-agent-32.dll;$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-agent-64\frida-agent-64.dll;$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-32.dll;$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-64.dll;$(SolutionDir)frida-gum\ext\symsrv\symsrv-32.dll;$(SolutionDir)frida-gum\ext\symsrv\symsrv-64.dll;%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Serializing Agent resources</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)data\agent.stamp</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Serializing Agent resources</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)data\agent.stamp</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Serializing Agent resources</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)data\agent.stamp</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Serializing Agent resources</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)data\agent.stamp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">mkdir "$(IntDir)data" 2&gt;NUL
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\agent.resources" -o "$(IntDir)data\frida-data-agent" "$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-agent-32\frida-agent-32.dll" "$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-agent-64\frida-agent-64.dll" "$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-32.dll" "$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-64.dll" "$(SolutionDir)frida-gum\ext\symsrv\symsrv-32.dll" "$(SolutionDir)frida-gum\ext\symsrv\symsrv-64.dll" || exit 1
REM. &gt; "$(IntDir)data\agent.stamp"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">mkdir "$(IntDir)data" 2&gt;NUL
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\agent.resources" -o "$(IntDir)data\frida-data-agent" "$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-agent-32\frida-agent-32.dll" "$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-agent-64\frida-agent-64.dll" "$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-32.dll" "$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-64.dll" "$(SolutionDir)frida-gum\ext\symsrv\symsrv-32.dll" "$(SolutionDir)frida-gum\ext\symsrv\symsrv-64.dll" || exit 1
REM. &gt; "$(IntDir)data\agent.stamp"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">mkdir "$(IntDir)data" 2&gt;NUL
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\agent.resources" -o "$(IntDir)data\frida-data-agent" "$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-agent-32\frida-agent-32.dll" "$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-agent-64\frida-agent-64.dll" "$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-32.dll" "$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-64.dll" "$(SolutionDir)frida-gum\ext\symsrv\symsrv-32.dll" "$(SolutionDir)frida-gum\ext\symsrv\symsrv-64.dll" || exit 1
REM. &gt; "$(IntDir)data\agent.stamp"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">mkdir "$(IntDir)data" 2&gt;NUL
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\agent.resources" -o "$(IntDir)data\frida-data-agent" "$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-agent-32\frida-agent-32.dll" "$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-agent-64\frida-agent-64.dll" "$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-32.dll" "$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-64.dll" "$(SolutionDir)frida-gum\ext\symsrv\symsrv-32.dll" "$(SolutionDir)frida-gum\ext\symsrv\symsrv-64.dll" || exit 1
REM. &gt; "$(IntDir)data\agent.stamp"
</Command>
</CustomBuild>
<CustomBuild Include="src\frida.vala">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Compiling vala code</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">mkdir "$(IntDir)data" 2&gt;NUL
mkdir "$(IntDir)src" 2&gt;NUL
"$(ValaCompiler)" src/frida.vala src/control-service.vala src/portal-service.vala src/host-session-service.vala src/agent-container.vala src/gdb.vala src/system.vala src/compiler/compiler.vala src/file-monitor.vala src/async-task.vala src/windows/windows-host-session.vala src/windows/winjector.vala src/windows/frida-helper-process.vala src/socket/socket-host-session.vala src/fruity/fruity-host-session.vala src/fruity/dtx.vala src/fruity/lockdown.vala src/fruity/installation-proxy.vala src/fruity/springboard-services.vala src/fruity/lldb.vala src/fruity/injector.vala src/fruity/usbmux.vala src/fruity/keyed-archive.vala src/fruity/plist.vala src/fruity/plist-service.vala src/droidy/droidy-host-session.vala src/droidy/droidy-client.vala src/droidy/jdwp.vala src/droidy/injector.vala src/droidy/axml.vala src/barebone/barebone-host-session.vala src/barebone/script.vala src/barebone/machine.vala src/barebone/allocator.vala src/barebone/callback.vala src/barebone/memory-scanner.vala src/barebone/interceptor.vala src/barebone/rust-module.vala src/barebone/arch-x86/machine.vala src/barebone/arch-x86_64/machine.vala src/barebone/arch-arm/machine.vala src/barebone/arch-arm64/machine.vala src/barebone/arch-unknown/machine.vala --ccode --directory=$(IntDir) --library=frida-core --gir=Frida-1.0.gir --header=$(IntDir)frida-core.h --symbols=$(IntDir)frida-core.symbols --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-pipe-32" --vapidir="$(IntDir)..\frida-pipe-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" --vapidir="$(IntDir)data" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gmodule-2.0 --pkg=gio-2.0 --pkg=nice --pkg=gioopenssl --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=libsoup-3.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-inspector-1.0 --pkg=libbrotlidec --pkg=quickjs --pkg=frida-base --pkg=frida-pipe --pkg=frida-helper-backend --pkg=frida-data-compiler --pkg=frida-data-helper --pkg=frida-data-agent --pkg=frida-data-barebone || exit 1
mkdir "$(IntDir)api" 2&gt;NUL
$(Python) "$(ProjectDir)src\api\generate.py" 1.0 "$(IntDir)frida-core.vapi" "$(IntDir)frida-core.h" "$(IntDir)..\frida-base-32\frida-base.vapi" "$(IntDir)..\frida-base-32\frida-base.h" "$(IntDir)api"
echo &gt; "$(IntDir)valacode.stamp"
</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ValaCompiler);$(ProjectDir)src\control-service.vala;$(ProjectDir)src\portal-service.vala;$(ProjectDir)src\host-session-service.vala;$(ProjectDir)src\agent-container.vala;$(ProjectDir)src\gdb.vala;$(ProjectDir)src\system.vala;$(ProjectDir)src\compiler\compiler.vala;$(ProjectDir)src\file-monitor.vala;$(ProjectDir)src\async-task.vala;$(ProjectDir)src\windows\windows-host-session.vala;$(ProjectDir)src\windows\winjector.vala;$(ProjectDir)src\windows\frida-helper-process.vala;$(ProjectDir)src\socket\socket-host-session.vala;$(ProjectDir)src\fruity\fruity-host-session.vala;$(ProjectDir)src\fruity\dtx.vala;$(ProjectDir)src\fruity\lockdown.vala;$(ProjectDir)src\fruity\installation-proxy.vala;$(ProjectDir)src\fruity\springboard-services.vala;$(ProjectDir)src\fruity\lldb.vala;$(ProjectDir)src\fruity\injector.vala;$(ProjectDir)src\fruity\usbmux.vala;$(ProjectDir)src\fruity\keyed-archive.vala;$(ProjectDir)src\fruity\plist.vala;$(ProjectDir)src\fruity\plist-service.vala;$(ProjectDir)src\droidy\droidy-host-session.vala;$(ProjectDir)src\droidy\droidy-client.vala;$(ProjectDir)src\droidy\jdwp.vala;$(ProjectDir)src\droidy\injector.vala;$(ProjectDir)src\droidy\axml.vala;$(ProjectDir)src\barebone\barebone-host-session.vala;$(ProjectDir)src\barebone\script.vala;$(ProjectDir)src\barebone\machine.vala;$(ProjectDir)src\barebone\allocator.vala;$(ProjectDir)src\barebone\callback.vala;$(ProjectDir)src\barebone\memory-scanner.vala;$(ProjectDir)src\barebone\interceptor.vala;$(ProjectDir)src\barebone\rust-module.vala;$(ProjectDir)src\barebone\arch-x86\machine.vala;$(ProjectDir)src\barebone\arch-x86_64\machine.vala;$(ProjectDir)src\barebone\arch-arm\machine.vala;$(ProjectDir)src\barebone\arch-arm64\machine.vala;$(ProjectDir)src\barebone\arch-unknown\machine.vala;$(IntDir)data\compiler.stamp;$(IntDir)data\windows.stamp;$(IntDir)data\agent.stamp;$(IntDir)data\barebone.stamp;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Compiling vala code</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">mkdir "$(IntDir)data" 2&gt;NUL
mkdir "$(IntDir)src" 2&gt;NUL
"$(ValaCompiler)" src/frida.vala src/control-service.vala src/portal-service.vala src/host-session-service.vala src/agent-container.vala src/gdb.vala src/system.vala src/compiler/compiler.vala src/file-monitor.vala src/async-task.vala src/windows/windows-host-session.vala src/windows/winjector.vala src/windows/frida-helper-process.vala src/socket/socket-host-session.vala src/fruity/fruity-host-session.vala src/fruity/dtx.vala src/fruity/lockdown.vala src/fruity/installation-proxy.vala src/fruity/springboard-services.vala src/fruity/lldb.vala src/fruity/injector.vala src/fruity/usbmux.vala src/fruity/keyed-archive.vala src/fruity/plist.vala src/fruity/plist-service.vala src/droidy/droidy-host-session.vala src/droidy/droidy-client.vala src/droidy/jdwp.vala src/droidy/injector.vala src/droidy/axml.vala src/barebone/barebone-host-session.vala src/barebone/script.vala src/barebone/machine.vala src/barebone/allocator.vala src/barebone/callback.vala src/barebone/memory-scanner.vala src/barebone/interceptor.vala src/barebone/rust-module.vala src/barebone/arch-x86/machine.vala src/barebone/arch-x86_64/machine.vala src/barebone/arch-arm/machine.vala src/barebone/arch-arm64/machine.vala src/barebone/arch-unknown/machine.vala --ccode --directory=$(IntDir) --library=frida-core --gir=Frida-1.0.gir --header=$(IntDir)frida-core.h --symbols=$(IntDir)frida-core.symbols --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-pipe-32" --vapidir="$(IntDir)..\frida-pipe-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" --vapidir="$(IntDir)data" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gmodule-2.0 --pkg=gio-2.0 --pkg=nice --pkg=gioopenssl --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=libsoup-3.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-inspector-1.0 --pkg=libbrotlidec --pkg=quickjs --pkg=frida-base --pkg=frida-pipe --pkg=frida-helper-backend --pkg=frida-data-compiler --pkg=frida-data-helper --pkg=frida-data-agent --pkg=frida-data-barebone || exit 1
mkdir "$(IntDir)api" 2&gt;NUL
$(Python) "$(ProjectDir)src\api\generate.py" 1.0 "$(IntDir)frida-core.vapi" "$(IntDir)frida-core.h" "$(IntDir)..\frida-base-64\frida-base.vapi" "$(IntDir)..\frida-base-64\frida-base.h" "$(IntDir)api"
echo &gt; "$(IntDir)valacode.stamp"
</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ValaCompiler);$(ProjectDir)src\control-service.vala;$(ProjectDir)src\portal-service.vala;$(ProjectDir)src\host-session-service.vala;$(ProjectDir)src\agent-container.vala;$(ProjectDir)src\gdb.vala;$(ProjectDir)src\system.vala;$(ProjectDir)src\compiler\compiler.vala;$(ProjectDir)src\file-monitor.vala;$(ProjectDir)src\async-task.vala;$(ProjectDir)src\windows\windows-host-session.vala;$(ProjectDir)src\windows\winjector.vala;$(ProjectDir)src\windows\frida-helper-process.vala;$(ProjectDir)src\socket\socket-host-session.vala;$(ProjectDir)src\fruity\fruity-host-session.vala;$(ProjectDir)src\fruity\dtx.vala;$(ProjectDir)src\fruity\lockdown.vala;$(ProjectDir)src\fruity\installation-proxy.vala;$(ProjectDir)src\fruity\springboard-services.vala;$(ProjectDir)src\fruity\lldb.vala;$(ProjectDir)src\fruity\injector.vala;$(ProjectDir)src\fruity\usbmux.vala;$(ProjectDir)src\fruity\keyed-archive.vala;$(ProjectDir)src\fruity\plist.vala;$(ProjectDir)src\fruity\plist-service.vala;$(ProjectDir)src\droidy\droidy-host-session.vala;$(ProjectDir)src\droidy\droidy-client.vala;$(ProjectDir)src\droidy\jdwp.vala;$(ProjectDir)src\droidy\injector.vala;$(ProjectDir)src\droidy\axml.vala;$(ProjectDir)src\barebone\barebone-host-session.vala;$(ProjectDir)src\barebone\script.vala;$(ProjectDir)src\barebone\machine.vala;$(ProjectDir)src\barebone\allocator.vala;$(ProjectDir)src\barebone\callback.vala;$(ProjectDir)src\barebone\memory-scanner.vala;$(ProjectDir)src\barebone\interceptor.vala;$(ProjectDir)src\barebone\rust-module.vala;$(ProjectDir)src\barebone\arch-x86\machine.vala;$(ProjectDir)src\barebone\arch-x86_64\machine.vala;$(ProjectDir)src\barebone\arch-arm\machine.vala;$(ProjectDir)src\barebone\arch-arm64\machine.vala;$(ProjectDir)src\barebone\arch-unknown\machine.vala;$(IntDir)data\compiler.stamp;$(IntDir)data\windows.stamp;$(IntDir)data\agent.stamp;$(IntDir)data\barebone.stamp;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compiling vala code</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">mkdir "$(IntDir)data" 2&gt;NUL
mkdir "$(IntDir)src" 2&gt;NUL
"$(ValaCompiler)" src/frida.vala src/control-service.vala src/portal-service.vala src/host-session-service.vala src/agent-container.vala src/gdb.vala src/system.vala src/compiler/compiler.vala src/file-monitor.vala src/async-task.vala src/windows/windows-host-session.vala src/windows/winjector.vala src/windows/frida-helper-process.vala src/socket/socket-host-session.vala src/fruity/fruity-host-session.vala src/fruity/dtx.vala src/fruity/lockdown.vala src/fruity/installation-proxy.vala src/fruity/springboard-services.vala src/fruity/lldb.vala src/fruity/injector.vala src/fruity/usbmux.vala src/fruity/keyed-archive.vala src/fruity/plist.vala src/fruity/plist-service.vala src/droidy/droidy-host-session.vala src/droidy/droidy-client.vala src/droidy/jdwp.vala src/droidy/injector.vala src/droidy/axml.vala src/barebone/barebone-host-session.vala src/barebone/script.vala src/barebone/machine.vala src/barebone/allocator.vala src/barebone/callback.vala src/barebone/memory-scanner.vala src/barebone/interceptor.vala src/barebone/rust-module.vala src/barebone/arch-x86/machine.vala src/barebone/arch-x86_64/machine.vala src/barebone/arch-arm/machine.vala src/barebone/arch-arm64/machine.vala src/barebone/arch-unknown/machine.vala --ccode --directory=$(IntDir) --library=frida-core --gir=Frida-1.0.gir --header=$(IntDir)frida-core.h --symbols=$(IntDir)frida-core.symbols --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-pipe-32" --vapidir="$(IntDir)..\frida-pipe-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" --vapidir="$(IntDir)data" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gmodule-2.0 --pkg=gio-2.0 --pkg=nice --pkg=gioopenssl --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=libsoup-3.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-inspector-1.0 --pkg=libbrotlidec --pkg=quickjs --pkg=frida-base --pkg=frida-pipe --pkg=frida-helper-backend --pkg=frida-data-compiler --pkg=frida-data-helper --pkg=frida-data-agent --pkg=frida-data-barebone || exit 1
mkdir "$(IntDir)api" 2&gt;NUL
$(Python) "$(ProjectDir)src\api\generate.py" 1.0 "$(IntDir)frida-core.vapi" "$(IntDir)frida-core.h" "$(IntDir)..\frida-base-32\frida-base.vapi" "$(IntDir)..\frida-base-32\frida-base.h" "$(IntDir)api"
echo &gt; "$(IntDir)valacode.stamp"
</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ValaCompiler);$(ProjectDir)src\control-service.vala;$(ProjectDir)src\portal-service.vala;$(ProjectDir)src\host-session-service.vala;$(ProjectDir)src\agent-container.vala;$(ProjectDir)src\gdb.vala;$(ProjectDir)src\system.vala;$(ProjectDir)src\compiler\compiler.vala;$(ProjectDir)src\file-monitor.vala;$(ProjectDir)src\async-task.vala;$(ProjectDir)src\windows\windows-host-session.vala;$(ProjectDir)src\windows\winjector.vala;$(ProjectDir)src\windows\frida-helper-process.vala;$(ProjectDir)src\socket\socket-host-session.vala;$(ProjectDir)src\fruity\fruity-host-session.vala;$(ProjectDir)src\fruity\dtx.vala;$(ProjectDir)src\fruity\lockdown.vala;$(ProjectDir)src\fruity\installation-proxy.vala;$(ProjectDir)src\fruity\springboard-services.vala;$(ProjectDir)src\fruity\lldb.vala;$(ProjectDir)src\fruity\injector.vala;$(ProjectDir)src\fruity\usbmux.vala;$(ProjectDir)src\fruity\keyed-archive.vala;$(ProjectDir)src\fruity\plist.vala;$(ProjectDir)src\fruity\plist-service.vala;$(ProjectDir)src\droidy\droidy-host-session.vala;$(ProjectDir)src\droidy\droidy-client.vala;$(ProjectDir)src\droidy\jdwp.vala;$(ProjectDir)src\droidy\injector.vala;$(ProjectDir)src\droidy\axml.vala;$(ProjectDir)src\barebone\barebone-host-session.vala;$(ProjectDir)src\barebone\script.vala;$(ProjectDir)src\barebone\machine.vala;$(ProjectDir)src\barebone\allocator.vala;$(ProjectDir)src\barebone\callback.vala;$(ProjectDir)src\barebone\memory-scanner.vala;$(ProjectDir)src\barebone\interceptor.vala;$(ProjectDir)src\barebone\rust-module.vala;$(ProjectDir)src\barebone\arch-x86\machine.vala;$(ProjectDir)src\barebone\arch-x86_64\machine.vala;$(ProjectDir)src\barebone\arch-arm\machine.vala;$(ProjectDir)src\barebone\arch-arm64\machine.vala;$(ProjectDir)src\barebone\arch-unknown\machine.vala;$(IntDir)data\compiler.stamp;$(IntDir)data\windows.stamp;$(IntDir)data\agent.stamp;$(IntDir)data\barebone.stamp;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Compiling vala code</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">mkdir "$(IntDir)data" 2&gt;NUL
mkdir "$(IntDir)src" 2&gt;NUL
"$(ValaCompiler)" src/frida.vala src/control-service.vala src/portal-service.vala src/host-session-service.vala src/agent-container.vala src/gdb.vala src/system.vala src/compiler/compiler.vala src/file-monitor.vala src/async-task.vala src/windows/windows-host-session.vala src/windows/winjector.vala src/windows/frida-helper-process.vala src/socket/socket-host-session.vala src/fruity/fruity-host-session.vala src/fruity/dtx.vala src/fruity/lockdown.vala src/fruity/installation-proxy.vala src/fruity/springboard-services.vala src/fruity/lldb.vala src/fruity/injector.vala src/fruity/usbmux.vala src/fruity/keyed-archive.vala src/fruity/plist.vala src/fruity/plist-service.vala src/droidy/droidy-host-session.vala src/droidy/droidy-client.vala src/droidy/jdwp.vala src/droidy/injector.vala src/droidy/axml.vala src/barebone/barebone-host-session.vala src/barebone/script.vala src/barebone/machine.vala src/barebone/allocator.vala src/barebone/callback.vala src/barebone/memory-scanner.vala src/barebone/interceptor.vala src/barebone/rust-module.vala src/barebone/arch-x86/machine.vala src/barebone/arch-x86_64/machine.vala src/barebone/arch-arm/machine.vala src/barebone/arch-arm64/machine.vala src/barebone/arch-unknown/machine.vala --ccode --directory=$(IntDir) --library=frida-core --gir=Frida-1.0.gir --header=$(IntDir)frida-core.h --symbols=$(IntDir)frida-core.symbols --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-pipe-32" --vapidir="$(IntDir)..\frida-pipe-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" --vapidir="$(IntDir)data" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gmodule-2.0 --pkg=gio-2.0 --pkg=nice --pkg=gioopenssl --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=libsoup-3.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-inspector-1.0 --pkg=libbrotlidec --pkg=quickjs --pkg=frida-base --pkg=frida-pipe --pkg=frida-helper-backend --pkg=frida-data-compiler --pkg=frida-data-helper --pkg=frida-data-agent --pkg=frida-data-barebone || exit 1
mkdir "$(IntDir)api" 2&gt;NUL
$(Python) "$(ProjectDir)src\api\generate.py" 1.0 "$(IntDir)frida-core.vapi" "$(IntDir)frida-core.h" "$(IntDir)..\frida-base-64\frida-base.vapi" "$(IntDir)..\frida-base-64\frida-base.h" "$(IntDir)api"
echo &gt; "$(IntDir)valacode.stamp"
</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ValaCompiler);$(ProjectDir)src\control-service.vala;$(ProjectDir)src\portal-service.vala;$(ProjectDir)src\host-session-service.vala;$(ProjectDir)src\agent-container.vala;$(ProjectDir)src\gdb.vala;$(ProjectDir)src\system.vala;$(ProjectDir)src\compiler\compiler.vala;$(ProjectDir)src\file-monitor.vala;$(ProjectDir)src\async-task.vala;$(ProjectDir)src\windows\windows-host-session.vala;$(ProjectDir)src\windows\winjector.vala;$(ProjectDir)src\windows\frida-helper-process.vala;$(ProjectDir)src\socket\socket-host-session.vala;$(ProjectDir)src\fruity\fruity-host-session.vala;$(ProjectDir)src\fruity\dtx.vala;$(ProjectDir)src\fruity\lockdown.vala;$(ProjectDir)src\fruity\installation-proxy.vala;$(ProjectDir)src\fruity\springboard-services.vala;$(ProjectDir)src\fruity\lldb.vala;$(ProjectDir)src\fruity\injector.vala;$(ProjectDir)src\fruity\usbmux.vala;$(ProjectDir)src\fruity\keyed-archive.vala;$(ProjectDir)src\fruity\plist.vala;$(ProjectDir)src\fruity\plist-service.vala;$(ProjectDir)src\droidy\droidy-host-session.vala;$(ProjectDir)src\droidy\droidy-client.vala;$(ProjectDir)src\droidy\jdwp.vala;$(ProjectDir)src\droidy\injector.vala;$(ProjectDir)src\droidy\axml.vala;$(ProjectDir)src\barebone\barebone-host-session.vala;$(ProjectDir)src\barebone\script.vala;$(ProjectDir)src\barebone\machine.vala;$(ProjectDir)src\barebone\allocator.vala;$(ProjectDir)src\barebone\callback.vala;$(ProjectDir)src\barebone\memory-scanner.vala;$(ProjectDir)src\barebone\interceptor.vala;$(ProjectDir)src\barebone\rust-module.vala;$(ProjectDir)src\barebone\arch-x86\machine.vala;$(ProjectDir)src\barebone\arch-x86_64\machine.vala;$(ProjectDir)src\barebone\arch-arm\machine.vala;$(ProjectDir)src\barebone\arch-arm64\machine.vala;$(ProjectDir)src\barebone\arch-unknown\machine.vala;$(IntDir)data\compiler.stamp;$(IntDir)data\windows.stamp;$(IntDir)data\agent.stamp;$(IntDir)data\barebone.stamp;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="src\compiler\compiler.resources">
<FileType>Document</FileType>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;src\compiler\generate-agent.py;src\compiler\agent-entrypoint.js;src\compiler\agent-core.ts;src\compiler\agent-warmup.js;src\compiler\package.json;src\compiler\package-lock.json;src\compiler\tsconfig.json;src\compiler\rollup.config.agent-core.ts;src\compiler\rollup.config.typescript.ts;%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;src\compiler\generate-agent.py;src\compiler\agent-entrypoint.js;src\compiler\agent-core.ts;src\compiler\agent-warmup.js;src\compiler\package.json;src\compiler\package-lock.json;src\compiler\tsconfig.json;src\compiler\rollup.config.agent-core.ts;src\compiler\rollup.config.typescript.ts;%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;src\compiler\generate-agent.py;src\compiler\agent-entrypoint.js;src\compiler\agent-core.ts;src\compiler\agent-warmup.js;src\compiler\package.json;src\compiler\package-lock.json;src\compiler\tsconfig.json;src\compiler\rollup.config.agent-core.ts;src\compiler\rollup.config.typescript.ts;%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;src\compiler\generate-agent.py;src\compiler\agent-entrypoint.js;src\compiler\agent-core.ts;src\compiler\agent-warmup.js;src\compiler\package.json;src\compiler\package-lock.json;src\compiler\tsconfig.json;src\compiler\rollup.config.agent-core.ts;src\compiler\rollup.config.typescript.ts;%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Serializing compiler resources</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)data\compiler.stamp</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Serializing compiler resources</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)data\compiler.stamp</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Serializing compiler resources</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)data\compiler.stamp</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Serializing compiler resources</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)data\compiler.stamp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">if $(ProcessorArchitecture)==amd64 (
set host_arch=x64
set cpu_mode=64
set v8_mksnapshot=$(SolutionDir)build\sdk-windows\x64-Release\bin\windows-x86_64\v8-mksnapshot-windows-x86_64.exe
) else (
set host_arch=ia32
set cpu_mode=32
set v8_mksnapshot=$(SolutionDir)build\sdk-windows\Win32-Release\bin\windows-x86\v8-mksnapshot-windows-x86.exe
)
if $(Configuration)==Debug (
set v8_mksnapshot=""
)
$(Python) src\compiler\generate-agent.py src\compiler "$(IntDir)src\compiler" windows %host_arch% %cpu_mode% %v8_mksnapshot% || exit 1
mkdir "$(IntDir)data" 2&gt;NUL
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\compiler\compiler.resources" -o "$(IntDir)data\frida-data-compiler" "$(IntDir)src\compiler\agent.js" "$(IntDir)src\compiler\snapshot.bin" || exit 1
REM. &gt; "$(IntDir)data\compiler.stamp"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">if $(ProcessorArchitecture)==amd64 (
set host_arch=x64
set cpu_mode=64
set v8_mksnapshot=$(SolutionDir)build\sdk-windows\x64-Release\bin\windows-x86_64\v8-mksnapshot-windows-x86_64.exe
) else (
set host_arch=ia32
set cpu_mode=32
set v8_mksnapshot=$(SolutionDir)build\sdk-windows\Win32-Release\bin\windows-x86\v8-mksnapshot-windows-x86.exe
)
if $(Configuration)==Debug (
set v8_mksnapshot=""
)
$(Python) src\compiler\generate-agent.py src\compiler "$(IntDir)src\compiler" windows %host_arch% %cpu_mode% %v8_mksnapshot% || exit 1
mkdir "$(IntDir)data" 2&gt;NUL
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\compiler\compiler.resources" -o "$(IntDir)data\frida-data-compiler" "$(IntDir)src\compiler\agent.js" "$(IntDir)src\compiler\snapshot.bin" || exit 1
REM. &gt; "$(IntDir)data\compiler.stamp"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">if $(ProcessorArchitecture)==amd64 (
set host_arch=x64
set cpu_mode=64
set v8_mksnapshot=$(SolutionDir)build\sdk-windows\x64-Release\bin\windows-x86_64\v8-mksnapshot-windows-x86_64.exe
) else (
set host_arch=ia32
set cpu_mode=32
set v8_mksnapshot=$(SolutionDir)build\sdk-windows\Win32-Release\bin\windows-x86\v8-mksnapshot-windows-x86.exe
)
if $(Configuration)==Debug (
set v8_mksnapshot=""
)
$(Python) src\compiler\generate-agent.py src\compiler "$(IntDir)src\compiler" windows %host_arch% %cpu_mode% %v8_mksnapshot% || exit 1
mkdir "$(IntDir)data" 2&gt;NUL
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\compiler\compiler.resources" -o "$(IntDir)data\frida-data-compiler" "$(IntDir)src\compiler\agent.js" "$(IntDir)src\compiler\snapshot.bin" || exit 1
REM. &gt; "$(IntDir)data\compiler.stamp"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">if $(ProcessorArchitecture)==amd64 (
set host_arch=x64
set cpu_mode=64
set v8_mksnapshot=$(SolutionDir)build\sdk-windows\x64-Release\bin\windows-x86_64\v8-mksnapshot-windows-x86_64.exe
) else (
set host_arch=ia32
set cpu_mode=32
set v8_mksnapshot=$(SolutionDir)build\sdk-windows\Win32-Release\bin\windows-x86\v8-mksnapshot-windows-x86.exe
)
if $(Configuration)==Debug (
set v8_mksnapshot=""
)
$(Python) src\compiler\generate-agent.py src\compiler "$(IntDir)src\compiler" windows %host_arch% %cpu_mode% %v8_mksnapshot% || exit 1
mkdir "$(IntDir)data" 2&gt;NUL
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\compiler\compiler.resources" -o "$(IntDir)data\frida-data-compiler" "$(IntDir)src\compiler\agent.js" "$(IntDir)src\compiler\snapshot.bin" || exit 1
REM. &gt; "$(IntDir)data\compiler.stamp"
</Command>
</CustomBuild>
<CustomBuild Include="src\barebone\barebone.resources">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Python) src\barebone\generate-script-runtime.py src\barebone "$(IntDir)src\barebone" || exit 1
mkdir "$(IntDir)data" 2&gt;NUL
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\barebone\barebone.resources" -o "$(IntDir)data\frida-data-barebone" "$(IntDir)src\barebone\script-runtime.js" src\barebone\helpers\memory-scanner-arm64.elf || exit 1
REM. &gt; "$(IntDir)data\barebone.stamp"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Python) src\barebone\generate-script-runtime.py src\barebone "$(IntDir)src\barebone" || exit 1
mkdir "$(IntDir)data" 2&gt;NUL
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\barebone\barebone.resources" -o "$(IntDir)data\frida-data-barebone" "$(IntDir)src\barebone\script-runtime.js" src\barebone\helpers\memory-scanner-arm64.elf || exit 1
REM. &gt; "$(IntDir)data\barebone.stamp"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Python) src\barebone\generate-script-runtime.py src\barebone "$(IntDir)src\barebone" || exit 1
mkdir "$(IntDir)data" 2&gt;NUL
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\barebone\barebone.resources" -o "$(IntDir)data\frida-data-barebone" "$(IntDir)src\barebone\script-runtime.js" src\barebone\helpers\memory-scanner-arm64.elf || exit 1
REM. &gt; "$(IntDir)data\barebone.stamp"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Python) src\barebone\generate-script-runtime.py src\barebone "$(IntDir)src\barebone" || exit 1
mkdir "$(IntDir)data" 2&gt;NUL
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\barebone\barebone.resources" -o "$(IntDir)data\frida-data-barebone" "$(IntDir)src\barebone\script-runtime.js" src\barebone\helpers\memory-scanner-arm64.elf || exit 1
REM. &gt; "$(IntDir)data\barebone.stamp"
</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Serializing Barebone resources</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)data\barebone.stamp</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;src\barebone\generate-script-runtime.py;src\barebone\package.json;src\barebone\package-lock.json;src\barebone\script-runtime\console.ts;src\barebone\script-runtime\entrypoint.ts;src\barebone\script-runtime\gdb.ts;src\barebone\script-runtime\hexdump.ts;src\barebone\script-runtime\message-dispatcher.ts;src\barebone\script-runtime\primitives.ts;%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Serializing Barebone resources</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)data\barebone.stamp</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;src\barebone\generate-script-runtime.py;src\barebone\package.json;src\barebone\package-lock.json;src\barebone\script-runtime\console.ts;src\barebone\script-runtime\entrypoint.ts;src\barebone\script-runtime\gdb.ts;src\barebone\script-runtime\hexdump.ts;src\barebone\script-runtime\message-dispatcher.ts;src\barebone\script-runtime\primitives.ts;%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Serializing Barebone resources</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)data\barebone.stamp</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;src\barebone\generate-script-runtime.py;src\barebone\package.json;src\barebone\package-lock.json;src\barebone\script-runtime\console.ts;src\barebone\script-runtime\entrypoint.ts;src\barebone\script-runtime\gdb.ts;src\barebone\script-runtime\hexdump.ts;src\barebone\script-runtime\message-dispatcher.ts;src\barebone\script-runtime\primitives.ts;%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Serializing Barebone resources</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)data\barebone.stamp</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;src\barebone\generate-script-runtime.py;src\barebone\package.json;src\barebone\package-lock.json;src\barebone\script-runtime\console.ts;src\barebone\script-runtime\entrypoint.ts;src\barebone\script-runtime\gdb.ts;src\barebone\script-runtime\hexdump.ts;src\barebone\script-runtime\message-dispatcher.ts;src\barebone\script-runtime\primitives.ts;%(AdditionalInputs)</AdditionalInputs>
</CustomBuild>
<None Include="src\control-service.vala" />
<None Include="src\portal-service.vala" />
<None Include="src\host-session-service.vala" />
<None Include="src\agent-container.vala" />
<None Include="src\gdb.vala" />
<None Include="src\system.vala" />
<None Include="src\compiler\compiler.vala" />
<None Include="src\file-monitor.vala" />
<None Include="src\async-task.vala" />
<None Include="src\windows\windows-host-session.vala" />
<None Include="src\windows\winjector.vala" />
<None Include="src\windows\frida-helper-process.vala" />
<None Include="src\socket\socket-host-session.vala" />
<None Include="src\fruity\fruity-host-session.vala" />
<None Include="src\fruity\dtx.vala" />
<None Include="src\fruity\lockdown.vala" />
<None Include="src\fruity\installation-proxy.vala" />
<None Include="src\fruity\springboard-services.vala" />
<None Include="src\fruity\lldb.vala" />
<None Include="src\fruity\injector.vala" />
<None Include="src\fruity\usbmux.vala" />
<None Include="src\fruity\keyed-archive.vala" />
<None Include="src\fruity\plist.vala" />
<None Include="src\fruity\plist-service.vala" />
<None Include="src\droidy\droidy-host-session.vala" />
<None Include="src\droidy\droidy-client.vala" />
<None Include="src\droidy\jdwp.vala" />
<None Include="src\droidy\injector.vala" />
<None Include="src\droidy\axml.vala" />
<None Include="src\barebone\barebone-host-session.vala" />
<None Include="src\barebone\script.vala" />
<None Include="src\barebone\machine.vala" />
<None Include="src\barebone\allocator.vala" />
<None Include="src\barebone\callback.vala" />
<None Include="src\barebone\memory-scanner.vala" />
<None Include="src\barebone\interceptor.vala" />
<None Include="src\barebone\rust-module.vala" />
<None Include="src\barebone\arch-x86\machine.vala" />
<None Include="src\barebone\arch-x86_64\machine.vala" />
<None Include="src\barebone\arch-arm\machine.vala" />
<None Include="src\barebone\arch-arm64\machine.vala" />
<None Include="src\barebone\arch-unknown\machine.vala" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)src\frida.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
</ClCompile>
<ClCompile Include="src\frida-glue.c">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\control-service.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\portal-service.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\host-session-service.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\agent-container.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\gdb.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\system.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\compiler\compiler.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\compiler\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\compiler\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\compiler\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\compiler\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\file-monitor.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\async-task.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\windows\windows-host-session.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\windows\</ObjectFileName>
</ClCompile>
<ClCompile Include="src\windows\frida-helper-process-glue.c" />
<ClCompile Include="src\windows\windows-host-session-glue.c">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\windows\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\windows\winjector.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\windows\</ObjectFileName>
</ClCompile>
<ClCompile Include="src\windows\winjector-glue.c">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\windows\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\windows\frida-helper-process.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\windows\</ObjectFileName>
</ClCompile>
<ClCompile Include="src\windows\access-helpers.c">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\windows\</ObjectFileName>
</ClCompile>
<ClCompile Include="src\windows\icon-helpers.c">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\windows\</ObjectFileName>
</ClCompile>
<ClCompile Include="src\windows\system-windows.c">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\windows\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\windows\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\socket\socket-host-session.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\socket\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\socket\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\socket\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\socket\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\fruity-host-session.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\dtx.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
</ClCompile>
<ClCompile Include="src\fruity\fruity-host-session-windows.c">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\lockdown.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\installation-proxy.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\springboard-services.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\lldb.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\injector.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\usbmux.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\keyed-archive.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\plist.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\plist-service.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\droidy\droidy-host-session.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\droidy\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\droidy\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\droidy\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\droidy\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\droidy\droidy-client.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\droidy\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\droidy\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\droidy\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\droidy\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\droidy\jdwp.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\droidy\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\droidy\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\droidy\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\droidy\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\droidy\injector.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\droidy\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\droidy\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\droidy\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\droidy\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\droidy\axml.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\droidy\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\droidy\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\droidy\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\droidy\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\barebone-host-session.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\script.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\machine.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\allocator.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\callback.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\memory-scanner.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\interceptor.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\rust-module.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\arch-x86\machine.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\arch-x86\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\arch-x86\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\arch-x86\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\arch-x86\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\arch-x86_64\machine.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\arch-x86_64\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\arch-x86_64\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\arch-x86_64\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\arch-x86_64\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\arch-arm\machine.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\arch-arm\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\arch-arm\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\arch-arm\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\arch-arm\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\arch-arm64\machine.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\arch-arm64\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\arch-arm64\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\arch-arm64\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\arch-arm64\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\arch-unknown\machine.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\arch-unknown\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\arch-unknown\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\arch-unknown\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\arch-unknown\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)data\frida-data-compiler.c">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)data\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)data\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)data\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)data\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)data\frida-data-helper.c">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)data\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)data\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)data\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)data\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)data\frida-data-agent.c">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)data\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)data\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)data\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)data\</ObjectFileName>
</ClCompile>
<ClCompile Include="$(IntDir)data\frida-data-barebone.c">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)data\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)data\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)data\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)data\</ObjectFileName>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\frida-gum\bindings\gumjs\gumjs-inspector.vcxproj">
<Project>{0b28ec3c-cc22-4067-9f08-6a3fac4fb454}</Project>
<Private>false</Private>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="lib\agent\frida-agent-32.vcxproj">
<Project>{b111ba27-807a-4b16-a4de-a33d7d6d7ce1}</Project>
<Private>false</Private>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="lib\agent\frida-agent-64.vcxproj">
<Project>{3194ec55-c1e5-423d-820f-13d38409b9d0}</Project>
<Private>false</Private>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="src\windows\frida-helper-32.vcxproj">
<Project>{e0ac03f2-f077-4ba7-88dd-bbe95b4e4ef0}</Project>
<Private>false</Private>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="src\windows\frida-helper-64.vcxproj">
<Project>{037e8466-f87b-486d-b6ad-fecb5740ce2c}</Project>
<Private>false</Private>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="tools\frida-resource-compiler.vcxproj">
<Project>{81b3e411-8676-41eb-84c6-1e5307f0c5ff}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>false</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(IntDir)frida-core.h" />
<ClInclude Include="src\windows\access-helpers.h" />
<ClInclude Include="src\windows\frida-helper-process-glue.h" />
<ClInclude Include="src\windows\icon-helpers.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-430
View File
@@ -1,430 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Source Files\generated">
<UniqueIdentifier>{5871a71e-92fa-44a7-847f-91d4ad19deb0}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\generated\core">
<UniqueIdentifier>{eef66507-e4a8-4117-87d0-a5b24833ddba}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Header Files\generated">
<UniqueIdentifier>{0ddd771d-c7e1-405b-a3e6-a4433e9094db}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\windows">
<UniqueIdentifier>{28f8e0ab-f994-4a5b-b62b-edcdcb9d0c34}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\generated\windows">
<UniqueIdentifier>{21f538e1-a14f-441b-9e2e-7303c1465c5b}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\socket">
<UniqueIdentifier>{d4552ab5-00ec-4394-bf75-666ac4f869a1}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\generated\socket">
<UniqueIdentifier>{620f3726-c7dd-4d6f-8f54-ad08f2ff594a}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\fruity">
<UniqueIdentifier>{7c397a46-f5dd-401d-b3c8-423615a25619}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\generated\fruity">
<UniqueIdentifier>{2d5a13f8-9bcb-4d70-9f8a-9597707fc771}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\droidy">
<UniqueIdentifier>{7c397a46-f5dd-401d-b3c8-423615a25618}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\generated\droidy">
<UniqueIdentifier>{2d5a13f8-9bcb-4d70-9f8a-9597707fc770}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\generated\data">
<UniqueIdentifier>{e441c3c0-5949-44e4-8617-0483732946e8}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
<Filter Include="Resource Files\windows">
<UniqueIdentifier>{c619adbc-c722-4220-8c57-9d40ce4e94ee}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\compiler">
<UniqueIdentifier>{440a7aec-8571-44e1-b100-6983d61a26ef}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\generated\compiler">
<UniqueIdentifier>{977f662a-1dea-4141-b63c-a71768cc07cf}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files\compiler">
<UniqueIdentifier>{56aeb7fc-6443-41fd-8bad-d5e3dd174f5c}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\barebone">
<UniqueIdentifier>{8095dacf-9529-4daf-9fa7-124a0dbd8c8c}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\barebone\arch-arm64">
<UniqueIdentifier>{5eb2dd88-94b6-46fb-bb45-04a18223ffa4}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files\barebone">
<UniqueIdentifier>{7543fdf8-bcba-4faf-b776-ba8c60b43ea6}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\generated\barebone">
<UniqueIdentifier>{ee876d25-94c0-4b08-b62e-542701f53a5a}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\generated\barebone\arch-arm">
<UniqueIdentifier>{a44b2b16-0f6e-4a59-ace2-5eafb5842cd3}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\generated\barebone\arch-unknown">
<UniqueIdentifier>{732196c7-efbb-467b-9a46-1b893a3ec1cf}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\generated\barebone\arch-x86_64">
<UniqueIdentifier>{890a4566-74ae-4d0a-a479-7e45580171db}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\generated\barebone\arch-arm64">
<UniqueIdentifier>{e062def2-897c-47e2-bde1-74b23a6066a8}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\generated\barebone\arch-x86">
<UniqueIdentifier>{6408ed39-33ab-461c-b887-a8da9e80ba2b}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\barebone\arch-arm">
<UniqueIdentifier>{98bd47cd-d261-4776-942b-1a40a30bc3ff}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\barebone\arch-x86">
<UniqueIdentifier>{fe48f50a-d564-4618-bbd3-813d5b7a79cb}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\barebone\arch-unknown">
<UniqueIdentifier>{0e4c39a3-82f0-4034-af21-3f787d114fe6}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\barebone\arch-x86_64">
<UniqueIdentifier>{abc9ec18-ef36-4200-ac4c-1dcba33f5db5}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="src\helper.resources">
<Filter>Resource Files</Filter>
</CustomBuild>
<CustomBuild Include="src\agent.resources">
<Filter>Resource Files</Filter>
</CustomBuild>
<CustomBuild Include="src\frida.vala">
<Filter>Source Files</Filter>
</CustomBuild>
<None Include="src\host-session-service.vala">
<Filter>Source Files</Filter>
</None>
<None Include="src\agent-container.vala">
<Filter>Source Files</Filter>
</None>
<None Include="src\gdb.vala">
<Filter>Source Files</Filter>
</None>
<None Include="src\system.vala">
<Filter>Source Files</Filter>
</None>
<None Include="src\windows\windows-host-session.vala">
<Filter>Source Files\windows</Filter>
</None>
<None Include="src\windows\winjector.vala">
<Filter>Source Files\windows</Filter>
</None>
<None Include="src\windows\frida-helper-process.vala">
<Filter>Source Files\windows</Filter>
</None>
<None Include="src\socket\socket-host-session.vala">
<Filter>Source Files\socket</Filter>
</None>
<None Include="src\fruity\fruity-host-session.vala">
<Filter>Source Files\fruity</Filter>
</None>
<None Include="src\fruity\dtx.vala">
<Filter>Source Files\fruity</Filter>
</None>
<None Include="src\fruity\lockdown.vala">
<Filter>Source Files\fruity</Filter>
</None>
<None Include="src\fruity\installation-proxy.vala">
<Filter>Source Files\fruity</Filter>
</None>
<None Include="src\fruity\lldb.vala">
<Filter>Source Files\fruity</Filter>
</None>
<None Include="src\fruity\injector.vala">
<Filter>Source Files\fruity</Filter>
</None>
<None Include="src\fruity\usbmux.vala">
<Filter>Source Files\fruity</Filter>
</None>
<None Include="src\fruity\keyed-archive.vala">
<Filter>Source Files\fruity</Filter>
</None>
<None Include="src\fruity\plist.vala">
<Filter>Source Files\fruity</Filter>
</None>
<None Include="src\fruity\plist-service.vala">
<Filter>Source Files\fruity</Filter>
</None>
<None Include="src\droidy\droidy-host-session.vala">
<Filter>Source Files\droidy</Filter>
</None>
<None Include="src\droidy\droidy-client.vala">
<Filter>Source Files\droidy</Filter>
</None>
<CustomBuild Include="src\compiler\compiler.resources">
<Filter>Resource Files\compiler</Filter>
</CustomBuild>
<CustomBuild Include="src\barebone\barebone.resources">
<Filter>Resource Files\barebone</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(IntDir)frida-core.h">
<Filter>Header Files\generated</Filter>
</ClInclude>
<ClCompile Include="$(IntDir)src\frida.c">
<Filter>Source Files\generated\core</Filter>
</ClCompile>
<ClCompile Include="src\frida-glue.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\host-session-service.c">
<Filter>Source Files\generated\core</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\agent-container.c">
<Filter>Source Files\generated\core</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\gdb.c">
<Filter>Source Files\generated\core</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\system.c">
<Filter>Source Files\generated\core</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\windows\windows-host-session.c">
<Filter>Source Files\generated\windows</Filter>
</ClCompile>
<ClCompile Include="src\windows\windows-host-session-glue.c">
<Filter>Source Files\windows</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\windows\winjector.c">
<Filter>Source Files\generated\windows</Filter>
</ClCompile>
<ClCompile Include="src\windows\winjector-glue.c">
<Filter>Source Files\windows</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\windows\frida-helper-process.c">
<Filter>Source Files\generated\windows</Filter>
</ClCompile>
<ClInclude Include="src\windows\access-helpers.h">
<Filter>Source Files\windows</Filter>
</ClInclude>
<ClCompile Include="src\windows\access-helpers.c">
<Filter>Source Files\windows</Filter>
</ClCompile>
<ClInclude Include="src\windows\icon-helpers.h">
<Filter>Source Files\windows</Filter>
</ClInclude>
<ClCompile Include="src\windows\icon-helpers.c">
<Filter>Source Files\windows</Filter>
</ClCompile>
<ClCompile Include="src\windows\system-windows.c">
<Filter>Source Files\windows</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\socket\socket-host-session.c">
<Filter>Source Files\generated\socket</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\fruity-host-session.c">
<Filter>Source Files\generated\fruity</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\dtx.c">
<Filter>Source Files\generated\fruity</Filter>
</ClCompile>
<ClCompile Include="src\fruity\fruity-host-session-windows.c">
<Filter>Source Files\fruity</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\lockdown.c">
<Filter>Source Files\generated\fruity</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\installation-proxy.c">
<Filter>Source Files\generated\fruity</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\lldb.c">
<Filter>Source Files\generated\fruity</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\injector.c">
<Filter>Source Files\generated\fruity</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\usbmux.c">
<Filter>Source Files\generated\fruity</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\keyed-archive.c">
<Filter>Source Files\generated\fruity</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\plist.c">
<Filter>Source Files\generated\fruity</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\plist-service.c">
<Filter>Source Files\generated\fruity</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\droidy\droidy-host-session.c">
<Filter>Source Files\generated\droidy</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\droidy\droidy-client.c">
<Filter>Source Files\generated\droidy</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)data\frida-data-helper.c">
<Filter>Source Files\generated\data</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)data\frida-data-agent.c">
<Filter>Source Files\generated\data</Filter>
</ClCompile>
<ClInclude Include="src\windows\frida-helper-process-glue.h">
<Filter>Source Files\windows</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\windows\frida-helper-process-glue.c">
<Filter>Source Files\windows</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\droidy\injector.c">
<Filter>Source Files\generated\droidy</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\droidy\axml.c">
<Filter>Source Files\generated\droidy</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\droidy\jdwp.c">
<Filter>Source Files\generated\droidy</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\async-task.c">
<Filter>Source Files\generated\core</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\control-service.c">
<Filter>Source Files\generated\core</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\file-monitor.c">
<Filter>Source Files\generated\core</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\portal-service.c">
<Filter>Source Files\generated\core</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\fruity\springboard-services.c">
<Filter>Source Files\generated\fruity</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\compiler\compiler.c">
<Filter>Source Files\generated\compiler</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)data\frida-data-compiler.c">
<Filter>Source Files\generated\data</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\barebone-host-session.c">
<Filter>Source Files\generated\barebone</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\script.c">
<Filter>Source Files\generated\barebone</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\machine.c">
<Filter>Source Files\generated\barebone</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\allocator.c">
<Filter>Source Files\generated\barebone</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\callback.c">
<Filter>Source Files\generated\barebone</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\memory-scanner.c">
<Filter>Source Files\generated\barebone</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\interceptor.c">
<Filter>Source Files\generated\barebone</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\rust-module.c">
<Filter>Source Files\generated\barebone</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)data\frida-data-barebone.c">
<Filter>Source Files\generated\data</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\arch-arm64\machine.c">
<Filter>Source Files\generated\barebone\arch-arm64</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\arch-arm\machine.c">
<Filter>Source Files\generated\barebone\arch-arm</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\arch-x86\machine.c">
<Filter>Source Files\generated\barebone\arch-x86</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\arch-unknown\machine.c">
<Filter>Source Files\generated\barebone\arch-unknown</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)src\barebone\arch-x86_64\machine.c">
<Filter>Source Files\generated\barebone\arch-x86_64</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="src\droidy\injector.vala">
<Filter>Source Files\droidy</Filter>
</None>
<None Include="src\droidy\jdwp.vala">
<Filter>Source Files\droidy</Filter>
</None>
<None Include="src\async-task.vala">
<Filter>Source Files</Filter>
</None>
<None Include="src\control-service.vala">
<Filter>Source Files</Filter>
</None>
<None Include="src\file-monitor.vala">
<Filter>Source Files</Filter>
</None>
<None Include="src\portal-service.vala">
<Filter>Source Files</Filter>
</None>
<None Include="src\fruity\springboard-services.vala">
<Filter>Source Files\fruity</Filter>
</None>
<None Include="src\compiler\compiler.vala">
<Filter>Source Files\compiler</Filter>
</None>
<None Include="src\droidy\axml.vala">
<Filter>Source Files\droidy</Filter>
</None>
<None Include="src\barebone\barebone-host-session.vala">
<Filter>Source Files\barebone</Filter>
</None>
<None Include="src\barebone\script.vala">
<Filter>Source Files\barebone</Filter>
</None>
<None Include="src\barebone\machine.vala">
<Filter>Source Files\barebone</Filter>
</None>
<None Include="src\barebone\allocator.vala">
<Filter>Source Files\barebone</Filter>
</None>
<None Include="src\barebone\callback.vala">
<Filter>Source Files\barebone</Filter>
</None>
<None Include="src\barebone\memory-scanner.vala">
<Filter>Source Files\barebone</Filter>
</None>
<None Include="src\barebone\interceptor.vala">
<Filter>Source Files\barebone</Filter>
</None>
<None Include="src\barebone\rust-module.vala">
<Filter>Source Files\barebone</Filter>
</None>
<None Include="src\barebone\arch-arm64\machine.vala">
<Filter>Source Files\barebone\arch-arm64</Filter>
</None>
<None Include="src\barebone\arch-arm\machine.vala">
<Filter>Source Files\barebone\arch-arm</Filter>
</None>
<None Include="src\barebone\arch-x86\machine.vala">
<Filter>Source Files\barebone\arch-x86</Filter>
</None>
<None Include="src\barebone\arch-unknown\machine.vala">
<Filter>Source Files\barebone\arch-unknown</Filter>
</None>
<None Include="src\barebone\arch-x86_64\machine.vala">
<Filter>Source Files\barebone\arch-x86_64</Filter>
</None>
</ItemGroup>
</Project>
-174
View File
@@ -1,174 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{5DBC3541-98D6-4F06-A184-B6116544ED26}</ProjectGuid>
<RootNamespace>frida-gadget</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Link>
<ModuleDefinitionFile>lib\gadget\frida-gadget.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalDependencies>gum-32.lib;gumjs-32.lib;frida-base-32.lib;frida-payload-32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(IntDir)..\frida-base-32;$(IntDir)..\frida-payload-32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-32;$(IntDir)..\frida-payload-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Link>
<ModuleDefinitionFile>lib\gadget\frida-gadget.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
<AdditionalDependencies>gum-64.lib;gumjs-64.lib;frida-base-64.lib;frida-payload-64.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(IntDir)..\frida-base-64;$(IntDir)..\frida-payload-64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-64;$(IntDir)..\frida-payload-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Link>
<ModuleDefinitionFile>lib\gadget\frida-gadget.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalDependencies>gum-32.lib;gumjs-32.lib;frida-base-32.lib;frida-payload-32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(IntDir)..\frida-base-32;$(IntDir)..\frida-payload-32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-32;$(IntDir)..\frida-payload-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Link>
<ModuleDefinitionFile>lib\gadget\frida-gadget.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
<AdditionalDependencies>gum-64.lib;gumjs-64.lib;frida-base-64.lib;frida-payload-64.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(IntDir)..\frida-base-64;$(IntDir)..\frida-payload-64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-64;$(IntDir)..\frida-payload-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="lib\gadget\gadget.vala">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(ValaCompiler)" lib/gadget/gadget.vala --ccode --directory=$(IntDir) --library=frida-gadget --header=$(IntDir)frida-gadget.h --symbols=$(IntDir)frida-gadget.symbols --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-payload-32" --vapidir="$(IntDir)..\frida-payload-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gee-0.8 --pkg=gio-2.0 --pkg=nice --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-1.0 --pkg=frida-base --pkg=frida-payload || exit 1
echo &gt; "$(IntDir)valacode.stamp"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Compiling vala code</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(ValaCompiler)" lib/gadget/gadget.vala --ccode --directory=$(IntDir) --library=frida-gadget --header=$(IntDir)frida-gadget.h --symbols=$(IntDir)frida-gadget.symbols --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-payload-32" --vapidir="$(IntDir)..\frida-payload-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gee-0.8 --pkg=gio-2.0 --pkg=nice --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-1.0 --pkg=frida-base --pkg=frida-payload || exit 1
echo &gt; "$(IntDir)valacode.stamp"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compiling vala code</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(ValaCompiler)" lib/gadget/gadget.vala --ccode --directory=$(IntDir) --library=frida-gadget --header=$(IntDir)frida-gadget.h --symbols=$(IntDir)frida-gadget.symbols --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-payload-32" --vapidir="$(IntDir)..\frida-payload-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gee-0.8 --pkg=gio-2.0 --pkg=nice --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-1.0 --pkg=frida-base --pkg=frida-payload || exit 1
echo &gt; "$(IntDir)valacode.stamp"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Compiling vala code</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(ValaCompiler)" lib/gadget/gadget.vala --ccode --directory=$(IntDir) --library=frida-gadget --header=$(IntDir)frida-gadget.h --symbols=$(IntDir)frida-gadget.symbols --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-payload-32" --vapidir="$(IntDir)..\frida-payload-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gee-0.8 --pkg=gio-2.0 --pkg=nice --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-1.0 --pkg=frida-base --pkg=frida-payload || exit 1
echo &gt; "$(IntDir)valacode.stamp"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Compiling vala code</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)lib\gadget\gadget.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)gadget\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)gadget\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)gadget\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)gadget\</ObjectFileName>
</ClCompile>
<ClCompile Include="lib\gadget\gadget-glue.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-35
View File
@@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
<Filter Include="Source Files\generated">
<UniqueIdentifier>{f60b305c-bd28-4f2c-9c4c-cbabeb0c2142}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="lib\gadget\gadget-glue.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)lib\gadget\gadget.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="lib\gadget\gadget.vala">
<Filter>Source Files</Filter>
</CustomBuild>
</ItemGroup>
</Project>
-175
View File
@@ -1,175 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{C21A9593-4BE8-4BE5-A7E6-39A1612FA569}</ProjectGuid>
<RootNamespace>frida-portal</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Link>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)..\frida-core;$(IntDir)..\frida-base-32;$(IntDir)..\frida-helper-backend-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Link>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)..\frida-core;$(IntDir)..\frida-base-64;$(IntDir)..\frida-helper-backend-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Link>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)..\frida-core;$(IntDir)..\frida-base-32;$(IntDir)..\frida-helper-backend-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Link>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)..\frida-core;$(IntDir)..\frida-base-64;$(IntDir)..\frida-helper-backend-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="portal\portal.vala">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(ValaCompiler)" portal/portal.vala --ccode --directory=$(IntDir) --library=frida-portal --header=$(IntDir)frida-portal.h --symbols=$(IntDir)frida-portal.symbols --vapidir="$(IntDir)..\frida-core" --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gio-2.0 --pkg=nice --pkg=gioopenssl --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-core --pkg=frida-base --pkg=frida-helper-backend --pkg=posix || exit 1
echo &gt; "$(IntDir)valacode.stamp"
</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Compiling vala code</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(ValaCompiler)" portal/portal.vala --ccode --directory=$(IntDir) --library=frida-portal --header=$(IntDir)frida-portal.h --symbols=$(IntDir)frida-portal.symbols --vapidir="$(IntDir)..\frida-core" --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gio-2.0 --pkg=nice --pkg=gioopenssl --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-core --pkg=frida-base --pkg=frida-helper-backend --pkg=posix || exit 1
echo &gt; "$(IntDir)valacode.stamp"
</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compiling vala code</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(ValaCompiler)" portal/portal.vala --ccode --directory=$(IntDir) --library=frida-portal --header=$(IntDir)frida-portal.h --symbols=$(IntDir)frida-portal.symbols --vapidir="$(IntDir)..\frida-core" --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gio-2.0 --pkg=nice --pkg=gioopenssl --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-core --pkg=frida-base --pkg=frida-helper-backend --pkg=posix || exit 1
echo &gt; "$(IntDir)valacode.stamp"
</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Compiling vala code</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(ValaCompiler)" portal/portal.vala --ccode --directory=$(IntDir) --library=frida-portal --header=$(IntDir)frida-portal.h --symbols=$(IntDir)frida-portal.symbols --vapidir="$(IntDir)..\frida-core" --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gio-2.0 --pkg=nice --pkg=gioopenssl --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-core --pkg=frida-base --pkg=frida-helper-backend --pkg=posix || exit 1
echo &gt; "$(IntDir)valacode.stamp"
</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Compiling vala code</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="frida-core.vcxproj">
<Project>{b7dc9b02-a5ff-4aa1-b2a2-dc1653168d44}</Project>
<Private>false</Private>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)portal\portal.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)portal\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)portal\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)portal\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)portal\</ObjectFileName>
</ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-30
View File
@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
<Filter Include="Source Files\generated">
<UniqueIdentifier>{4f6f9d9e-2378-4fde-b1b2-f54395a16475}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="portal\portal.vala">
<Filter>Source Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)portal\portal.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
</ItemGroup>
</Project>
-176
View File
@@ -1,176 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{218DDF16-1726-4492-A92F-DC190397DB44}</ProjectGuid>
<RootNamespace>frida-server</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Link>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)..\frida-core;$(IntDir)..\frida-base-32;$(IntDir)..\frida-helper-backend-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Link>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)..\frida-core;$(IntDir)..\frida-base-64;$(IntDir)..\frida-helper-backend-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Link>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)..\frida-core;$(IntDir)..\frida-base-32;$(IntDir)..\frida-helper-backend-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Link>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)..\frida-core;$(IntDir)..\frida-base-64;$(IntDir)..\frida-helper-backend-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="server\server.vala">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(ValaCompiler)" server/server.vala --ccode --directory=$(IntDir) --library=frida-server --header=$(IntDir)frida-server.h --symbols=$(IntDir)frida-server.symbols --vapidir="$(IntDir)..\frida-core" --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gio-2.0 --pkg=nice --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-core --pkg=frida-base --pkg=frida-helper-backend --pkg=posix || exit 1
echo &gt; "$(IntDir)valacode.stamp"
</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Compiling vala code</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ValaCompiler);$(ProjectDir)server\server.vala;%(AdditionalInputs)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(ValaCompiler)" server/server.vala --ccode --directory=$(IntDir) --library=frida-server --header=$(IntDir)frida-server.h --symbols=$(IntDir)frida-server.symbols --vapidir="$(IntDir)..\frida-core" --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gio-2.0 --pkg=nice --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-core --pkg=frida-base --pkg=frida-helper-backend --pkg=posix || exit 1
echo &gt; "$(IntDir)valacode.stamp"
</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compiling vala code</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ValaCompiler);$(ProjectDir)server\server.vala;%(AdditionalInputs)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(ValaCompiler)" server/server.vala --ccode --directory=$(IntDir) --library=frida-server --header=$(IntDir)frida-server.h --symbols=$(IntDir)frida-server.symbols --vapidir="$(IntDir)..\frida-core" --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gio-2.0 --pkg=nice --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-core --pkg=frida-base --pkg=frida-helper-backend --pkg=posix || exit 1
echo &gt; "$(IntDir)valacode.stamp"
</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Compiling vala code</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ValaCompiler);$(ProjectDir)server\server.vala;%(AdditionalInputs)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(ValaCompiler)" server/server.vala --ccode --directory=$(IntDir) --library=frida-server --header=$(IntDir)frida-server.h --symbols=$(IntDir)frida-server.symbols --vapidir="$(IntDir)..\frida-core" --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gio-2.0 --pkg=nice --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-core --pkg=frida-base --pkg=frida-helper-backend --pkg=posix || exit 1
echo &gt; "$(IntDir)valacode.stamp"
</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Compiling vala code</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ValaCompiler);$(ProjectDir)server\server.vala;%(AdditionalInputs)</AdditionalInputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="frida-core.vcxproj">
<Project>{b7dc9b02-a5ff-4aa1-b2a2-dc1653168d44}</Project>
<Private>false</Private>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)server\server.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)server\</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)server\</ObjectFileName>
</ClCompile>
<ClCompile Include="server\server-glue.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-33
View File
@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
<Filter Include="Source Files\generated">
<UniqueIdentifier>{f60b305c-bd28-4f2c-9c4c-cbabeb0c2142}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="server\server.vala">
<Filter>Source Files</Filter>
</CustomBuild>
<ClCompile Include="server\server-glue.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)server\server.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
</ItemGroup>
</Project>
+63 -34
View File
@@ -147,7 +147,7 @@ namespace Frida.Inject {
public extern void init ();
}
public class Application : Object {
public sealed class Application : Object {
public string? device_id {
get;
construct;
@@ -388,7 +388,7 @@ namespace Frida.Inject {
return false;
}
script_runner.on_stdin (line);
script_runner.on_stdin (line, null);
return true;
}
@@ -414,14 +414,19 @@ namespace Frida.Inject {
buf[n] = 0;
script_runner.on_stdin ((string) buf);
if (script_runner.terminal_mode == TerminalMode.BINARY) {
var bytes = new Bytes (buf[:n]);
script_runner.on_stdin ("", bytes);
} else {
script_runner.on_stdin ((string) buf, null);
}
return true;
}
#endif
}
private class ScriptRunner : Object, RpcPeer {
private sealed class ScriptRunner : Object, RpcPeer {
public TerminalMode terminal_mode {
get;
private set;
@@ -549,7 +554,7 @@ namespace Frida.Inject {
var stage = new Json.Node.alloc ().init_string ("early");
try {
yield rpc_client.call ("init", new Json.Node[] { stage, parameters }, io_cancellable);
yield rpc_client.call ("init", new Json.Node[] { stage, parameters }, null, io_cancellable);
} catch (GLib.Error e) {
}
}
@@ -591,7 +596,7 @@ namespace Frida.Inject {
private async TerminalMode query_terminal_mode () {
Json.Node mode_value;
try {
mode_value = yield rpc_client.call ("getFridaTerminalMode", new Json.Node[] {}, io_cancellable);
mode_value = yield rpc_client.call ("getFridaTerminalMode", new Json.Node[] {}, null, io_cancellable);
} catch (GLib.Error e) {
return COOKED;
}
@@ -599,7 +604,14 @@ namespace Frida.Inject {
if (mode_value.get_value_type () != typeof (string))
return COOKED;
return (mode_value.get_string () == "raw") ? TerminalMode.RAW : TerminalMode.COOKED;
switch (mode_value.get_string ()) {
case "raw":
return TerminalMode.RAW;
case "binary":
return TerminalMode.BINARY;
default:
return TerminalMode.COOKED;
}
}
private void apply_terminal_mode (TerminalMode mode) throws Error {
@@ -632,10 +644,10 @@ namespace Frida.Inject {
}
#endif
public void on_stdin (string data) {
var data_value = new Json.Node.alloc ().init_string (data);
public void on_stdin (string str, Bytes? data) {
var str_value = new Json.Node.alloc ().init_string (str);
rpc_client.call.begin ("onFridaStdin", new Json.Node[] { data_value }, io_cancellable);
rpc_client.call.begin ("onFridaStdin", new Json.Node[] { str_value }, data, io_cancellable);
}
private void on_script_file_changed (File file, File? other_file, FileMonitorEvent event_type) {
@@ -675,7 +687,7 @@ namespace Frida.Inject {
handled = try_handle_log_message (message);
break;
case "send":
handled = try_handle_stdout_message (message);
handled = try_handle_stdout_message (message, data);
break;
default:
handled = false;
@@ -722,20 +734,19 @@ namespace Frida.Inject {
*
* {"type":"send","payload":["frida:stdout","DATA"]}
*/
private bool try_handle_stdout_message (Json.Object message) {
private bool try_handle_stdout_message (Json.Object message, Bytes? data) {
var payload = message.get_member ("payload");
if (payload.get_node_type () != Json.NodeType.ARRAY)
return false;
var tuple = payload.get_array ();
if (tuple.get_length () != 2)
var tuple_len = tuple.get_length ();
if (tuple_len == 0)
return false;
var first_element = tuple.get_element (0);
if (first_element.get_value_type () != typeof (string))
var type = tuple.get_element (0).get_string ();
if (type == null)
return false;
var type = first_element.get_string ();
switch (type) {
case "frida:stdout":
case "frida:stderr":
@@ -744,31 +755,49 @@ namespace Frida.Inject {
return false;
}
var second_element = tuple.get_element (1);
if (second_element.get_value_type () != typeof (string))
return false;
var str = second_element.get_string ();
switch (type) {
case "frida:stdout":
stdout.write (str.data);
stdout.flush ();
return true;
case "frida:stderr":
stderr.write (str.data);
return true;
default:
if (tuple_len >= 2) {
var str = tuple.get_element (1).get_string ();
if (str == null)
return false;
switch (type) {
case "frida:stdout":
stdout.write (str.data);
stdout.flush ();
break;
case "frida:stderr":
stderr.write (str.data);
break;
default:
return false;
}
}
if (data != null) {
switch (type) {
case "frida:stdout":
stdout.write (data.get_data ());
stdout.flush ();
break;
case "frida:stderr":
stderr.write (data.get_data ());
break;
default:
return false;
}
}
return true;
}
private async void post_rpc_message (string json, Cancellable? cancellable) throws Error, IOError {
script.post (json, null);
private async void post_rpc_message (string json, Bytes? data, Cancellable? cancellable) throws Error, IOError {
script.post (json, data);
}
}
private enum TerminalMode {
COOKED,
RAW
RAW,
BINARY
}
}
+5 -16
View File
@@ -13,36 +13,25 @@ extra_link_args = []
extra_link_depends = []
if host_os_family == 'darwin'
symlist = 'frida-inject.symbols'
extra_link_args += ['-Wl,-exported_symbols_list,' + join_paths(meson.current_source_dir(), symlist)]
extra_link_args += ['-Wl,-exported_symbols_list,' + meson.current_source_dir() / symlist]
extra_link_depends += [symlist]
elif host_os_family != 'windows'
symscript = 'frida-inject.version'
extra_link_args += ['-Wl,--version-script,' + join_paths(meson.current_source_dir(), symscript)]
extra_link_args += ['-Wl,--version-script,' + meson.current_source_dir() / symscript]
extra_link_depends += [symscript]
endif
raw_inject = executable('frida-inject-raw', inject_sources,
vala_args: system_vala_args,
vala_args: [core_vala_args, system_vala_args],
link_args: extra_link_args,
link_depends: extra_link_depends,
dependencies: [json_glib_dep, core_dep],
)
custom_target('frida-inject',
input: [
raw_inject,
'frida-inject.xcent',
],
input: [raw_inject, 'frida-inject.xcent'],
output: 'frida-inject' + exe_suffix,
command: [
files('post-process.sh'),
'@INPUT@',
'@OUTPUT@',
host_os,
'>>>', strip, '<<<',
get_option('strip').to_string(),
codesign,
],
command: post_process + ['executable', 're.frida.Inject', '@INPUT1@'],
install: true,
install_dir: get_option('bindir'),
)
-70
View File
@@ -1,70 +0,0 @@
#!/usr/bin/env bash
input_inject_path=$1
input_entitlements_path=$2
output_inject_path=$3
host_os=$4
strip_command=()
if [ "$5" = ">>>" ]; then
shift 5
while true; do
cur=$1
shift 1
if [ "$cur" = "<<<" ]; then
break
fi
strip_command+=("$cur")
done
else
echo "Invalid argument" > /dev/stderr
exit 1
fi
strip_enabled=$1
codesign=$2
case $host_os in
macos)
if [ -z "$MACOS_CERTID" ]; then
echo "MACOS_CERTID not set, see https://github.com/frida/frida#apple-oses"
exit 1
fi
;;
ios)
if [ -z "$IOS_CERTID" ]; then
echo "IOS_CERTID not set, see https://github.com/frida/frida#apple-oses"
exit 1
fi
;;
tvos)
if [ -z "$TVOS_CERTID" ]; then
echo "TVOS_CERTID not set, see https://github.com/frida/frida#apple-oses"
exit 1
fi
;;
esac
intermediate_path=$output_inject_path.tmp
rm -f "$intermediate_path"
cp -a "$input_inject_path" "$intermediate_path"
if [ "$strip_enabled" = "true" ]; then
"${strip_command[@]}" "$intermediate_path" || exit 1
fi
case $host_os in
macos|ios|tvos)
case $host_os in
macos)
"$codesign" -f -s "$MACOS_CERTID" -i "re.frida.Inject" "$intermediate_path" || exit 1
;;
ios)
"$codesign" -f -s "$IOS_CERTID" --entitlements "$input_entitlements_path" "$intermediate_path" || exit 1
;;
tvos)
"$codesign" -f -s "$TVOS_CERTID" --entitlements "$input_entitlements_path" "$intermediate_path" || exit 1
;;
esac
;;
esac
mv "$intermediate_path" "$output_inject_path"
+26 -20
View File
@@ -11,7 +11,7 @@ namespace Frida.Agent {
PROCESS_TRANSITION
}
private class Runner : Object, ProcessInvader, AgentSessionProvider, ExitHandler, ForkHandler, SpawnHandler {
private sealed class Runner : Object, ProcessInvader, AgentSessionProvider, ExitHandler, ForkHandler, SpawnHandler {
public static Runner shared_instance = null;
public static Mutex shared_mutex;
private static string? cached_agent_path = null;
@@ -81,7 +81,7 @@ namespace Frida.Agent {
private uint child_gating_subscriber_count = 0;
private ForkMonitor? fork_monitor;
private FileDescriptorGuard fd_guard;
private FileDescriptorGuard? fd_guard;
private ThreadCountCloaker? thread_count_cloaker;
private ThreadListCloaker? thread_list_cloaker;
private FDListCloaker? fd_list_cloaker;
@@ -99,6 +99,7 @@ namespace Frida.Agent {
private Cond transition_cond;
private SpawnMonitor? spawn_monitor;
private ThreadSuspendMonitor? thread_suspend_monitor;
private UnwindSitter? unwind_sitter;
private delegate void CompletionNotify ();
@@ -148,7 +149,6 @@ namespace Frida.Agent {
linjector_state->agent_ctrlfd = -1;
fdt_padder.move_descriptor_if_needed (ref agent_ctrlfd);
Gum.Cloak.add_file_descriptor (agent_ctrlfd);
agent_parameters_with_transport_uri = "socket:%d%s".printf (agent_ctrlfd, agent_parameters);
agent_parameters = agent_parameters_with_transport_uri;
@@ -259,6 +259,7 @@ namespace Frida.Agent {
interceptor.begin_transaction ();
thread_suspend_monitor = null;
unwind_sitter = null;
invalidate_dbus_context ();
@@ -287,6 +288,7 @@ namespace Frida.Agent {
#endif
bool enable_exit_monitor = true;
bool enable_thread_suspend_monitor = true;
bool enable_unwind_sitter = true;
foreach (unowned string option in tokens[1:]) {
if (option == "eternal")
ensure_eternalized ();
@@ -298,6 +300,8 @@ namespace Frida.Agent {
enable_exit_monitor = false;
else if (option == "thread-suspend-monitor:off")
enable_thread_suspend_monitor = false;
else if (option == "unwind-sitter:off")
enable_unwind_sitter = false;
}
if (!enable_exceptor)
@@ -313,6 +317,9 @@ namespace Frida.Agent {
if (enable_thread_suspend_monitor)
thread_suspend_monitor = new ThreadSuspendMonitor (this);
if (enable_unwind_sitter)
unwind_sitter = new UnwindSitter (this);
this.interceptor = interceptor;
this.exceptor = Gum.Exceptor.obtain ();
@@ -1502,13 +1509,14 @@ namespace Frida.Agent {
}
public static NativeBridgeApi open () throws Error {
string? nb_mod = null;
string? vm_mod = null;
Gum.Process.enumerate_modules ((details) => {
if (/\/lib(64)?\/libnativebridge.so$/.match (details.path))
nb_mod = details.path;
else if (/^lib(art|dvm).so$/.match (details.name) && !/\/system\/fake-libs/.match (details.path))
vm_mod = details.path;
Gum.Module? nb_mod = null;
Gum.Module? vm_mod = null;
Gum.Process.enumerate_modules (module => {
unowned string path = module.path;
if (/\/lib(64)?\/libnativebridge.so$/.match (path))
nb_mod = module;
else if (/^lib(art|dvm).so$/.match (module.name) && !/\/system\/fake-libs/.match (path))
vm_mod = module;
bool carry_on = nb_mod == null || vm_mod == null;
return carry_on;
});
@@ -1523,29 +1531,27 @@ namespace Frida.Agent {
NBUnloadLibraryFunc? unload;
NBGetTrampolineFunc get_trampoline;
load = (NBLoadLibraryFunc) Gum.Module.find_export_by_name (nb_mod, "NativeBridgeLoadLibrary");;
load = (NBLoadLibraryFunc) nb_mod.find_export_by_name ("NativeBridgeLoadLibrary");;
if (load != null) {
flavor = MODERN;
load_ext = (NBLoadLibraryExtFunc) Gum.Module.find_export_by_name (nb_mod, "NativeBridgeLoadLibraryExt");
load_ext = (NBLoadLibraryExtFunc) nb_mod.find_export_by_name ("NativeBridgeLoadLibraryExt");
// XXX: NativeBridgeUnloadLibrary() is only a stub as of Android 11 w/ libndk_translation.so
unload = null;
get_trampoline = (NBGetTrampolineFunc) Gum.Module.find_export_by_name (nb_mod,
"NativeBridgeGetTrampoline");
get_trampoline = (NBGetTrampolineFunc) nb_mod.find_export_by_name ("NativeBridgeGetTrampoline");
} else {
flavor = LEGACY;
load = (NBLoadLibraryFunc) Gum.Module.find_export_by_name (nb_mod,
"_ZN7android23NativeBridgeLoadLibraryEPKci");
load_ext = (NBLoadLibraryExtFunc) Gum.Module.find_export_by_name (nb_mod,
load = (NBLoadLibraryFunc) nb_mod.find_export_by_name ("_ZN7android23NativeBridgeLoadLibraryEPKci");
load_ext = (NBLoadLibraryExtFunc) nb_mod.find_export_by_name (
"_ZN7android26NativeBridgeLoadLibraryExtEPKciPNS_25native_bridge_namespace_tE");
// XXX: Unload implementation seems to be unreliable.
unload = null;
get_trampoline = (NBGetTrampolineFunc) Gum.Module.find_export_by_name (nb_mod,
get_trampoline = (NBGetTrampolineFunc) nb_mod.find_export_by_name (
"_ZN7android25NativeBridgeGetTrampolineEPvPKcS2_j");
}
if (load == null || get_trampoline == null)
throw new Error.NOT_SUPPORTED ("NativeBridge API is not available on this system");
var get_vms = (JNIGetCreatedJavaVMsFunc) Gum.Module.find_export_by_name (vm_mod, "JNI_GetCreatedJavaVMs");
var get_vms = (JNIGetCreatedJavaVMsFunc) vm_mod.find_export_by_name ("JNI_GetCreatedJavaVMs");
if (get_vms == null)
throw new Error.NOT_SUPPORTED ("Unable to locate Java VM");
@@ -1615,7 +1621,7 @@ namespace Frida.Agent {
}
#endif
private class LiveAgentSession : BaseAgentSession {
private sealed class LiveAgentSession : BaseAgentSession {
public uint registration_id {
get;
set;
-112
View File
@@ -1,112 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F4F9AF1C-3111-4563-8066-8FAE8CBEFBDC}</ProjectGuid>
<RootNamespace>frida</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>frida-agent-32</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-32;$(IntDir)..\frida-pipe-32;$(IntDir)..\frida-payload-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<ModuleDefinitionFile>frida-agent.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-32;$(IntDir)..\frida-pipe-32;$(IntDir)..\frida-payload-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<ModuleDefinitionFile>frida-agent.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<Import Project="frida-agent-common.props" />
<ItemGroup>
<ProjectReference Include="..\..\..\frida-gum\bindings\gumjs\gumjs-32.vcxproj">
<Project>{8381538f-3cb5-480b-bfa4-960299af6485}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\frida-gum\gum-32.vcxproj">
<Project>{b31c7d42-54b6-49bb-b30c-11745c48b062}</Project>
<Private>false</Private>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="..\..\..\releng\frida-deps.vcxproj">
<Project>{4afce7c4-6d9a-4663-b43c-d2e518486910}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="..\base\frida-base-32.vcxproj">
<Project>{c4203124-c838-437b-8662-ca477b146655}</Project>
</ProjectReference>
<ProjectReference Include="..\payload\frida-payload-32.vcxproj">
<Project>{26f21663-d1b3-46e4-acb6-115ed9ce086c}</Project>
</ProjectReference>
<ProjectReference Include="..\pipe\frida-pipe-32.vcxproj">
<Project>{4c39c3cf-13e5-4346-b6ae-f73013105936}</Project>
<Private>false</Private>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-33
View File
@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
<Filter Include="Source Files\generated">
<UniqueIdentifier>{0353eb66-cd17-403a-ac99-dcf4a5709318}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)agent.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="agent-glue.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="agent.vala">
<Filter>Source Files</Filter>
</CustomBuild>
</ItemGroup>
</Project>
-112
View File
@@ -1,112 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{D873638D-AA0D-4252-9334-456557A65D95}</ProjectGuid>
<RootNamespace>frida</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>frida-agent-64</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-64;$(IntDir)..\frida-pipe-64;$(IntDir)..\frida-payload-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<ModuleDefinitionFile>frida-agent.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-64;$(IntDir)..\frida-pipe-64;$(IntDir)..\frida-payload-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<ModuleDefinitionFile>frida-agent.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<Import Project="frida-agent-common.props" />
<ItemGroup>
<ProjectReference Include="..\..\..\frida-gum\bindings\gumjs\gumjs-64.vcxproj">
<Project>{0b39885e-731c-4a45-a7de-44cbdbbf0067}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\frida-gum\gum-64.vcxproj">
<Project>{dc30a450-95bc-4476-a2f9-45100562424e}</Project>
<Private>false</Private>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="..\..\..\releng\frida-deps.vcxproj">
<Project>{4afce7c4-6d9a-4663-b43c-d2e518486910}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="..\base\frida-base-64.vcxproj">
<Project>{a31522d9-715b-4e04-aa57-df7afebe082c}</Project>
</ProjectReference>
<ProjectReference Include="..\payload\frida-payload-64.vcxproj">
<Project>{26ccf317-ace8-4cd6-bdde-ffed1aa2fadd}</Project>
</ProjectReference>
<ProjectReference Include="..\pipe\frida-pipe-64.vcxproj">
<Project>{d50f460f-9c4d-42eb-a8c4-48c0c46cfaaf}</Project>
<Private>false</Private>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-33
View File
@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
<Filter Include="Source Files\generated">
<UniqueIdentifier>{ae68f2cc-7b74-44ad-addd-3d447d9b2a4e}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)agent.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="agent-glue.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="agent.vala">
<Filter>Source Files</Filter>
</CustomBuild>
</ItemGroup>
</Project>
+8
View File
@@ -0,0 +1,8 @@
{
global:
frida_agent_main;
JNI_OnLoad;
local:
*;
};
-31
View File
@@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="agent.vala">
<Message>Compiling vala code</Message>
<Command>"$(ValaCompiler)" agent.vala --ccode --directory=$(IntDir) --library=frida-agent --header=$(IntDir)frida-agent.h --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-pipe-32" --vapidir="$(IntDir)..\frida-pipe-64" --vapidir="$(IntDir)..\frida-payload-32" --vapidir="$(IntDir)..\frida-payload-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg=glib-2.0 --pkg=gio-2.0 --pkg=nice --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-1.0 --pkg=frida-base --pkg=frida-pipe --pkg=frida-payload || exit 1
echo &gt; "$(IntDir)valacode.stamp"
</Command>
<AdditionalInputs>$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
<Outputs>$(IntDir)valacode.stamp;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)agent.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="agent-glue.c" />
</ItemGroup>
</Project>
-1
View File
@@ -1,7 +1,6 @@
{
global:
frida_agent_main;
JNI_OnLoad;
local:
*;
+35 -32
View File
@@ -20,14 +20,16 @@ if host_os_family == 'darwin'
endif
if host_os_family == 'windows'
symfile = (host_arch == 'x86') ? 'frida-agent-x86.symbols' : 'frida-agent.symbols'
extra_link_args += '-Wl,--retain-symbols-file,' + (meson.current_source_dir() / symfile)
extra_link_depends += symfile
if host_toolchain != 'microsoft'
symfile = (host_arch == 'x86') ? 'frida-agent-x86.symbols' : 'frida-agent.symbols'
extra_link_args += '-Wl,--retain-symbols-file,' + meson.current_source_dir() / symfile
extra_link_depends += symfile
endif
elif host_os_family == 'darwin'
extra_link_args += '-Wl,-exported_symbol,_frida_agent_main'
else
symscript = 'frida-agent.version'
extra_link_args += '-Wl,--version-script,' + (meson.current_source_dir() / symscript)
symscript = (host_os == 'android') ? 'frida-agent-android.version' : 'frida-agent.version'
extra_link_args += '-Wl,--version-script,' + meson.current_source_dir() / symscript
extra_link_depends += symscript
endif
@@ -36,10 +38,11 @@ if host_os_family in ['linux', 'qnx']
extra_link_args += '-Wl,-Bsymbolic'
endif
raw_agent = shared_library('frida-agent', agent_sources,
raw_agent = shared_library('frida-agent-raw', agent_sources,
name_prefix: 'lib',
c_args: frida_component_cflags,
vala_args: extra_vala_args,
vala_header: 'frida-agent.h',
vala_args: [base_vala_args, payload_vala_args, extra_vala_args],
link_args: extra_link_args,
link_depends: extra_link_depends,
vs_module_defs: 'frida-agent.def',
@@ -51,45 +54,45 @@ operations = ['--move', 'constructor', 'frida_init_memory', 'first']
if host_os_family != 'darwin'
operations += ['--move', 'destructor', 'frida_deinit_memory', 'first']
endif
if host_machine.endian() == 'little'
endian_option = ['--endian', 'little']
else
endian_option = ['--endian', 'big']
endif
modulated_agent = custom_target('frida-agent-modulated',
input: raw_agent,
output: 'libfrida-agent-modulated' + shlib_suffix,
command: [
modulate,
'@INPUT@',
] + operations + endian_option + [
'--output', '@OUTPUT@',
'--nm', nm,
'--readelf', readelf,
'--otool', otool,
],
command: modulate + operations,
)
need_universal_agent = host_os_family == 'darwin' \
and get_option('assets') == 'installed' \
and agent_compat != ''
if host_os_family == 'darwin'
identity = 'FridaAgent'
else
identity = agent_name
endif
agent = custom_target('frida-agent',
input: modulated_agent,
output: agent_name,
command: [
post_process_module,
'@INPUT@',
'@OUTPUT@',
identity,
],
output: need_universal_agent ? f'@agent_name@-@host_abi@' : agent_name,
command: post_process + ['shared-library', identity],
build_by_default: true,
install: get_option('assets') == 'installed',
install: get_option('assets') == 'installed' and not need_universal_agent,
install_dir: asset_dir,
)
agent_dep = declare_dependency(link_with: agent)
if need_universal_agent
custom_target('frida-agent-universal',
input: agent,
output: agent_name,
command: [
lipo,
'@INPUT@',
agent_compat,
'-create',
'-output', meson.current_build_dir() / agent_name,
],
depends: agent_depends,
install: true,
install_dir: asset_dir,
)
endif
+168 -18
View File
@@ -1,11 +1,11 @@
namespace Frida {
public class BufferBuilder : Object {
public uint pointer_size {
public sealed class BufferBuilder : Object {
public ByteOrder byte_order {
get;
construct;
}
public ByteOrder byte_order {
public uint pointer_size {
get;
construct;
}
@@ -23,10 +23,10 @@ namespace Frida {
private Gee.List<LabelRef>? label_refs;
private Gee.Map<string, uint>? label_defs;
public BufferBuilder (uint pointer_size = (uint) sizeof (size_t), ByteOrder byte_order = HOST) {
public BufferBuilder (ByteOrder byte_order = HOST, uint pointer_size = (uint) sizeof (size_t)) {
Object (
pointer_size: pointer_size,
byte_order: byte_order
byte_order: byte_order,
pointer_size: pointer_size
);
}
@@ -307,30 +307,30 @@ namespace Frida {
NUL
}
public class Buffer : Object {
public sealed class Buffer : Object {
public Bytes bytes {
get;
construct;
}
public uint pointer_size {
get;
construct;
}
public ByteOrder byte_order {
get;
construct;
}
public uint pointer_size {
get;
construct;
}
private unowned uint8 * data;
private size_t size;
public Buffer (Bytes bytes, uint pointer_size, ByteOrder byte_order) {
public Buffer (Bytes bytes, ByteOrder byte_order = HOST, uint pointer_size = (uint) sizeof (size_t)) {
Object (
bytes: bytes,
pointer_size: pointer_size,
byte_order: byte_order
byte_order: byte_order,
pointer_size: pointer_size
);
}
@@ -428,10 +428,35 @@ namespace Frida {
return *((double *) &bits);
}
public string read_string (size_t offset) {
string * val = (string *) get_pointer (offset, sizeof (char));
public string read_string (size_t offset) throws Error {
string * start = (string *) get_pointer (offset, sizeof (char));
size_t max_length = size - offset;
return val->substring (0, (long) max_length);
string * end = memchr (start, 0, max_length);
if (end == null)
throw new Error.PROTOCOL ("Missing null character");
size_t size = end - start;
string val = start->substring (0, (long) size);
if (!val.validate ())
throw new Error.PROTOCOL ("Invalid UTF-8 string");
return val;
}
[CCode (cname = "memchr", cheader_filename = "string.h")]
private extern static string * memchr (string * s, int c, size_t n);
public string read_fixed_string (size_t offset, size_t size) throws Error {
string * start = (string *) get_pointer (offset, size);
size_t max_length = size - offset;
string * end = memchr (start, 0, max_length);
size_t n;
if (end != null)
n = end - start;
else
n = size;
string val = start->substring (0, (long) n);
if (!val.validate ())
throw new Error.PROTOCOL ("Invalid UTF-8 string");
return val;
}
public unowned Buffer write_string (size_t offset, string val) {
@@ -447,4 +472,129 @@ namespace Frida {
return data + offset;
}
}
public sealed class BufferReader {
public size_t available {
get {
return buffer.bytes.get_size () - offset;
}
}
private Buffer buffer;
private size_t offset = 0;
public BufferReader (Buffer buf) {
buffer = buf;
}
public uint64 read_pointer (size_t offset) throws Error {
var pointer_size = buffer.pointer_size;
check_available (pointer_size);
var ptr = buffer.read_pointer (offset);
offset += pointer_size;
return ptr;
}
public int8 read_int8 () throws Error {
check_available (sizeof (int8));
var val = buffer.read_int8 (offset);
offset += sizeof (int8);
return val;
}
public uint8 read_uint8 () throws Error {
check_available (sizeof (uint8));
var val = buffer.read_uint8 (offset);
offset += sizeof (uint8);
return val;
}
public int16 read_int16 () throws Error {
check_available (sizeof (int16));
var val = buffer.read_int16 (offset);
offset += sizeof (int16);
return val;
}
public uint16 read_uint16 () throws Error {
check_available (sizeof (uint16));
var val = buffer.read_uint16 (offset);
offset += sizeof (uint16);
return val;
}
public int32 read_int32 () throws Error {
check_available (sizeof (int32));
var val = buffer.read_int32 (offset);
offset += sizeof (int32);
return val;
}
public uint32 read_uint32 () throws Error {
check_available (sizeof (uint32));
var val = buffer.read_uint32 (offset);
offset += sizeof (uint32);
return val;
}
public int64 read_int64 () throws Error {
check_available (sizeof (int64));
var val = buffer.read_int64 (offset);
offset += sizeof (int64);
return val;
}
public uint64 read_uint64 () throws Error {
check_available (sizeof (uint64));
var val = buffer.read_uint64 (offset);
offset += sizeof (uint64);
return val;
}
public float read_float () throws Error {
check_available (sizeof (float));
var val = buffer.read_float (offset);
offset += sizeof (float);
return val;
}
public double read_double () throws Error {
check_available (sizeof (double));
var val = buffer.read_double (offset);
offset += sizeof (double);
return val;
}
public string read_string () throws Error {
check_available (1);
var val = buffer.read_string (offset);
offset += val.length + 1;
return val;
}
public string read_fixed_string (size_t size) throws Error {
check_available (size);
var val = buffer.read_fixed_string (offset, size);
offset += size;
return val;
}
public Bytes read_bytes (size_t size) throws Error {
check_available (size);
var val = buffer.bytes[offset:offset + size];
offset += size;
return val;
}
public unowned BufferReader skip (size_t n) throws Error {
check_available (n);
offset += n;
return this;
}
private void check_available (size_t n) throws Error {
if (available < n)
throw new Error.PROTOCOL ("Malformed buffer: truncated");
}
}
}
+243
View File
@@ -0,0 +1,243 @@
namespace Frida {
public sealed class ChannelRegistry : Object {
public signal void channel_closed (ChannelId id);
private Gee.Map<ChannelId?, weak IOStream> channels =
new Gee.HashMap<ChannelId?, weak IOStream> (ChannelId.hash, ChannelId.equal);
~ChannelRegistry () {
clear ();
}
public void clear () {
foreach (IOStream stream in channels.values.to_array ()) {
var channel_stream = stream as ChannelStream;
if (channel_stream != null)
channel_stream.abandon ();
}
channels.clear ();
}
public void register (ChannelId id, IOStream stream) {
stream.set_data ("channel-registry-entry", new Entry (this, id));
lock (channels)
channels[id] = stream;
}
public IOStream link (ChannelId id) throws Error {
IOStream? stream;
lock (channels)
stream = channels[id];
if (stream == null)
throw new Error.INVALID_ARGUMENT ("Invalid channel ID");
return stream;
}
public void unlink (ChannelId id) {
lock (channels) {
if (!channels.unset (id))
return;
}
channel_closed (id);
}
private class Entry {
public ChannelRegistry parent;
public ChannelId id;
public Entry (ChannelRegistry parent, ChannelId id) {
this.parent = parent;
this.id = id;
}
~Entry () {
parent.unlink (id);
}
}
}
public sealed class ChannelEndpoint : Object, Channel {
private IOStream? stream;
private ByteArray write_queue = new ByteArray ();
private bool writing = false;
private Cancellable io_cancellable = new Cancellable ();
public ChannelEndpoint (IOStream stream) {
this.stream = stream;
read_loop.begin ();
}
public async void close (Cancellable? cancellable) throws Error, IOError {
io_cancellable.cancel ();
}
public async void input (uint8[] data, Cancellable? cancellable) throws Error, IOError {
if (io_cancellable.is_cancelled ())
throw new Error.INVALID_OPERATION ("Channel is closed");
write_queue.append (data);
if (!writing) {
writing = true;
var source = new IdleSource ();
source.set_callback (() => {
process_write_queue.begin ();
return false;
});
source.attach (MainContext.get_thread_default ());
}
}
private async void read_loop () {
var input = stream.get_input_stream ();
var buffer = new uint8[64 * 1024];
while (true) {
ssize_t n;
try {
n = yield input.read_async (buffer, Priority.DEFAULT, io_cancellable);
} catch (GLib.Error e) {
break;
}
output (buffer[:n]);
if (n == 0)
break;
}
stream.close_async.begin ();
stream = null;
}
private async void process_write_queue () {
if (stream != null) {
var output = stream.get_output_stream ();
while (write_queue.len > 0) {
uint8[] batch = write_queue.steal ();
size_t bytes_written;
try {
yield output.write_all_async (batch, Priority.DEFAULT, io_cancellable, out bytes_written);
} catch (GLib.Error e) {
break;
}
}
}
writing = false;
}
}
public sealed class ChannelStream : VirtualStream {
public Channel channel {
get;
construct;
}
private ByteArray recv_queue = new ByteArray ();
private ByteArray send_queue = new ByteArray ();
public ChannelStream (Channel channel) {
Object (channel: channel);
}
construct {
channel.output.connect (on_output);
}
public void abandon () {
with_state_lock (() => {
state = CLOSED;
update_pending_io ();
});
}
protected override IOCondition query_events () {
IOCondition new_events = 0;
if (recv_queue.len != 0 || state == CLOSED)
new_events |= IN;
if (state == OPEN)
new_events |= OUT;
return new_events;
}
protected override void handle_close () {
channel.close.begin (null);
}
public override ssize_t read (uint8[] buffer) throws IOError {
ssize_t n = 0;
with_state_lock (() => {
n = ssize_t.min (recv_queue.len, buffer.length);
if (n > 0) {
Memory.copy (buffer, recv_queue.data, n);
recv_queue.remove_range (0, (uint) n);
update_pending_io ();
} else {
if (state == OPEN)
n = -1;
}
});
if (n == -1)
throw new IOError.WOULD_BLOCK ("Resource temporarily unavailable");
return n;
}
public override ssize_t write (uint8[] buffer) throws IOError {
with_state_lock (() => {
send_queue.append (buffer);
});
if (main_context.is_owner ()) {
process_send_queue ();
} else {
var source = new IdleSource ();
source.set_callback (() => {
process_send_queue ();
return Source.REMOVE;
});
source.attach (main_context);
}
return buffer.length;
}
private void process_send_queue () {
uint8[]? chunk = null;
with_state_lock (() => {
size_t n = send_queue.len;
if (n == 0)
return;
chunk = send_queue.data[0:n];
send_queue.remove_range (0, (uint) n);
});
if (chunk == null)
return;
channel.input.begin (chunk, io_cancellable);
}
private void on_output (uint8[] data) {
with_state_lock (() => {
if (data.length != 0)
recv_queue.append (data);
else
state = CLOSED;
update_pending_io ();
});
}
}
}
+34
View File
@@ -0,0 +1,34 @@
namespace Frida {
public sealed class CFArray<T> {
private CoreFoundation.Array handle;
public static CFArray<T> wrap<T> (void * handle) {
return new CFArray<T> ((CoreFoundation.Array) handle);
}
private CFArray (CoreFoundation.Array handle) {
this.handle = handle;
}
public Iterator<T> iterator () {
return new Iterator<T> (handle);
}
public class Iterator<T> {
public CoreFoundation.Array handle;
private CoreFoundation.Index i = 0;
private CoreFoundation.Index length;
internal Iterator (CoreFoundation.Array arr) {
handle = arr;
length = arr.length;
}
public unowned T? next_value () {
if (i == length)
return null;
return handle[i++];
}
}
}
}
+1 -1
View File
@@ -60,7 +60,7 @@ namespace Frida {
return yield connection.get_proxy (null, ObjectPath.HOST_SESSION, DBusProxyFlags.NONE, cancellable);
}
private class DummyInputStream : InputStream {
private sealed class DummyInputStream : InputStream {
private bool done = false;
private Mutex mutex;
private Cond cond;
-77
View File
@@ -1,77 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{C4203124-C838-437B-8662-CA477B146655}</ProjectGuid>
<RootNamespace>frida</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>frida-base-32</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="frida-base-common.props" />
<ItemGroup>
<ProjectReference Include="..\..\..\releng\frida-deps.vcxproj">
<Project>{4afce7c4-6d9a-4663-b43c-d2e518486910}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-85
View File
@@ -1,85 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
<Filter Include="Source Files\generated">
<UniqueIdentifier>{e96fc7f6-bddd-4322-8836-d9af8b731269}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\generated">
<UniqueIdentifier>{ca976c61-371a-4de5-b837-a8bd8857bc13}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)session.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="p2p-glue.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="socket-glue.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)dbus.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)p2p.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)promise.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)rpc.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)socket.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)buffer.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="session-glue.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="session.vala">
<Filter>Source Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(IntDir)frida-base.h">
<Filter>Header Files\generated</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="dbus.vala">
<Filter>Source Files</Filter>
</None>
<None Include="p2p.vala">
<Filter>Source Files</Filter>
</None>
<None Include="promise.vala">
<Filter>Source Files</Filter>
</None>
<None Include="rpc.vala">
<Filter>Source Files</Filter>
</None>
<None Include="socket.vala">
<Filter>Source Files</Filter>
</None>
<None Include="buffer.vala">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
</Project>
-77
View File
@@ -1,77 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{A31522D9-715B-4E04-AA57-DF7AFEBE082C}</ProjectGuid>
<RootNamespace>frida</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>frida-base-64</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="frida-base-common.props" />
<ItemGroup>
<ProjectReference Include="..\..\..\releng\frida-deps.vcxproj">
<Project>{4afce7c4-6d9a-4663-b43c-d2e518486910}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-85
View File
@@ -1,85 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
<Filter Include="Source Files\generated">
<UniqueIdentifier>{6c15c760-cd5b-41c4-ad64-83283571aeaf}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\generated">
<UniqueIdentifier>{984e0fc8-e24c-4868-a432-6dd66cc7db4d}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)session.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)dbus.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)p2p.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)promise.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)rpc.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)socket.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)buffer.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="p2p-glue.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="socket-glue.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="session-glue.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="session.vala">
<Filter>Source Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(IntDir)frida-base.h">
<Filter>Header Files\generated</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="dbus.vala">
<Filter>Source Files</Filter>
</None>
<None Include="p2p.vala">
<Filter>Source Files</Filter>
</None>
<None Include="promise.vala">
<Filter>Source Files</Filter>
</None>
<None Include="rpc.vala">
<Filter>Source Files</Filter>
</None>
<None Include="socket.vala">
<Filter>Source Files</Filter>
</None>
<None Include="buffer.vala">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
</Project>
-79
View File
@@ -1,79 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(FridaCoreDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="session.vala">
<Message>Compiling vala code</Message>
<Command>"$(ValaCompiler)" session.vala rpc.vala p2p.vala dbus.vala promise.vala socket.vala buffer.vala --ccode --directory=$(IntDir) --library=frida-base --header=$(IntDir)frida-base.h $(ValaFlags) $(FridaCoreValaFlags) --pkg=gio-2.0 --pkg=libsoup-3.0 --pkg=nice --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 || exit 1
echo &gt; "$(IntDir)valacode.stamp"
</Command>
<AdditionalInputs>$(ValaCompiler);rpc.vala;p2p.vala;dbus.vala;promise.vala;socket.vala;buffer.vala;%(AdditionalInputs)</AdditionalInputs>
<Outputs>$(IntDir)valacode.stamp;%(Outputs)</Outputs>
</CustomBuild>
<None Include="rpc.vala" />
<None Include="p2p.vala" />
<None Include="dbus.vala" />
<None Include="promise.vala" />
<None Include="socket.vala" />
<None Include="buffer.vala" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(IntDir)frida-base.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)session.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="session-glue.c" />
<ClCompile Include="$(IntDir)rpc.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="$(IntDir)p2p.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="p2p-glue.c" />
<ClCompile Include="$(IntDir)dbus.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="$(IntDir)promise.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="$(IntDir)socket.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="socket-glue.c" />
<ClCompile Include="$(IntDir)buffer.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
</ItemGroup>
</Project>
+51
View File
@@ -0,0 +1,51 @@
#include "frida-darwin.h"
gpointer
_frida_dispatch_retain (gpointer object)
{
dispatch_retain (object);
return object;
}
void
_frida_xpc_connection_set_event_handler (xpc_connection_t connection, FridaXpcHandler handler, gpointer user_data)
{
xpc_connection_set_event_handler (connection, ^(xpc_object_t object)
{
handler (object, user_data);
});
}
void
_frida_xpc_connection_send_message_with_reply (xpc_connection_t connection, xpc_object_t message, dispatch_queue_t replyq,
FridaXpcHandler handler, gpointer user_data, GDestroyNotify notify)
{
xpc_connection_send_message_with_reply (connection, message, replyq, ^(xpc_object_t object)
{
handler (object, user_data);
if (notify != NULL)
notify (user_data);
});
}
gchar *
_frida_xpc_object_to_string (xpc_object_t object)
{
gchar * result;
char * str;
str = xpc_copy_description (object);
result = g_strdup (str);
free (str);
return result;
}
gboolean
_frida_xpc_dictionary_apply (xpc_object_t dict, FridaXpcDictionaryApplier applier, gpointer user_data)
{
return xpc_dictionary_apply (dict, ^bool (const char * key, xpc_object_t val)
{
return applier (key, val, user_data);
});
}
+22
View File
@@ -0,0 +1,22 @@
#ifndef __FRIDA_DARWIN_H__
#define __FRIDA_DARWIN_H__
#ifdef HAVE_MACOS
#include <glib.h>
#include <xpc/xpc.h>
typedef void (* FridaXpcHandler) (xpc_object_t object, gpointer user_data);
typedef gboolean (* FridaXpcDictionaryApplier) (const gchar * key, xpc_object_t val, gpointer user_data);
gpointer _frida_dispatch_retain (gpointer object);
void _frida_xpc_connection_set_event_handler (xpc_connection_t connection, FridaXpcHandler handler, gpointer user_data);
void _frida_xpc_connection_send_message_with_reply (xpc_connection_t connection, xpc_object_t message, dispatch_queue_t replyq,
FridaXpcHandler handler, gpointer user_data, GDestroyNotify notify);
gchar * _frida_xpc_object_to_string (xpc_object_t object);
gboolean _frida_xpc_dictionary_apply (xpc_object_t dict, FridaXpcDictionaryApplier applier, gpointer user_data);
#endif
#endif
+114
View File
@@ -0,0 +1,114 @@
namespace Frida.FS {
public void mkdirp (File dir, Cancellable? cancellable = null) throws Error {
try {
dir.make_directory_with_parents (cancellable);
} catch (GLib.Error e) {
if (!(e is IOError.EXISTS))
throw new Error.PERMISSION_DENIED ("%s", e.message);
}
}
public void rmtree (File dir, Cancellable? cancellable = null) throws Error {
rmtree_worker (dir, 0, cancellable);
}
private void rmtree_worker (File dir, uint depth, Cancellable? cancellable = null) throws Error {
FileEnumerator enumerator;
try {
enumerator = dir.enumerate_children (FileAttribute.STANDARD_NAME, NOFOLLOW_SYMLINKS, cancellable);
} catch (GLib.Error e) {
if (depth == 0 && e is IOError.NOT_FOUND)
return;
throw new Error.PERMISSION_DENIED ("%s", e.message);
}
try {
FileInfo? info;
File? child;
while (enumerator.iterate (out info, out child, cancellable) && info != null) {
if (info == null)
continue;
if (info.get_file_type () == DIRECTORY)
rmtree (child, cancellable);
else
child.delete (cancellable);
}
dir.delete (cancellable);
} catch (GLib.Error e) {
if (!(e is IOError.EXISTS))
throw new Error.PERMISSION_DENIED ("%s", e.message);
}
}
public async void rmtree_async (File dir, Cancellable? cancellable = null) throws Error, IOError {
yield rmtree_async_worker (dir, 0, cancellable);
}
private async void rmtree_async_worker (File dir, uint depth, Cancellable? cancellable = null) throws Error, IOError {
int io_priority = Priority.DEFAULT;
FileEnumerator enumerator;
try {
enumerator = yield dir.enumerate_children_async (FileAttribute.STANDARD_NAME, NOFOLLOW_SYMLINKS, io_priority,
cancellable);
} catch (GLib.Error e) {
if (depth == 0 && e is IOError.NOT_FOUND)
return;
throw new Error.PERMISSION_DENIED ("%s", e.message);
}
try {
while (true) {
var batch = yield enumerator.next_files_async (1000, io_priority, cancellable);
if (batch.is_empty ())
break;
foreach (FileInfo info in batch) {
File child = dir.get_child (info.get_name ());
if (info.get_file_type () == DIRECTORY)
yield rmtree_async_worker (child, depth + 1, cancellable);
else
yield child.delete_async (io_priority, cancellable);
}
}
yield dir.delete_async (io_priority, cancellable);
} catch (GLib.Error e) {
throw new Error.PERMISSION_DENIED ("%s", e.message);
}
}
public async string read_all_text (File f, Cancellable? cancellable) throws Error, IOError {
Bytes b = yield read_all_bytes (f, cancellable);
string text = (string) b.get_data ();
if (!text.validate ())
throw new Error.PROTOCOL ("Unable to read '%s': invalid UTF-8", f.get_parse_name ());
return text;
}
public async void write_all_text (File f, string t, Cancellable? cancellable) throws Error, IOError {
yield write_all_bytes (f, new Bytes (t.data), cancellable);
}
public async Bytes read_all_bytes (File f, Cancellable? cancellable) throws Error, IOError {
try {
return yield f.load_bytes_async (cancellable, null);
} catch (GLib.Error e) {
if (e is IOError.CANCELLED)
throw (IOError) e;
if (e is IOError.NOT_FOUND)
throw new Error.INVALID_ARGUMENT ("%s", e.message);
throw new Error.PERMISSION_DENIED ("%s", e.message);
}
}
public async void write_all_bytes (File f, Bytes b, Cancellable? cancellable) throws Error, IOError {
try {
yield f.replace_contents_bytes_async (b, null, false, FileCreateFlags.NONE, cancellable, null);
} catch (GLib.Error e) {
if (e is IOError.CANCELLED)
throw (IOError) e;
throw new Error.PERMISSION_DENIED ("%s", e.message);
}
}
}
@@ -1,6 +1,7 @@
#ifndef __FRIDA_SYSCALL_H__
#define __FRIDA_SYSCALL_H__
#ifndef __FRIDA_LINUX_SYSCALL_H__
#define __FRIDA_LINUX_SYSCALL_H__
#include <linux/unistd.h>
#include <sys/syscall.h>
#undef SYS_process_vm_readv
@@ -14,7 +14,7 @@ namespace Frida {
[CCode (cheader_filename = "sys/mman.h", cname = "MAP_ANONYMOUS")]
public const int MAP_ANONYMOUS;
[CCode (cheader_filename = "linux/frida-syscall.h", cprefix = "SYS_", has_type_id = false)]
[CCode (cheader_filename = "linux-syscall.h", cprefix = "SYS_", has_type_id = false)]
public enum SysCall {
memfd_create,
pidfd_getfd,
+107
View File
@@ -0,0 +1,107 @@
namespace Frida {
private uint linux_major = 0;
private uint linux_minor = 0;
public bool check_kernel_version (uint major, uint minor) {
if (linux_major == 0) {
var name = Posix.utsname ();
name.release.scanf ("%u.%u", out linux_major, out linux_minor);
}
return (linux_major == major && linux_minor >= minor) || linux_major > major;
}
public class FileDescriptor : Object, FileDescriptorBased {
public int handle;
public FileDescriptor (int handle) {
this.handle = handle;
}
~FileDescriptor () {
if (handle != -1)
Posix.close (handle);
}
public int steal () {
int result = handle;
handle = -1;
return result;
}
public int get_fd () {
return handle;
}
}
public sealed class PidFileDescriptor : FileDescriptor {
private uint pid;
private PidFileDescriptor (int fd, uint pid) {
base (fd);
this.pid = pid;
}
public static bool is_supported () {
return check_kernel_version (5, 3);
}
public static bool getfd_is_supported () {
return check_kernel_version (5, 6);
}
public static PidFileDescriptor from_pid (uint pid) throws Error {
int fd = pidfd_open (pid, 0);
if (fd == -1)
throw_pidfd_error (pid, errno);
return new PidFileDescriptor (fd, pid);
}
public FileDescriptor getfd (int targetfd) throws Error {
int fd = pidfd_getfd (handle, targetfd, 0);
if (fd == -1)
throw_pidfd_error (pid, errno);
return new FileDescriptor (fd);
}
private static int pidfd_open (uint pid, uint flags) {
return Linux.syscall (SysCall.pidfd_open, pid, flags);
}
private static int pidfd_getfd (int pidfd, int targetfd, uint flags) {
return Linux.syscall (SysCall.pidfd_getfd, pidfd, targetfd, flags);
}
[NoReturn]
private static void throw_pidfd_error (uint pid, int err) throws Error {
switch (err) {
case Posix.ESRCH:
throw new Error.PROCESS_NOT_FOUND ("Process not found");
case Posix.EPERM:
throw new Error.PERMISSION_DENIED ("Unable to use pidfd for pid %u: %s", pid, strerror (err));
default:
throw new Error.NOT_SUPPORTED ("Unable to use pidfd for pid %u: %s", pid, strerror (err));
}
}
}
namespace MemoryFileDescriptor {
public bool is_supported () {
return check_kernel_version (3, 17);
}
public static FileDescriptor from_bytes (string name, Bytes bytes) {
assert (is_supported ());
var fd = new FileDescriptor (memfd_create (name, 0));
unowned uint8[] data = bytes.get_data ();
ssize_t n = Posix.write (fd.handle, data, data.length);
assert (n == data.length);
return fd;
}
private int memfd_create (string name, uint flags) {
return Linux.syscall (SysCall.memfd_create, name, flags);
}
}
}
+57 -4
View File
@@ -1,39 +1,92 @@
base_sources = [
'session.vala',
'session-glue.c',
'channel.vala',
'service.vala',
'stream.vala',
'rpc.vala',
'p2p.vala',
'p2p-glue.c',
'dbus.vala',
'promise.vala',
'fs.vala',
'socket.vala',
'socket-glue.c',
'buffer.vala',
'value.vala',
]
extra_vala_args = []
if host_os == 'macos'
base_sources += [
'xpc.vala',
'frida-darwin.c',
]
endif
if host_os_family == 'darwin'
base_sources += 'corefoundation.vala'
endif
if host_os_family == 'linux'
base_sources += 'linux.vala'
extra_vala_args += [
'--pkg=linux',
'--pkg=linux-system',
'--pkg=posix',
]
endif
extra_deps = []
if host_os_family != 'windows'
extra_deps += [gio_unix_dep]
extra_vala_args += '--pkg=gio-unix-2.0'
extra_deps += gio_unix_dep
endif
base_vala_args = [gum_vala_args, '--pkg=gio-2.0', '--pkg=json-glib-1.0']
if nice_dep.found()
base_vala_args += '--pkg=nice'
endif
if host_os_family == 'darwin'
base_vala_args += [
'--pkg=corefoundation',
'--pkg=darwin-gcd',
'--pkg=darwin-xpc',
]
endif
if host_os_family == 'linux'
base_vala_args += [
'--vapidir=' + meson.current_source_dir(),
'--pkg=gio-unix-2.0',
]
endif
base_gir_name = f'FridaBase-@[email protected]'
base = static_library('frida-base-' + api_version, base_sources,
c_args: frida_component_cflags,
vala_args: [base_vala_args, '--pkg=libsoup-3.0'] + extra_vala_args,
vala_header: 'frida-base.h',
vala_gir: base_gir_name,
vala_vapi: f'frida-base-@[email protected]',
dependencies: [glib_dep, gobject_dep, gio_dep, libsoup_dep, nice_dep, usrsctp_dep, gee_dep, json_glib_dep, gum_dep, openssl_dep] + extra_deps,
install: true,
install_dir: [true, header_install_dir, true],
install_dir: [true, header_install_dir, true, false],
)
base_dep = declare_dependency(
include_directories: include_directories('.'),
link_with: base,
dependencies: [nice_dep, json_glib_dep, gum_dep],
dependencies: [nice_dep, json_glib_dep, gum_dep] + extra_deps,
)
base_build_dir = meson.current_build_dir()
pkg = import('pkgconfig')
pkg.generate(base,
description: 'Frida base library',
filebase: f'frida-base-@api_version@',
name: 'Frida Base Library',
version: frida_version,
description: 'Basic building blocks',
)
+1 -1
View File
@@ -59,7 +59,7 @@ _frida_generate_certificate (guint8 ** cert_der, gint * cert_der_length, gchar *
bio = BIO_new (BIO_s_mem ());
i2d_X509_bio (bio, x509);
n = BIO_get_mem_data (bio, (guint8 **) &der);
*cert_der = g_memdup (der, n);
*cert_der = g_memdup2 (der, n);
*cert_der_length = n;
BIO_free (g_steal_pointer (&bio));
+38 -249
View File
@@ -169,7 +169,7 @@ namespace Frida {
}
}
public class PeerSocket : Object, DatagramBased {
public sealed class PeerSocket : Object, DatagramBased {
public Nice.Agent agent {
get;
construct;
@@ -447,11 +447,13 @@ namespace Frida {
_pending_io = condition;
foreach (var entry in sources.entries) {
Source source = entry.key;
unowned Source source = entry.key;
IOCondition c = entry.value;
if ((_pending_io & c) != 0)
source.set_ready_time (0);
}
notify_property ("pending-io");
}
private void prepare_for_io (int64 timeout, Cancellable? cancellable, out int64 deadline) throws IOError {
@@ -563,7 +565,7 @@ namespace Frida {
}
}
public class SctpConnection : IOStream {
public sealed class SctpConnection : VirtualStream {
public DatagramBased transport_socket {
get;
construct;
@@ -584,55 +586,14 @@ namespace Frida {
construct;
}
public State state {
get {
return _state;
}
}
public override InputStream input_stream {
get {
return _input_stream;
}
}
public override OutputStream output_stream {
get {
return _output_stream;
}
}
public IOCondition pending_io {
get {
lock (state)
return sctp_events;
}
}
private State _state = CREATED;
private SctpInputStream _input_stream;
private SctpOutputStream _output_stream;
private DatagramBasedSource transport_source;
private uint8[] transport_buffer = new uint8[65536];
private void * sctp_socket;
private IOCondition sctp_events = 0;
private SctpTimerSource sctp_source;
private uint16 stream_id;
private ByteArray dcep_message = new ByteArray ();
private Gee.Map<unowned Source, IOCondition> sources = new Gee.HashMap<unowned Source, IOCondition> ();
private Cancellable io_cancellable = new Cancellable ();
public enum State {
CREATED,
OPENING,
OPENED,
CLOSED
}
public SctpConnection (DatagramBased transport_socket, PeerSetup setup, uint16 port, size_t max_message_size) {
Object (
transport_socket: transport_socket,
@@ -649,14 +610,9 @@ namespace Frida {
protected extern static void _initialize_sctp_backend ();
construct {
_input_stream = new SctpInputStream (this);
_output_stream = new SctpOutputStream (this);
sctp_socket = _create_sctp_socket ();
_connect_sctp_socket (sctp_socket, port);
var main_context = MainContext.get_thread_default ();
transport_source = transport_socket.create_source (IOCondition.IN, io_cancellable);
transport_source.set_callback (on_transport_socket_readable);
transport_source.attach (main_context);
@@ -669,17 +625,22 @@ namespace Frida {
protected extern void _connect_sctp_socket (void * sock, uint16 port);
public override bool close (GLib.Cancellable? cancellable) throws IOError {
do_close ();
return true;
protected override VirtualStream.State query_initial_state () {
return CREATED;
}
public override async bool close_async (int io_priority, GLib.Cancellable? cancellable) throws IOError {
do_close ();
return true;
protected override IOCondition query_events () {
return _query_sctp_socket_events (sctp_socket);
}
private void do_close () {
protected override void update_pending_io () {
base.update_pending_io ();
sctp_source.invalidate ();
}
protected extern static IOCondition _query_sctp_socket_events (void * sock);
protected override void handle_close () {
sctp_source.destroy ();
transport_source.destroy ();
@@ -689,13 +650,17 @@ namespace Frida {
public extern static void _close (void * sock);
public void shutdown (SctpShutdownType type) throws IOError {
_shutdown (sctp_socket, type);
public override void shutdown_read () throws IOError {
_shutdown (sctp_socket, READ);
}
public override void shutdown_write () throws IOError {
_shutdown (sctp_socket, WRITE);
}
public extern static void _shutdown (void * sock, SctpShutdownType type) throws IOError;
public ssize_t recv (uint8[] buffer) throws IOError {
public override ssize_t read (uint8[] buffer) throws IOError {
ssize_t n = -1;
try {
@@ -711,18 +676,18 @@ namespace Frida {
handle_dcep_message (stream_id, dcep_message.steal ());
}
throw new IOError.WOULD_BLOCK ("Resource temporarily unavailable");
} else if (protocol_id == NONE || _state != OPENED) {
} else if (protocol_id == NONE || state != OPEN) {
throw new IOError.WOULD_BLOCK ("Resource temporarily unavailable");
}
} finally {
update_sctp_events ();
update_pending_io ();
}
return n;
}
public ssize_t send (uint8[] buffer) throws IOError {
if (_state != OPENED)
public override ssize_t write (uint8[] buffer) throws IOError {
if (state != OPEN)
throw new IOError.WOULD_BLOCK ("Resource temporarily unavailable");
ssize_t n = ssize_t.min (buffer.length, (ssize_t) max_message_size);
@@ -730,20 +695,10 @@ namespace Frida {
try {
return _send (sctp_socket, stream_id, WEBRTC_BINARY, buffer[0:n]);
} finally {
update_sctp_events ();
update_pending_io ();
}
}
public void register_source (Source source, IOCondition condition) {
lock (state)
sources[source] = condition | IOCondition.ERR | IOCondition.HUP;
}
public void unregister_source (Source source) {
lock (state)
sources.unset (source);
}
private bool on_transport_socket_readable (DatagramBased datagram_based, IOCondition condition) {
var v = InputVector ();
v.buffer = transport_buffer;
@@ -774,31 +729,18 @@ namespace Frida {
protected extern void _handle_transport_packet (uint8[] data);
protected int _emit_transport_packet (uint8[] data) {
var v = OutputVector ();
v.buffer = data;
v.size = data.length;
OutputVector[] vectors = { v };
var m = OutputMessage ();
m.vectors = vectors;
m.num_vectors = vectors.length;
OutputMessage[] messages = { m };
try {
transport_socket.send_messages (messages, 0, 0, io_cancellable);
Udp.send (data, transport_socket, io_cancellable);
return 0;
} catch (GLib.Error e) {
return -1;
}
return 0;
}
protected void _on_sctp_socket_events_changed () {
update_sctp_events ();
update_pending_io ();
if (_state == CREATED && setup == ACTIVE && (sctp_events & IOCondition.OUT) != 0) {
if (state == CREATED && setup == ACTIVE && (pending_io & IOCondition.OUT) != 0) {
stream_id = 1;
uint8[] open_message = {
@@ -812,31 +754,12 @@ namespace Frida {
};
try {
_send (sctp_socket, stream_id, WEBRTC_DCEP, open_message);
_state = OPENING;
state = OPENING;
} catch (IOError e) {
}
}
}
private void update_sctp_events () {
IOCondition new_events = _query_sctp_socket_events (sctp_socket);
lock (state) {
sctp_events = new_events;
foreach (var entry in sources.entries) {
Source source = entry.key;
IOCondition c = entry.value;
if ((new_events & c) != 0)
source.set_ready_time (0);
}
sctp_source.invalidate ();
}
}
protected extern static IOCondition _query_sctp_socket_events (void * sock);
protected extern static ssize_t _recv (void * sock, uint8[] buffer, out uint16 stream_id,
out PayloadProtocolId protocol_id, out SctpMessageFlags message_flags) throws IOError;
@@ -848,7 +771,7 @@ namespace Frida {
switch (type) {
case DATA_CHANNEL_OPEN: {
if (_state != CREATED || setup == ACTIVE)
if (state != CREATED || setup == ACTIVE)
return;
this.stream_id = stream_id;
@@ -856,15 +779,15 @@ namespace Frida {
uint8[] reply = { DcepMessageType.DATA_CHANNEL_ACK };
_send (sctp_socket, stream_id, WEBRTC_DCEP, reply);
_state = OPENED;
state = OPEN;
break;
}
case DATA_CHANNEL_ACK:
if (_state != OPENING)
if (state != OPENING)
return;
_state = OPENED;
state = OPEN;
break;
}
@@ -899,140 +822,6 @@ namespace Frida {
DATA_CHANNEL_ACK = 0x02
}
private class SctpInputStream : InputStream, PollableInputStream {
public weak SctpConnection connection {
get;
construct;
}
public SctpInputStream (SctpConnection connection) {
Object (connection: connection);
}
public override bool close (Cancellable? cancellable) throws IOError {
connection.shutdown (READ);
return true;
}
public override async bool close_async (int io_priority, Cancellable? cancellable) throws GLib.IOError {
return close (cancellable);
}
public override ssize_t read (uint8[] buffer, Cancellable? cancellable) throws IOError {
assert_not_reached ();
}
public bool can_poll () {
return true;
}
public bool is_readable () {
return (connection.pending_io & IOCondition.IN) != 0;
}
public PollableSource create_source (Cancellable? cancellable) {
return new PollableSource.full (this, new SctpIOSource (connection, IOCondition.IN), cancellable);
}
public ssize_t read_nonblocking_fn (uint8[] buffer) throws GLib.Error {
return connection.recv (buffer);
}
}
private class SctpOutputStream : OutputStream, PollableOutputStream {
public weak SctpConnection connection {
get;
construct;
}
public SctpOutputStream (SctpConnection connection) {
Object (connection: connection);
}
public override bool close (Cancellable? cancellable) throws IOError {
connection.shutdown (WRITE);
return true;
}
public override async bool close_async (int io_priority, Cancellable? cancellable) throws GLib.IOError {
return close (cancellable);
}
public override bool flush (GLib.Cancellable? cancellable) throws GLib.Error {
return true;
}
public override async bool flush_async (int io_priority, GLib.Cancellable? cancellable) throws GLib.Error {
return true;
}
public override ssize_t write (uint8[] buffer, Cancellable? cancellable) throws IOError {
assert_not_reached ();
}
public bool can_poll () {
return true;
}
public bool is_writable () {
return (connection.pending_io & IOCondition.OUT) != 0;
}
public PollableSource create_source (Cancellable? cancellable) {
return new PollableSource.full (this, new SctpIOSource (connection, IOCondition.OUT), cancellable);
}
public ssize_t write_nonblocking_fn (uint8[]? buffer) throws GLib.Error {
return connection.send (buffer);
}
public PollableReturn writev_nonblocking_fn (OutputVector[] vectors, out size_t bytes_written) throws GLib.Error {
assert_not_reached ();
}
}
private class SctpIOSource : Source {
public SctpConnection connection;
public IOCondition condition;
public SctpIOSource (SctpConnection connection, IOCondition condition) {
this.connection = connection;
this.condition = condition;
connection.register_source (this, condition);
}
~SctpIOSource () {
connection.unregister_source (this);
}
protected override bool prepare (out int timeout) {
timeout = -1;
return (connection.pending_io & condition) != 0;
}
protected override bool check () {
return (connection.pending_io & condition) != 0;
}
protected override bool dispatch (SourceFunc? callback) {
set_ready_time (-1);
if (callback == null)
return Source.REMOVE;
return callback ();
}
protected static bool closure_callback (Closure closure) {
var return_value = Value (typeof (bool));
closure.invoke (ref return_value, {});
return return_value.get_boolean ();
}
}
private class SctpTimerSource : Source {
private static int64 last_process_time = -1;
+1 -1
View File
@@ -1,5 +1,5 @@
namespace Frida {
public class Promise<T> {
public sealed class Promise<T> {
private Impl<T> impl;
public Future<T> future {
+4 -4
View File
@@ -1,5 +1,5 @@
namespace Frida {
public class RpcClient : Object {
public sealed class RpcClient : Object {
public weak RpcPeer peer {
get;
construct;
@@ -11,7 +11,7 @@ namespace Frida {
Object (peer: peer);
}
public async Json.Node call (string method, Json.Node[] args, Cancellable? cancellable) throws Error, IOError {
public async Json.Node call (string method, Json.Node[] args, Bytes? data, Cancellable? cancellable) throws Error, IOError {
string request_id = Uuid.string_random ();
var request = new Json.Builder ();
@@ -39,7 +39,7 @@ namespace Frida {
pending_responses[request_id] = pending;
try {
yield peer.post_rpc_message (raw_request, cancellable);
yield peer.post_rpc_message (raw_request, data, cancellable);
} catch (Error e) {
if (pending_responses.unset (request_id))
pending.complete_with_error (e);
@@ -158,6 +158,6 @@ namespace Frida {
}
public interface RpcPeer : Object {
public abstract async void post_rpc_message (string json, Cancellable? cancellable) throws Error, IOError;
public abstract async void post_rpc_message (string json, Bytes? data, Cancellable? cancellable) throws Error, IOError;
}
}
+48
View File
@@ -0,0 +1,48 @@
namespace Frida {
public sealed class ServiceSessionRegistry : Object {
public signal void session_closed (ServiceSessionId id);
private Gee.Map<ServiceSessionId?, ServiceSession> sessions =
new Gee.HashMap<ServiceSessionId?, ServiceSession> (ServiceSessionId.hash, ServiceSessionId.equal);
~ServiceSessionRegistry () {
clear ();
}
public void clear () {
foreach (var session in sessions.values.to_array ())
session.close ();
sessions.clear ();
}
public void register (ServiceSessionId id, ServiceSession session) {
sessions[id] = session;
ServiceSessionId? boxed_id = id;
session.set_data ("service-session-id", boxed_id);
session.close.connect (on_session_close);
}
public ServiceSession link (ServiceSessionId id) throws Error {
var session = sessions[id];
if (session == null)
throw new Error.INVALID_ARGUMENT ("Invalid session ID");
return session;
}
public void unlink (ServiceSessionId id) {
ServiceSession? session;
if (sessions.unset (id, out session)) {
session.close.disconnect (on_session_close);
session_closed (id);
}
}
private void on_session_close (ServiceSession session) {
ServiceSessionId? id = session.get_data ("service-session-id");
unlink (id);
}
}
}
+2
View File
@@ -2,6 +2,8 @@
#if defined (HAVE_WINDOWS)
#include <windows.h>
gchar *
_frida_query_windows_version (void)
{
+138 -28
View File
@@ -1,5 +1,5 @@
namespace Frida {
[DBus (name = "re.frida.HostSession16")]
[DBus (name = "re.frida.HostSession17")]
public interface HostSession : Object {
public abstract async void ping (uint interval_seconds, Cancellable? cancellable) throws GLib.Error;
@@ -27,6 +27,10 @@ namespace Frida {
public abstract async InjectorPayloadId inject_library_blob (uint pid, uint8[] blob, string entrypoint, string data,
Cancellable? cancellable) throws GLib.Error;
public abstract async ChannelId open_channel (string address, Cancellable? cancellable) throws GLib.Error;
public abstract async ServiceSessionId open_service (string address, Cancellable? cancellable) throws GLib.Error;
public signal void spawn_added (HostSpawnInfo info);
public signal void spawn_removed (HostSpawnInfo info);
public signal void child_added (HostChildInfo info);
@@ -34,10 +38,12 @@ namespace Frida {
public signal void process_crashed (CrashInfo crash);
public signal void output (uint pid, int fd, uint8[] data);
public signal void agent_session_detached (AgentSessionId id, SessionDetachReason reason, CrashInfo crash);
public signal void channel_closed (ChannelId id);
public signal void service_session_closed (ServiceSessionId id);
public signal void uninjected (InjectorPayloadId id);
}
[DBus (name = "re.frida.AgentSessionProvider16")]
[DBus (name = "re.frida.AgentSessionProvider17")]
public interface AgentSessionProvider : Object {
public abstract async void open (AgentSessionId id, HashTable<string, Variant> options,
Cancellable? cancellable) throws GLib.Error;
@@ -52,7 +58,7 @@ namespace Frida {
public signal void child_gating_changed (uint subscriber_count);
}
[DBus (name = "re.frida.AgentSession16")]
[DBus (name = "re.frida.AgentSession17")]
public interface AgentSession : Object {
public abstract async void close (Cancellable? cancellable) throws GLib.Error;
@@ -94,7 +100,7 @@ namespace Frida {
public signal void candidate_gathering_done ();
}
[DBus (name = "re.frida.AgentController16")]
[DBus (name = "re.frida.AgentController17")]
public interface AgentController : Object {
#if !WINDOWS
public abstract async HostChildId prepare_to_fork (uint parent_pid, Cancellable? cancellable, out uint parent_injectee_id,
@@ -115,7 +121,7 @@ namespace Frida {
Cancellable? cancellable) throws GLib.Error;
}
[DBus (name = "re.frida.AgentMessageSink16")]
[DBus (name = "re.frida.AgentMessageSink17")]
public interface AgentMessageSink : Object {
public abstract async void post_messages (AgentMessage[] messages, uint batch_id,
Cancellable? cancellable) throws GLib.Error;
@@ -145,11 +151,16 @@ namespace Frida {
DEBUGGER
}
public class AgentMessageTransmitter : Object {
public sealed class AgentMessageTransmitter : Object {
public signal void closed ();
public signal void new_candidates (string[] candidate_sdps);
public signal void candidate_gathering_done ();
public weak AgentSession agent_session {
get;
construct;
}
public uint persist_timeout {
get;
construct;
@@ -198,8 +209,10 @@ namespace Frida {
INTERRUPTED
}
public AgentMessageTransmitter (uint persist_timeout, MainContext frida_context, MainContext dbus_context) {
public AgentMessageTransmitter (AgentSession agent_session, uint persist_timeout, MainContext frida_context,
MainContext dbus_context) {
Object (
agent_session: agent_session,
persist_timeout: persist_timeout,
frida_context: frida_context,
dbus_context: dbus_context
@@ -500,8 +513,7 @@ namespace Frida {
nice_connection.on_closed.connect (on_nice_connection_closed);
try {
nice_registration_id = nice_connection.register_object (ObjectPath.AGENT_SESSION,
(AgentSession) this);
nice_registration_id = nice_connection.register_object (ObjectPath.AGENT_SESSION, agent_session);
} catch (IOError io_error) {
assert_not_reached ();
}
@@ -737,13 +749,30 @@ namespace Frida {
}
}
[DBus (name = "re.frida.TransportBroker16")]
[DBus (name = "re.frida.Channel17")]
public interface Channel : Object {
public abstract async void close (Cancellable? cancellable) throws GLib.Error;
public abstract async void input (uint8[] data, Cancellable? cancellable) throws GLib.Error;
public signal void output (uint8[] data);
}
[DBus (name = "re.frida.ServiceSession17")]
public interface ServiceSession : Object {
public signal void close ();
public signal void message (Variant message);
public abstract async void activate (Cancellable? cancellable) throws GLib.Error;
public abstract async void cancel (Cancellable? cancellable) throws GLib.Error;
public abstract async Variant request (Variant parameters, Cancellable? cancellable) throws GLib.Error;
}
[DBus (name = "re.frida.TransportBroker17")]
public interface TransportBroker : Object {
public abstract async void open_tcp_transport (AgentSessionId id, Cancellable? cancellable, out uint16 port,
out string token) throws GLib.Error;
}
[DBus (name = "re.frida.PortalSession16")]
[DBus (name = "re.frida.PortalSession17")]
public interface PortalSession : Object {
public abstract async void join (HostApplicationInfo app, SpawnStartState current_state,
AgentSessionId[] interrupted_sessions, HashTable<string, Variant> options, Cancellable? cancellable,
@@ -752,19 +781,19 @@ namespace Frida {
public signal void kill ();
}
[DBus (name = "re.frida.BusSession16")]
[DBus (name = "re.frida.BusSession17")]
public interface BusSession : Object {
public abstract async void attach (Cancellable? cancellable) throws GLib.Error;
public abstract async void post (string json, bool has_data, uint8[] data, Cancellable? cancellable) throws GLib.Error;
public signal void message (string json, bool has_data, uint8[] data);
}
[DBus (name = "re.frida.AuthenticationService16")]
[DBus (name = "re.frida.AuthenticationService17")]
public interface AuthenticationService : Object {
public abstract async string authenticate (string token, Cancellable? cancellable) throws GLib.Error;
}
public class StaticAuthenticationService : Object, AuthenticationService {
public sealed class StaticAuthenticationService : Object, AuthenticationService {
public string token_hash {
get;
construct;
@@ -789,13 +818,13 @@ namespace Frida {
}
}
public class NullAuthenticationService : Object, AuthenticationService {
public sealed class NullAuthenticationService : Object, AuthenticationService {
public async string authenticate (string token, Cancellable? cancellable) throws Error, IOError {
throw new Error.INVALID_OPERATION ("Authentication not expected");
}
}
public class UnauthorizedHostSession : Object, HostSession {
public sealed class UnauthorizedHostSession : Object, HostSession {
public async void ping (uint interval_seconds, Cancellable? cancellable) throws Error, IOError {
throw_not_authorized ();
}
@@ -869,9 +898,17 @@ namespace Frida {
Cancellable? cancellable) throws Error, IOError {
throw_not_authorized ();
}
public async ChannelId open_channel (string address, Cancellable? cancellable) throws Error, IOError {
throw_not_authorized ();
}
public async ServiceSessionId open_service (string address, Cancellable? cancellable) throws Error, IOError {
throw_not_authorized ();
}
}
public class UnauthorizedPortalSession : Object, PortalSession {
public sealed class UnauthorizedPortalSession : Object, PortalSession {
public async void join (HostApplicationInfo app, SpawnStartState current_state,
AgentSessionId[] interrupted_sessions, HashTable<string, Variant> options,
Cancellable? cancellable, out SpawnStartState next_state) throws Error, IOError {
@@ -879,7 +916,7 @@ namespace Frida {
}
}
public class UnauthorizedBusSession : Object, BusSession {
public sealed class UnauthorizedBusSession : Object, BusSession {
public async void attach (Cancellable? cancellable) throws Error, IOError {
throw_not_authorized ();
}
@@ -1077,7 +1114,7 @@ namespace Frida {
}
}
public class FrontmostQueryOptions : Object {
public sealed class FrontmostQueryOptions : Object {
public Scope scope {
get;
set;
@@ -1107,7 +1144,7 @@ namespace Frida {
}
}
public class ApplicationQueryOptions : Object {
public sealed class ApplicationQueryOptions : Object {
public Scope scope {
get;
set;
@@ -1165,7 +1202,7 @@ namespace Frida {
}
}
public class ProcessQueryOptions : Object {
public sealed class ProcessQueryOptions : Object {
public Scope scope {
get;
set;
@@ -1307,7 +1344,7 @@ namespace Frida {
}
}
public class SessionOptions : Object {
public sealed class SessionOptions : Object {
public Realm realm {
get;
set;
@@ -1496,6 +1533,46 @@ namespace Frida {
}
}
public struct ChannelId {
public string handle;
public ChannelId (string handle) {
this.handle = handle;
}
public ChannelId.generate () {
this.handle = Uuid.string_random ().replace ("-", "");
}
public static uint hash (ChannelId? id) {
return id.handle.hash ();
}
public static bool equal (ChannelId? a, ChannelId? b) {
return a.handle == b.handle;
}
}
public struct ServiceSessionId {
public string handle;
public ServiceSessionId (string handle) {
this.handle = handle;
}
public ServiceSessionId.generate () {
this.handle = Uuid.string_random ().replace ("-", "");
}
public static uint hash (ServiceSessionId? id) {
return id.handle.hash ();
}
public static bool equal (ServiceSessionId? a, ServiceSessionId? b) {
return a.handle == b.handle;
}
}
public struct AgentScriptId {
public uint handle;
@@ -1512,7 +1589,7 @@ namespace Frida {
}
}
public class ScriptOptions : Object {
public sealed class ScriptOptions : Object {
public string? name {
get;
set;
@@ -1602,7 +1679,7 @@ namespace Frida {
SHARED_MEMORY
}
public class SnapshotOptions : Object {
public sealed class SnapshotOptions : Object {
public string? warmup_script {
get;
set;
@@ -1677,7 +1754,7 @@ namespace Frida {
}
}
public class PortalOptions : Object {
public sealed class PortalOptions : Object {
public TlsCertificate? certificate {
get;
set;
@@ -1740,7 +1817,7 @@ namespace Frida {
}
}
public class PeerOptions : Object {
public sealed class PeerOptions : Object {
public string? stun_server {
get;
set;
@@ -1801,7 +1878,7 @@ namespace Frida {
}
}
public class Relay : Object {
public sealed class Relay : Object {
public string address {
get;
construct;
@@ -2042,7 +2119,8 @@ namespace Frida {
public const string AGENT_SESSION = "/re/frida/AgentSession";
public const string AGENT_CONTROLLER = "/re/frida/AgentController";
public const string AGENT_MESSAGE_SINK = "/re/frida/AgentMessageSink";
public const string CHILD_SESSION = "/re/frida/ChildSession";
public const string CHANNEL = "/re/frida/Channel";
public const string SERVICE = "/re/frida/Service";
public const string TRANSPORT_BROKER = "/re/frida/TransportBroker";
public const string PORTAL_SESSION = "/re/frida/PortalSession";
public const string BUS_SESSION = "/re/frida/BusSession";
@@ -2055,6 +2133,14 @@ namespace Frida {
public static string for_agent_message_sink (AgentSessionId id) {
return AGENT_MESSAGE_SINK + "/" + id.handle;
}
public static string for_channel (ChannelId id) {
return CHANNEL + "/" + id.handle;
}
public static string for_service_session (ServiceSessionId id) {
return SERVICE + "/" + id.handle;
}
}
namespace Marshal {
@@ -2071,4 +2157,28 @@ namespace Frida {
return klass.get_value (val).value_nick;
}
}
namespace Numeric {
public uint int64_hash (int64? val) {
uint64 v = (uint64) val.abs ();
return (uint) ((v >> 32) ^ (v & 0xffffffffU));
}
public bool int64_equal (int64? val_a, int64? val_b) {
int64 a = val_a;
int64 b = val_b;
return a == b;
}
public uint uint64_hash (uint64? val) {
uint64 v = val;
return (uint) ((v >> 32) ^ (v & 0xffffffffU));
}
public bool uint64_equal (uint64? val_a, uint64? val_b) {
uint64 a = val_a;
uint64 b = val_b;
return a == b;
}
}
}
+610 -587
View File
File diff suppressed because it is too large. Load diff
+336
View File
@@ -0,0 +1,336 @@
namespace Frida {
public abstract class VirtualStream : IOStream {
public override InputStream input_stream {
get {
return _input_stream;
}
}
public override OutputStream output_stream {
get {
return _output_stream;
}
}
public IOCondition pending_io {
get {
lock (state)
return _pending_io;
}
}
protected State state = OPEN;
private VirtualInputStream _input_stream;
private VirtualOutputStream _output_stream;
private IOCondition _pending_io;
private Gee.Map<unowned Source, IOCondition> sources = new Gee.HashMap<unowned Source, IOCondition> ();
protected Cancellable io_cancellable = new Cancellable ();
protected MainContext main_context;
protected enum State {
CREATED,
OPENING,
OPEN,
CLOSED
}
protected delegate void WorkFunc ();
construct {
_input_stream = new VirtualInputStream (this);
_output_stream = new VirtualOutputStream (this);
main_context = MainContext.ref_thread_default ();
state = query_initial_state ();
_pending_io = query_events ();
}
public override void dispose () {
_output_stream.detach ();
_input_stream.detach ();
io_cancellable.cancel ();
base.dispose ();
}
protected virtual State query_initial_state () {
return OPEN;
}
protected abstract IOCondition query_events ();
public override bool close (GLib.Cancellable? cancellable) throws IOError {
_close ();
return true;
}
public override async bool close_async (int io_priority, GLib.Cancellable? cancellable) throws IOError {
_close ();
return true;
}
private void _close () {
if (main_context.is_owner ()) {
do_close ();
} else {
var source = new IdleSource ();
source.set_callback (() => {
do_close ();
return Source.REMOVE;
});
source.attach (main_context);
}
}
private void do_close () {
if (state == CLOSED)
return;
handle_close ();
}
protected abstract void handle_close ();
public virtual void shutdown_read () throws IOError {
}
public virtual void shutdown_write () throws IOError {
}
public abstract ssize_t read (uint8[] buffer) throws IOError;
public abstract ssize_t write (uint8[] buffer) throws IOError;
protected void with_state_lock (WorkFunc func) {
lock (state)
func ();
}
public void register_source (Source source, IOCondition condition) {
lock (state)
sources[source] = condition | IOCondition.ERR | IOCondition.HUP;
}
public void unregister_source (Source source) {
lock (state)
sources.unset (source);
}
protected virtual void update_pending_io () {
lock (state) {
_pending_io = query_events ();
foreach (var entry in sources.entries) {
unowned Source source = entry.key;
IOCondition c = entry.value;
if ((_pending_io & c) != 0)
source.set_ready_time (0);
}
}
notify_property ("pending-io");
}
}
private sealed class VirtualInputStream : InputStream, PollableInputStream {
private weak VirtualStream stream;
public VirtualInputStream (VirtualStream stream) {
Object ();
this.stream = stream;
}
internal void detach () {
stream = null;
}
public override bool close (Cancellable? cancellable) throws IOError {
if (stream != null)
stream.shutdown_read ();
return true;
}
public override async bool close_async (int io_priority, Cancellable? cancellable) throws GLib.IOError {
return close (cancellable);
}
public override ssize_t read (uint8[] buffer, Cancellable? cancellable) throws IOError {
if (stream == null)
return 0;
if (!is_readable ()) {
bool done = false;
var mutex = Mutex ();
var cond = Cond ();
ulong io_handler = stream.notify["pending-io"].connect ((obj, pspec) => {
if (is_readable ()) {
mutex.lock ();
done = true;
cond.signal ();
mutex.unlock ();
}
});
ulong cancellation_handler = 0;
if (cancellable != null) {
cancellation_handler = cancellable.connect (() => {
mutex.lock ();
done = true;
cond.signal ();
mutex.unlock ();
});
}
if (!is_readable ()) {
mutex.lock ();
while (!done)
cond.wait (mutex);
mutex.unlock ();
}
if (cancellation_handler != 0)
cancellable.disconnect (cancellation_handler);
stream.disconnect (io_handler);
cancellable.set_error_if_cancelled ();
}
return stream.read (buffer);
}
public bool can_poll () {
return true;
}
public bool is_readable () {
if (stream == null)
return true;
return (stream.pending_io & IOCondition.IN) != 0;
}
public PollableSource create_source (Cancellable? cancellable) {
return new PollableSource.full (this, new VirtualIOSource (stream, IOCondition.IN), cancellable);
}
public ssize_t read_nonblocking_fn (uint8[] buffer) throws GLib.Error {
if (stream == null)
return 0;
return stream.read (buffer);
}
}
private sealed class VirtualOutputStream : OutputStream, PollableOutputStream {
private weak VirtualStream? stream;
public VirtualOutputStream (VirtualStream stream) {
Object ();
this.stream = stream;
}
internal void detach () {
stream = null;
}
public override bool close (Cancellable? cancellable) throws IOError {
if (stream != null)
stream.shutdown_write ();
return true;
}
public override async bool close_async (int io_priority, Cancellable? cancellable) throws GLib.IOError {
return close (cancellable);
}
public override bool flush (GLib.Cancellable? cancellable) throws GLib.Error {
return true;
}
public override async bool flush_async (int io_priority, GLib.Cancellable? cancellable) throws GLib.Error {
return true;
}
public override ssize_t write (uint8[] buffer, Cancellable? cancellable) throws IOError {
return stream.write (buffer);
}
public bool can_poll () {
return true;
}
public bool is_writable () {
if (stream == null)
return false;
return (stream.pending_io & IOCondition.OUT) != 0;
}
public PollableSource create_source (Cancellable? cancellable) {
return new PollableSource.full (this, new VirtualIOSource (stream, IOCondition.OUT), cancellable);
}
public ssize_t write_nonblocking_fn (uint8[]? buffer) throws GLib.Error {
if (stream == null)
throw new IOError.CLOSED ("Virtual is closed");
return stream.write (buffer);
}
public PollableReturn writev_nonblocking_fn (OutputVector[] vectors, out size_t bytes_written) throws GLib.Error {
assert_not_reached ();
}
}
private class VirtualIOSource : Source {
public VirtualStream? stream;
public IOCondition condition;
public VirtualIOSource (VirtualStream stream, IOCondition condition) {
this.stream = stream;
this.condition = condition;
if (stream != null)
stream.register_source (this, condition);
}
~VirtualIOSource () {
if (stream != null)
stream.unregister_source (this);
}
protected override bool prepare (out int timeout) {
timeout = -1;
return is_ready ();
}
protected override bool check () {
return is_ready ();
}
private bool is_ready () {
IOCondition pending_io = (stream != null) ? stream.pending_io : IOCondition.IN;
return (pending_io & condition) != 0;
}
protected override bool dispatch (SourceFunc? callback) {
set_ready_time (-1);
if (callback == null)
return Source.REMOVE;
return callback ();
}
protected static bool closure_callback (Closure closure) {
var return_value = Value (typeof (bool));
closure.invoke (ref return_value, {});
return return_value.get_boolean ();
}
}
}
+391
View File
@@ -0,0 +1,391 @@
namespace Frida {
public interface ObjectBuilder : Object {
public abstract unowned ObjectBuilder begin_dictionary ();
public abstract unowned ObjectBuilder set_member_name (string name);
public abstract unowned ObjectBuilder end_dictionary ();
public abstract unowned ObjectBuilder begin_array ();
public abstract unowned ObjectBuilder end_array ();
public abstract unowned ObjectBuilder add_null_value ();
public abstract unowned ObjectBuilder add_bool_value (bool val);
public abstract unowned ObjectBuilder add_int64_value (int64 val);
public abstract unowned ObjectBuilder add_uint64_value (uint64 val);
public abstract unowned ObjectBuilder add_data_value (Bytes val);
public abstract unowned ObjectBuilder add_string_value (string val);
public abstract unowned ObjectBuilder add_uuid_value (uint8[] val);
public abstract unowned ObjectBuilder add_raw_value (Bytes val);
public abstract Bytes build ();
}
public interface ObjectReader : Object {
public abstract bool has_member (string name) throws Error;
public abstract unowned ObjectReader read_member (string name) throws Error;
public abstract unowned ObjectReader end_member ();
public abstract uint count_elements () throws Error;
public abstract unowned ObjectReader read_element (uint index) throws Error;
public abstract unowned ObjectReader end_element () throws Error;
public abstract bool get_bool_value () throws Error;
public abstract uint8 get_uint8_value () throws Error;
public abstract uint16 get_uint16_value () throws Error;
public abstract int64 get_int64_value () throws Error;
public abstract uint64 get_uint64_value () throws Error;
public abstract Bytes get_data_value () throws Error;
public abstract unowned string get_string_value () throws Error;
public abstract unowned string get_uuid_value () throws Error;
}
public sealed class VariantReader : Object, ObjectReader {
public Variant root_object {
get {
return scopes.peek_head ().val;
}
}
public Variant current_object {
get {
return scopes.peek_tail ().val;
}
}
private Gee.Deque<Scope> scopes = new Gee.ArrayQueue<Scope> ();
public VariantReader (Variant v) {
push_scope (v);
}
public bool has_member (string name) throws Error {
var scope = peek_scope ();
if (scope.dict == null)
throw new Error.PROTOCOL ("Dictionary expected, but at %s", scope.val.print (true));
return scope.dict.contains (name);
}
public unowned ObjectReader read_member (string name) throws Error {
var scope = peek_scope ();
if (scope.dict == null)
throw new Error.PROTOCOL ("Dictionary expected, but at %s", scope.val.print (true));
Variant? v = scope.dict.lookup_value (name, null);
if (v == null)
throw new Error.PROTOCOL ("Key '%s' not found in dictionary: %s", name, scope.val.print (true));
push_scope (v);
return this;
}
public unowned ObjectReader end_member () {
pop_scope ();
return this;
}
public uint count_elements () throws Error {
var scope = peek_scope ();
scope.check_array ();
return (uint) scope.val.n_children ();
}
public unowned ObjectReader read_element (uint index) throws Error {
var scope = peek_scope ();
scope.check_array ();
push_scope (scope.val.get_child_value (index).get_variant ());
return this;
}
public unowned ObjectReader end_element () throws Error {
pop_scope ();
return this;
}
public bool get_bool_value () throws Error {
return peek_scope ().get_value (VariantType.BOOLEAN).get_boolean ();
}
public uint8 get_uint8_value () throws Error {
return peek_scope ().get_value (VariantType.BYTE).get_byte ();
}
public uint16 get_uint16_value () throws Error {
return peek_scope ().get_value (VariantType.UINT16).get_uint16 ();
}
public int64 get_int64_value () throws Error {
return peek_scope ().get_value (VariantType.INT64).get_int64 ();
}
public uint64 get_uint64_value () throws Error {
return peek_scope ().get_value (VariantType.UINT64).get_uint64 ();
}
public Bytes get_data_value () throws Error {
return peek_scope ().get_value (new VariantType.array (VariantType.BYTE)).get_data_as_bytes ();
}
public unowned string get_string_value () throws Error {
return peek_scope ().get_value (VariantType.STRING).get_string ();
}
public unowned string get_uuid_value () throws Error {
return peek_scope ().get_value (VariantType.STRING).get_string (); // TODO: Use a tuple to avoid ambiguity.
}
private void push_scope (Variant v) {
scopes.offer_tail (new Scope (v));
}
private Scope peek_scope () {
return scopes.peek_tail ();
}
private Scope pop_scope () {
return scopes.poll_tail ();
}
private class Scope {
public Variant val;
public VariantDict? dict;
public bool is_array = false;
public Scope (Variant v) {
val = v;
VariantType t = v.get_type ();
if (t.equal (VariantType.VARDICT))
dict = new VariantDict (v);
else if (t.is_subtype_of (VariantType.ARRAY))
is_array = true;
}
public Variant get_value (VariantType expected_type) throws Error {
if (!val.get_type ().equal (expected_type)) {
throw new Error.PROTOCOL ("Expected type '%s', got '%s'",
(string) expected_type.peek_string (),
(string) val.get_type ().peek_string ());
}
return val;
}
public void check_array () throws Error {
if (!is_array)
throw new Error.PROTOCOL ("Array expected, but at %s", val.print (true));
}
}
}
public sealed class JsonObjectBuilder : Object, ObjectBuilder {
private Json.Builder builder = new Json.Builder ();
private Gee.Map<string, Bytes> raw_values = new Gee.HashMap<string, Bytes> ();
public unowned ObjectBuilder begin_dictionary () {
builder.begin_object ();
return this;
}
public unowned ObjectBuilder set_member_name (string name) {
builder.set_member_name (name);
return this;
}
public unowned ObjectBuilder end_dictionary () {
builder.end_object ();
return this;
}
public unowned ObjectBuilder begin_array () {
builder.begin_array ();
return this;
}
public unowned ObjectBuilder end_array () {
builder.end_array ();
return this;
}
public unowned ObjectBuilder add_null_value () {
builder.add_null_value ();
return this;
}
public unowned ObjectBuilder add_bool_value (bool val) {
builder.add_boolean_value (val);
return this;
}
public unowned ObjectBuilder add_int64_value (int64 val) {
builder.add_int_value (val);
return this;
}
public unowned ObjectBuilder add_uint64_value (uint64 val) {
builder.add_int_value ((int64) val);
return this;
}
public unowned ObjectBuilder add_data_value (Bytes val) {
builder.add_string_value (Base64.encode (val.get_data ()));
return this;
}
public unowned ObjectBuilder add_string_value (string val) {
builder.add_string_value (val);
return this;
}
public unowned ObjectBuilder add_uuid_value (uint8[] val) {
assert_not_reached ();
}
public unowned ObjectBuilder add_raw_value (Bytes val) {
string uuid = Uuid.string_random ();
builder.add_string_value (uuid);
raw_values[uuid] = val;
return this;
}
public Bytes build () {
string json = Json.to_string (builder.get_root (), false);
foreach (var e in raw_values.entries) {
unowned string uuid = e.key;
Bytes val = e.value;
unowned string raw_str = (string) val.get_data ();
string str = raw_str[:(long) val.get_size ()];
json = json.replace ("\"" + uuid + "\"", str);
}
return new Bytes (json.data);
}
}
public sealed class JsonObjectReader : Object, ObjectReader {
private Json.Reader reader;
public JsonObjectReader (string json) throws Error {
try {
reader = new Json.Reader (Json.from_string (json));
} catch (GLib.Error e) {
throw new Error.INVALID_ARGUMENT ("%s", e.message);
}
}
public bool has_member (string name) throws Error {
bool result = reader.read_member (name);
reader.end_member ();
return result;
}
public unowned ObjectReader read_member (string name) throws Error {
if (!reader.read_member (name))
throw_dict_access_error ();
return this;
}
public unowned ObjectReader end_member () {
reader.end_member ();
return this;
}
[NoReturn]
private void throw_dict_access_error () throws Error {
GLib.Error e = reader.get_error ();
reader.end_member ();
throw new Error.PROTOCOL ("%s", e.message);
}
public uint count_elements () throws Error {
int n = reader.count_elements ();
if (n == -1)
throw_array_access_error ();
return n;
}
public unowned ObjectReader read_element (uint index) throws Error {
if (!reader.read_element (index)) {
GLib.Error e = reader.get_error ();
reader.end_element ();
throw new Error.PROTOCOL ("%s", e.message);
}
return this;
}
public unowned ObjectReader end_element () throws Error {
reader.end_element ();
return this;
}
[NoReturn]
private void throw_array_access_error () throws Error {
GLib.Error e = reader.get_error ();
reader.end_element ();
throw new Error.PROTOCOL ("%s", e.message);
}
public bool get_bool_value () throws Error {
bool v = reader.get_boolean_value ();
if (!v)
maybe_throw_value_access_error ();
return v;
}
public uint8 get_uint8_value () throws Error {
int64 v = get_int64_value ();
if (v < 0 || v > uint8.MAX)
throw new Error.PROTOCOL ("Invalid uint8");
return (uint8) v;
}
public uint16 get_uint16_value () throws Error {
int64 v = get_int64_value ();
if (v < 0 || v > uint16.MAX)
throw new Error.PROTOCOL ("Invalid uint16");
return (uint16) v;
}
public int64 get_int64_value () throws Error {
int64 v = reader.get_int_value ();
if (v == 0)
maybe_throw_value_access_error ();
return v;
}
public uint64 get_uint64_value () throws Error {
int64 v = get_int64_value ();
if (v < 0)
throw new Error.PROTOCOL ("Invalid uint64");
return v;
}
public Bytes get_data_value () throws Error {
return new Bytes (Base64.decode (get_string_value ()));
}
public unowned string get_string_value () throws Error {
unowned string? v = reader.get_string_value ();
if (v == null)
maybe_throw_value_access_error ();
return v;
}
public unowned string get_uuid_value () throws Error {
return get_string_value ();
}
private void maybe_throw_value_access_error () throws Error {
GLib.Error? e = reader.get_error ();
if (e == null)
return;
reader.end_member ();
throw new Error.PROTOCOL ("%s", e.message);
}
}
}
+291
View File
@@ -0,0 +1,291 @@
namespace Frida {
public sealed class XpcClient : Object {
public signal void message (Darwin.Xpc.Object obj);
public State state {
get {
return _state;
}
}
public Darwin.Xpc.Connection connection {
get;
construct;
}
public Darwin.GCD.DispatchQueue queue {
get;
construct;
}
private State _state;
private string? close_reason;
private MainContext main_context;
public enum State {
OPEN,
CLOSING,
CLOSED,
}
public static XpcClient make_for_mach_service (string name, Darwin.GCD.DispatchQueue queue) {
return new XpcClient (Darwin.Xpc.Connection.create_mach_service (name, queue, 0), queue);
}
public XpcClient (Darwin.Xpc.Connection connection, Darwin.GCD.DispatchQueue queue) {
Object (connection: connection, queue: queue);
}
construct {
main_context = MainContext.ref_thread_default ();
connection.set_event_handler (on_event);
connection.activate ();
}
public override void dispose () {
if (close_reason != null) {
change_state (CLOSED);
} else {
change_state (CLOSING);
this.ref ();
connection.cancel ();
}
base.dispose ();
}
public async Darwin.Xpc.Object request (Darwin.Xpc.Object message, Cancellable? cancellable) throws Error, IOError {
Darwin.Xpc.Object? reply = null;
connection.send_message_with_reply (message, queue, r => {
schedule_on_frida_thread (() => {
reply = r;
request.callback ();
return Source.REMOVE;
});
});
var cancel_source = new CancellableSource (cancellable);
cancel_source.set_callback (() => {
connection.cancel ();
return Source.REMOVE;
});
cancel_source.attach (main_context);
yield;
cancel_source.destroy ();
if (reply.type == Darwin.Xpc.Error.TYPE) {
var e = (Darwin.Xpc.Error) reply;
throw new Error.NOT_SUPPORTED ("%s", e.get_string (Darwin.Xpc.Error.KEY_DESCRIPTION));
}
return reply;
}
public void post (Darwin.Xpc.Object message) throws Error, IOError {
connection.send_message (message);
}
private void change_state (State new_state) {
_state = new_state;
notify_property ("state");
}
private void on_event (Darwin.Xpc.Object obj) {
schedule_on_frida_thread (() => {
if (obj.type == Darwin.Xpc.Error.TYPE) {
var e = (Darwin.Xpc.Error) obj;
close_reason = e.get_string (Darwin.Xpc.Error.KEY_DESCRIPTION);
switch (state) {
case OPEN:
change_state (CLOSED);
break;
case CLOSING:
change_state (CLOSED);
unref ();
break;
case CLOSED:
assert_not_reached ();
}
} else {
message (obj);
}
return Source.REMOVE;
});
}
private void schedule_on_frida_thread (owned SourceFunc function) {
var source = new IdleSource ();
source.set_callback ((owned) function);
source.attach (main_context);
}
}
public sealed class XpcObjectReader {
public Darwin.Xpc.Object root_object {
get {
return scopes.peek_head ().object;
}
}
public Darwin.Xpc.Object current_object {
get {
return scopes.peek_tail ().object;
}
}
public delegate int TranslateErrorFunc (string domain, int code, string description);
private Gee.Deque<Scope> scopes = new Gee.ArrayQueue<Scope> ();
public XpcObjectReader (Darwin.Xpc.Object obj) {
push_scope (obj);
}
public bool has_member (string name) throws Error {
return peek_scope ().get_dictionary ().get_value (name) != null;
}
public bool try_read_member (string name) throws Error {
var scope = peek_scope ();
var dict = scope.get_dictionary ();
var val = dict.get_value (name);
if (val == null)
return false;
push_scope (val);
return true;
}
public unowned XpcObjectReader read_member (string name) throws Error {
var scope = peek_scope ();
var dict = scope.get_dictionary ();
var val = dict.get_value (name);
if (val == null)
throw new Error.PROTOCOL ("Key '%s' not found in dictionary: %s", name, scope.object.to_string ());
push_scope (val);
return this;
}
public unowned XpcObjectReader end_member () {
pop_scope ();
return this;
}
public size_t count_elements () throws Error {
return peek_scope ().get_array ().count;
}
public unowned XpcObjectReader read_element (size_t index) throws Error {
push_scope (peek_scope ().get_array ().get_value (index));
return this;
}
public unowned XpcObjectReader end_element () throws Error {
pop_scope ();
return this;
}
public bool get_bool_value () throws Error {
return peek_scope ().get_object<Darwin.Xpc.Bool> (Darwin.Xpc.Bool.TYPE).get_value ();
}
public int64 get_int64_value () throws Error {
return peek_scope ().get_object<Darwin.Xpc.Int64> (Darwin.Xpc.Int64.TYPE).get_value ();
}
public uint64 get_uint64_value () throws Error {
return peek_scope ().get_object<Darwin.Xpc.UInt64> (Darwin.Xpc.UInt64.TYPE).get_value ();
}
public unowned uint8[] get_data_value () throws Error {
var data = peek_scope ().get_object<Darwin.Xpc.Data> (Darwin.Xpc.Data.TYPE);
unowned uint8[] buf = (uint8[]) data.get_bytes_ptr ();
buf.length = (int) data.get_length ();
return buf;
}
public unowned string get_string_value () throws Error {
return peek_scope ().get_object<Darwin.Xpc.String> (Darwin.Xpc.String.TYPE).get_string_ptr ();
}
public unowned uint8[] get_uuid_value () throws Error {
return peek_scope ().get_object<Darwin.Xpc.Uuid> (Darwin.Xpc.Uuid.TYPE).get_bytes ()[:16];
}
public unowned string get_error_description () throws Error {
var error = peek_scope ().get_object<Darwin.Xpc.Error> (Darwin.Xpc.Error.TYPE);
return error.get_string (Darwin.Xpc.Error.KEY_DESCRIPTION);
}
public void check_nserror (TranslateErrorFunc translate_error) throws Error {
if (!has_member ("error"))
return;
read_member ("error");
unowned string domain = read_member ("domain").get_string_value ();
end_member ();
var code = (int) read_member ("code").get_int64_value ();
end_member ();
string description = read_member ("userInfo").read_member ("NSLocalizedDescription").get_string_value ();
if (description.has_suffix ("."))
description = description[:description.length - 1];
throw (Error) new GLib.Error.literal (
Quark.from_string ("frida-error-quark"),
translate_error (domain, code, description),
description);
}
public unowned Darwin.Xpc.Object get_object_value (Darwin.Xpc.Type expected_type) throws Error {
return peek_scope ().get_object<Darwin.Xpc.Object> (expected_type);
}
private void push_scope (Darwin.Xpc.Object obj) {
scopes.offer_tail (new Scope (obj));
}
private Scope peek_scope () {
return scopes.peek_tail ();
}
private Scope pop_scope () {
return scopes.poll_tail ();
}
private class Scope {
public Darwin.Xpc.Object object;
private unowned Darwin.Xpc.Type type;
public Scope (Darwin.Xpc.Object obj) {
object = obj;
type = obj.type;
}
public unowned T get_object<T> (Darwin.Xpc.Type expected_type) throws Error {
if (type != expected_type)
throw new Error.PROTOCOL ("Expected type '%s', got '%s'", expected_type.name, type.name);
return object;
}
public unowned Darwin.Xpc.Array get_array () throws Error {
return get_object<Darwin.Xpc.Array> (Darwin.Xpc.Array.TYPE);
}
public unowned Darwin.Xpc.Dictionary get_dictionary () throws Error {
return get_object<Darwin.Xpc.Dictionary> (Darwin.Xpc.Dictionary.TYPE);
}
}
}
}
+97 -27
View File
@@ -1,5 +1,5 @@
namespace Frida.Gadget {
private class Config : Object, Json.Serializable {
private sealed class Config : Object, Json.Serializable {
public Object interaction {
get;
set;
@@ -93,7 +93,7 @@ namespace Frida.Gadget {
}
}
private class ScriptInteraction : Object, Json.Serializable {
private sealed class ScriptInteraction : Object, Json.Serializable {
public string path {
get;
set;
@@ -145,7 +145,7 @@ namespace Frida.Gadget {
}
}
private class ScriptDirectoryInteraction : Object {
private sealed class ScriptDirectoryInteraction : Object {
public string path {
get;
set;
@@ -164,7 +164,7 @@ namespace Frida.Gadget {
}
}
private class ScriptConfig : Object, Json.Serializable {
private sealed class ScriptConfig : Object, Json.Serializable {
public ProcessFilter? filter {
get;
set;
@@ -216,7 +216,7 @@ namespace Frida.Gadget {
}
}
private class ProcessFilter : Object {
private sealed class ProcessFilter : Object {
public string[] executables {
get;
set;
@@ -258,7 +258,7 @@ namespace Frida.Gadget {
}
}
private class ListenInteraction : SocketInteraction {
private sealed class ListenInteraction : SocketInteraction {
public PortConflictBehavior on_port_conflict {
get;
set;
@@ -287,7 +287,7 @@ namespace Frida.Gadget {
}
}
private class ConnectInteraction : SocketInteraction, Json.Serializable {
private sealed class ConnectInteraction : SocketInteraction, Json.Serializable {
public string[]? acl {
get;
set;
@@ -328,7 +328,7 @@ namespace Frida.Gadget {
}
}
private class Location : Object {
private sealed class Location : Object {
public string executable_name {
get;
construct;
@@ -751,7 +751,7 @@ namespace Frida.Gadget {
string config_data;
try {
FileUtils.get_contents (config_path, out config_data);
load_asset_text (config_path, out config_data);
} catch (FileError e) {
if (e is FileError.NOENT)
return new Config ();
@@ -841,6 +841,7 @@ namespace Frida.Gadget {
private ExitMonitor exit_monitor;
private ThreadSuspendMonitor thread_suspend_monitor;
private UnwindSitter unwind_sitter;
private Gum.ScriptBackend? qjs_backend;
private Gum.ScriptBackend? v8_backend;
@@ -852,6 +853,7 @@ namespace Frida.Gadget {
construct {
exit_monitor = new ExitMonitor (this, MainContext.default ());
thread_suspend_monitor = new ThreadSuspendMonitor (this);
unwind_sitter = new UnwindSitter (this);
}
public async void start () throws Error, IOError {
@@ -986,7 +988,7 @@ namespace Frida.Gadget {
}
}
private class ScriptRunner : BaseController {
private sealed class ScriptRunner : BaseController {
private ScriptEngine engine;
private Script script;
@@ -1034,7 +1036,7 @@ namespace Frida.Gadget {
}
}
private class ScriptDirectoryRunner : BaseController {
private sealed class ScriptDirectoryRunner : BaseController {
public string directory_path {
get;
construct;
@@ -1224,7 +1226,7 @@ namespace Frida.Gadget {
private ScriptConfig load_config (string path) throws Error {
string data;
try {
FileUtils.get_contents (path, out data);
load_asset_text (path, out data);
} catch (FileError e) {
if (e is FileError.NOENT)
return new ScriptConfig ();
@@ -1239,8 +1241,14 @@ namespace Frida.Gadget {
}
}
private class Script : Object, RpcPeer {
private const uint8 QUICKJS_BYTECODE_MAGIC = 0x02;
private sealed class Script : Object, RpcPeer {
private const uint8 QUICKJS_BYTECODE_MAGIC =
#if BIG_ENDIAN
0x42
#else
0x02
#endif
;
public enum ChangeBehavior {
IGNORE,
@@ -1347,9 +1355,9 @@ namespace Frida.Gadget {
try {
var path = this.path;
uint8[] contents;
Bytes contents;
try {
FileUtils.get_data (path, out contents);
load_asset_bytes (path, out contents);
} catch (FileError e) {
throw new Error.INVALID_ARGUMENT ("%s", e.message);
}
@@ -1358,11 +1366,10 @@ namespace Frida.Gadget {
options.name = Path.get_basename (path).split (".", 2)[0];
ScriptEngine.ScriptInstance instance;
if (contents.length > 0 && contents[0] == QUICKJS_BYTECODE_MAGIC) {
instance = yield engine.create_script (null, new Bytes (contents), options);
} else {
instance = yield engine.create_script ((string) contents, null, options);
}
if (contents.length > 0 && contents[0] == QUICKJS_BYTECODE_MAGIC)
instance = yield engine.create_script (null, contents, options);
else
instance = yield engine.create_script ((string) contents.get_data (), null, options);
if (id.handle != 0)
yield engine.destroy_script (id);
@@ -1379,7 +1386,7 @@ namespace Frida.Gadget {
var stage = new Json.Node.alloc ().init_string ((peek_state () == State.CREATED) ? "early" : "late");
try {
yield rpc_client.call ("init", new Json.Node[] { stage, parameters }, null);
yield rpc_client.call ("init", new Json.Node[] { stage, parameters }, null, null);
} catch (GLib.Error e) {
}
}
@@ -1447,12 +1454,12 @@ namespace Frida.Gadget {
return true;
}
private async void post_rpc_message (string json, Cancellable? cancellable) throws Error, IOError {
engine.post_to_script (id, json);
private async void post_rpc_message (string json, Bytes? data, Cancellable? cancellable) throws Error, IOError {
engine.post_to_script (id, json, data);
}
}
private class ControlServer : BaseController {
private sealed class ControlServer : BaseController {
public EndpointParameters endpoint_params {
get;
construct;
@@ -1495,7 +1502,8 @@ namespace Frida.Gadget {
var endpoint_params = new EndpointParameters (interaction.address, interaction.port,
parse_certificate (interaction.certificate, location), interaction.origin, auth_service, asset_root);
service = new WebService (endpoint_params, CONTROL, interaction.on_port_conflict);
service = new WebService (endpoint_params, WebServiceFlavor.CONTROL, interaction.on_port_conflict,
new TunnelInterfaceObserver ());
service.incoming.connect (on_incoming_connection);
yield service.start (io_cancellable);
}
@@ -1925,6 +1933,14 @@ namespace Frida.Gadget {
throw new Error.NOT_SUPPORTED ("Unable to inject libraries when embedded");
}
public async ChannelId open_channel (string address, Cancellable? cancellable) throws Error, IOError {
throw new Error.NOT_SUPPORTED ("Unable to open channels when embedded");
}
public async ServiceSessionId open_service (string address, Cancellable? cancellable) throws Error, IOError {
throw new Error.NOT_SUPPORTED ("Unable to open services when embedded");
}
private void validate_pid (uint pid) throws Error {
if (pid != this_process.pid)
throw new Error.NOT_SUPPORTED ("Unable to act on other processes when embedded");
@@ -1956,7 +1972,7 @@ namespace Frida.Gadget {
}
}
private class ClusterClient : BaseController {
private sealed class ClusterClient : BaseController {
public SocketConnectable connectable {
get;
construct;
@@ -2073,6 +2089,60 @@ namespace Frida.Gadget {
}
#endif
private void load_asset_text (string filename, out string text) throws FileError {
Bytes raw_contents;
load_asset_bytes (filename, out raw_contents);
unowned string str = (string) raw_contents.get_data ();
if (!str.validate ())
throw new FileError.FAILED ("%s: invalid UTF-8", filename);
text = str;
}
private void load_asset_bytes (string filename, out Bytes bytes) throws FileError {
#if ANDROID
if (maybe_load_asset_bytes_from_apk (filename, out bytes))
return;
#endif
uint8[] data;
FileUtils.get_data (filename, out data);
bytes = new Bytes.take ((owned) data);
}
#if ANDROID
private bool maybe_load_asset_bytes_from_apk (string filename, out Bytes contents) throws FileError {
contents = null;
var tokens = filename.split ("!", 2);
if (tokens.length != 2 || !tokens[0].has_suffix (".apk"))
return false;
unowned string apk_path = tokens[0];
unowned string file_path = tokens[1];
var reader = Minizip.Reader.create ();
try {
if (reader.open_file (apk_path) != OK)
throw new FileError.FAILED ("Unable to open APK");
if (reader.locate_entry (file_path[1:], true) != OK)
throw new FileError.FAILED ("Unable to locate %s inside APK", file_path);
var size = reader.entry_save_buffer_length ();
var data = new uint8[size + 1];
if (reader.entry_save_buffer (data[:size]) != OK)
throw new FileError.FAILED ("Unable to extract %s from APK", file_path);
contents = new Bytes.take ((owned) data);
return true;
} finally {
reader.close ();
Minizip.Reader.destroy (ref reader);
}
}
#endif
private Json.Node make_empty_json_object () {
return new Json.Node.alloc ().init_object (new Json.Object ());
}
+44 -36
View File
@@ -14,11 +14,13 @@ endif
platform_deps = []
extra_vala_args = []
extra_objc_args = []
extra_link_args = []
extra_link_depends = []
if host_os_family != 'windows'
extra_vala_args += '--pkg=gio-unix-2.0'
platform_deps += gio_unix_dep
endif
@@ -27,17 +29,24 @@ if host_os_family == 'darwin'
extra_link_args += '-Wl,-framework,Foundation'
endif
if host_os == 'android'
extra_vala_args += '--pkg=minizip'
platform_deps += minizip_dep
endif
if host_os_family == 'windows'
symfile = 'frida-gadget.symbols'
extra_link_args += '-Wl,--retain-symbols-file,' + (meson.current_source_dir() / symfile)
extra_link_depends += symfile
if host_toolchain != 'microsoft'
symfile = 'frida-gadget.symbols'
extra_link_args += '-Wl,--retain-symbols-file,' + meson.current_source_dir() / symfile
extra_link_depends += symfile
endif
elif host_os_family == 'darwin'
symlist = 'frida-gadget.symbols'
extra_link_args += '-Wl,-exported_symbols_list,' + (meson.current_source_dir() / symlist)
extra_link_args += '-Wl,-exported_symbols_list,' + meson.current_source_dir() / symlist
extra_link_depends += symlist
else
symscript = 'frida-gadget.version'
extra_link_args += '-Wl,--version-script,' + (meson.current_source_dir() / symscript)
extra_link_args += '-Wl,--version-script,' + meson.current_source_dir() / symscript
extra_link_depends += symscript
endif
@@ -46,15 +55,17 @@ if host_os_family in ['linux', 'qnx']
extra_link_args += ['-Wl,-Bsymbolic']
endif
raw_gadget = shared_library('frida-gadget', gadget_sources,
raw_gadget = shared_library('frida-gadget-raw', gadget_sources,
name_prefix: 'lib',
vala_args: [base_vala_args, payload_vala_args, extra_vala_args],
vala_header: 'frida-gadget.h',
c_args: frida_component_cflags,
objc_args: extra_objc_args,
link_args: extra_link_args,
link_depends: extra_link_depends,
vs_module_defs: 'frida-gadget.def',
override_options: ['b_asneeded=true'],
dependencies: [gio_dep, gee_dep, json_glib_dep, gum_dep, gumjs_dep, base_dep, tls_provider_dep, payload_dep] + platform_deps,
dependencies: [gio_dep, gee_dep, json_glib_dep, gum_dep, gumjs_dep, base_dep, netif_dep, tls_provider_dep, payload_dep] + platform_deps,
)
operations = [
@@ -67,30 +78,14 @@ if host_os_family != 'darwin'
'--move', 'destructor', 'frida_on_unload', 'last',
]
endif
if get_option('strip')
operations += ['--strip', '>>>', strip, '<<<']
endif
if host_machine.endian() == 'little'
endian_option = ['--endian', 'little']
else
endian_option = ['--endian', 'big']
endif
modulated_gadget = custom_target('frida-gadget-modulated',
input: raw_gadget,
output: 'libfrida-gadget-modulated' + shlib_suffix,
command: [
modulate,
'@INPUT@',
] + operations + endian_option + [
'--output', '@OUTPUT@',
'--nm', nm,
'--readelf', readelf,
'--otool', otool,
],
command: modulate + operations,
)
need_universal_gadget = host_os_family == 'darwin' and gadget_compat != ''
if host_os == 'macos'
identity = '@executable_path/../Frameworks/FridaGadget.dylib'
elif host_os in ['ios', 'tvos']
@@ -98,16 +93,29 @@ elif host_os in ['ios', 'tvos']
else
identity = gadget_name
endif
custom_target('frida-gadget',
gadget_for_host_arch = custom_target('frida-gadget',
input: modulated_gadget,
output: gadget_name,
command: [
post_process_module,
'@INPUT@',
'@OUTPUT@',
identity,
],
install: true,
output: need_universal_gadget ? f'@gadget_name@-@host_abi@' : gadget_name,
command: post_process + ['shared-library', identity],
install: not need_universal_gadget,
install_dir: asset_dir,
)
if need_universal_gadget
gadget = custom_target('frida-gadget-universal',
input: gadget_for_host_arch,
output: gadget_name,
command: [
lipo,
'@INPUT@',
gadget_compat,
'-create',
'-output', meson.current_build_dir() / gadget_name,
],
depends: gadget_depends,
install: true,
install_dir: asset_dir,
)
else
gadget = gadget_for_host_arch
endif
+7 -2
View File
@@ -2,7 +2,12 @@ if host_os == 'android'
subdir('selinux')
endif
subdir('base')
subdir('netif')
subdir('pipe')
subdir('payload')
subdir('agent')
subdir('gadget')
if have_local_backend
subdir('agent')
endif
if build_gadget
subdir('gadget')
endif
+28
View File
@@ -0,0 +1,28 @@
netif_sources = [
'tunnel-interface-observer.vala',
]
extra_vala_args = []
extra_link_args = []
if host_os in ['ios', 'tvos']
extra_vala_args += [
'--pkg=corefoundation',
'--pkg=darwin-gcd',
'--pkg=darwin-systemconfiguration',
]
extra_link_args += '-Wl,-framework,SystemConfiguration'
endif
netif = static_library('frida-netif', netif_sources,
c_args: frida_component_cflags,
vala_args: [base_vala_args, extra_vala_args],
dependencies: [base_dep, gee_dep],
)
netif_dep = declare_dependency(
include_directories: include_directories('.'),
link_args: extra_link_args,
link_with: netif,
dependencies: base_dep,
)
+99
View File
@@ -0,0 +1,99 @@
public sealed class Frida.TunnelInterfaceObserver : Object, DynamicInterfaceObserver {
#if IOS || TVOS
private Gee.Map<string, DynamicInterface> interfaces = new Gee.HashMap<string, DynamicInterface> ();
private Darwin.SystemConfiguration.DynamicStore? store;
private Darwin.GCD.DispatchQueue event_queue =
new Darwin.GCD.DispatchQueue ("re.frida.endpoint-enumerator", Darwin.GCD.DispatchQueueAttr.SERIAL);
private MainContext? main_context;
public override void dispose () {
if (store != null) {
store.set_dispatch_queue (null);
store = null;
ref ();
event_queue.dispatch_async (do_dispose);
}
base.dispose ();
}
private void do_dispose () {
unref ();
}
public void start () {
main_context = MainContext.ref_thread_default ();
Darwin.SystemConfiguration.DynamicStoreContext context = { 0, };
context.info = this;
store = new Darwin.SystemConfiguration.DynamicStore (null, CoreFoundation.String.make ("Frida"),
on_interfaces_changed_wrapper, context);
var pattern = CoreFoundation.String.make ("State:/Network/Interface/utun.*/IPv6");
var patterns = new CoreFoundation.Array (null, ((CoreFoundation.Type[]) &pattern)[:1]);
store.set_notification_keys (null, patterns);
store.set_dispatch_queue (event_queue);
var initial_keys = store.copy_key_list (pattern);
if (initial_keys != null)
handle_interface_changes (initial_keys);
}
private static void on_interfaces_changed_wrapper (Darwin.SystemConfiguration.DynamicStore store,
CoreFoundation.Array changed_keys, void * info) {
unowned TunnelInterfaceObserver enumerator = (TunnelInterfaceObserver) info;
enumerator.on_interfaces_changed (changed_keys);
}
private void on_interfaces_changed (CoreFoundation.Array changed_keys) {
schedule_on_frida_thread (() => {
if (store != null)
handle_interface_changes (changed_keys);
return Source.REMOVE;
});
}
private void handle_interface_changes (CoreFoundation.Array changed_keys) {
var addresses_str = CoreFoundation.String.make ("Addresses");
foreach (var key in CFArray.wrap<CoreFoundation.String> (changed_keys)) {
string name = key.to_string ().split ("/")[3];
var val = (CoreFoundation.Dictionary) store.copy_value (key);
if (val != null) {
InetAddress? address = null;
foreach (var raw_address in CFArray.wrap<CoreFoundation.String> (val[addresses_str])) {
var str = raw_address.to_string ();
bool is_reserved_ipv6_range = str.has_prefix ("fc") || str.has_prefix ("fd");
bool is_tunnel = is_reserved_ipv6_range && str.has_suffix ("::1");
if (is_tunnel) {
address = new InetAddress.from_string (str);
break;
}
}
if (address != null && !interfaces.has_key (name)) {
var iface = new DynamicInterface (name, address);
interfaces[name] = iface;
interface_attached (iface);
}
} else {
DynamicInterface iface;
if (interfaces.unset (name, out iface))
interface_detached (iface);
}
}
}
private void schedule_on_frida_thread (owned SourceFunc function) {
var source = new IdleSource ();
source.set_callback ((owned) function);
source.attach (main_context);
}
#else
public void start () {
}
#endif
}
+1 -1
View File
@@ -50,7 +50,7 @@ namespace Frida {
script_engine.message_from_script.connect (on_message_from_script);
script_engine.message_from_debugger.connect (on_message_from_debugger);
transmitter = new AgentMessageTransmitter (persist_timeout, frida_context, dbus_context);
transmitter = new AgentMessageTransmitter (this, persist_timeout, frida_context, dbus_context);
transmitter.closed.connect (on_transmitter_closed);
transmitter.new_candidates.connect (on_transmitter_new_candidates);
transmitter.candidate_gathering_done.connect (on_transmitter_candidate_gathering_done);
+33 -30
View File
@@ -1,5 +1,5 @@
namespace Frida {
public class ThreadIgnoreScope {
public sealed class ThreadIgnoreScope {
public enum Kind {
APPLICATION_THREAD,
FRIDA_THREAD
@@ -43,7 +43,7 @@ namespace Frida {
}
#if ANDROID
public class ThreadCountCloaker : Object {
public sealed class ThreadCountCloaker : Object {
private ReadFunc * read_slot;
private static ReadFunc old_read_impl;
@@ -53,15 +53,18 @@ namespace Frida {
private delegate ssize_t ReadFunc (int fd, void * buf, size_t count);
construct {
Gum.Module.enumerate_imports ("libart.so", imp => {
if (imp.name == "read") {
read_slot = (ReadFunc *) imp.slot;
return false;
}
return true;
});
if (read_slot != null)
old_read_impl = update_read_slot (on_read);
var art = Gum.Process.find_module_by_name ("libart.so");
if (art != null) {
art.enumerate_imports (imp => {
if (imp.name == "read") {
read_slot = (ReadFunc *) imp.slot;
return false;
}
return true;
});
if (read_slot != null)
old_read_impl = update_read_slot (on_read);
}
}
~ThreadCountCloaker () {
@@ -153,12 +156,12 @@ namespace Frida {
}
}
#else
public class ThreadCountCloaker : Object {
public sealed class ThreadCountCloaker : Object {
}
#endif
#if LINUX
public class ThreadListCloaker : Object, DirListFilter {
public sealed class ThreadListCloaker : Object, DirListFilter {
private string our_dir_by_pid;
private DirListCloaker cloaker;
@@ -177,7 +180,7 @@ namespace Frida {
}
}
public class FDListCloaker : Object, DirListFilter {
public sealed class FDListCloaker : Object, DirListFilter {
private string our_dir_by_pid;
private DirListCloaker cloaker;
@@ -196,7 +199,7 @@ namespace Frida {
}
}
private class DirListCloaker : Object {
private sealed class DirListCloaker : Object {
public weak DirListFilter filter {
get;
construct;
@@ -212,38 +215,38 @@ namespace Frida {
construct {
var interceptor = Gum.Interceptor.obtain ();
unowned string libc = Gum.Process.query_libc_name ();
var libc = Gum.Process.get_libc_module ();
var open_listener = new OpenDirListener (this);
listeners.add (open_listener);
interceptor.attach (Gum.Module.find_export_by_name (libc, "opendir"), open_listener);
interceptor.attach ((void *) libc.find_export_by_name ("opendir"), open_listener);
var close_listener = new CloseDirListener (this);
listeners.add (close_listener);
interceptor.attach (Gum.Module.find_export_by_name (libc, "closedir"), close_listener);
interceptor.attach ((void *) libc.find_export_by_name ("closedir"), close_listener);
var readdir_impl = Gum.Module.find_export_by_name (libc, "readdir");
var readdir_impl = libc.find_export_by_name ("readdir");
var readdir_listener = new ReadDirListener (this, LEGACY);
listeners.add (readdir_listener);
interceptor.attach (readdir_impl, readdir_listener);
interceptor.attach ((void *) readdir_impl, readdir_listener);
var readdir64_impl = Gum.Module.find_export_by_name (libc, "readdir64");
if (readdir64_impl != null && readdir64_impl != readdir_impl) {
var readdir64_impl = libc.find_export_by_name ("readdir64");
if (readdir64_impl != 0 && readdir64_impl != readdir_impl) {
var listener = new ReadDirListener (this, MODERN);
listeners.add (listener);
interceptor.attach (readdir64_impl, listener);
interceptor.attach ((void *) readdir64_impl, listener);
}
var readdir_r_impl = Gum.Module.find_export_by_name (libc, "readdir_r");
var readdir_r_impl = libc.find_export_by_name ("readdir_r");
var readdir_r_listener = new ReadDirRListener (this, LEGACY);
listeners.add (readdir_r_listener);
interceptor.attach (readdir_r_impl, readdir_r_listener);
interceptor.attach ((void *) readdir_r_impl, readdir_r_listener);
var readdir64_r_impl = Gum.Module.find_export_by_name (libc, "readdir64_r");
if (readdir64_r_impl != null && readdir64_r_impl != readdir_r_impl) {
var readdir64_r_impl = libc.find_export_by_name ("readdir64_r");
if (readdir64_r_impl != 0 && readdir64_r_impl != readdir_r_impl) {
var listener = new ReadDirRListener (this, MODERN);
listeners.add (listener);
interceptor.attach (readdir64_r_impl, listener);
interceptor.attach ((void *) readdir64_r_impl, listener);
}
}
@@ -464,10 +467,10 @@ namespace Frida {
public abstract bool matches_file (string name);
}
#else
public class ThreadListCloaker : Object {
public sealed class ThreadListCloaker : Object {
}
public class FDListCloaker : Object {
public sealed class FDListCloaker : Object {
}
#endif
}
+5 -4
View File
@@ -1,5 +1,5 @@
namespace Frida {
public class ExitMonitor : Object, Gum.InvocationListener {
public sealed class ExitMonitor : Object, Gum.InvocationListener {
public weak ExitHandler handler {
get;
construct;
@@ -32,16 +32,17 @@ namespace Frida {
unowned Gum.InvocationListener listener = this;
#if WINDOWS
interceptor.attach (Gum.Module.find_export_by_name ("kernel32.dll", "ExitProcess"), listener);
interceptor.attach ((void *) Gum.Process.find_module_by_name ("kernel32.dll").find_export_by_name ("ExitProcess"),
listener);
#else
unowned string libc = Gum.Process.query_libc_name ();
var libc = Gum.Process.get_libc_module ();
const string[] apis = {
"exit",
"_exit",
"abort",
};
foreach (var symbol in apis) {
interceptor.attach (Gum.Module.find_export_by_name (libc, symbol), listener);
interceptor.attach ((void *) libc.find_export_by_name (symbol), listener);
}
#endif
}
+4 -4
View File
@@ -1,6 +1,6 @@
namespace Frida {
#if WINDOWS
public class FileDescriptorGuard : Object {
public sealed class FileDescriptorGuard : Object {
public Gum.MemoryRange agent_range {
get;
construct;
@@ -11,7 +11,7 @@ namespace Frida {
}
}
#else
public class FileDescriptorGuard : Object {
public sealed class FileDescriptorGuard : Object {
public Gum.MemoryRange agent_range {
get;
construct;
@@ -26,9 +26,9 @@ namespace Frida {
construct {
var interceptor = Gum.Interceptor.obtain ();
var close = Gum.Module.find_export_by_name (Gum.Process.query_libc_name (), "close");
var close = Gum.Process.get_libc_module ().find_export_by_name ("close");
close_listener = new CloseListener (this);
interceptor.attach (close, close_listener);
interceptor.attach ((void *) close, close_listener);
}
~FileDescriptorGuard () {
+3 -3
View File
@@ -1,6 +1,6 @@
namespace Frida {
#if WINDOWS
public class FileDescriptorTablePadder {
public sealed class FileDescriptorTablePadder {
public static FileDescriptorTablePadder obtain () {
return new FileDescriptorTablePadder ();
}
@@ -9,7 +9,7 @@ namespace Frida {
}
}
#else
public class FileDescriptorTablePadder {
public sealed class FileDescriptorTablePadder {
private const int MIN_TABLE_SIZE = 32;
private static unowned FileDescriptorTablePadder shared_instance = null;
@@ -67,7 +67,7 @@ namespace Frida {
int result = -1;
#if LINUX
do {
result = Linux.dup3 (fd, pair[0], Posix.FD_CLOEXEC);
result = LibcShim.dup3 (fd, pair[0], Posix.FD_CLOEXEC);
} while (result == -1 && Posix.errno == Posix.EINTR);
#else
do {
+18 -12
View File
@@ -1,6 +1,6 @@
namespace Frida {
#if WINDOWS
public class ForkMonitor : Object {
public sealed class ForkMonitor : Object {
public weak ForkHandler handler {
get;
construct;
@@ -11,7 +11,7 @@ namespace Frida {
}
}
#else
public class ForkMonitor : Object, Gum.InvocationListener {
public sealed class ForkMonitor : Object, Gum.InvocationListener {
public weak ForkHandler handler {
get;
construct;
@@ -45,9 +45,9 @@ namespace Frida {
}
static construct {
unowned string libc = Gum.Process.query_libc_name ();
fork_impl = Gum.Module.find_export_by_name (libc, "fork");
vfork_impl = Gum.Module.find_export_by_name (libc, "vfork");
var libc = Gum.Process.get_libc_module ();
fork_impl = (void *) libc.find_export_by_name ("fork");
vfork_impl = (void *) libc.find_export_by_name ("vfork");
}
construct {
@@ -61,15 +61,21 @@ namespace Frida {
string cmdline;
FileUtils.get_contents ("/proc/self/cmdline", out cmdline);
if (cmdline == "zygote" || cmdline == "zygote64" || cmdline == "usap32" || cmdline == "usap64") {
var set_argv0 = Gum.Module.find_export_by_name ("libandroid_runtime.so", "_Z27android_os_Process_setArgV0P7_JNIEnvP8_jobjectP8_jstring");
if (set_argv0 != null) {
interceptor.attach (set_argv0, listener, (void *) HookId.SET_ARGV0);
child_recovery_behavior = DEFERRED_UNTIL_SET_ARGV0;
var runtime = Gum.Process.find_module_by_name ("libandroid_runtime.so");
if (runtime != null) {
var set_argv0 = (void *) runtime.find_export_by_name ("_Z27android_os_Process_setArgV0P7_JNIEnvP8_jobjectP8_jstring");
if (set_argv0 != null) {
interceptor.attach (set_argv0, listener, (void *) HookId.SET_ARGV0);
child_recovery_behavior = DEFERRED_UNTIL_SET_ARGV0;
}
}
var setcontext = Gum.Module.find_export_by_name ("libselinux.so", "selinux_android_setcontext");
if (setcontext != null)
interceptor.attach (setcontext, listener, (void *) HookId.SET_CTX);
var selinux = Gum.Process.find_module_by_name ("libselinux.so");
if (selinux != null) {
var setcontext = (void *) selinux.find_export_by_name ("selinux_android_setcontext");
if (setcontext != null)
interceptor.attach (setcontext, listener, (void *) HookId.SET_CTX);
}
}
} catch (FileError e) {
}
-90
View File
@@ -1,90 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{26F21663-D1B3-46E4-ACB6-115ED9CE086C}</ProjectGuid>
<RootNamespace>frida</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>frida-payload-32</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="frida-payload-common.props" />
<ItemGroup>
<ProjectReference Include="..\..\..\frida-gum\bindings\gumjs\gumjs-32.vcxproj">
<Project>{8381538f-3cb5-480b-bfa4-960299af6485}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\frida-gum\gum-32.vcxproj">
<Project>{b31c7d42-54b6-49bb-b30c-11745c48b062}</Project>
<Private>false</Private>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="..\..\..\releng\frida-deps.vcxproj">
<Project>{4afce7c4-6d9a-4663-b43c-d2e518486910}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -1,112 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
<Filter Include="Source Files\generated">
<UniqueIdentifier>{e96fc7f6-bddd-4322-8836-d9af8b731269}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\generated">
<UniqueIdentifier>{ca976c61-371a-4de5-b837-a8bd8857bc13}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)process.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="process-glue.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="spawn-monitor-glue.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="thread-suspend-monitor-glue.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="libc-shim.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)cloak.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)exit-monitor.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)fd-guard.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)fdt-padder.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)fork-monitor.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)script-engine.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)spawn-monitor.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)thread-suspend-monitor.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)base-agent-session.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)portal-client.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="process.vala">
<Filter>Source Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(IntDir)frida-payload.h">
<Filter>Header Files\generated</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="cloak.vala">
<Filter>Source Files</Filter>
</None>
<None Include="exit-monitor.vala">
<Filter>Source Files</Filter>
</None>
<None Include="fd-guard.vala">
<Filter>Source Files</Filter>
</None>
<None Include="fdt-padder.vala">
<Filter>Source Files</Filter>
</None>
<None Include="fork-monitor.vala">
<Filter>Source Files</Filter>
</None>
<None Include="script-engine.vala">
<Filter>Source Files</Filter>
</None>
<None Include="spawn-monitor.vala">
<Filter>Source Files</Filter>
</None>
<None Include="thread-suspend-monitor.vala">
<Filter>Source Files</Filter>
</None>
<None Include="base-agent-session.vala">
<Filter>Source Files</Filter>
</None>
<None Include="portal-client.vala">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
</Project>
-90
View File
@@ -1,90 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{26CCF317-ACE8-4CD6-BDDE-FFED1AA2FADD}</ProjectGuid>
<RootNamespace>frida</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>frida-payload-64</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="frida-payload-common.props" />
<ItemGroup>
<ProjectReference Include="..\..\..\frida-gum\bindings\gumjs\gumjs-64.vcxproj">
<Project>{0b39885e-731c-4a45-a7de-44cbdbbf0067}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\frida-gum\gum-64.vcxproj">
<Project>{dc30a450-95bc-4476-a2f9-45100562424e}</Project>
<Private>false</Private>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="..\..\..\releng\frida-deps.vcxproj">
<Project>{4afce7c4-6d9a-4663-b43c-d2e518486910}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -1,112 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
<Filter Include="Source Files\generated">
<UniqueIdentifier>{6c15c760-cd5b-41c4-ad64-83283571aeaf}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\generated">
<UniqueIdentifier>{984e0fc8-e24c-4868-a432-6dd66cc7db4d}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)process.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="process-glue.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="spawn-monitor-glue.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="thread-suspend-monitor-glue.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="libc-shim.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)cloak.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)exit-monitor.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)fd-guard.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)fdt-padder.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)fork-monitor.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)script-engine.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)spawn-monitor.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)thread-suspend-monitor.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)base-agent-session.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)portal-client.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="process.vala">
<Filter>Source Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(IntDir)frida-payload.h">
<Filter>Header Files\generated</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="cloak.vala">
<Filter>Source Files</Filter>
</None>
<None Include="exit-monitor.vala">
<Filter>Source Files</Filter>
</None>
<None Include="fd-guard.vala">
<Filter>Source Files</Filter>
</None>
<None Include="fdt-padder.vala">
<Filter>Source Files</Filter>
</None>
<None Include="fork-monitor.vala">
<Filter>Source Files</Filter>
</None>
<None Include="script-engine.vala">
<Filter>Source Files</Filter>
</None>
<None Include="spawn-monitor.vala">
<Filter>Source Files</Filter>
</None>
<None Include="thread-suspend-monitor.vala">
<Filter>Source Files</Filter>
</None>
<None Include="base-agent-session.vala">
<Filter>Source Files</Filter>
</None>
<None Include="portal-client.vala">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
</Project>
-108
View File
@@ -1,108 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="process.vala">
<Message>Compiling vala code</Message>
<Command>"$(ValaCompiler)" process.vala base-agent-session.vala script-engine.vala portal-client.vala fork-monitor.vala spawn-monitor.vala thread-suspend-monitor.vala exit-monitor.vala cloak.vala fd-guard.vala fdt-padder.vala --ccode --directory=$(IntDir) --library=frida-payload --header=$(IntDir)frida-payload.h --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg=gio-2.0 --pkg=nice --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-1.0 --pkg=frida-base || exit 1
echo &gt; "$(IntDir)valacode.stamp"
</Command>
<AdditionalInputs>$(ValaCompiler);base-agent-session.vala;script-engine.vala;portal-client.vala;fork-monitor.vala;spawn-monitor.vala;thread-suspend-monitor.vala;exit-monitor.vala;cloak.vala;fd-guard.vala;fdt-padder.vala;%(AdditionalInputs)</AdditionalInputs>
<Outputs>$(IntDir)valacode.stamp;%(Outputs)</Outputs>
</CustomBuild>
<None Include="base-agent-session.vala" />
<None Include="script-engine.vala" />
<None Include="portal-client.vala" />
<None Include="fork-monitor.vala" />
<None Include="spawn-monitor.vala" />
<None Include="thread-suspend-monitor.vala" />
<None Include="exit-monitor.vala" />
<None Include="cloak.vala" />
<None Include="fd-guard.vala" />
<None Include="fdt-padder.vala" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(IntDir)frida-payload.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)process.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="process-glue.c" />
<ClCompile Include="$(IntDir)base-agent-session.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="$(IntDir)script-engine.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="$(IntDir)portal-client.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="$(IntDir)fork-monitor.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="$(IntDir)spawn-monitor.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="spawn-monitor-glue.c" />
<ClCompile Include="$(IntDir)thread-suspend-monitor.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="thread-suspend-monitor-glue.c" />
<ClCompile Include="$(IntDir)exit-monitor.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="$(IntDir)cloak.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="$(IntDir)fd-guard.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="$(IntDir)fdt-padder.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="libc-shim.c" />
</ItemGroup>
</Project>
+19
View File
@@ -1,4 +1,5 @@
#define FRIDA_PRINTF_BUFFER_SIZE (512 * 1024)
#define _GNU_SOURCE
#include <errno.h>
#include <gum/gum.h>
@@ -24,6 +25,24 @@ frida_run_atexit_handlers (void)
{
}
# ifdef HAVE_ASAN
__attribute__ ((constructor)) static void
frida_init_memory (void)
{
asm volatile ("");
}
# ifndef HAVE_DARWIN
__attribute__ ((destructor)) static void
frida_deinit_memory (void)
{
asm volatile ("");
}
# endif
# endif
#else
#define FRIDA_SHIM_LOCK() gum_spinlock_acquire (&frida_shim_lock)
+8
View File
@@ -0,0 +1,8 @@
#ifndef __FRIDA_LIBC_SHIM_H__
#define __FRIDA_LIBC_SHIM_H__
#ifdef HAVE_LINUX
int dup3 (int oldfd, int newfd, int flags);
#endif
#endif
+6
View File
@@ -0,0 +1,6 @@
[CCode (cheader_filename = "libc-shim.h", lower_case_cprefix = "", gir_namespace = "FridaLibcShim", gir_version = "1.0")]
namespace Frida.LibcShim {
#if LINUX
public int dup3 (int oldfd, int newfd, int flags);
#endif
}
+19 -3
View File
@@ -9,6 +9,8 @@ payload_sources = [
'spawn-monitor-glue.c',
'thread-suspend-monitor.vala',
'thread-suspend-monitor-glue.c',
'unwind-sitter.vala',
'unwind-sitter-glue.c',
'exit-monitor.vala',
'cloak.vala',
'fd-guard.vala',
@@ -20,20 +22,31 @@ if host_os_family == 'linux'
payload_sources += 'syscall-linux-@[email protected]'.format(host_arch)
endif
extra_c_args = []
extra_vala_args = []
if host_os_family != 'windows'
extra_vala_args += ['--pkg=posix']
endif
if host_os_family == 'darwin'
# FIXME: Remove this once glib-2.0.vapi provides a GLib.Private binding not involving deprecated APIs.
extra_c_args += ['-UGLIB_VERSION_MIN_REQUIRED', '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_30']
extra_vala_args += ['--pkg=frida-gum-darwin-1.0']
endif
if host_os_family == 'linux'
extra_vala_args += ['--pkg=linux']
endif
payload_vala_args = gum_vala_args + gumjs_vala_args
payload = static_library('frida-payload-' + api_version, payload_sources,
c_args: frida_component_cflags,
vala_args: extra_vala_args,
c_args: [frida_component_cflags, extra_c_args],
vala_args: [
'--vapidir=' + meson.current_source_dir(),
'--pkg=libc-shim',
payload_vala_args,
base_vala_args,
extra_vala_args,
],
vala_header: 'frida-payload.h',
vala_vapi: f'frida-payload-@[email protected]',
dependencies: [gio_dep, gee_dep, json_glib_dep, gum_dep, gumjs_dep, base_dep],
@@ -48,5 +61,8 @@ payload_dep = declare_dependency(
pkg = import('pkgconfig')
pkg.generate(payload,
description: 'Frida payload library intended for static linking into payloads',
filebase: f'frida-payload-@api_version@',
name: 'Frida Payload Library',
version: frida_version,
description: 'Building blocks commonly needed to implement payloads',
)
+1 -1
View File
@@ -1,5 +1,5 @@
namespace Frida {
public class PortalClient : Object, AgentSessionProvider {
public sealed class PortalClient : Object, AgentSessionProvider {
public signal void resume ();
public signal void kill ();
+5 -5
View File
@@ -1,5 +1,5 @@
namespace Frida {
public class ScriptEngine : Object {
public sealed class ScriptEngine : Object {
public signal void message_from_script (AgentScriptId script_id, string json, Bytes? data);
public signal void message_from_debugger (AgentScriptId script_id, string message);
@@ -223,7 +223,7 @@ namespace Frida {
source.attach (Gum.ScriptBackend.get_scheduler ().get_js_context ());
}
public class ScriptInstance : Object, RpcPeer {
public sealed class ScriptInstance : Object, RpcPeer {
public signal void closed ();
public signal void message (string json, Bytes? data);
public signal void debug_message (string message);
@@ -420,7 +420,7 @@ namespace Frida {
var reason_value = new Json.Node.alloc ().init_string (reason.to_nick ());
try {
yield rpc_client.call ("dispose", new Json.Node[] { reason_value }, null);
yield rpc_client.call ("dispose", new Json.Node[] { reason_value }, null, null);
} catch (GLib.Error e) {
}
@@ -467,10 +467,10 @@ namespace Frida {
this.debug_message (message);
}
private async void post_rpc_message (string json, Cancellable? cancellable) throws Error, IOError {
private async void post_rpc_message (string json, Bytes? data, Cancellable? cancellable) throws Error, IOError {
if (script == null)
throw new Error.INVALID_OPERATION ("Script is destroyed");
script.post (json);
script.post (json, data);
}
}
}
+24 -15
View File
@@ -1,5 +1,5 @@
namespace Frida {
public class SpawnMonitor : Object, Gum.InvocationListener {
public sealed class SpawnMonitor : Object, Gum.InvocationListener {
public weak SpawnHandler handler {
get;
construct;
@@ -27,7 +27,7 @@ namespace Frida {
private void * execve;
private Private posix_spawn_caller_is_internal = new Private ();
private static Private posix_spawn_caller_is_internal = new Private ();
#endif
public SpawnMonitor (SpawnHandler handler, MainContext main_context) {
@@ -38,27 +38,36 @@ namespace Frida {
var interceptor = Gum.Interceptor.obtain ();
#if WINDOWS
var create_process_internal = Gum.Module.find_export_by_name ("kernelbase.dll", "CreateProcessInternalW");
if (create_process_internal == null)
create_process_internal = Gum.Module.find_export_by_name ("kernel32.dll", "CreateProcessInternalW");
assert (create_process_internal != null);
interceptor.attach (create_process_internal, this);
var kernelbase = Gum.Process.find_module_by_name ("kernelbase.dll");
var create_process_internal = (kernelbase != null) ? kernelbase.find_export_by_name ("CreateProcessInternalW") : 0;
if (create_process_internal == 0) {
create_process_internal = Gum.Process.find_module_by_name ("kernel32.dll")
.find_export_by_name ("CreateProcessInternalW");
}
assert (create_process_internal != 0);
interceptor.attach ((void *) create_process_internal, this);
#else
unowned string libc = Gum.Process.query_libc_name ();
var libc = Gum.Process.get_libc_module ();
#if DARWIN
posix_spawn = (PosixSpawnFunc) Gum.Module.find_export_by_name (libc, "posix_spawn");
posix_spawnattr_init = (PosixSpawnAttrInitFunc) Gum.Module.find_export_by_name (libc, "posix_spawnattr_init");
posix_spawnattr_destroy = (PosixSpawnAttrDestroyFunc) Gum.Module.find_export_by_name (libc, "posix_spawnattr_destroy");
posix_spawnattr_getflags = (PosixSpawnAttrSetFlagsFunc) Gum.Module.find_export_by_name (libc, "posix_spawnattr_getflags");
posix_spawnattr_setflags = (PosixSpawnAttrSetFlagsFunc) Gum.Module.find_export_by_name (libc, "posix_spawnattr_setflags");
posix_spawn = (PosixSpawnFunc) libc.find_export_by_name ("posix_spawn");
posix_spawnattr_init = (PosixSpawnAttrInitFunc) libc.find_export_by_name ("posix_spawnattr_init");
posix_spawnattr_destroy = (PosixSpawnAttrDestroyFunc) libc.find_export_by_name ("posix_spawnattr_destroy");
posix_spawnattr_getflags = (PosixSpawnAttrSetFlagsFunc) libc.find_export_by_name ("posix_spawnattr_getflags");
posix_spawnattr_setflags = (PosixSpawnAttrSetFlagsFunc) libc.find_export_by_name ("posix_spawnattr_setflags");
execve = Gum.Module.find_export_by_name (libc, "execve");
execve = (void *) libc.find_export_by_name ("execve");
interceptor.attach ((void *) posix_spawn, this);
interceptor.replace (execve, (void *) replacement_execve, this);
#else
interceptor.attach (Gum.Module.find_export_by_name (libc, "execve"), this);
Gum.Address execve = 0;
#if ANDROID
execve = libc.find_symbol_by_name ("__execve");
#endif
if (execve == 0)
execve = libc.find_export_by_name ("execve");
interceptor.attach ((void *) execve, this);
#endif
#endif
}
+14 -8
View File
@@ -1,6 +1,6 @@
namespace Frida {
#if DARWIN
public class ThreadSuspendMonitor : Object {
public sealed class ThreadSuspendMonitor : Object {
public weak ProcessInvader invader {
get;
construct;
@@ -26,9 +26,10 @@ namespace Frida {
construct {
var interceptor = Gum.Interceptor.obtain ();
task_threads = (TaskThreadsFunc) Gum.Module.find_export_by_name (LIBSYSTEM_KERNEL, "task_threads");
thread_suspend = (ThreadSuspendFunc) Gum.Module.find_export_by_name (LIBSYSTEM_KERNEL, "thread_suspend");
thread_resume = (ThreadResumeFunc) Gum.Module.find_export_by_name (LIBSYSTEM_KERNEL, "thread_resume");
var kernel = Gum.Process.find_module_by_name (LIBSYSTEM_KERNEL);
task_threads = (TaskThreadsFunc) kernel.find_export_by_name ("task_threads");
thread_suspend = (ThreadSuspendFunc) kernel.find_export_by_name ("thread_suspend");
thread_resume = (ThreadResumeFunc) kernel.find_export_by_name ("thread_resume");
interceptor.replace ((void *) task_threads, (void *) replacement_task_threads, this);
interceptor.replace ((void *) thread_suspend, (void *) replacement_thread_suspend, this);
@@ -84,14 +85,19 @@ namespace Frida {
if (script_backend == null || thread_id == caller_thread_id)
return thread_suspend (thread_id);
int result = 0;
var interceptor = Gum.Interceptor.obtain ();
int result = 0;
while (true) {
script_backend.with_lock_held (() => {
result = thread_suspend (thread_id);
interceptor.with_lock_held (() => {
Gum.Cloak.with_lock_held (() => {
result = thread_suspend (thread_id);
});
});
});
if (result != 0 || !script_backend.is_locked ())
if (result != 0 || (!script_backend.is_locked () && !Gum.Cloak.is_locked () && !interceptor.is_locked ()))
break;
if (thread_resume (thread_id) != 0)
@@ -125,7 +131,7 @@ namespace Frida {
}
}
#else
public class ThreadSuspendMonitor : Object {
public sealed class ThreadSuspendMonitor : Object {
public weak ProcessInvader invader {
get;
construct;
+529
View File
@@ -0,0 +1,529 @@
#include "frida-payload.h"
#ifdef HAVE_DARWIN
#include <capstone.h>
#include <gum/gumdarwin.h>
#include <gum/gummemory.h>
#include <ptrauth.h>
#define FRIDA_MH_MAGIC_64 0xfeedfacf
#define FRIDA_LIBUNWIND_PATH "/usr/lib/system/libunwind.dylib"
#define FRIDA_UNWIND_CURSOR_VTABLE_OFFSET_SET_INFO 0x68
#define FRIDA_UNWIND_CURSOR_VTABLE_OFFSET_GET_REG 0x18
#define FRIDA_FP_TO_SP(fp) (fp + 0x10)
#ifdef HAVE_ARM64
# define FRIDA_UNWIND_CURSOR_unwindInfoMissing 0x268
# define FRIDA_UNWAARCH64_X29 29
# define FRIDA_STRIP_MASK 0x0000007fffffffffULL
#else
# define FRIDA_UNWIND_CURSOR_unwindInfoMissing 0x100
# define FRIDA_UNWX86_64_RBP 6
#endif
typedef struct _FridaFillInfoContext FridaFillInfoContext;
typedef struct _FridaDyldUnwindSections FridaDyldUnwindSections;
typedef struct _FridaCreateArgs FridaCreateArgs;
typedef struct _FridaUnwindHookState FridaUnwindHookState;
struct _FridaFillInfoContext
{
FridaDyldUnwindSections * info;
guint missing_info;
};
struct _FridaDyldUnwindSections
{
const void * mh;
const void * dwarf_section;
uintptr_t dwarf_section_length;
const void * compact_unwind_section;
uintptr_t compact_unwind_section_length;
};
struct _FridaCreateArgs
{
GumAddress range_start;
GumAddress range_end;
};
struct _FridaUnwindHookState
{
gpointer vtable;
gssize shift;
gpointer * set_info_slot;
gpointer set_info_original;
void (* set_info) (gpointer cursor, gint is_return_address);
gpointer (* get_reg) (gpointer cursor, gint reg);
GumInterceptor * interceptor;
};
#if __has_feature (ptrauth_calls)
# define FRIDA_RESIGN_PTR(x) GSIZE_TO_POINTER (gum_sign_code_address (gum_strip_code_address (GUM_ADDRESS (x))))
#else
# define FRIDA_RESIGN_PTR(x) (x)
#endif
static FridaDyldUnwindSections * frida_get_cached_sections (GumAddress range_start, GumAddress range_end);
static FridaDyldUnwindSections * frida_create_cached_sections (FridaCreateArgs * args);
static gboolean frida_fill_info (const GumDarwinSectionDetails * details, FridaFillInfoContext * ctx);
static void frida_unwind_cursor_set_info_replacement (gpointer cursor, gint is_return_address);
static gpointer frida_find_vtable (void);
static gboolean frida_compute_vtable_shift (gpointer vtable, gssize * shift);
#ifdef HAVE_ARM64
static gboolean frida_find_bss_range (const GumSectionDetails * details, GumMemoryRange * range);
#else
static gboolean frida_is_empty_function (GumAddress address);
static gboolean frida_has_first_match (GumAddress address, gsize size, gboolean * matches);
#endif
static FridaUnwindHookState * state = NULL;
void
_frida_unwind_sitter_fill_unwind_sections (GumAddress invader_start, GumAddress invader_end, void * info)
{
FridaDyldUnwindSections * unwind_sections = info;
FridaDyldUnwindSections * cached;
cached = frida_get_cached_sections (invader_start, invader_end);
if (cached == NULL)
return;
memcpy (unwind_sections, cached, sizeof (FridaDyldUnwindSections));
}
void
_frida_unwind_sitter_hook_libunwind (void)
{
#if GLIB_SIZEOF_VOID_P == 8
gpointer * set_info_slot;
gpointer get_reg_impl;
if (state != NULL)
return;
state = g_slice_new0 (FridaUnwindHookState);
if (state == NULL)
return;
state->vtable = frida_find_vtable ();
if (state->vtable == NULL)
goto unsupported_version;
if (!frida_compute_vtable_shift (state->vtable, &state->shift))
goto unsupported_version;
set_info_slot = (gpointer *) (GUM_ADDRESS (state->vtable) + FRIDA_UNWIND_CURSOR_VTABLE_OFFSET_SET_INFO + state->shift);
get_reg_impl = *(gpointer *) (GUM_ADDRESS (state->vtable) + FRIDA_UNWIND_CURSOR_VTABLE_OFFSET_GET_REG + state->shift);
state->set_info_slot = set_info_slot;
state->set_info_original = *set_info_slot;
state->set_info = FRIDA_RESIGN_PTR (state->set_info_original);
state->get_reg = FRIDA_RESIGN_PTR (get_reg_impl);
state->interceptor = gum_interceptor_obtain ();
if (gum_interceptor_replace (state->interceptor, state->set_info_original, frida_unwind_cursor_set_info_replacement, NULL, NULL)
!= GUM_REPLACE_OK)
goto unsupported_version;
return;
unsupported_version:
g_slice_free (FridaUnwindHookState, state);
state = NULL;
#endif
}
void
_frida_unwind_sitter_unhook_libunwind (void)
{
if (state == NULL)
return;
gum_interceptor_revert (state->interceptor, state->set_info_original);
g_object_unref (state->interceptor);
g_slice_free (FridaUnwindHookState, state);
state = NULL;
}
static FridaDyldUnwindSections *
frida_get_cached_sections (GumAddress range_start, GumAddress range_end)
{
static GOnce get_sections_once = G_ONCE_INIT;
FridaCreateArgs args;
args.range_start = range_start;
args.range_end = range_end;
g_once (&get_sections_once, (GThreadFunc) frida_create_cached_sections, &args);
return (FridaDyldUnwindSections *) get_sections_once.retval;
}
static FridaDyldUnwindSections *
frida_create_cached_sections (FridaCreateArgs * args)
{
FridaDyldUnwindSections * cached_sections;
gsize page_size;
gpointer header;
GumPageProtection prot;
GumDarwinModule * module;
FridaFillInfoContext ctx;
page_size = gum_query_page_size ();
header = GSIZE_TO_POINTER (args->range_start);
while ((gum_memory_query_protection (header, &prot) && (prot & GUM_PAGE_READ) == 0) ||
(*(guint32 *) header != FRIDA_MH_MAGIC_64 && header + 4 <= GSIZE_TO_POINTER (args->range_end)))
{
header += page_size;
}
if (*(guint32 *) header != FRIDA_MH_MAGIC_64)
return NULL;
cached_sections = g_slice_new0 (FridaDyldUnwindSections);
cached_sections->mh = header;
module = gum_darwin_module_new_from_memory ("Frida", mach_task_self (), GPOINTER_TO_SIZE (header), GUM_DARWIN_MODULE_FLAGS_NONE, NULL);
if (module == NULL)
return cached_sections;
ctx.info = cached_sections;
ctx.missing_info = 2;
gum_darwin_module_enumerate_sections (module, (GumFoundDarwinSectionFunc) frida_fill_info, &ctx);
g_object_unref (module);
return cached_sections;
}
static gboolean
frida_fill_info (const GumDarwinSectionDetails * details, FridaFillInfoContext * ctx)
{
if (strcmp ("__TEXT", details->segment_name) != 0)
return TRUE;
if (strcmp ("__eh_frame", details->section_name) == 0)
{
ctx->missing_info--;
ctx->info->dwarf_section = GSIZE_TO_POINTER (details->vm_address);
ctx->info->dwarf_section_length = details->size;
}
else if (strcmp ("__unwind_info", details->section_name) == 0)
{
ctx->missing_info--;
ctx->info->compact_unwind_section = GSIZE_TO_POINTER (details->vm_address);
ctx->info->compact_unwind_section_length = details->size;
}
return ctx->missing_info > 0;
}
static void
frida_unwind_cursor_set_info_replacement (gpointer self, gint is_return_address)
{
gboolean missing_info;
GumAddress fp, stored_pc;
gpointer * stored_pc_slot;
#if defined (HAVE_ARM64) && !__has_feature (ptrauth_calls)
gboolean was_signed = FALSE;
#endif
if (state == NULL)
return;
state->set_info (self, is_return_address);
#ifdef HAVE_ARM64
fp = GUM_ADDRESS (state->get_reg (self, FRIDA_UNWAARCH64_X29));
#else
fp = GUM_ADDRESS (state->get_reg (self, FRIDA_UNWX86_64_RBP));
#endif
if (fp == 0 || fp == -1)
return;
missing_info = *((guint8 *) self + FRIDA_UNWIND_CURSOR_unwindInfoMissing);
stored_pc_slot = GSIZE_TO_POINTER (fp + GLIB_SIZEOF_VOID_P);
stored_pc = GUM_ADDRESS (*stored_pc_slot);
#if __has_feature (ptrauth_calls)
stored_pc = gum_strip_code_address (stored_pc);
#elif defined (HAVE_ARM64)
was_signed = (stored_pc & ~FRIDA_STRIP_MASK) != 0ULL;
if (was_signed)
stored_pc &= FRIDA_STRIP_MASK;
#endif
if (!missing_info)
{
GumAddress translated;
translated = GUM_ADDRESS (gum_invocation_stack_translate (gum_interceptor_get_current_stack (), GSIZE_TO_POINTER (stored_pc)));
if (translated != stored_pc)
{
#if __has_feature (ptrauth_calls)
*stored_pc_slot = ptrauth_sign_unauthenticated (
ptrauth_strip (GSIZE_TO_POINTER (translated), ptrauth_key_asia), ptrauth_key_asib, FRIDA_FP_TO_SP (fp));
#elif defined (HAVE_ARM64)
if (was_signed)
{
GumAddress resigned;
asm volatile (
"mov x17, %1\n\t"
"mov x16, %2\n\t"
".byte 0x5f, 0x21, 0x03, 0xd5\n\t" /* pacib1716 */
"mov %0, x17\n\t"
: "=r" (resigned)
: "r" (translated & FRIDA_STRIP_MASK),
"r" (FRIDA_FP_TO_SP (fp))
: "x16", "x17"
);
*stored_pc_slot = GSIZE_TO_POINTER (resigned);
}
else
{
*stored_pc_slot = GSIZE_TO_POINTER (translated);
}
#else
*stored_pc_slot = GSIZE_TO_POINTER (translated);
#endif
}
}
}
static gpointer
frida_find_vtable (void)
{
GumAddress result = 0;
GumModule * libunwind;
GumAddress export;
uint64_t address;
G_GNUC_UNUSED cs_err err;
csh capstone;
cs_insn * insn = NULL;
const uint8_t * code;
size_t size;
const size_t max_size = 2048;
libunwind = gum_process_find_module_by_name (FRIDA_LIBUNWIND_PATH);
if (libunwind == NULL)
goto beach;
export = gum_module_find_export_by_name (libunwind, "unw_init_local");
if (export == 0)
export = gum_module_find_export_by_name (libunwind, "_Unwind_RaiseException");
if (export == 0)
goto beach;
export = gum_strip_code_address (export);
address = export;
#ifdef HAVE_ARM64
cs_arch_register_arm64 ();
err = cs_open (CS_ARCH_ARM64, CS_MODE_LITTLE_ENDIAN, &capstone);
#else
cs_arch_register_x86 ();
err = cs_open (CS_ARCH_X86, CS_MODE_64, &capstone);
#endif
g_assert (err == CS_ERR_OK);
err = cs_option (capstone, CS_OPT_DETAIL, CS_OPT_ON);
g_assert (err == CS_ERR_OK);
insn = cs_malloc (capstone);
code = GSIZE_TO_POINTER (export);
size = max_size;
#ifdef HAVE_ARM64
{
GumAddress last_adrp;
guint last_adrp_reg;
GumMemoryRange bss_range;
bss_range.base_address = 0;
gum_module_enumerate_sections (libunwind, (GumFoundSectionFunc) frida_find_bss_range, &bss_range);
while (cs_disasm_iter (capstone, &code, &size, &address, insn))
{
if (insn->id == ARM64_INS_RET || insn->id == ARM64_INS_RETAA || insn->id == ARM64_INS_RETAB)
break;
if (insn->id == ARM64_INS_ADRP)
{
if (result != 0)
break;
last_adrp = (GumAddress) insn->detail->arm64.operands[1].imm;
last_adrp_reg = insn->detail->arm64.operands[0].reg;
}
else if (insn->id == ARM64_INS_ADD && insn->detail->arm64.operands[0].reg == last_adrp_reg)
{
GumAddress candidate;
gboolean is_bss;
candidate = last_adrp + (GumAddress) insn->detail->arm64.operands[2].imm;
is_bss = bss_range.base_address != 0 &&
bss_range.base_address <= candidate &&
candidate < bss_range.base_address + bss_range.size;
if (!is_bss)
{
if (result == 0)
{
result = candidate;
last_adrp = candidate;
}
else
{
result = candidate;
break;
}
}
}
else if (result != 0)
{
break;
}
}
}
#else
while (cs_disasm_iter (capstone, &code, &size, &address, insn))
{
if (insn->id == X86_INS_RET)
break;
if (insn->id == X86_INS_LEA)
{
const cs_x86_op * op = &insn->detail->x86.operands[1];
if (op->type == X86_OP_MEM && op->mem.base == X86_REG_RIP)
{
result = address + op->mem.disp * op->mem.scale;
break;
}
}
}
#endif
if (insn != NULL)
cs_free (insn, 1);
cs_close (&capstone);
beach:
g_clear_object (&libunwind);
return GSIZE_TO_POINTER (result);
}
#ifdef HAVE_ARM64
static gboolean
frida_find_bss_range (const GumSectionDetails * details, GumMemoryRange * range)
{
if (strcmp (details->name, "__bss") == 0)
{
range->base_address = details->address;
range->size = details->size;
return FALSE;
}
return TRUE;
}
static gboolean
frida_compute_vtable_shift (gpointer vtable, gssize * shift)
{
gboolean result = FALSE;
G_GNUC_UNUSED cs_err err;
csh capstone;
cs_insn * insn = NULL;
const uint8_t * code;
uint64_t address;
size_t size = 4;
cs_arch_register_arm64 ();
err = cs_open (CS_ARCH_ARM64, CS_MODE_LITTLE_ENDIAN, &capstone);
g_assert (err == CS_ERR_OK);
insn = cs_malloc (capstone);
code = gum_strip_code_pointer (*(gpointer *) vtable);
address = GPOINTER_TO_SIZE (code);
if (cs_disasm_iter (capstone, &code, &size, &address, insn))
{
if (insn->id == ARM64_INS_RET || insn->id == ARM64_INS_RETAA || insn->id == ARM64_INS_RETAB)
*shift = 0;
else
*shift = -2 * GLIB_SIZEOF_VOID_P;
result = TRUE;
}
if (insn != NULL)
cs_free (insn, 1);
cs_close (&capstone);
return result;
}
#else
static gboolean
frida_compute_vtable_shift (gpointer vtable, gssize * shift)
{
GumAddress cursor = GPOINTER_TO_SIZE (vtable);
GumAddress error = cursor + 16 * GLIB_SIZEOF_VOID_P;
while (cursor < error && *(gpointer *) GSIZE_TO_POINTER (cursor) == NULL)
cursor += GLIB_SIZEOF_VOID_P;
if (cursor == error)
return FALSE;
if (frida_is_empty_function (GUM_ADDRESS (*(gpointer *) GSIZE_TO_POINTER (cursor))) &&
frida_is_empty_function (GUM_ADDRESS (*(gpointer *) GSIZE_TO_POINTER (cursor + GLIB_SIZEOF_VOID_P))))
{
*shift = cursor - GPOINTER_TO_SIZE (vtable);
}
else
{
*shift = cursor - GPOINTER_TO_SIZE (vtable) - 2 * GLIB_SIZEOF_VOID_P;
}
return TRUE;
}
static gboolean
frida_is_empty_function (GumAddress address)
{
gboolean matches = FALSE;
GumMemoryRange range;
GumMatchPattern * pattern;
range.base_address = address;
range.size = 6;
/*
* 55 push rbp
* 4889e5 mov rbp, rsp
* 5d pop rbp
* c3 ret
*/
pattern = gum_match_pattern_new_from_string ("55 48 89 e5 5d c3");
gum_memory_scan (&range, pattern, (GumMemoryScanMatchFunc) frida_has_first_match, &matches);
gum_match_pattern_unref (pattern);
return matches;
}
static gboolean
frida_has_first_match (GumAddress address, gsize size, gboolean * matches)
{
*matches = TRUE;
return FALSE;
}
#endif
#endif
+76
View File
@@ -0,0 +1,76 @@
namespace Frida {
#if DARWIN
public sealed class UnwindSitter : Object {
public weak ProcessInvader invader {
get;
construct;
}
private DyldFindUnwindSectionsFunc dyld_find_unwind_sections;
private const string LIBDYLD = "/usr/lib/system/libdyld.dylib";
[CCode (has_target = false)]
private delegate int DyldFindUnwindSectionsFunc (void * addr, void * info);
public UnwindSitter (ProcessInvader invader) {
Object (invader: invader);
}
construct {
var interceptor = Gum.Interceptor.obtain ();
dyld_find_unwind_sections = (DyldFindUnwindSectionsFunc)
Gum.Process.find_module_by_name (LIBDYLD).find_export_by_name ("_dyld_find_unwind_sections");
interceptor.replace ((void *) dyld_find_unwind_sections, (void *) replacement_dyld_find_unwind_sections, this);
_hook_libunwind ();
}
public override void dispose () {
var interceptor = Gum.Interceptor.obtain ();
_unhook_libunwind ();
interceptor.revert ((void *) dyld_find_unwind_sections);
base.dispose ();
}
private static int replacement_dyld_find_unwind_sections (void * addr, void * info) {
unowned Gum.InvocationContext context = Gum.Interceptor.get_current_invocation ();
unowned UnwindSitter sitter = (UnwindSitter) context.get_replacement_data ();
Gum.MemoryRange range = sitter.invader.get_memory_range ();
var range_end = range.base_address + range.size;
var address = Gum.Address.from_pointer (addr);
#if ARM64
address &= 0x7ffffffffULL;
#endif
var is_ours = address >= range.base_address && address < range_end;
if (!is_ours)
return sitter.dyld_find_unwind_sections (addr, info);
_fill_unwind_sections (range.base_address, range_end, info);
return 1;
}
public extern static void _fill_unwind_sections (Gum.Address invader_start, Gum.Address invader_end, void * info);
public extern static void _hook_libunwind ();
public extern static void _unhook_libunwind ();
}
#else
public sealed class UnwindSitter : Object {
public weak ProcessInvader invader {
get;
construct;
}
public UnwindSitter (ProcessInvader invader) {
Object (invader: invader);
}
}
#endif
}
-84
View File
@@ -1,84 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{4C39C3CF-13E5-4346-B6AE-F73013105936}</ProjectGuid>
<RootNamespace>frida</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>frida-pipe-32</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="frida-pipe-common.props" />
<ItemGroup>
<ProjectReference Include="..\..\..\releng\frida-deps.vcxproj">
<Project>{4afce7c4-6d9a-4663-b43c-d2e518486910}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="..\base\frida-base-32.vcxproj">
<Project>{c4203124-c838-437b-8662-ca477b146655}</Project>
<Private>false</Private>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-50
View File
@@ -1,50 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
<Filter Include="Source Files\generated">
<UniqueIdentifier>{e96fc7f6-bddd-4322-8836-d9af8b731269}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\generated">
<UniqueIdentifier>{ca976c61-371a-4de5-b837-a8bd8857bc13}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="pipe-windows.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)pipe.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="pipe-sddl.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="pipe.vala">
<Filter>Source Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(IntDir)frida-pipe.h">
<Filter>Header Files\generated</Filter>
</ClInclude>
<ClInclude Include="pipe-glue.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="pipe-sddl.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
-84
View File
@@ -1,84 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{D50F460F-9C4D-42EB-A8C4-48C0C46CFAAF}</ProjectGuid>
<RootNamespace>frida</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>frida-pipe-64</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="frida-pipe-common.props" />
<ItemGroup>
<ProjectReference Include="..\..\..\releng\frida-deps.vcxproj">
<Project>{4afce7c4-6d9a-4663-b43c-d2e518486910}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="..\base\frida-base-64.vcxproj">
<Project>{a31522d9-715b-4e04-aa57-df7afebe082c}</Project>
<Private>false</Private>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-50
View File
@@ -1,50 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
<Filter Include="Source Files\generated">
<UniqueIdentifier>{6c15c760-cd5b-41c4-ad64-83283571aeaf}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\generated">
<UniqueIdentifier>{984e0fc8-e24c-4868-a432-6dd66cc7db4d}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="pipe-windows.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)pipe.c">
<Filter>Source Files\generated</Filter>
</ClCompile>
<ClCompile Include="pipe-sddl.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="pipe.vala">
<Filter>Source Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(IntDir)frida-pipe.h">
<Filter>Header Files\generated</Filter>
</ClInclude>
<ClInclude Include="pipe-glue.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="pipe-sddl.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
-38
View File
@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>$(FridaCoreDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="pipe.vala">
<Message>Compiling vala code</Message>
<Command>"$(ValaCompiler)" pipe.vala --ccode --directory=$(IntDir) --library=frida-pipe --header=$(IntDir)frida-pipe.h $(ValaFlags) $(FridaCoreValaFlags) --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --pkg=gio-2.0 --pkg=nice --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-base || exit 1
echo &gt; "$(IntDir)valacode.stamp"
</Command>
<AdditionalInputs>$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
<Outputs>$(IntDir)valacode.stamp;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(IntDir)frida-pipe.h" />
<ClInclude Include="pipe-glue.h" />
<ClInclude Include="pipe-sddl.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)pipe.c">
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="pipe-windows.c" />
<ClCompile Include="pipe-sddl.c" />
</ItemGroup>
</Project>
+11 -11
View File
@@ -3,7 +3,7 @@ pipe_sources = [
]
system_deps = []
vala_args = []
extra_vala_args = []
if host_os_family == 'windows'
pipe_sources += [
@@ -11,25 +11,25 @@ if host_os_family == 'windows'
'pipe-sddl.c',
]
elif host_os in ['macos', 'ios', 'tvos']
pipe_sources += ['pipe-darwin.c']
system_deps += [gio_unix_dep]
vala_args += ['--pkg=frida-gum-darwin-1.0', '--pkg=posix']
pipe_sources += 'pipe-darwin.c'
extra_vala_args += '--pkg=frida-gum-darwin-1.0'
else
pipe_sources += ['pipe-unix.c']
pipe_sources += 'pipe-unix.c'
endif
system_deps += [gio_unix_dep]
vala_args += ['--pkg=posix']
if host_os_family != 'windows'
system_deps += gio_unix_dep
extra_vala_args += ['--pkg=gio-unix-2.0', '--pkg=posix']
endif
if host_os == 'android'
system_deps += [frida_selinux_dep]
vala_args += frida_selinux_vala_args
system_deps += libselinux_dep
extra_vala_args += '--pkg=libselinux'
endif
pipe = static_library('frida-pipe', pipe_sources,
c_args: frida_component_cflags,
vala_args: vala_args,
vala_args: base_vala_args + extra_vala_args,
vala_header: 'frida-pipe.h',
dependencies: [glib_dep, gobject_dep, gio_dep, gee_dep, base_dep] + system_deps,
)
+2 -2
View File
@@ -1,7 +1,7 @@
#include "pipe-glue.h"
#include "frida-tvos.h"
#include "pipe-glue.h"
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
+2 -2
View File
@@ -1,5 +1,5 @@
namespace Frida {
public class PipeTransport : Object {
public sealed class PipeTransport : Object {
public string local_address {
get;
construct;
@@ -42,7 +42,7 @@ namespace Frida {
}
#if WINDOWS
public class WindowsPipe : IOStream {
public sealed class WindowsPipe : IOStream {
public string address {
get;
construct;
+3 -2
View File
@@ -1,10 +1,11 @@
frida_selinux_incdir = include_directories('.')
install_headers('frida-selinux.h', subdir: 'frida-' + api_version)
frida_selinux_h = files('frida-selinux.h')
install_headers(frida_selinux_h, subdir: 'frida-' + api_version)
frida_selinux = static_library('frida-selinux', 'patch.c',
c_args: frida_component_cflags,
dependencies: [glib_dep, libselinux_dep, libsepol_dep],
dependencies: [glib_dep, gio_dep, libselinux_dep, libsepol_dep],
)
frida_selinux_dep = declare_dependency(
+23
View File
@@ -0,0 +1,23 @@
@setlocal
@echo off
rem:: Based on: https://github.com/microsoft/terminal/issues/217#issuecomment-737594785
goto :_start_
:set_real_dp0
set dp0=%~dp0
set "dp0=%dp0:~0,-1%"
goto :eof
:_start_
call :set_real_dp0
if not exist "%dp0%\releng\meson\meson.py" (
pushd "%dp0%" & git submodule update --init --recursive --depth 1 & popd
if %errorlevel% neq 0 exit /b %errorlevel%
)
endlocal & goto #_undefined_# 2>nul || title %COMSPEC% & python ^
-c "import sys; sys.path.insert(0, sys.argv[1]); from releng.meson_make import main; main()" ^
"%dp0%" ^
.\build ^
%*
+510 -137
View File
@@ -1,12 +1,51 @@
project('frida-core', 'vala', 'c', 'cpp',
version: '1.0.0',
meson_version: '>=0.58.0',
default_options: ['c_std=gnu99', 'cpp_std=c++11'],
version: run_command(find_program('python3'), files('tools' / 'detect-version.py'),
capture: true,
check: true).stdout().strip(),
meson_version: '>=1.1.0',
default_options: ['c_std=gnu99,c99', 'cpp_std=c++17'],
)
fs = import('fs')
if not meson.get_compiler('vala').version().endswith('-frida')
error('''Incompatible Vala compiler detected.
Frida currently relies on features not yet upstream. Grab the Frida-optimized
Vala compiler from:
https://github.com/frida/vala''')
endif
c_languages = ['c', 'cpp']
cc = meson.get_compiler('c')
cpp = meson.get_compiler('cpp')
releng = meson.global_source_root() / 'releng'
if not fs.exists(releng)
releng = meson.project_source_root() / 'releng'
endif
frida_version = get_option('frida_version')
if frida_version == ''
frida_version = run_command(releng / 'frida_version.py', meson.project_source_root(), check: true).stdout().strip()
endif
tokens = frida_version.split('.')
frida_major_version = tokens[0].to_int()
frida_minor_version = tokens[1].to_int()
if tokens.length() == 4
frida_micro_version = tokens[2].split('-')[0].to_int() - 1
frida_nano_version = tokens[3].to_int() + 1
else
assert(tokens.length() == 3)
frida_micro_version = tokens[2].to_int()
frida_nano_version = 0
endif
frida_profile = (frida_version != '0.0.0' and frida_nano_version == 0) ? 'prod' : 'dev'
api_version = '1.0'
header_install_dir = get_option('includedir') / 'frida-' + api_version
header_install_dir = get_option('includedir') / f'frida-@api_version@'
build_os = build_machine.system()
if build_os == 'android'
@@ -14,13 +53,23 @@ if build_os == 'android'
else
build_os_family = build_os
endif
host_os = host_machine.system()
if host_os == 'android'
host_os_family = host_machine.system()
if host_os_family == 'android'
host_os_family = 'linux'
else
host_os_family = host_os
endif
host_is_64bit = host_machine.cpu_family().endswith('64')
tokens = host_machine.subsystem().split('-')
host_os = tokens[0]
if tokens.length() == 2
host_config = tokens[1]
elif host_os_family == 'windows'
if cc.get_argument_syntax() == 'msvc'
host_config = get_option('b_vscrt')
else
host_config = 'mingw'
endif
else
host_config = ''
endif
if host_machine.cpu_family() == 'arm'
host_arch = 'arm'
host_abi = 'arm'
@@ -45,26 +94,34 @@ else
host_arch = host_machine.cpu_family()
host_abi = host_arch
endif
host_toolchain = (host_os_family == 'darwin') ? 'apple' : 'gnu'
gumjs_archs = {
'x86': 'ia32',
'x86_64': 'x64',
}
host_arch_gumjs = gumjs_archs.get(host_arch, host_arch)
if cc.sizeof('void *') == 8
host_cpu_mode = '64'
else
host_cpu_mode = '32'
endif
host_docks_mobile_devices = host_os in ['windows', 'macos', 'linux'] and host_cpu_mode == '64'
c_languages = ['c', 'cpp']
if host_os_family == 'darwin'
c_languages += ['objc', 'objcpp']
add_languages('objc', 'objcpp', native: false)
endif
cc = meson.get_compiler('c')
python = import('python').find_installation()
if cc.get_argument_syntax() == 'msvc'
host_toolchain = 'microsoft'
resource_blob_extension = '.obj'
else
host_toolchain = (host_os_family == 'darwin') ? 'apple' : 'gnu'
resource_blob_extension = '.S'
endif
vala_flags = []
frida_component_cflags = []
ndebug = get_option('b_ndebug')
if ndebug == 'true' or (ndebug == 'if-release' and not get_option('debug'))
optimize_for_prod = ndebug == 'true' or (ndebug == 'if-release' and not get_option('debug'))
if optimize_for_prod
frida_component_cflags += [
'-DG_DISABLE_ASSERT',
'-DG_DISABLE_CHECKS',
@@ -84,30 +141,6 @@ if host_arch == 'arm'
endif
if host_os_family == 'darwin'
apple_os_flavors = [
['macOS', 'OSX'],
['iOS', 'IOS'],
['watchOS', 'WATCH'],
['tvOS', 'TV'],
]
foreach candidate : apple_os_flavors
name = candidate[0]
constant = candidate[1]
if cc.compiles('''
#include <TargetConditionals.h>
#if !TARGET_OS_@0@
# error Nope
#endif
'''.format(constant),
name: f'compiling for @name@')
host_os = name.to_lower()
break
endif
endforeach
if host_os == 'darwin'
error('Unable to detect Apple OS flavor')
endif
have_ptrauth_src = '''
#ifdef __clang__
# if __has_feature (ptrauth_calls)
@@ -126,28 +159,33 @@ if host_os_family == 'darwin'
endif
endif
if host_os_family == 'linux' and cc.has_header('android/api-level.h')
host_os = 'android'
if host_machine.endian() == 'big'
if host_abi in ['arm', 'armhf']
host_abi = 'armbe8'
elif host_abi == 'arm64'
host_abi = 'arm64be'
endif
endif
if cc.sizeof('void *') == 8
host_cpu_mode = '64'
if host_os_family == 'darwin' and host_arch == 'arm64'
host_is_modern = host_abi == 'arm64e'
else
host_cpu_mode = '32'
host_is_modern = host_cpu_mode == '64'
endif
cdata = configuration_data()
if cc.get_define('FRIDA_VERSION') == ''
version = meson.project_version()
tokens = version.split('.')
cdata.set_quoted('FRIDA_VERSION', version)
cdata.set('FRIDA_MAJOR_VERSION', tokens[0].to_int())
cdata.set('FRIDA_MINOR_VERSION', tokens[1].to_int())
cdata.set('FRIDA_MICRO_VERSION', tokens[2].to_int())
cdata.set('FRIDA_NANO_VERSION', 0)
endif
cdata.set_quoted('FRIDA_PREFIX', get_option('prefix'))
cdata.set_quoted('FRIDA_VERSION', frida_version)
cdata.set('FRIDA_MAJOR_VERSION', frida_major_version)
cdata.set('FRIDA_MINOR_VERSION', frida_minor_version)
cdata.set('FRIDA_MICRO_VERSION', frida_micro_version)
cdata.set('FRIDA_NANO_VERSION', frida_nano_version)
escaped_prefix = get_option('prefix')
if host_os_family == 'windows'
escaped_prefix = escaped_prefix.replace('\\', '\\\\')
endif
cdata.set_quoted('FRIDA_PREFIX', escaped_prefix)
exe_suffix = (host_os_family == 'windows') ? '.exe' : ''
if host_os_family == 'windows'
@@ -162,11 +200,14 @@ helper_name = 'frida-helper' + exe_suffix
agent_name = 'frida-agent' + shlib_suffix
gadget_name = 'frida-gadget' + shlib_suffix
root_asset_dir = get_option('libdir') / 'frida'
if host_os_family == 'darwin'
asset_dir = get_option('libdir') / 'frida'
asset_dir = root_asset_dir
default_asset_path_template = get_option('prefix') / get_option('libdir') / 'frida'
else
asset_dir = get_option('libdir') / 'frida' / host_cpu_mode
asset_dir = root_asset_dir / host_cpu_mode
asset_dir_modern = root_asset_dir / '64'
asset_dir_legacy = root_asset_dir / '32'
default_asset_path_template = get_option('prefix') / get_option('libdir') / 'frida' / '<arch>'
endif
@@ -240,33 +281,69 @@ if get_option('b_sanitize') == 'address'
cdata.set('HAVE_ASAN', 1)
endif
glib_dep = dependency('glib-2.0', version: '>=2.74')
gum_dep = dependency('frida-gum-1.0', default_options: [
f'frida_version=@frida_version@',
'gumjs=enabled',
])
gumjs_dep = dependency('frida-gumjs-1.0')
gumjs_inspector_dep = dependency('frida-gumjs-inspector-1.0')
glib_options = [
'cocoa=disabled',
'selinux=disabled',
'xattr=false',
'libmount=disabled',
'tests=false',
'nls=disabled',
]
if optimize_for_prod
glib_options += [
'glib_debug=disabled',
'glib_assert=false',
'glib_checks=false',
]
endif
gee_options = [
'disable-introspection=true',
]
if optimize_for_prod
gee_options += 'disable-internal-asserts=true'
endif
glib_dep = dependency('glib-2.0', version: '>=2.72', default_options: glib_options)
gobject_dep = dependency('gobject-2.0')
gmodule_dep = dependency('gmodule-2.0')
gio_dep = dependency('gio-2.0')
gee_dep = dependency('gee-0.8')
json_glib_dep = dependency('json-glib-1.0')
libsoup_dep = dependency('libsoup-3.0')
gum_dep = dependency('frida-gum-1.0')
gumjs_dep = dependency('frida-gumjs-1.0')
gumjs_inspector_dep = dependency('frida-gumjs-inspector-1.0')
quickjs_dep = dependency('quickjs', required: false)
gee_dep = dependency('gee-0.8', default_options: gee_options)
json_glib_dep = dependency('json-glib-1.0', default_options: [
'introspection=disabled',
'gtk_doc=disabled',
'tests=false',
])
libsoup_dep = dependency('libsoup-3.0', default_options: [
'gssapi=disabled',
'ntlm=disabled',
'brotli=disabled',
'tls_check=false',
'introspection=disabled',
'vapi=disabled',
'docs=disabled',
'examples=disabled',
'tests=false',
'sysprof=disabled',
])
brotlidec_dep = dependency('libbrotlidec')
quickjs_dep = dependency('quickjs', required: get_option('barebone_backend'), default_options: [
'libc=false',
'bignum=true',
'atomics=disabled',
'stack_check=disabled',
])
have_v8 = gumjs_dep.get_variable('gumjs_v8') == 'enabled'
if have_v8
vala_flags += ['--define=HAVE_V8']
v8_mksnapshot = find_program('v8-mksnapshot-@0@-@1@'.format(host_os, host_abi), required: false)
if not v8_mksnapshot.found()
v8_mksnapshot = ''
endif
else
v8_mksnapshot = ''
endif
native_glib_dep = dependency('glib-2.0', version: '>=2.74', native: true)
native_glib_dep = dependency('glib-2.0', version: '>=2.74', native: true, default_options: glib_options)
native_gio_dep = dependency('gio-2.0', native: true)
native_gee_dep = dependency('gee-0.8', native: true)
native_gee_dep = dependency('gee-0.8', native: true, default_options: gee_options)
native_brotlienc_dep = dependency('libbrotlienc', native: true)
if host_os_family == 'windows'
@@ -275,11 +352,226 @@ else
gio_unix_dep = dependency('gio-unix-2.0')
endif
if host_os == 'android'
minizip_dep = dependency('minizip', required: false, default_options: [
'zlib=enabled',
'lzma=disabled',
])
endif
if host_toolchain == 'microsoft'
lib = find_program('lib')
ar = ''
nm = ''
ranlib = ''
strip = ''
else
lib = ''
ar = find_program('ar')
nm = find_program('nm')
ranlib = find_program('ranlib')
strip = find_program('strip')
endif
if host_os_family != 'windows'
if host_os_family == 'darwin'
readelf = ''
otool = find_program('otool')
libtool = find_program('libtool')
else
readelf = find_program('readelf')
otool = ''
libtool = ''
endif
else
readelf = ''
otool = ''
libtool = ''
endif
if host_os_family == 'darwin'
install_name_tool = find_program('install_name_tool')
lipo = find_program('lipo')
codesign = find_program('codesign')
else
install_name_tool = ''
lipo = ''
codesign = ''
endif
have_local_backend = get_option('local_backend').allowed()
have_fruity_backend = get_option('fruity_backend') \
.disable_auto_if(not host_docks_mobile_devices) \
.allowed()
have_droidy_backend = get_option('droidy_backend') \
.disable_auto_if(not host_docks_mobile_devices) \
.allowed()
have_socket_backend = get_option('socket_backend').allowed()
have_barebone_backend = get_option('barebone_backend') \
.disable_if(not quickjs_dep.found()) \
.disable_auto_if(not host_docks_mobile_devices) \
.allowed()
compiler_backend_opt = get_option('compiler_backend') \
.disable_auto_if(host_os == 'watchos')
have_compiler_backend = false
if compiler_backend_opt.allowed()
go = find_program('go', native: true, required: false)
if go.found()
message('Detecting cgo availability')
detect_output = run_command(
[
python,
files('tools' / 'cgo' / 'detect.py'),
go,
host_os,
host_abi,
shlib_suffix,
cc.get_id(),
'>>>', cc.cmd_array(), '<<<',
'>>>', ar, '<<<',
'>>>', nm, '<<<',
'>>>', ranlib, '<<<',
],
capture: true,
check: true
).stdout()
lines = detect_output.split('\n')
status = lines[0]
if status == 'ok'
have_compiler_backend = true
tokens = lines[1].split(' ')
go_mode = tokens[0]
go_config = tokens[1]
compiler_backend_static_compilation = go_mode == 'c-archive'
if compiler_backend_static_compilation
vala_flags += '--define=COMPILER_BACKEND_STATIC_COMPILATION'
endif
else
error_message = lines[1]
if compiler_backend_opt.enabled()
error(error_message)
else
warning(f'Building without Compiler backend: @error_message@')
endif
endif
elif compiler_backend_opt.enabled()
error('Need Go >= 1.24 to build the Compiler backend powered by ESBuild and typescript-go')
else
warning('Building without Compiler backend: Go >= 1.24 not found')
endif
endif
build_gadget = get_option('gadget') \
.disable_auto_if(meson.is_subproject()) \
.allowed()
build_server = get_option('server') \
.disable_if(not have_local_backend, error_message: 'frida-server requires the local backend to be included') \
.disable_if(host_os == 'watchos', error_message: 'frida-server not yet supported on watchOS') \
.disable_auto_if(meson.is_subproject()) \
.allowed()
build_portal = get_option('portal') \
.disable_if(host_os == 'watchos', error_message: 'frida-portal not yet supported on watchOS') \
.disable_auto_if(meson.is_subproject()) \
.allowed()
build_inject = get_option('inject') \
.disable_if(not have_local_backend, error_message: 'frida-inject requires the local backend to be included') \
.disable_if(host_os == 'watchos', error_message: 'frida-inject not yet supported on watchOS') \
.disable_auto_if(meson.is_subproject()) \
.allowed()
build_tests = get_option('tests') \
.disable_if(host_os == 'watchos', error_message: 'tests not yet supported on watchOS') \
.disable_auto_if(meson.is_subproject() or not meson.can_run_host_binaries()) \
.allowed()
foreach b : [['local', have_local_backend],
['fruity', have_fruity_backend],
['droidy', have_droidy_backend],
['socket', have_socket_backend],
['barebone', have_barebone_backend],
['compiler', have_compiler_backend]]
if b[1]
vala_flags += '--define=HAVE_@0@_BACKEND'.format(b[0].to_upper())
endif
endforeach
if host_os_family == 'darwin' or host_os == 'android' or have_barebone_backend or have_compiler_backend
node = find_program('node', version: '>=18.0.0', native: true, required: false)
if not node.found()
error('Need Node.js >= 18.0.0 to process JavaScript code at build time')
endif
npm = find_program('npm', native: true, required: false)
if not npm.found()
error('Need npm to process JavaScript code at build time')
endif
endif
gi_dep = dependency('gobject-introspection-1.0', required: false)
if gi_dep.found()
girdir = gi_dep.get_variable('girdir')
else
girdir = get_option('prefix') / get_option('datadir') / 'gir-1.0'
endif
vapidir = get_option('prefix') / get_option('datadir') / 'vala' / 'vapi'
gum_vala_args = [
'--pkg=frida-gum-1.0',
'--vapidir=' + gum_dep.get_variable('frida_vapidir'),
]
gumjs_vala_args = ['--pkg=frida-gumjs-1.0', '--pkg=gio-2.0', gum_vala_args]
gumjs_inspector_vala_args = ['--pkg=frida-gumjs-inspector-1.0', gum_vala_args]
have_v8 = gumjs_dep.get_variable('gumjs_v8') == 'enabled'
if have_v8
vala_flags += ['--define=HAVE_V8']
endif
backend_deps_private = []
backend_reqs_private = []
backend_libs_private = []
openssl_options = [
'cli=disabled',
]
if host_os_family == 'windows' and cc.get_argument_syntax() != 'msvc'
openssl_options += 'asm=disabled'
endif
openssl_dep = dependency('openssl',
required: have_fruity_backend or get_option('connectivity').enabled(),
modules: cc.get_argument_syntax() == 'msvc' ? ['OpenSSL::SSL'] : [],
default_options: openssl_options,
)
if have_fruity_backend
foreach dep : ['libnghttp2', 'libngtcp2', 'libngtcp2_crypto_quictls', 'libusb-1.0']
backend_deps_private += dependency(dep)
backend_reqs_private += dep
endforeach
lwip_options = [
'ipv4=disabled',
'ipv6=enabled',
'dns=disabled',
'arp=disabled',
'ethernet=enabled',
'tcp_mss=4036',
'tcp_snd_buf=65535',
'tcp_wnd=65535',
]
if optimize_for_prod
lwip_options += 'lwip_debug=disabled'
else
lwip_options += 'lwip_debug=enabled'
endif
backend_deps_private += dependency('lwip', default_options: lwip_options)
backend_reqs_private += 'lwip'
endif
if quickjs_dep.found()
backend_deps_private += quickjs_dep
backend_reqs_private += 'quickjs'
endif
if host_os_family == 'linux' and cc.has_function('openpty', prefix: '#include <pty.h>')
@@ -287,34 +579,58 @@ if host_os_family == 'linux' and cc.has_function('openpty', prefix: '#include <p
endif
if host_os == 'android'
termux_elf_cleaner = find_program('termux-elf-cleaner', native: true)
libselinux_dep = dependency('libselinux', version: '>=3.0')
libsepol_dep = dependency('libsepol', version: '>=3.0')
backend_deps_private += [libselinux_dep, libsepol_dep]
backend_reqs_private += ['libselinux', 'libsepol']
else
termux_elf_cleaner = []
endif
tls_provider_dep = dependency('gioopenssl', required: get_option('connectivity'))
tls_provider_dep = dependency('gioopenssl', required: get_option('connectivity'), default_options: [
'gnutls=disabled',
'openssl=enabled',
'libproxy=disabled',
'gnome_proxy=disabled',
'tests=false',
])
tls_provider_vala_args = []
if tls_provider_dep.found()
tls_provider_vala_args += [
'--pkg=gioopenssl',
'--vapidir=' + tls_provider_dep.get_variable('vapidir'),
]
cdata.set('HAVE_GIOOPENSSL', 1)
vala_flags += ['--define=HAVE_GIOOPENSSL']
backend_deps_private += tls_provider_dep
backend_reqs_private += 'gioopenssl'
endif
nice_dep = dependency('nice', required: get_option('connectivity'))
nice_dep = dependency('nice', required: get_option('connectivity'), default_options: [
'gupnp=disabled',
'gstreamer=disabled',
'crypto-library=openssl',
'examples=disabled',
'tests=disabled',
'introspection=disabled',
])
if nice_dep.found()
openssl_dep = dependency('openssl')
usrsctp_dep = dependency('usrsctp')
usrsctp_dep = dependency('usrsctp', default_options: [
'sctp_inet=false',
'sctp_inet6=false',
'sctp_build_programs=false',
])
cdata.set('HAVE_NICE', 1)
vala_flags += ['--define=HAVE_NICE']
backend_deps_private += [nice_dep, openssl_dep, usrsctp_dep]
backend_reqs_private += ['nice', 'openssl', 'usrsctp']
if cc.has_member('struct sockaddr_conn', 'sconn_len',
dependencies: [usrsctp_dep],
prefix: '#include <usrsctp.h>')
if host_os_family in ['darwin', 'freebsd', 'qnx']
cdata.set('HAVE_SCONN_LEN', 1)
endif
else
openssl_dep = []
usrsctp_dep = []
endif
@@ -331,44 +647,65 @@ if host_os in ['ios', 'tvos']
backend_libs_private += ['-Wl,-framework,CoreGraphics', '-Wl,-framework,UIKit']
endif
ar = find_program('ar')
nm = find_program('nm')
if host_os_family != 'windows'
if get_option('devkits').length() != 0
if get_option('default_library') != 'static'
error('Devkits can only be generated from static libraries')
endif
mkdevkit = [python, releng / 'mkdevkit.py']
uninstalled_dir = meson.global_build_root() / 'meson-uninstalled'
devkit_options = [
'--cc', '>>>', cc.cmd_array(), '<<<',
'--c-args', '>>>', get_option('c_args'), '<<<',
'--pkg-config', '>>>', find_program('pkg-config'), '<<<',
'--pkg-config-path', '>>>', uninstalled_dir, get_option('pkg_config_path'), '<<<',
]
if host_toolchain == 'microsoft'
static_lib_prefix = ''
static_lib_suffix = '.lib'
devkit_options += ['--lib', '>>>', lib, '<<<']
else
static_lib_prefix = 'lib'
static_lib_suffix = '.a'
devkit_options += [
'--ar', '>>>', ar, '<<<',
'--nm', '>>>', nm, '<<<',
]
objcopy = find_program('objcopy', required: false)
if objcopy.found()
devkit_options += ['--objcopy', '>>>', objcopy, '<<<']
endif
endif
if host_os_family == 'darwin'
readelf = ''
otool = find_program('otool')
libtool = find_program('libtool')
else
readelf = find_program('readelf')
otool = ''
libtool = ''
devkit_options += ['--libtool', '>>>', libtool, '<<<']
endif
else
readelf = ''
otool = ''
libtool = ''
endif
strip = find_program('strip')
if host_os_family == 'darwin'
install_name_tool = find_program('install_name_tool')
lipo = find_program('lipo')
codesign = find_program('codesign')
else
install_name_tool = ''
lipo = ''
codesign = ''
endif
modulate = files('tools/modulate.py')
post_process_module = [
files('tools/post-process-module.sh'),
modulate = [
python,
files('tools' / 'modulate.py'),
'--endian', host_machine.endian(),
'--nm', '>>>', nm, '<<<',
'--readelf', '>>>', readelf, '<<<',
'--otool', '>>>', otool, '<<<',
'--output', '@OUTPUT@',
'@INPUT@',
]
post_process = [
python,
files('tools' / 'post-process.py'),
host_os,
host_abi,
'>>>', strip, '<<<',
get_option('strip').to_string(),
install_name_tool,
codesign,
'>>>', install_name_tool, '<<<',
'>>>', codesign, '<<<',
'>>>', termux_elf_cleaner, '<<<',
'@OUTPUT@',
'@INPUT0@',
]
compile_js_agent = files('tools' / 'compile-js-agent.py')
mapper_opt = get_option('mapper')
if mapper_opt.auto()
have_mapper = host_os_family == 'darwin'
@@ -384,48 +721,84 @@ configure_file(
configuration: cdata)
add_project_arguments(
'-include', 'config.h',
(cc.get_argument_syntax() == 'msvc') ? '/FI' : '-include', meson.current_build_dir() / 'config.h',
'-DG_LOG_DOMAIN="Frida"',
'-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56',
'-DG_DISABLE_DEPRECATED',
language: c_languages)
if host_os_family == 'linux'
add_project_arguments('-D_GNU_SOURCE=1', language: c_languages)
# Our Vala compiler emits warnings pragmas for GCC >= 5, so for older versions we'll need to
# suppress them through GCC's command-line options. It would be better to only do this for
# Vala-generated sources, but this will have to do for now.
if cc.get_id() == 'gcc' and cc.compiles('#if __GNUC__ >= 5\n#error NOTNEEDED\n#endif')
add_project_arguments('-w', language: 'c')
endif
vapidir = meson.current_source_dir() / 'vapi'
vala_flags += [
'--vapidir=' + meson.current_source_dir() / 'vapi',
'--vapidir=' + vapidir,
'--pkg', 'config',
]
vala_flags += ['--define=' + host_os_family.to_upper()]
vala_flags += '--define=' + host_os_family.to_upper()
if host_os != host_os_family
vala_flags += ['--define=' + host_os.to_upper()]
vala_flags += '--define=' + host_os.to_upper()
endif
vala_flags += ['--define=' + host_arch.to_upper()]
vala_flags += '--define=' + host_arch.to_upper()
if host_abi != host_arch
vala_flags += ['--define=' + host_abi.to_upper()]
vala_flags += '--define=' + host_abi.to_upper()
endif
if get_option('agent_legacy') != ''
vala_flags += ['--define=CROSS_ARCH']
endif
add_project_arguments(vala_flags, language: ['vala'])
vala_flags += '--define=' + host_machine.endian().to_upper() + '_ENDIAN'
add_project_arguments(vala_flags, language: 'vala')
add_project_arguments('-I' + vapidir, language: 'c')
native_vala_flags = [
'--vapidir=' + meson.current_source_dir() / 'vapi',
]
add_project_arguments(native_vala_flags, language: ['vala'], native: true)
add_project_arguments(native_vala_flags, language: 'vala', native: true)
add_project_arguments('-I' + vapidir, language: 'c', native: true)
subdir('compat')
subdir('tools')
subdir('lib')
subdir('src')
if host_os != 'watchos'
if build_server
subdir('server')
subdir('portal')
subdir('inject')
if get_option('tests')
subdir('tests')
endif
endif
if build_portal
subdir('portal')
endif
if build_inject
subdir('inject')
endif
if build_tests
subdir('tests')
endif
summary(
{
'local': have_local_backend,
'fruity': have_fruity_backend,
'droidy': have_droidy_backend,
'socket': have_socket_backend,
'barebone': have_barebone_backend,
'compiler': have_compiler_backend,
},
section: 'Backends',
bool_yn: true,
)
summary(
{
'compat': compat_summary,
'assets': get_option('assets'),
'mapper': have_mapper,
'connectivity': tls_provider_dep.found(),
'gadget': build_gadget,
'server': build_server,
'portal': build_portal,
'inject': build_inject,
'tests': build_tests,
},
section: 'Features',
bool_yn: true,
)
+157
View File
@@ -0,0 +1,157 @@
option('frida_version',
type: 'string',
value: '',
description: 'Frida version, such as 16.2.2 or 16.2.2-dev.27',
)
option('local_backend',
type: 'feature',
value: 'auto',
description: 'Include backend for the local system',
)
option('fruity_backend',
type: 'feature',
value: 'auto',
description: 'Include the Fruity backend',
)
option('droidy_backend',
type: 'feature',
value: 'auto',
description: 'Include the Droidy backend',
)
option('socket_backend',
type: 'feature',
value: 'auto',
description: 'Include the Socket backend',
)
option('barebone_backend',
type: 'feature',
value: 'auto',
description: 'Include the Barebone backend',
)
option('compiler_backend',
type: 'feature',
value: 'auto',
description: 'Include frida-compile backend powered by ESBuild and typescript-go',
)
option('assets',
type: 'combo',
choices: ['embedded', 'installed'],
value: 'embedded',
description: 'Whether assets such as frida-agent should be embedded vs installed and loaded at runtime'
)
option('asset_path_template',
type: 'string',
description: 'Override the default installed asset path template'
)
option('compat',
type: 'array',
choices: ['auto', 'disabled', 'native', 'emulated'],
value: ['auto'],
description: 'Support for targets with a different architecture',
)
option('helper_modern',
type: 'string',
value: 'auto',
description: 'Prebuilt frida-helper to embed for supporting modern targets'
)
option('helper_legacy',
type: 'string',
value: 'auto',
description: 'Prebuilt frida-helper to embed for supporting legacy targets'
)
option('helper_emulated_modern',
type: 'string',
value: 'auto',
description: 'Prebuilt frida-helper to embed for supporting modern emulated targets'
)
option('helper_emulated_legacy',
type: 'string',
value: 'auto',
description: 'Prebuilt frida-helper to embed for supporting legacy emulated targets'
)
option('agent_modern',
type: 'string',
value: 'auto',
description: 'Prebuilt agent to embed for use on modern targets'
)
option('agent_legacy',
type: 'string',
value: 'auto',
description: 'Prebuilt agent to embed for use on legacy targets'
)
option('agent_emulated_modern',
type: 'string',
value: 'auto',
description: 'Prebuilt agent to embed for use on modern emulated targets'
)
option('agent_emulated_legacy',
type: 'string',
value: 'auto',
description: 'Prebuilt agent to embed for use on legacy emulated targets'
)
option('gadget',
type: 'feature',
value: 'auto',
description: 'Build frida-gadget',
)
option('server',
type: 'feature',
value: 'auto',
description: 'Build frida-server',
)
option('portal',
type: 'feature',
value: 'auto',
description: 'Build frida-portal',
)
option('inject',
type: 'feature',
value: 'auto',
description: 'Build frida-inject',
)
option('connectivity',
type: 'feature',
value: 'enabled',
description: 'Internet connectivity features (TLS and ICE support)'
)
option('mapper',
type: 'feature',
value: 'auto',
description: 'Use our own out-of-process dynamic linker for injection on i/macOS'
)
option('devkits',
type: 'array',
choices: ['core'],
value: [],
description: 'Devkits to build'
)
option('tests',
type: 'feature',
value: 'auto',
description: 'Build tests'
)
-84
View File
@@ -1,84 +0,0 @@
option('assets',
type: 'combo',
choices: ['embedded', 'installed'],
value: 'embedded',
description: 'Whether assets such as frida-agent should be embedded vs installed and loaded at runtime'
)
option('asset_path_template',
type: 'string',
value: '',
description: 'Override the default installed asset path template'
)
option('helper_modern',
type: 'string',
value: '',
description: 'Prebuilt frida-helper to embed for use on modern systems'
)
option('helper_legacy',
type: 'string',
value: '',
description: 'Prebuilt frida-helper to embed for use on legacy systems'
)
option('agent_modern',
type: 'string',
value: '',
description: 'Prebuilt agent to embed for use on modern targets'
)
option('agent_legacy',
type: 'string',
value: '',
description: 'Prebuilt agent to embed for use on legacy targets'
)
option('agent_emulated_modern',
type: 'string',
value: '',
description: 'Prebuilt agent to embed for use on modern emulated targets'
)
option('agent_emulated_legacy',
type: 'string',
value: '',
description: 'Prebuilt agent to embed for use on legacy emulated targets'
)
option('agent_dbghelp_prefix',
type: 'string',
value: '',
description: 'Location of DbgHelp binaries to embed alongside agent (Windows only)'
)
option('agent_symsrv_prefix',
type: 'string',
value: '',
description: 'Location of SymSrv binaries to embed alongside agent (Windows only)'
)
option('connectivity',
type: 'feature',
value: 'auto',
description: 'Internet connectivity features (TLS and ICE support)'
)
option('mapper',
type: 'feature',
value: 'auto',
description: 'Use our own out-of-process dynamic linker for injection on i/macOS'
)
option('compiler_snapshot',
type: 'feature',
value: 'auto',
description: 'Speed up compiler startup by using a snapshot'
)
option('tests',
type: 'boolean',
value: true,
description: 'Build tests'
)
+5 -16
View File
@@ -6,11 +6,11 @@ extra_link_args = []
extra_link_depends = []
if host_os_family == 'darwin'
symlist = 'frida-portal.symbols'
extra_link_args += ['-Wl,-exported_symbols_list,' + join_paths(meson.current_source_dir(), symlist)]
extra_link_args += ['-Wl,-exported_symbols_list,' + meson.current_source_dir() / symlist]
extra_link_depends += [symlist]
elif host_os_family != 'windows'
symscript = 'frida-portal.version'
extra_link_args += ['-Wl,--version-script,' + join_paths(meson.current_source_dir(), symscript)]
extra_link_args += ['-Wl,--version-script,' + meson.current_source_dir() / symscript]
extra_link_depends += [symscript]
endif
@@ -20,27 +20,16 @@ if tls_provider_dep.found()
endif
raw_portal = executable('frida-portal-raw', portal_sources,
vala_args: ['--pkg=posix'],
vala_args: [core_vala_args, tls_provider_vala_args, '--pkg=posix'],
link_args: extra_link_args,
link_depends: extra_link_depends,
dependencies: [core_dep] + extra_deps,
)
custom_target('frida-portal',
input: [
raw_portal,
'frida-portal.xcent',
],
input: [raw_portal, 'frida-portal.xcent'],
output: 'frida-portal' + exe_suffix,
command: [
files('post-process.sh'),
'@INPUT@',
'@OUTPUT@',
host_os,
'>>>', strip, '<<<',
get_option('strip').to_string(),
codesign,
],
command: post_process + ['executable', 're.frida.Portal', '@INPUT1@'],
install: true,
install_dir: get_option('bindir'),
)
+1 -1
View File
@@ -142,7 +142,7 @@ namespace Frida.Portal {
return application.run ();
}
private class Application : Object {
private sealed class Application : Object {
public signal void ready (bool success);
public PortalService service {
Loaded 100 of 429 files, more files were not shown because too many files have changed in this diff. Show more