client <--> GAPIS <--> GAPII
libgapii.so
before doing any EGL/GL work. Then, call the exposed JNI_OnLoad
function. You can pass two nullptrs as arguments, as we no longer use Java for anything and ignore them. If you cannot modify your app to call JNI_OnLoad
, you can achieve the same by marking the JNI_OnLoad
function as a constructor function and removing its arguments, rebuilding, and using LD_PRELOAD
to load the library. Calling JNI_OnLoad
will initialize the spy and block your app waiting for a connection from host. You should see a GAPII awaiting connection on pipe <pipe>
message in logcat. You can then trace using the gapit
command line utility. Specify the android device and use a target URL of the form port:<pipename>:<abi>
. <pipename>
is gapii
by default and <abi>
is one of armeabi-v7a
, arm64-v8a
or x86
depending on the ABI of the app you are trying to trace. Let me know if that works for you.