frida 17.9.1 → 17.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/frida.d.ts +13 -2
- package/build/src/frida.js +14 -2
- package/build/src/frida_binding.d.ts +28 -0
- package/package.json +1 -1
- package/releng/deps.toml +6 -6
- package/releng/devkit.py +22 -2
- package/releng/env.py +61 -23
- package/releng/env_android.py +2 -1
- package/releng/env_apple.py +7 -3
- package/releng/env_generic.py +6 -2
- package/releng/meson_configure.py +30 -5
- package/releng/meson_make.py +7 -3
- package/src/frida_bindgen/__pycache__/__init__.cpython-312.pyc +0 -0
- package/src/frida_bindgen/__pycache__/__main__.cpython-312.pyc +0 -0
- package/src/frida_bindgen/__pycache__/cli.cpython-312.pyc +0 -0
- package/src/frida_bindgen/__pycache__/codegen.cpython-312.pyc +0 -0
- package/src/frida_bindgen/__pycache__/customization.cpython-312.pyc +0 -0
- package/src/frida_bindgen/__pycache__/loader.cpython-312.pyc +0 -0
- package/src/frida_bindgen/__pycache__/model.cpython-312.pyc +0 -0
- package/src/frida_bindgen/codegen.py +1 -1
- package/subprojects/frida-core.wrap +1 -1
package/build/src/frida.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { DeviceManager as _DeviceManager, DeviceAddedHandler as _DeviceAddedHandler, DeviceRemovedHandler as _DeviceRemovedHandler, DeviceChangedHandler as _DeviceChangedHandler, Device as _Device, SpawnAddedHandler as _SpawnAddedHandler, SpawnRemovedHandler as _SpawnRemovedHandler, ChildAddedHandler as _ChildAddedHandler, ChildRemovedHandler as _ChildRemovedHandler, ProcessCrashedHandler as _ProcessCrashedHandler, OutputHandler as _OutputHandler, UninjectedHandler as _UninjectedHandler, DeviceLostHandler as _DeviceLostHandler, RemoteDeviceOptions as _RemoteDeviceOptions, Application as _Application, Process as _Process, ProcessMatchOptions as _ProcessMatchOptions, RawSpawnOptions as _RawSpawnOptions, Spawn as _Spawn, Child as _Child, Crash as _Crash, Bus as _Bus, BusDetachedHandler as _BusDetachedHandler, BusMessageHandler as _BusMessageHandler, Service as _Service, ServiceCloseHandler as _ServiceCloseHandler, ServiceMessageHandler as _ServiceMessageHandler, Session as _Session, SessionDetachedHandler as _SessionDetachedHandler, Script as _Script, ScriptDestroyedHandler as _ScriptDestroyedHandler, ScriptMessageHandler as _ScriptMessageHandler, PortalMembership as _PortalMembership, PackageManager as _PackageManager, PackageManagerInstallProgressHandler as _PackageManagerInstallProgressHandler, Package as _Package, PackageSearchOptions as _PackageSearchOptions, PackageSearchResult as _PackageSearchResult, PackageInstallOptions as _PackageInstallOptions, PackageInstallResult as _PackageInstallResult, ControlService as _ControlService, ControlServiceOptions as _ControlServiceOptions, PortalService as _PortalService, PortalNodeConnectedHandler as _PortalNodeConnectedHandler, PortalNodeJoinedHandler as _PortalNodeJoinedHandler, PortalNodeLeftHandler as _PortalNodeLeftHandler, PortalNodeDisconnectedHandler as _PortalNodeDisconnectedHandler, PortalControllerConnectedHandler as _PortalControllerConnectedHandler, PortalControllerDisconnectedHandler as _PortalControllerDisconnectedHandler, PortalAuthenticatedHandler as _PortalAuthenticatedHandler, PortalSubscribeHandler as _PortalSubscribeHandler, PortalMessageHandler as _PortalMessageHandler, FileMonitor as _FileMonitor, FileMonitorChangeHandler as _FileMonitorChangeHandler, Compiler as _Compiler, CompilerStartingHandler as _CompilerStartingHandler, CompilerFinishedHandler as _CompilerFinishedHandler, CompilerOutputHandler as _CompilerOutputHandler, CompilerDiagnosticsHandler as _CompilerDiagnosticsHandler, CompilerOptions as _CompilerOptions, BuildOptions as _BuildOptions, WatchOptions as _WatchOptions, StaticAuthenticationService as _StaticAuthenticationService, FrontmostQueryOptions as _FrontmostQueryOptions, ApplicationQueryOptions as _ApplicationQueryOptions, ProcessQueryOptions as _ProcessQueryOptions, SessionOptions as _SessionOptions, ScriptOptions as _ScriptOptions, SnapshotOptions as _SnapshotOptions, PortalOptions as _PortalOptions, PeerOptions as _PeerOptions, Relay as _Relay, EndpointParameters as _EndpointParameters, AuthenticationService as _AuthenticationService, AbstractAuthenticationService as _AbstractAuthenticationService, BaseObject as _BaseObject, Cancellable as _Cancellable, CancelledHandler as _CancelledHandler, IOStream as _IOStream, InputStream as _InputStream, OutputStream as _OutputStream, InetSocketAddress as _InetSocketAddress, InetAddress as _InetAddress, UnixSocketAddress as _UnixSocketAddress, BaseSocketAddress as _BaseSocketAddress, SocketAddressEnumerator as _SocketAddressEnumerator, SocketConnectable as _SocketConnectable, Runtime as _Runtime, DeviceType as _DeviceType, PackageInstallPhase as _PackageInstallPhase, PackageRole as _PackageRole, OutputFormat as _OutputFormat, BundleFormat as _BundleFormat, TypeCheckMode as _TypeCheckMode, SourceMaps as _SourceMaps, JsCompression as _JsCompression, JsPlatform as _JsPlatform, GadgetBreakpointAction as _GadgetBreakpointAction, Realm as _Realm, SessionDetachReason as _SessionDetachReason, Scope as _Scope, Stdio as _Stdio, ChildOrigin as _ChildOrigin, SnapshotTransport as _SnapshotTransport, ScriptRuntime as _ScriptRuntime, RelayKind as _RelayKind, XnuMachTrap as _XnuMachTrap, XnuBsdSyscall as _XnuBsdSyscall, FileMonitorEvent as _FileMonitorEvent, SocketFamily as _SocketFamily, UnixSocketAddressType as _UnixSocketAddressType, TargetProcess as _TargetProcess, ProcessID as _ProcessID, InjecteeID as _InjecteeID, FileDescriptor as _FileDescriptor, ProcessName as _ProcessName, SystemParameters as _SystemParameters, SystemInterface as _SystemInterface, NetworkInterface as _NetworkInterface, CellularInterface as _CellularInterface, SpawnOptions as _SpawnOptions, RelayProperties as _RelayProperties, Message as _Message, MessageType as _MessageType, SendMessage as _SendMessage, ErrorMessage as _ErrorMessage, ScriptLogHandler as _ScriptLogHandler, ScriptExports as _ScriptExports, LogLevel as _LogLevel, EnableDebuggerOptions as _EnableDebuggerOptions, PortalServiceOptions as _PortalServiceOptions, PortalConnectionId as _PortalConnectionId, PortalConnectionTag as _PortalConnectionTag, EndpointParametersSubset as _EndpointParametersSubset, AuthenticationScheme as _AuthenticationScheme, TokenAuthenticationScheme as _TokenAuthenticationScheme, CallbackAuthenticationScheme as _CallbackAuthenticationScheme, AuthenticationCallback as _AuthenticationCallback, AuthenticatedSessionInfo as _AuthenticatedSessionInfo, SocketAddress as _SocketAddress, IPV4SocketAddress as _IPV4SocketAddress, IPV6SocketAddress as _IPV6SocketAddress, AnonymousUnixSocketAddress as _AnonymousUnixSocketAddress, PathUnixSocketAddress as _PathUnixSocketAddress, AbstractUnixSocketAddress as _AbstractUnixSocketAddress, Variant as _Variant, VariantValue as _VariantValue, VariantDict as _VariantDict } from "./frida_binding.d.ts";
|
|
1
|
+
import type { DeviceManager as _DeviceManager, DeviceAddedHandler as _DeviceAddedHandler, DeviceRemovedHandler as _DeviceRemovedHandler, DeviceChangedHandler as _DeviceChangedHandler, Device as _Device, SpawnAddedHandler as _SpawnAddedHandler, SpawnRemovedHandler as _SpawnRemovedHandler, ChildAddedHandler as _ChildAddedHandler, ChildRemovedHandler as _ChildRemovedHandler, ProcessCrashedHandler as _ProcessCrashedHandler, OutputHandler as _OutputHandler, UninjectedHandler as _UninjectedHandler, DeviceLostHandler as _DeviceLostHandler, RemoteDeviceOptions as _RemoteDeviceOptions, Application as _Application, Process as _Process, ProcessMatchOptions as _ProcessMatchOptions, RawSpawnOptions as _RawSpawnOptions, Spawn as _Spawn, Child as _Child, Crash as _Crash, Bus as _Bus, BusDetachedHandler as _BusDetachedHandler, BusMessageHandler as _BusMessageHandler, Service as _Service, ServiceCloseHandler as _ServiceCloseHandler, ServiceMessageHandler as _ServiceMessageHandler, Session as _Session, SessionDetachedHandler as _SessionDetachedHandler, Script as _Script, ScriptDestroyedHandler as _ScriptDestroyedHandler, ScriptMessageHandler as _ScriptMessageHandler, PortalMembership as _PortalMembership, PackageManager as _PackageManager, PackageManagerInstallProgressHandler as _PackageManagerInstallProgressHandler, Package as _Package, PackageSearchOptions as _PackageSearchOptions, PackageSearchResult as _PackageSearchResult, PackageInstallOptions as _PackageInstallOptions, PackageInstallResult as _PackageInstallResult, ControlService as _ControlService, ControlServiceOptions as _ControlServiceOptions, PortalService as _PortalService, PortalNodeConnectedHandler as _PortalNodeConnectedHandler, PortalNodeJoinedHandler as _PortalNodeJoinedHandler, PortalNodeLeftHandler as _PortalNodeLeftHandler, PortalNodeDisconnectedHandler as _PortalNodeDisconnectedHandler, PortalControllerConnectedHandler as _PortalControllerConnectedHandler, PortalControllerDisconnectedHandler as _PortalControllerDisconnectedHandler, PortalAuthenticatedHandler as _PortalAuthenticatedHandler, PortalSubscribeHandler as _PortalSubscribeHandler, PortalMessageHandler as _PortalMessageHandler, FileMonitor as _FileMonitor, FileMonitorChangeHandler as _FileMonitorChangeHandler, Compiler as _Compiler, CompilerStartingHandler as _CompilerStartingHandler, CompilerFinishedHandler as _CompilerFinishedHandler, CompilerOutputHandler as _CompilerOutputHandler, CompilerDiagnosticsHandler as _CompilerDiagnosticsHandler, CompilerOptions as _CompilerOptions, BuildOptions as _BuildOptions, WatchOptions as _WatchOptions, StaticAuthenticationService as _StaticAuthenticationService, FrontmostQueryOptions as _FrontmostQueryOptions, ApplicationQueryOptions as _ApplicationQueryOptions, ProcessQueryOptions as _ProcessQueryOptions, SessionOptions as _SessionOptions, ScriptOptions as _ScriptOptions, SnapshotOptions as _SnapshotOptions, PortalOptions as _PortalOptions, PeerOptions as _PeerOptions, Relay as _Relay, EndpointParameters as _EndpointParameters, WebRequest as _WebRequest, WebResponse as _WebResponse, AuthenticationService as _AuthenticationService, AbstractAuthenticationService as _AbstractAuthenticationService, WebRequestHandler as _WebRequestHandler, AbstractWebRequestHandler as _AbstractWebRequestHandler, BaseObject as _BaseObject, Cancellable as _Cancellable, CancelledHandler as _CancelledHandler, IOStream as _IOStream, InputStream as _InputStream, OutputStream as _OutputStream, InetSocketAddress as _InetSocketAddress, InetAddress as _InetAddress, UnixSocketAddress as _UnixSocketAddress, BaseSocketAddress as _BaseSocketAddress, SocketAddressEnumerator as _SocketAddressEnumerator, SocketConnectable as _SocketConnectable, Runtime as _Runtime, DeviceType as _DeviceType, PackageInstallPhase as _PackageInstallPhase, PackageRole as _PackageRole, OutputFormat as _OutputFormat, BundleFormat as _BundleFormat, TypeCheckMode as _TypeCheckMode, SourceMaps as _SourceMaps, JsCompression as _JsCompression, JsPlatform as _JsPlatform, GadgetBreakpointAction as _GadgetBreakpointAction, Realm as _Realm, SessionDetachReason as _SessionDetachReason, Scope as _Scope, Stdio as _Stdio, ChildOrigin as _ChildOrigin, SnapshotTransport as _SnapshotTransport, ScriptRuntime as _ScriptRuntime, RelayKind as _RelayKind, XnuMachTrap as _XnuMachTrap, XnuBsdSyscall as _XnuBsdSyscall, FileMonitorEvent as _FileMonitorEvent, SocketFamily as _SocketFamily, UnixSocketAddressType as _UnixSocketAddressType, TargetProcess as _TargetProcess, ProcessID as _ProcessID, InjecteeID as _InjecteeID, FileDescriptor as _FileDescriptor, ProcessName as _ProcessName, SystemParameters as _SystemParameters, SystemInterface as _SystemInterface, NetworkInterface as _NetworkInterface, CellularInterface as _CellularInterface, SpawnOptions as _SpawnOptions, RelayProperties as _RelayProperties, Message as _Message, MessageType as _MessageType, SendMessage as _SendMessage, ErrorMessage as _ErrorMessage, ScriptLogHandler as _ScriptLogHandler, ScriptExports as _ScriptExports, LogLevel as _LogLevel, EnableDebuggerOptions as _EnableDebuggerOptions, PortalServiceOptions as _PortalServiceOptions, PortalConnectionId as _PortalConnectionId, PortalConnectionTag as _PortalConnectionTag, EndpointParametersSubset as _EndpointParametersSubset, AuthenticationScheme as _AuthenticationScheme, TokenAuthenticationScheme as _TokenAuthenticationScheme, CallbackAuthenticationScheme as _CallbackAuthenticationScheme, AuthenticationCallback as _AuthenticationCallback, AuthenticatedSessionInfo as _AuthenticatedSessionInfo, SocketAddress as _SocketAddress, IPV4SocketAddress as _IPV4SocketAddress, IPV6SocketAddress as _IPV6SocketAddress, AnonymousUnixSocketAddress as _AnonymousUnixSocketAddress, PathUnixSocketAddress as _PathUnixSocketAddress, AbstractUnixSocketAddress as _AbstractUnixSocketAddress, Variant as _Variant, VariantValue as _VariantValue, VariantDict as _VariantDict } from "./frida_binding.d.ts";
|
|
2
2
|
export declare const MessageType: typeof _MessageType;
|
|
3
3
|
export declare const LogLevel: typeof _LogLevel;
|
|
4
|
-
export declare const DeviceManager: typeof _DeviceManager, Device: typeof _Device, RemoteDeviceOptions: _RemoteDeviceOptions, Application: typeof _Application, Process: typeof _Process, ProcessMatchOptions: _ProcessMatchOptions, RawSpawnOptions: _RawSpawnOptions, Spawn: typeof _Spawn, Child: typeof _Child, Crash: typeof _Crash, Bus: typeof _Bus, Service: typeof _Service, Session: typeof _Session, Script: typeof _Script, PortalMembership: typeof _PortalMembership, PackageManager: typeof _PackageManager, Package: typeof _Package, PackageSearchOptions: _PackageSearchOptions, PackageSearchResult: typeof _PackageSearchResult, PackageInstallOptions: _PackageInstallOptions, PackageInstallResult: typeof _PackageInstallResult, ControlService: typeof _ControlService, ControlServiceOptions: _ControlServiceOptions, PortalService: typeof _PortalService, FileMonitor: typeof _FileMonitor, Compiler: typeof _Compiler, CompilerOptions: _CompilerOptions, BuildOptions: _BuildOptions, WatchOptions: _WatchOptions, StaticAuthenticationService: typeof _StaticAuthenticationService, FrontmostQueryOptions: _FrontmostQueryOptions, ApplicationQueryOptions: _ApplicationQueryOptions, ProcessQueryOptions: _ProcessQueryOptions, SessionOptions: _SessionOptions, ScriptOptions: _ScriptOptions, SnapshotOptions: _SnapshotOptions, PortalOptions: _PortalOptions, PeerOptions: _PeerOptions, Relay: typeof _Relay, EndpointParameters: typeof _EndpointParameters, AbstractAuthenticationService: typeof _AbstractAuthenticationService, BaseObject: typeof _BaseObject, Cancellable: typeof _Cancellable, IOStream: typeof _IOStream, InputStream: typeof _InputStream, OutputStream: typeof _OutputStream, InetSocketAddress: typeof _InetSocketAddress, InetAddress: typeof _InetAddress, UnixSocketAddress: typeof _UnixSocketAddress, BaseSocketAddress: typeof _BaseSocketAddress, SocketAddressEnumerator: typeof _SocketAddressEnumerator, Runtime: typeof _Runtime, DeviceType: typeof _DeviceType, PackageInstallPhase: typeof _PackageInstallPhase, PackageRole: typeof _PackageRole, OutputFormat: typeof _OutputFormat, BundleFormat: typeof _BundleFormat, TypeCheckMode: typeof _TypeCheckMode, SourceMaps: typeof _SourceMaps, JsCompression: typeof _JsCompression, JsPlatform: typeof _JsPlatform, GadgetBreakpointAction: typeof _GadgetBreakpointAction, Realm: typeof _Realm, SessionDetachReason: typeof _SessionDetachReason, Scope: typeof _Scope, Stdio: typeof _Stdio, ChildOrigin: typeof _ChildOrigin, SnapshotTransport: typeof _SnapshotTransport, ScriptRuntime: typeof _ScriptRuntime, RelayKind: typeof _RelayKind, XnuMachTrap: typeof _XnuMachTrap, XnuBsdSyscall: typeof _XnuBsdSyscall, FileMonitorEvent: typeof _FileMonitorEvent, SocketFamily: typeof _SocketFamily, UnixSocketAddressType: typeof _UnixSocketAddressType;
|
|
4
|
+
export declare const DeviceManager: typeof _DeviceManager, Device: typeof _Device, RemoteDeviceOptions: _RemoteDeviceOptions, Application: typeof _Application, Process: typeof _Process, ProcessMatchOptions: _ProcessMatchOptions, RawSpawnOptions: _RawSpawnOptions, Spawn: typeof _Spawn, Child: typeof _Child, Crash: typeof _Crash, Bus: typeof _Bus, Service: typeof _Service, Session: typeof _Session, Script: typeof _Script, PortalMembership: typeof _PortalMembership, PackageManager: typeof _PackageManager, Package: typeof _Package, PackageSearchOptions: _PackageSearchOptions, PackageSearchResult: typeof _PackageSearchResult, PackageInstallOptions: _PackageInstallOptions, PackageInstallResult: typeof _PackageInstallResult, ControlService: typeof _ControlService, ControlServiceOptions: _ControlServiceOptions, PortalService: typeof _PortalService, FileMonitor: typeof _FileMonitor, Compiler: typeof _Compiler, CompilerOptions: _CompilerOptions, BuildOptions: _BuildOptions, WatchOptions: _WatchOptions, StaticAuthenticationService: typeof _StaticAuthenticationService, FrontmostQueryOptions: _FrontmostQueryOptions, ApplicationQueryOptions: _ApplicationQueryOptions, ProcessQueryOptions: _ProcessQueryOptions, SessionOptions: _SessionOptions, ScriptOptions: _ScriptOptions, SnapshotOptions: _SnapshotOptions, PortalOptions: _PortalOptions, PeerOptions: _PeerOptions, Relay: typeof _Relay, EndpointParameters: typeof _EndpointParameters, WebRequest: typeof _WebRequest, WebResponse: typeof _WebResponse, AbstractAuthenticationService: typeof _AbstractAuthenticationService, AbstractWebRequestHandler: typeof _AbstractWebRequestHandler, BaseObject: typeof _BaseObject, Cancellable: typeof _Cancellable, IOStream: typeof _IOStream, InputStream: typeof _InputStream, OutputStream: typeof _OutputStream, InetSocketAddress: typeof _InetSocketAddress, InetAddress: typeof _InetAddress, UnixSocketAddress: typeof _UnixSocketAddress, BaseSocketAddress: typeof _BaseSocketAddress, SocketAddressEnumerator: typeof _SocketAddressEnumerator, Runtime: typeof _Runtime, DeviceType: typeof _DeviceType, PackageInstallPhase: typeof _PackageInstallPhase, PackageRole: typeof _PackageRole, OutputFormat: typeof _OutputFormat, BundleFormat: typeof _BundleFormat, TypeCheckMode: typeof _TypeCheckMode, SourceMaps: typeof _SourceMaps, JsCompression: typeof _JsCompression, JsPlatform: typeof _JsPlatform, GadgetBreakpointAction: typeof _GadgetBreakpointAction, Realm: typeof _Realm, SessionDetachReason: typeof _SessionDetachReason, Scope: typeof _Scope, Stdio: typeof _Stdio, ChildOrigin: typeof _ChildOrigin, SnapshotTransport: typeof _SnapshotTransport, ScriptRuntime: typeof _ScriptRuntime, RelayKind: typeof _RelayKind, XnuMachTrap: typeof _XnuMachTrap, XnuBsdSyscall: typeof _XnuBsdSyscall, FileMonitorEvent: typeof _FileMonitorEvent, SocketFamily: typeof _SocketFamily, UnixSocketAddressType: typeof _UnixSocketAddressType;
|
|
5
5
|
declare const frida: {
|
|
6
6
|
readonly DeviceManager: typeof _DeviceManager;
|
|
7
7
|
readonly Device: typeof _Device;
|
|
@@ -43,7 +43,10 @@ declare const frida: {
|
|
|
43
43
|
readonly PeerOptions: _PeerOptions;
|
|
44
44
|
readonly Relay: typeof _Relay;
|
|
45
45
|
readonly EndpointParameters: typeof _EndpointParameters;
|
|
46
|
+
readonly WebRequest: typeof _WebRequest;
|
|
47
|
+
readonly WebResponse: typeof _WebResponse;
|
|
46
48
|
readonly AbstractAuthenticationService: typeof _AbstractAuthenticationService;
|
|
49
|
+
readonly AbstractWebRequestHandler: typeof _AbstractWebRequestHandler;
|
|
47
50
|
readonly BaseObject: typeof _BaseObject;
|
|
48
51
|
readonly Cancellable: typeof _Cancellable;
|
|
49
52
|
readonly IOStream: typeof _IOStream;
|
|
@@ -169,8 +172,12 @@ declare namespace frida {
|
|
|
169
172
|
type PeerOptions = _PeerOptions;
|
|
170
173
|
type Relay = _Relay;
|
|
171
174
|
type EndpointParameters = _EndpointParameters;
|
|
175
|
+
type WebRequest = _WebRequest;
|
|
176
|
+
type WebResponse = _WebResponse;
|
|
172
177
|
type AuthenticationService = _AuthenticationService;
|
|
173
178
|
type AbstractAuthenticationService = _AbstractAuthenticationService;
|
|
179
|
+
type WebRequestHandler = _WebRequestHandler;
|
|
180
|
+
type AbstractWebRequestHandler = _AbstractWebRequestHandler;
|
|
174
181
|
type BaseObject = _BaseObject;
|
|
175
182
|
type Cancellable = _Cancellable;
|
|
176
183
|
type CancelledHandler = _CancelledHandler;
|
|
@@ -318,8 +325,12 @@ export type PortalOptions = _PortalOptions;
|
|
|
318
325
|
export type PeerOptions = _PeerOptions;
|
|
319
326
|
export type Relay = _Relay;
|
|
320
327
|
export type EndpointParameters = _EndpointParameters;
|
|
328
|
+
export type WebRequest = _WebRequest;
|
|
329
|
+
export type WebResponse = _WebResponse;
|
|
321
330
|
export type AuthenticationService = _AuthenticationService;
|
|
322
331
|
export type AbstractAuthenticationService = _AbstractAuthenticationService;
|
|
332
|
+
export type WebRequestHandler = _WebRequestHandler;
|
|
333
|
+
export type AbstractWebRequestHandler = _AbstractWebRequestHandler;
|
|
323
334
|
export type BaseObject = _BaseObject;
|
|
324
335
|
export type Cancellable = _Cancellable;
|
|
325
336
|
export type CancelledHandler = _CancelledHandler;
|
package/build/src/frida.js
CHANGED
|
@@ -713,7 +713,7 @@ export const LogLevel = binding.LogLevel;
|
|
|
713
713
|
}
|
|
714
714
|
binding.Relay = Relay;
|
|
715
715
|
binding._EndpointParameters.prototype[inspect.custom] = function (depth, options) {
|
|
716
|
-
return inspectWrapper(this, "EndpointParameters", ["address", "port", "certificate", "origin", "authService", "assetRoot"], depth, options);
|
|
716
|
+
return inspectWrapper(this, "EndpointParameters", ["address", "port", "certificate", "origin", "authService", "assetRoot", "requestHandler"], depth, options);
|
|
717
717
|
};
|
|
718
718
|
class EndpointParameters extends binding._EndpointParameters {
|
|
719
719
|
constructor(params) {
|
|
@@ -736,9 +736,18 @@ export const LogLevel = binding.LogLevel;
|
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
738
|
binding.EndpointParameters = EndpointParameters;
|
|
739
|
+
binding.WebRequest.prototype[inspect.custom] = function (depth, options) {
|
|
740
|
+
return inspectWrapper(this, "WebRequest", ["method", "path", "queryString", "body"], depth, options);
|
|
741
|
+
};
|
|
742
|
+
binding.WebResponse.prototype[inspect.custom] = function (depth, options) {
|
|
743
|
+
return inspectWrapper(this, "WebResponse", ["status", "body"], depth, options);
|
|
744
|
+
};
|
|
739
745
|
binding.AuthenticationService.prototype[inspect.custom] = function (depth, options) {
|
|
740
746
|
return inspectWrapper(this, "AuthenticationService", [], depth, options);
|
|
741
747
|
};
|
|
748
|
+
binding.WebRequestHandler.prototype[inspect.custom] = function (depth, options) {
|
|
749
|
+
return inspectWrapper(this, "WebRequestHandler", [], depth, options);
|
|
750
|
+
};
|
|
742
751
|
binding.BaseObject.prototype[inspect.custom] = function (depth, options) {
|
|
743
752
|
return inspectWrapper(this, "BaseObject", [], depth, options);
|
|
744
753
|
};
|
|
@@ -795,7 +804,7 @@ export const LogLevel = binding.LogLevel;
|
|
|
795
804
|
};
|
|
796
805
|
}
|
|
797
806
|
binding.commitConstructors();
|
|
798
|
-
export const { DeviceManager, Device, RemoteDeviceOptions, Application, Process, ProcessMatchOptions, RawSpawnOptions, Spawn, Child, Crash, Bus, Service, Session, Script, PortalMembership, PackageManager, Package, PackageSearchOptions, PackageSearchResult, PackageInstallOptions, PackageInstallResult, ControlService, ControlServiceOptions, PortalService, FileMonitor, Compiler, CompilerOptions, BuildOptions, WatchOptions, StaticAuthenticationService, FrontmostQueryOptions, ApplicationQueryOptions, ProcessQueryOptions, SessionOptions, ScriptOptions, SnapshotOptions, PortalOptions, PeerOptions, Relay, EndpointParameters, AbstractAuthenticationService, BaseObject, Cancellable, IOStream, InputStream, OutputStream, InetSocketAddress, InetAddress, UnixSocketAddress, BaseSocketAddress, SocketAddressEnumerator, Runtime, DeviceType, PackageInstallPhase, PackageRole, OutputFormat, BundleFormat, TypeCheckMode, SourceMaps, JsCompression, JsPlatform, GadgetBreakpointAction, Realm, SessionDetachReason, Scope, Stdio, ChildOrigin, SnapshotTransport, ScriptRuntime, RelayKind, XnuMachTrap, XnuBsdSyscall, FileMonitorEvent, SocketFamily, UnixSocketAddressType, } = binding;
|
|
807
|
+
export const { DeviceManager, Device, RemoteDeviceOptions, Application, Process, ProcessMatchOptions, RawSpawnOptions, Spawn, Child, Crash, Bus, Service, Session, Script, PortalMembership, PackageManager, Package, PackageSearchOptions, PackageSearchResult, PackageInstallOptions, PackageInstallResult, ControlService, ControlServiceOptions, PortalService, FileMonitor, Compiler, CompilerOptions, BuildOptions, WatchOptions, StaticAuthenticationService, FrontmostQueryOptions, ApplicationQueryOptions, ProcessQueryOptions, SessionOptions, ScriptOptions, SnapshotOptions, PortalOptions, PeerOptions, Relay, EndpointParameters, WebRequest, WebResponse, AbstractAuthenticationService, AbstractWebRequestHandler, BaseObject, Cancellable, IOStream, InputStream, OutputStream, InetSocketAddress, InetAddress, UnixSocketAddress, BaseSocketAddress, SocketAddressEnumerator, Runtime, DeviceType, PackageInstallPhase, PackageRole, OutputFormat, BundleFormat, TypeCheckMode, SourceMaps, JsCompression, JsPlatform, GadgetBreakpointAction, Realm, SessionDetachReason, Scope, Stdio, ChildOrigin, SnapshotTransport, ScriptRuntime, RelayKind, XnuMachTrap, XnuBsdSyscall, FileMonitorEvent, SocketFamily, UnixSocketAddressType, } = binding;
|
|
799
808
|
const frida = {
|
|
800
809
|
DeviceManager,
|
|
801
810
|
Device,
|
|
@@ -837,7 +846,10 @@ const frida = {
|
|
|
837
846
|
PeerOptions,
|
|
838
847
|
Relay,
|
|
839
848
|
EndpointParameters,
|
|
849
|
+
WebRequest,
|
|
850
|
+
WebResponse,
|
|
840
851
|
AbstractAuthenticationService,
|
|
852
|
+
AbstractWebRequestHandler,
|
|
841
853
|
BaseObject,
|
|
842
854
|
Cancellable,
|
|
843
855
|
IOStream,
|
|
@@ -46,7 +46,10 @@ export interface FridaBinding {
|
|
|
46
46
|
_Relay: typeof _Relay;
|
|
47
47
|
EndpointParameters: typeof EndpointParameters;
|
|
48
48
|
_EndpointParameters: typeof _EndpointParameters;
|
|
49
|
+
WebRequest: typeof WebRequest;
|
|
50
|
+
WebResponse: typeof WebResponse;
|
|
49
51
|
AbstractAuthenticationService: typeof AbstractAuthenticationService;
|
|
52
|
+
AbstractWebRequestHandler: typeof AbstractWebRequestHandler;
|
|
50
53
|
BaseObject: typeof BaseObject;
|
|
51
54
|
Cancellable: typeof Cancellable;
|
|
52
55
|
_Cancellable: typeof _Cancellable;
|
|
@@ -387,6 +390,8 @@ export type PortalMessageHandler = (connectionId: PortalConnectionId, message: a
|
|
|
387
390
|
|
|
388
391
|
export class _PortalService extends BaseObject {
|
|
389
392
|
constructor(clusterParams: EndpointParameters, controlParams?: EndpointParameters | null);
|
|
393
|
+
addClusterEndpoint(endpointParams: EndpointParameters): void;
|
|
394
|
+
addControlEndpoint(endpointParams: EndpointParameters): void;
|
|
390
395
|
start(cancellable?: Cancellable | null): Promise<void>;
|
|
391
396
|
stop(cancellable?: Cancellable | null): Promise<void>;
|
|
392
397
|
kick(connectionId: number): void;
|
|
@@ -535,6 +540,21 @@ export class _EndpointParameters extends BaseObject {
|
|
|
535
540
|
origin: string;
|
|
536
541
|
authService: AuthenticationService;
|
|
537
542
|
assetRoot: string;
|
|
543
|
+
requestHandler: WebRequestHandler;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
export class WebRequest extends BaseObject {
|
|
547
|
+
method: string;
|
|
548
|
+
path: string;
|
|
549
|
+
queryString: string;
|
|
550
|
+
body: Buffer;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
export class WebResponse extends BaseObject {
|
|
554
|
+
constructor(status: number, body: Buffer);
|
|
555
|
+
addHeader(name: string, val: string): void;
|
|
556
|
+
status: number;
|
|
557
|
+
body: Buffer;
|
|
538
558
|
}
|
|
539
559
|
|
|
540
560
|
export interface AuthenticationService extends BaseObject {
|
|
@@ -545,6 +565,14 @@ export abstract class AbstractAuthenticationService extends BaseObject implement
|
|
|
545
565
|
authenticate(token: string, cancellable: Cancellable | null): Promise<string>;
|
|
546
566
|
}
|
|
547
567
|
|
|
568
|
+
export interface WebRequestHandler extends BaseObject {
|
|
569
|
+
handleRequest(request: WebRequest, cancellable?: Cancellable | null): Promise<WebResponse | null>;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
export abstract class AbstractWebRequestHandler extends BaseObject implements WebRequestHandler {
|
|
573
|
+
handleRequest(request: WebRequest, cancellable: Cancellable | null): Promise<WebResponse | null>;
|
|
574
|
+
}
|
|
575
|
+
|
|
548
576
|
export class BaseObject {
|
|
549
577
|
notify(propertyName: string): void;
|
|
550
578
|
}
|
package/package.json
CHANGED
package/releng/deps.toml
CHANGED
|
@@ -114,7 +114,7 @@ dependencies = [
|
|
|
114
114
|
[libdwarf]
|
|
115
115
|
when = "machine.os in {'linux', 'android', 'freebsd', 'qnx'}"
|
|
116
116
|
name = "libdwarf"
|
|
117
|
-
version = "
|
|
117
|
+
version = "61ff154ae803d2b0202dbc1bf385cda1ac3ece54"
|
|
118
118
|
url = "https://github.com/frida/libdwarf.git"
|
|
119
119
|
options = [
|
|
120
120
|
"-Ddecompression=false",
|
|
@@ -196,7 +196,7 @@ dependencies = [
|
|
|
196
196
|
[glib-networking]
|
|
197
197
|
when = "machine.os != 'none'"
|
|
198
198
|
name = "glib-networking"
|
|
199
|
-
version = "
|
|
199
|
+
version = "5c9331ba47790ee4f541185f3ca0971fe84fcfc2"
|
|
200
200
|
url = "https://github.com/frida/glib-networking.git"
|
|
201
201
|
options = [
|
|
202
202
|
"-Dgnutls=disabled",
|
|
@@ -213,12 +213,12 @@ dependencies = [
|
|
|
213
213
|
[libnice]
|
|
214
214
|
when = "machine.os != 'none'"
|
|
215
215
|
name = "libnice"
|
|
216
|
-
version = "
|
|
216
|
+
version = "9a3da6e3e5bbcf935fd85b6b8557ff8c7dd9032c"
|
|
217
217
|
url = "https://github.com/frida/libnice.git"
|
|
218
218
|
options = [
|
|
219
219
|
"-Dgupnp=disabled",
|
|
220
220
|
"-Dgstreamer=disabled",
|
|
221
|
-
"-Dcrypto-library=
|
|
221
|
+
"-Dcrypto-library=auto",
|
|
222
222
|
"-Dexamples=disabled",
|
|
223
223
|
"-Dtests=disabled",
|
|
224
224
|
"-Dintrospection=disabled",
|
|
@@ -254,7 +254,7 @@ dependencies = [
|
|
|
254
254
|
[usrsctp]
|
|
255
255
|
when = "machine.os != 'none'"
|
|
256
256
|
name = "usrsctp"
|
|
257
|
-
version = "
|
|
257
|
+
version = "377fecfe06bb766c69cc0e1e1f6d5c72cf7704e6"
|
|
258
258
|
url = "https://github.com/frida/usrsctp.git"
|
|
259
259
|
options = [
|
|
260
260
|
"-Dsctp_inet=false",
|
|
@@ -314,7 +314,7 @@ options = [
|
|
|
314
314
|
[ngtcp2]
|
|
315
315
|
when = "machine.os != 'none'"
|
|
316
316
|
name = "ngtcp2"
|
|
317
|
-
version = "
|
|
317
|
+
version = "5b21d4418ff668d9b5ddc4f744b7a28af4196abf"
|
|
318
318
|
url = "https://github.com/frida/ngtcp2.git"
|
|
319
319
|
dependencies = [
|
|
320
320
|
"openssl",
|
package/releng/devkit.py
CHANGED
|
@@ -197,7 +197,8 @@ class CompilerApplication:
|
|
|
197
197
|
|
|
198
198
|
library_dirs = infer_library_dirs(library_flags)
|
|
199
199
|
library_names = infer_library_names(library_flags)
|
|
200
|
-
library_paths, extra_flags = resolve_library_paths(library_names, library_dirs, self.machine
|
|
200
|
+
library_paths, extra_flags = resolve_library_paths(library_names, library_dirs, self.machine,
|
|
201
|
+
self._build_root())
|
|
201
202
|
extra_flags += infer_linker_flags(library_flags)
|
|
202
203
|
|
|
203
204
|
if self.compiler_argument_syntax == "msvc":
|
|
@@ -207,6 +208,12 @@ class CompilerApplication:
|
|
|
207
208
|
|
|
208
209
|
return (extra_flags, thirdparty_symbol_mappings)
|
|
209
210
|
|
|
211
|
+
def _build_root(self):
|
|
212
|
+
for candidate in [self.output_dir, *self.output_dir.parents]:
|
|
213
|
+
if is_meson_build_root(candidate):
|
|
214
|
+
return candidate
|
|
215
|
+
return None
|
|
216
|
+
|
|
210
217
|
def _do_generate_library_msvc(self, library_paths):
|
|
211
218
|
subprocess.run(self.meson_config["lib"] + ["/nologo", "/out:" + str(self.output_dir / self.library_filename)] + library_paths,
|
|
212
219
|
capture_output=True,
|
|
@@ -407,7 +414,10 @@ def infer_linker_flags(flags):
|
|
|
407
414
|
return [flag for flag in flags if flag.startswith("-Wl") or flag == "-pthread"]
|
|
408
415
|
|
|
409
416
|
|
|
410
|
-
def resolve_library_paths(names, dirs, machine):
|
|
417
|
+
def resolve_library_paths(names, dirs, machine, build_root=None):
|
|
418
|
+
if build_root is not None:
|
|
419
|
+
dirs = wrap_overrides_first(dirs, build_root)
|
|
420
|
+
|
|
411
421
|
paths = []
|
|
412
422
|
flags = []
|
|
413
423
|
for name in names:
|
|
@@ -424,12 +434,22 @@ def resolve_library_paths(names, dirs, machine):
|
|
|
424
434
|
return (deduplicate(paths), flags)
|
|
425
435
|
|
|
426
436
|
|
|
437
|
+
def wrap_overrides_first(dirs, build_root):
|
|
438
|
+
prefix = build_root.resolve()
|
|
439
|
+
inside_build_tree = lambda d: d.resolve() == prefix or prefix in d.resolve().parents
|
|
440
|
+
return [d for d in dirs if inside_build_tree(d)] + [d for d in dirs if not inside_build_tree(d)]
|
|
441
|
+
|
|
442
|
+
|
|
427
443
|
def is_os_library(path, machine):
|
|
428
444
|
if machine.os == "linux":
|
|
429
445
|
return path.name in {"libdl.a", "libm.a", "libpthread.a"}
|
|
430
446
|
return False
|
|
431
447
|
|
|
432
448
|
|
|
449
|
+
def is_meson_build_root(path):
|
|
450
|
+
return (path / "meson-info").is_dir()
|
|
451
|
+
|
|
452
|
+
|
|
433
453
|
def query_pkgconfig_cflags(package, meson_config):
|
|
434
454
|
raw_flags = call_pkgconfig(["--cflags", package], meson_config)
|
|
435
455
|
return shlex.split(raw_flags)
|
package/releng/env.py
CHANGED
|
@@ -69,7 +69,8 @@ def generate_machine_configs(build_machine: MachineSpec,
|
|
|
69
69
|
host_sdk_prefix: Optional[Path],
|
|
70
70
|
call_selected_meson: Callable,
|
|
71
71
|
default_library: DefaultLibrary,
|
|
72
|
-
outdir: Path
|
|
72
|
+
outdir: Path,
|
|
73
|
+
apple_min_os: Optional[Dict[str, str]] = None) -> Tuple[MachineConfig, MachineConfig]:
|
|
73
74
|
is_cross_build = host_machine != build_machine
|
|
74
75
|
|
|
75
76
|
if is_cross_build:
|
|
@@ -86,7 +87,8 @@ def generate_machine_configs(build_machine: MachineSpec,
|
|
|
86
87
|
build_sdk_prefix,
|
|
87
88
|
call_selected_meson,
|
|
88
89
|
default_library,
|
|
89
|
-
outdir
|
|
90
|
+
outdir,
|
|
91
|
+
apple_min_os)
|
|
90
92
|
|
|
91
93
|
if is_cross_build:
|
|
92
94
|
host_config = generate_machine_config(host_machine,
|
|
@@ -97,7 +99,8 @@ def generate_machine_configs(build_machine: MachineSpec,
|
|
|
97
99
|
host_sdk_prefix,
|
|
98
100
|
call_selected_meson,
|
|
99
101
|
default_library,
|
|
100
|
-
outdir
|
|
102
|
+
outdir,
|
|
103
|
+
apple_min_os)
|
|
101
104
|
else:
|
|
102
105
|
host_config = build_config
|
|
103
106
|
|
|
@@ -112,7 +115,8 @@ def generate_machine_config(machine: MachineSpec,
|
|
|
112
115
|
sdk_prefix: Optional[Path],
|
|
113
116
|
call_selected_meson: Callable,
|
|
114
117
|
default_library: DefaultLibrary,
|
|
115
|
-
outdir: Path
|
|
118
|
+
outdir: Path,
|
|
119
|
+
apple_min_os: Optional[Dict[str, str]] = None) -> MachineConfig:
|
|
116
120
|
config = ConfigParser(dict_type=OrderedDict)
|
|
117
121
|
config["constants"] = OrderedDict()
|
|
118
122
|
config["binaries"] = OrderedDict()
|
|
@@ -152,7 +156,8 @@ def generate_machine_config(machine: MachineSpec,
|
|
|
152
156
|
config,
|
|
153
157
|
outpath,
|
|
154
158
|
outenv,
|
|
155
|
-
outdir
|
|
159
|
+
outdir,
|
|
160
|
+
apple_min_os=apple_min_os)
|
|
156
161
|
|
|
157
162
|
if machine.toolchain_is_msvc:
|
|
158
163
|
builtin_options["b_vscrt"] = str_to_meson(machine.config)
|
|
@@ -186,35 +191,46 @@ def generate_machine_config(machine: MachineSpec,
|
|
|
186
191
|
if tool_path is not None:
|
|
187
192
|
binaries[tool_name] = strv_to_meson([str(tool_path)])
|
|
188
193
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
194
|
+
if machine == build_machine:
|
|
195
|
+
pkg_config_binary = find_usable_system_pkg_config()
|
|
196
|
+
else:
|
|
197
|
+
pkg_config_binary = None
|
|
198
|
+
if pkg_config_binary is None:
|
|
199
|
+
pkg_config_binary = toolchain_bindir / f"pkg-config{exe_suffix}"
|
|
200
|
+
if not pkg_config_binary.exists():
|
|
201
|
+
pkg_config_binary = None
|
|
192
202
|
if pkg_config_binary is not None:
|
|
193
203
|
pkg_config = [
|
|
194
204
|
str(pkg_config_binary),
|
|
195
205
|
]
|
|
196
|
-
if default_library == "static":
|
|
197
|
-
pkg_config += ["--static"]
|
|
198
206
|
if sdk_prefix is not None:
|
|
207
|
+
if default_library == "static":
|
|
208
|
+
pkg_config += ["--static"]
|
|
199
209
|
pkg_config += [f"--define-variable=frida_sdk_prefix={sdk_prefix}"]
|
|
200
|
-
binaries["pkg-config"] = strv_to_meson(pkg_config)
|
|
201
210
|
|
|
202
211
|
vala_compiler = detect_toolchain_vala_compiler(toolchain_prefix, build_machine)
|
|
203
212
|
|
|
204
213
|
pkg_config_path = shlex.split(environ.get("PKG_CONFIG_PATH", "").replace("\\", "\\\\"))
|
|
214
|
+
pkg_config_libdir = None
|
|
205
215
|
|
|
206
216
|
if sdk_prefix is not None:
|
|
207
217
|
builtin_options["vala_args"] = strv_to_meson([
|
|
208
218
|
"--vapidir=" + str(sdk_prefix / "share" / "vala" / "vapi")
|
|
209
219
|
])
|
|
210
220
|
|
|
211
|
-
|
|
221
|
+
pkg_config_libdir = str(sdk_prefix / machine.libdatadir / "pkgconfig")
|
|
212
222
|
|
|
213
223
|
sdk_bindir = sdk_prefix / "bin" / build_machine.os_dash_arch
|
|
214
224
|
if sdk_bindir.exists():
|
|
215
225
|
for f in sdk_bindir.iterdir():
|
|
216
226
|
binaries[f.stem] = strv_to_meson([str(f)])
|
|
217
227
|
|
|
228
|
+
if pkg_config is not None:
|
|
229
|
+
wrapper = outdir / f"frida-pkg-config-{machine.identifier}.py"
|
|
230
|
+
wrapper.write_text(make_pkg_config_wrapper(pkg_config, pkg_config_path, pkg_config_libdir), encoding="utf-8")
|
|
231
|
+
pkg_config = [sys.executable, str(wrapper)]
|
|
232
|
+
binaries["pkg-config"] = strv_to_meson(pkg_config)
|
|
233
|
+
|
|
218
234
|
if vala_compiler is not None:
|
|
219
235
|
valac, vapidir = vala_compiler
|
|
220
236
|
vala = [
|
|
@@ -222,8 +238,6 @@ def generate_machine_config(machine: MachineSpec,
|
|
|
222
238
|
f"--vapidir={vapidir}",
|
|
223
239
|
]
|
|
224
240
|
if pkg_config is not None:
|
|
225
|
-
wrapper = outdir / "frida-pkg-config.py"
|
|
226
|
-
wrapper.write_text(make_pkg_config_wrapper(pkg_config, pkg_config_path), encoding="utf-8")
|
|
227
241
|
vala += [f"--pkg-config={quote(sys.executable)} {quote(str(wrapper))}"]
|
|
228
242
|
binaries["vala"] = strv_to_meson(vala)
|
|
229
243
|
|
|
@@ -297,8 +311,25 @@ def find_exe_wrapper(machine: MachineSpec,
|
|
|
297
311
|
return [qemu_binary, "-L", qemu_sysroot]
|
|
298
312
|
|
|
299
313
|
|
|
300
|
-
def
|
|
301
|
-
|
|
314
|
+
def find_usable_system_pkg_config() -> Optional[str]:
|
|
315
|
+
binary = shutil.which("pkg-config")
|
|
316
|
+
if binary is None:
|
|
317
|
+
return None
|
|
318
|
+
try:
|
|
319
|
+
helptext = subprocess.run([binary, "--help"],
|
|
320
|
+
capture_output=True,
|
|
321
|
+
text=True,
|
|
322
|
+
timeout=5).stdout
|
|
323
|
+
except (OSError, subprocess.SubprocessError):
|
|
324
|
+
return None
|
|
325
|
+
is_strawberry_perl_stub = "Pure-Perl" in helptext
|
|
326
|
+
if is_strawberry_perl_stub:
|
|
327
|
+
return None
|
|
328
|
+
return binary
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
def make_pkg_config_wrapper(pkg_config: List[str], pkg_config_path: List[str], pkg_config_libdir: Optional[str] = None) -> str:
|
|
332
|
+
lines = [
|
|
302
333
|
"import os",
|
|
303
334
|
"import subprocess",
|
|
304
335
|
"import sys",
|
|
@@ -307,13 +338,20 @@ def make_pkg_config_wrapper(pkg_config: List[str], pkg_config_path: List[str]) -
|
|
|
307
338
|
f" {pprint.pformat(pkg_config, indent=4)[1:-1]},",
|
|
308
339
|
" *sys.argv[1:],",
|
|
309
340
|
"]",
|
|
310
|
-
"env = {",
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
341
|
+
"env = {**os.environ}",
|
|
342
|
+
]
|
|
343
|
+
if pkg_config_path:
|
|
344
|
+
joined = os.pathsep.join(pkg_config_path)
|
|
345
|
+
sep = os.pathsep
|
|
346
|
+
lines.append(f"env['PKG_CONFIG_PATH'] = {joined!r} + {sep!r}"
|
|
347
|
+
f" + env.get('PKG_CONFIG_PATH', '')")
|
|
348
|
+
if pkg_config_libdir is not None:
|
|
349
|
+
lines.append(f"env['PKG_CONFIG_LIBDIR'] = {pkg_config_libdir!r}")
|
|
350
|
+
lines += [
|
|
351
|
+
"p = subprocess.run(args, env=env)",
|
|
352
|
+
"sys.exit(p.returncode)",
|
|
353
|
+
]
|
|
354
|
+
return "\n".join(lines)
|
|
317
355
|
|
|
318
356
|
|
|
319
357
|
def detect_toolchain_vala_compiler(toolchain_prefix: Path,
|
package/releng/env_android.py
CHANGED
|
@@ -17,7 +17,8 @@ def init_machine_config(machine: MachineSpec,
|
|
|
17
17
|
config: ConfigParser,
|
|
18
18
|
outpath: List[str],
|
|
19
19
|
outenv: Dict[str, str],
|
|
20
|
-
outdir: Path
|
|
20
|
+
outdir: Path,
|
|
21
|
+
apple_min_os: Optional[Dict[str, str]] = None):
|
|
21
22
|
ndk_found = False
|
|
22
23
|
try:
|
|
23
24
|
ndk_root = Path(environ["ANDROID_NDK_ROOT"])
|
package/releng/env_apple.py
CHANGED
|
@@ -18,7 +18,8 @@ def init_machine_config(machine: MachineSpec,
|
|
|
18
18
|
config: ConfigParser,
|
|
19
19
|
outpath: List[str],
|
|
20
20
|
outenv: Dict[str, str],
|
|
21
|
-
outdir: Path
|
|
21
|
+
outdir: Path,
|
|
22
|
+
apple_min_os: Optional[Dict[str, str]] = None):
|
|
22
23
|
xcenv = {**environ}
|
|
23
24
|
if machine.arch == "arm64eoabi":
|
|
24
25
|
try:
|
|
@@ -38,8 +39,11 @@ def init_machine_config(machine: MachineSpec,
|
|
|
38
39
|
|
|
39
40
|
clang_arch = APPLE_CLANG_ARCHS.get(machine.arch, machine.arch)
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
overrides = apple_min_os or {}
|
|
43
|
+
os_minver = (overrides.get(machine.os_dash_arch)
|
|
44
|
+
or overrides.get(machine.os)
|
|
45
|
+
or APPLE_MINIMUM_OS_VERSIONS.get(machine.os_dash_arch,
|
|
46
|
+
APPLE_MINIMUM_OS_VERSIONS[machine.os]))
|
|
43
47
|
|
|
44
48
|
target = f"{clang_arch}-apple-{machine.os}{os_minver}"
|
|
45
49
|
if machine.config is not None:
|
package/releng/env_generic.py
CHANGED
|
@@ -22,7 +22,8 @@ def init_machine_config(machine: MachineSpec,
|
|
|
22
22
|
config: ConfigParser,
|
|
23
23
|
outpath: List[str],
|
|
24
24
|
outenv: Dict[str, str],
|
|
25
|
-
outdir: Path
|
|
25
|
+
outdir: Path,
|
|
26
|
+
apple_min_os: Optional[Dict[str, str]] = None):
|
|
26
27
|
allow_undefined_symbols = machine.os == "freebsd"
|
|
27
28
|
|
|
28
29
|
options = config["built-in options"]
|
|
@@ -109,7 +110,10 @@ def init_machine_config(machine: MachineSpec,
|
|
|
109
110
|
if cc is not None \
|
|
110
111
|
and machine.os == "windows" \
|
|
111
112
|
and machine.toolchain_is_msvc:
|
|
112
|
-
|
|
113
|
+
try:
|
|
114
|
+
linker_flavor = detect_linker_flavor(cc)
|
|
115
|
+
except LinkerDetectionError:
|
|
116
|
+
pass
|
|
113
117
|
detected_wrong_toolchain = linker_flavor != "msvc"
|
|
114
118
|
if detected_wrong_toolchain:
|
|
115
119
|
cc = None
|
|
@@ -8,7 +8,7 @@ import shlex
|
|
|
8
8
|
import shutil
|
|
9
9
|
import subprocess
|
|
10
10
|
import sys
|
|
11
|
-
from typing import Any, Callable, Dict, List, Optional, Set
|
|
11
|
+
from typing import Any, Callable, Dict, List, Optional, Set, Tuple
|
|
12
12
|
|
|
13
13
|
RELENG_DIR = Path(__file__).resolve().parent
|
|
14
14
|
SCRIPTS_DIR = RELENG_DIR / "meson-scripts"
|
|
@@ -18,7 +18,7 @@ import mesonbuild.interpreter
|
|
|
18
18
|
from mesonbuild.coredata import UserArrayOption, UserBooleanOption, \
|
|
19
19
|
UserComboOption, UserFeatureOption, UserOption, UserStringOption
|
|
20
20
|
|
|
21
|
-
from . import deps, env
|
|
21
|
+
from . import deps, env, env_apple
|
|
22
22
|
from .machine_spec import MachineSpec
|
|
23
23
|
from .progress import ProgressCallback, print_progress
|
|
24
24
|
|
|
@@ -69,6 +69,14 @@ def main():
|
|
|
69
69
|
metavar="{" + ",".join(query_supported_bundle_types(include_wildcards=True)) + "}",
|
|
70
70
|
type=parse_bundle_type_set,
|
|
71
71
|
default=set())
|
|
72
|
+
opts.add_argument("--with-apple-min-os",
|
|
73
|
+
help="override Apple deployment target floor for one platform;\n"
|
|
74
|
+
"may be given multiple times. Defaults:\n"
|
|
75
|
+
" " + ", ".join(f"{k}={v}" for k, v in env_apple.APPLE_MINIMUM_OS_VERSIONS.items()),
|
|
76
|
+
metavar="PLATFORM=VERSION",
|
|
77
|
+
type=parse_apple_min_os_override,
|
|
78
|
+
action="append",
|
|
79
|
+
default=[])
|
|
72
80
|
opts.add_argument("extra_meson_options",
|
|
73
81
|
nargs="*",
|
|
74
82
|
help=argparse.SUPPRESS)
|
|
@@ -103,7 +111,8 @@ def main():
|
|
|
103
111
|
default_library,
|
|
104
112
|
allowed_prebuilds,
|
|
105
113
|
options.meson,
|
|
106
|
-
collect_meson_options(options)
|
|
114
|
+
collect_meson_options(options),
|
|
115
|
+
apple_min_os=dict(options.with_apple_min_os))
|
|
107
116
|
except Exception as e:
|
|
108
117
|
print(e, file=sys.stderr)
|
|
109
118
|
if isinstance(e, subprocess.CalledProcessError):
|
|
@@ -126,7 +135,8 @@ def configure(sourcedir: Path,
|
|
|
126
135
|
meson: str = "internal",
|
|
127
136
|
extra_meson_options: List[str] = [],
|
|
128
137
|
call_meson: Callable = env.call_meson,
|
|
129
|
-
on_progress: ProgressCallback = print_progress
|
|
138
|
+
on_progress: ProgressCallback = print_progress,
|
|
139
|
+
apple_min_os: Optional[Dict[str, str]] = None):
|
|
130
140
|
if prefix is None:
|
|
131
141
|
prefix = env.detect_default_prefix()
|
|
132
142
|
|
|
@@ -209,7 +219,8 @@ def configure(sourcedir: Path,
|
|
|
209
219
|
host_sdk_prefix,
|
|
210
220
|
call_selected_meson,
|
|
211
221
|
default_library,
|
|
212
|
-
builddir
|
|
222
|
+
builddir,
|
|
223
|
+
apple_min_os)
|
|
213
224
|
|
|
214
225
|
meson_options += [f"--native-file={build_config.machine_file}"]
|
|
215
226
|
if host_config is not build_config:
|
|
@@ -232,6 +243,7 @@ def configure(sourcedir: Path,
|
|
|
232
243
|
"meson": meson,
|
|
233
244
|
"build": build_config,
|
|
234
245
|
"host": host_config if host_config is not build_config else None,
|
|
246
|
+
"default_library": default_library,
|
|
235
247
|
"allowed_prebuilds": allowed_prebuilds,
|
|
236
248
|
"deps": deps_dir,
|
|
237
249
|
}))
|
|
@@ -276,6 +288,19 @@ def parse_bundle_type_set(raw_array: str) -> List[str]:
|
|
|
276
288
|
return result
|
|
277
289
|
|
|
278
290
|
|
|
291
|
+
def parse_apple_min_os_override(raw_value: str) -> Tuple[str, str]:
|
|
292
|
+
platform, _, version = raw_value.partition("=")
|
|
293
|
+
if not version:
|
|
294
|
+
raise argparse.ArgumentTypeError(
|
|
295
|
+
f"invalid Apple min OS override: '{raw_value}' (expected PLATFORM=VERSION)")
|
|
296
|
+
valid_platforms = list(env_apple.APPLE_MINIMUM_OS_VERSIONS.keys())
|
|
297
|
+
if platform not in valid_platforms:
|
|
298
|
+
pretty_choices = "', '".join(valid_platforms)
|
|
299
|
+
raise argparse.ArgumentTypeError(
|
|
300
|
+
f"invalid Apple platform: '{platform}' (choose from '{pretty_choices}')")
|
|
301
|
+
return (platform, version)
|
|
302
|
+
|
|
303
|
+
|
|
279
304
|
def raise_toolchain_not_found(e: Exception):
|
|
280
305
|
raise ToolchainNotFoundError("\n".join([
|
|
281
306
|
f"Unable to download toolchain: {e}",
|
package/releng/meson_make.py
CHANGED
|
@@ -53,16 +53,20 @@ def make(sourcedir: Path,
|
|
|
53
53
|
|
|
54
54
|
test_options = shlex.split(environ.get("FRIDA_TEST_OPTIONS", "-v"))
|
|
55
55
|
|
|
56
|
+
env_state = pickle.loads((builddir / "frida-env.dat").read_bytes())
|
|
57
|
+
|
|
58
|
+
install_options = []
|
|
59
|
+
if env_state.get("default_library") == "shared":
|
|
60
|
+
install_options += ["--skip-subprojects"]
|
|
61
|
+
|
|
56
62
|
standard_targets = {
|
|
57
63
|
"all": ["compile"] + compile_options,
|
|
58
64
|
"clean": ["compile", "--clean"] + compile_options,
|
|
59
65
|
"distclean": lambda: distclean(sourcedir, builddir),
|
|
60
|
-
"install": ["install"],
|
|
66
|
+
"install": ["install"] + install_options,
|
|
61
67
|
"test": ["test"] + test_options,
|
|
62
68
|
}
|
|
63
69
|
|
|
64
|
-
env_state = pickle.loads((builddir / "frida-env.dat").read_bytes())
|
|
65
|
-
|
|
66
70
|
machine_config = env_state["host"]
|
|
67
71
|
if machine_config is None:
|
|
68
72
|
machine_config = env_state["build"]
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -2021,7 +2021,7 @@ if (!fdn_{retval.type.nick}_from_value (env, js_retval, &retval))
|
|
|
2021
2021
|
raw_result = {result_conversion};"""
|
|
2022
2022
|
|
|
2023
2023
|
if retval.nullable:
|
|
2024
|
-
code = f"if (!fdn_is_null (
|
|
2024
|
+
code = f"if (!fdn_is_null (env, js_retval))\n{{\n{indent_c_code(code, 1)}\n}} else {{\n raw_result = NULL;\n}}"
|
|
2025
2025
|
|
|
2026
2026
|
else:
|
|
2027
2027
|
code = "raw_result = NULL;"
|