Some good Android apitrace Info
Imre Deak
imre.deak at intel.com
Mon Sep 17 03:36:44 PDT 2012
On Fri, 2012-09-14 at 17:56 -0700, Kenneth Hurley wrote:
> Android apitrace documentation states you can use LD_PRELOAD in the
> init.rc but would have to flash your ROM, etc.
>
> There is a cool way to do this preventing and possibility of bricking
> your devices.
>
> adb reboot-bootloader <--- wait for bootloader to come up.
> fastboot boot boot-apitrace.img.
> adb chmod 0777 /data/
>
> I personally built boot-apitrace.img from a JellyBean ROM and some tools
> called Android Kitchen. These allowed me to edit
> the .rc file and rebuild the boot.img file.
>
> Now, I see that some of the code says that Android doesn't support
> LD_PRELOAD and it does. I think it was added with Android 2.3.
>
> One gotcha is that apitrace will crash if you have rooted your device
> and the boot.img on your device has a SuperUser program as
> it changes ownership on the /data/data directory.
>
> Hope this gives a little help to others trying to use this under Android.
>
> Still not there yet, as I don't think apitrace uses the new egl.cfg
> which mangles the names of the .so files to load.
>
> For instance my egl.cfg has:
>
> 0 0 POWERVR_SGX540_120
>
> which means that the correctly loaded shared libraries are this:
> D/apitrace( 2789): apitrace[2789]: disabled for com.xxxxx
> D/libEGL ( 2789): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
> D/libEGL ( 2789): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
> D/libEGL ( 2789): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
Yes, These aren't intercepted by apitrace atm. The interception is
library name based, see egltrace.py.
> I assume the disabled for com.xxxxx is because the current code doesn't
> find the correct libGLESv1_CM.so file it is looking for?
No, whether apitrace activates or not for a given app depends on your
debug.apitrace.procname setting (setprop/getprop) if it's an app
launched by zygote, or for whether you LD_PRELOADED apitrace for
standalone apps.
Hope this helps,
Imre
>
> Any ideas?
>
> Regards,
>
> Kenneth Hurley
>
> _______________________________________________
> apitrace mailing list
> apitrace at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/apitrace
More information about the apitrace
mailing list