Some good Android apitrace Info
Kenneth Hurley
klhurley at graffitientertainment.com
Fri Sep 14 17:56:40 PDT 2012
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
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?
Any ideas?
Regards,
Kenneth Hurley
More information about the apitrace
mailing list