Upgrade Frida to 17.7.3 and frida-java-bridge to 7.0.12 for Android 16 support#177
Upgrade Frida to 17.7.3 and frida-java-bridge to 7.0.12 for Android 16 support#177JRBusiness wants to merge 2 commits intohttptoolkit:mainfrom
Conversation
…6 support Frida 17.5.1 fails on Android 16 (API 36) devices due to ART runtime changes that removed `copied_methods_offset_` from the Class structure. This causes two distinct failures: 1. The bundled frida-java-bridge v7.0.10 crashes with: "Unable to find copied methods in java/lang/Thread; please file a bug" 2. frida-server 17.5.1 itself has transport-level incompatibilities on newer Android builds. Changes: - Bump FRIDA_VERSION from 17.5.1 to 17.7.3 with updated SRI hashes - Rebuild frida-java-bridge.js from v7.0.10 to v7.0.12 (uses JVMTI-based method enumeration instead of relying on removed ART internals) Tested on Google Pixel 8, Android 16, API 36. Fixes httptoolkit/httptoolkit#854
pimterry
left a comment
There was a problem hiding this comment.
Can you test on your device with the latest java bridge but previous Frida server versions? It would be helpful to confirm the exact Frida version that fixes your issue, you can bisect between 17.7.3 and 17.5.1 to hunt it down.
The 17.7.3 release is only just out a couple of days ago, so I'd normally prefer to wait a little bit to ensure there's no issues there (many Frida releases are quickly followed by bugfixes due to tricky edge cases that appear). Also for some reason there's no changelogs on https://frida.re/news/ which is very weird, I'd really like to know what changes are included before shipping it here.
| @@ -1,8 +1,8 @@ | |||
| // Generated with: | |||
| // npm install frida-java-bridge@v7.0.10 && echo "import Java from 'frida-java-bridge'; globalThis.Java ||= Java;" > global-java.js && npx frida-compile global-java.js -Sc -B iife -T none -o frida-java-bridge.js | |||
| // npm install frida-java-bridge@7.0.12 && echo "import Java from 'frida-java-bridge'; globalThis.Java ||= Java;" > global-java.js && npx esbuild global-java.js --bundle --format=iife --minify --platform=neutral --target=es2020 --outfile=frida-java-bridge.js | |||
There was a problem hiding this comment.
Why has this command been changed? I'd prefer to use Frida's official compilation tool instead of something custom unless there's a specific reason.
Summary
Fixes httptoolkit/httptoolkit#854
Frida 17.5.1 does not work on Android 16 (API 36) devices (e.g. Google Pixel 8). Two issues were identified and fixed:
frida-server 17.5.1 has transport-level incompatibilities with newer Android 16 builds, causing
re.frida.Error.Transport: Agent connection closed unexpectedlyerrors. Upgrading to 17.7.3 resolves this.frida-java-bridge v7.0.10 (bundled in
overrides/frida/frida-java-bridge.js) crashes withError: Unable to find copied methods in java/lang/Thread; please file a bug. This is caused by Android 16's ART runtime removingcopied_methods_offset_from the internal Class structure. The fix in frida-java-bridge v7.0.12 switches to JVMTI-based method enumeration instead of relying on removed ART internals.Changes
src/interceptors/frida/frida-integration.ts: BumpFRIDA_VERSIONfrom17.5.1to17.7.3and update all Android SRI hashesoverrides/frida/frida-java-bridge.js: Rebuild fromfrida-java-bridge@7.0.10tofrida-java-bridge@7.0.12using esbuild (IIFE format)Test Plan
copied methodserrors