Unfortunately, NPM 12 adds a new feature, where it will silently skip
running post-install scripts, without telling you, unless you
explicitly configure it otherwise for every individual dependency.
As a result, if you checkout Objection onto a machine running NPM 12,
and run "npm install" in the agent directory, then it will error out
with:
Error: Could not locate the bindings file.
Which happens because the npm install runs the prepare script in the
agent package.json, which runs the build script, which invokes
frida-compile, which expects for its frida dependency to have been
actually installed properly.
Unfortunately, the npm install output makes absolutely no mention of
the fact that a post-install script was silently skipped. Even in the
debug logfile that it tells you about in the command output. I don't
know why this is the case. If you npm install frida just by itself,
then it does print a warning explaining the problem, but not if it's a
dependency.
Some Android distributions (e.g. crDroid, Evolution X) append
additional identifiers to ro.build.version.release, causing
packaging.version.Version to raise InvalidVersion.
This patch sanitizes the version string before parsing to ensure
compatibility and prevent crashes.
objection/__init__.py imports tomllib at module level, which only
exists in the standard library from Python 3.11. With requires-python
set to >=3.10, installation succeeds on 3.10 but 'import objection'
immediately fails with ModuleNotFoundError.
Fixes#799
warn_about_older_operating_systems() is called from the start command before
device_state.platform and device_state.version are populated (e.g. when
connecting to a remote frida-server). This caused:
AttributeError: 'DeviceState' object has no attribute 'platform'
Guard with getattr(..., None) and return early when platform or version
are not set, so the version warnings are skipped until device state is
available.
Co-authored-by: uceka2 <[email protected]>
Co-authored-by: Cursor <[email protected]>
* `reconnect` command now allows recovering crashed agent.
* new `reconnect_spawn` command allows recovering crashed app.
* Can now spawn application with identifier or name, i.e. "My App" & "com.my.app" previously this only applied when attaching. This means the same -n <identifier> syntax will work with and without --spawn.
---------
Co-authored-by: 3rm-z <[email protected]>
Co-authored-by: Shlomo isaacs <[email protected]>
Fixes a typo in the Frida version compatibility check where
globalThis.Java was incorrectly assigned instead of globalThis.ObjC.
This typo caused a ReferenceError when the agent attempted to use
ObjC methods on iOS devices running Frida 17.x, specifically when
calling env_runtime() and other iOS-specific functions.
The fix ensures that when globalThis.ObjC exists (Frida < 17),
it is correctly assigned to the ObjC variable instead of Java.
Fixes#740
Tested-on:
- Frida 17.0.7
- iOS 17.x (jailbroken device)
- DVIA-v2 test application