Android tracing
Imre Deak
imre.deak at intel.com
Tue Oct 30 03:39:46 PDT 2012
On Tue, 2012-10-30 at 00:53 -0700, Anthony Lombardi wrote:
> What is the correct command to get a trace of an application on
> android? Below is a command I put into the adb shell. It runs the
> application, but I didn't find a trace file in /data. I have
> egltrace.so in /data on the device. The device is also rooted.
>
> LD_PRELOAD=/data/egltrace.so am start -n
> com.rovio.angrybirds/com.rovio.ka3d.App
This looks like an app started by zygote, so you need to preload
egltrace.so for the zygote process (app_process). There are instructions
for this in the README, but basically you need to modify your init.rc
and set LD_PRELOAD for zyogte there. For my device I need to rebuild the
Android install image for this.
Afterwards in the Android shell you need to do:
$ setprop debug.apitrace.procname <proc_name>
proc_name is what shows up in the ps list and for you it'll be either
com.rovio.angrybirds or com.rovio.ka3d.App (I'm not familiar with am's
syntax).
> The readme mentioned that the method for linux should work, and in the
> Linux section there's this:
> LD_PRELOAD=/path/to/apitrace/wrappers/glxtrace.so /path/to/application
This works only for standalone applications.
> I'm probably doing something wrong here... am I supposed to use
> glxtrace.so or egltrace.so?
egltrace.so
> If someone has used apitrace on android and can give an example for an
> actual app that would be great. Thanks.
Hope this helps,
Imre
More information about the apitrace
mailing list