As you can see from the output, the function passed to java.Perform() is executed after the spawned application is resumed via the resume() call, hence any hooking of android.os.Process methods is futile.
Testing system:
$ uname -a
Linux ghirew 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u3 (2019-06-16) x86_64 GNU/Linux
$ pip search frida
frida-tools (2.0.2) - Frida CLI tools
INSTALLED: 2.0.2 (latest)
frida-gadget (0.1.6) - Easy to use frida gadget
frida-util (0.5) - Silly python wrapper around Frida.
frida-runner (0.2.0) - A Stupid CLI script to run Frida on iOS or Android
frida-push (1.0.8) - Wrapper tool to identify the remote device and push device specific frida-server binary.
frida (12.6.11) - Dynamic instrumentation toolkit for developers, reverse-engineers, and security researchers
INSTALLED: 12.6.10
LATEST: 12.6.11
frida-android-adb (1.2.0) - A pure python implementation of the Android ADB and Fastboot protocols
frida-android-M2Crypto (0.27.0) - M2Crypto: A Python crypto and SSL toolkit
apk-cheater (0.0.7) - Easy to use frida gadget
$ frida --version
12.6.10
Testing device:
OnePlus3:/ # uname -a
Linux localhost 3.18.66-perf+ #1 SMP PREEMPT Thu Dec 6 00:54:59 CST 2018 aarch64
I'm trying to hook
android.os.Process.start()
but fail as the process executes before I can hook it with Frida.Python script: (hook.py)
Javascript file: (x.js)
As you can see from the output, the function passed to java.Perform() is executed after the spawned application is resumed via the
resume()
call, hence any hooking ofandroid.os.Process
methods is futile.Testing system:
Testing device:
What am I doing wrong?