Tracing on android

Divick Kishore divick.kishore at gmail.com
Sat May 30 11:16:31 PDT 2015


Hi,
     I am trying to trace gles calls on android x86 build. The
procedure that I have followed is as follows:

In a root shell

1. PROCNAME=air.com.cz.ctx

2. setprop wrap.$PROCNAME LD_PRELOAD=/system/lib/egltrace.so

3. setprop debug.apitrace.procname $PROCNAME

4. am start -S -a android.intent.action.MAIN -n air.com.cz.ctx/.AppEntry


I have copied the egltrace.so and libgnustl_shared.so to /system/lib/
and the Anctivity name is AppEntry. When I run the app as above, I get
the following in the logcat output:

05-30 18:09:24.110 I/dalvikvm(  640): Exec: /system/bin/sh -c
LD_PRELOAD=/system/lib/egltrace.so /system/bin/app_process /system/bin
--application '--nice-name=air.com.cz.ctx'
com.android.internal.os.WrapperInit 26 17 'android.app.ActivityThread'
05-30 18:09:24.117 D/Zygote  (   22): Process 640 exited cleanly (255)
05-30 18:09:24.117 W/Zygote  (   22): Error reading pid from wrapped
process, child may have died
05-30 18:09:24.117 W/Zygote  (   22): java.io.EOFException
05-30 18:09:24.117 W/Zygote  (   22): at
libcore.io.Streams.readFully(Streams.java:83)
05-30 18:09:24.117 W/Zygote  (   22): at
java.io.DataInputStream.readInt(DataInputStream.java:124)
05-30 18:09:24.117 W/Zygote  (   22): at
com.android.internal.os.ZygoteConnection.handleParentProc(ZygoteConnection.java:1010)
05-30 18:09:24.117 W/Zygote  (   22): at
com.android.internal.os.ZygoteConnection.runOnce(ZygoteConnection.java:263)
05-30 18:09:24.117 W/Zygote  (   22): at
com.android.internal.os.ZygoteInit.runSelectLoopMode(ZygoteInit.java:658)
05-30 18:09:24.117 W/Zygote  (   22): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555)
05-30 18:09:24.117 W/Zygote  (   22): at
dalvik.system.NativeStart.main(Native Method)

Doing a LD_PRELOAD=/system/lib/egltrace.so /system/bin/ls works fine
(this is to ensure that at least the egltrace.so has right abi type
and there are no unresolved dependencies.

I would appreciate any help.
Thanks,
Divick


More information about the apitrace mailing list