Hello,
I just followed the manual but I cannot get the MGD to intercept any call from my app.
The GUI connects to de daemon though USB but no data is traced.
I am using Android 4.4.2 and Mali-400 MP.
Am I missing something?
Hi vruiz,
Does the daemon report that an interceptor is connecting when you run the application? Are you sure the application was completely dead (i.e. force killed, not showing up in the task switcher) before you launch it again?
Thanks,
Chris
Thanks for you quick response.
Yes I have tried both, killing my app before launching the daemon and just after rebooting the device. None of them seem to connect the interceptor.
I have also tried with no /system/lib/egl/processlist.cfg at all and with my app name in the file.
Any other suggestion?
What device are you using? Can you provide the output of ls -al /system/lib/egl/ and ls -al /vendor/lib/egl/ ?
Hi Chris,
I cannot say the device due to NDA.
ls -al /system/lib/egl/
-rwxrwxrwx root root 8 2014-06-26 18:25 egl.cfg
-rwxrwxrwx root root 9 2014-06-26 18:24 egl.cfg.bak
-rwxrwxrwx root root 13344 2014-06-02 21:15 libEGL_mali.so
lrwxrwxrwx root root 2014-06-26 19:19 libEGL_mgd.so -> libGLES_
mgd.so
lrwxrwxrwx root root 2014-06-26 18:31 libGLES.so -> /system/lib
/egl/libGLES_mgd.so
-rwxrwxrwx root root 79196 2014-06-02 21:18 libGLES_android.so
-rwxrwxrwx root root 272116 2014-06-26 18:24 libGLES_mgd.so
-rwxrwxrwx root root 25640 2014-06-02 21:15 libGLESv1_CM_mali.so
lrwxrwxrwx root root 2014-06-26 19:19 libGLESv1_CM_mgd.so -> li
bGLES_mgd.so
-rwxrwxrwx root root 21540 2014-06-02 21:15 libGLESv2_mali.so
lrwxrwxrwx root root 2014-06-26 19:19 libGLESv2_mgd.so -> libGL
ES_mgd.so
I have no egl folder on /vendor/lib/
How about android developer options? GPU profiling and so on?
How is it supposed to be set up?
Regards.
None of the android developer settings need to be modified, following the guide is usually sufficient. There have been a couple of cases on certain devices where the current instructions will not work due to modifications made to the EGL loader behaviour by the vendor, this might be a similar case.
Does the application still run, but there is no report of an interceptor connecting in the daemon output?
Can you provide the output of adb logcat when starting up the application?
Hello Chris,
This is the output:
06-26 20:57:18.430: W/linker(9622): libGLES.so has text relocations. This is wasting memory and is a security risk. Please fix.
06-26 20:57:18.430: D/libEGL(9622): loaded /system/lib/egl/libGLES.so
06-26 20:57:18.430: I/mgd_interceptor(9622): Trying to connect to the daemon...
06-26 20:57:18.430: E/mgd_interceptor(9622): error socket connect: Permission denied
06-26 20:57:18.430: I/mgd_interceptor(9622): Getting pid...
06-26 20:57:18.430: I/mgd_interceptor(9622): Got pid (9622), reading process name
06-26 20:57:18.435: I/mgd_interceptor(9622): Process = com.voovio.sweeptest
06-26 20:57:18.435: I/mgd_interceptor(9622): Couldn't open /system/lib/egl/processlist.cfg, so tracing by default.
06-26 20:57:18.435: I/mgd_interceptor(9622): Attempting to load libEGL at /vendor/lib/egl/libGLES_mali.so ...
06-26 20:57:18.435: I/mgd_interceptor(9622): Attempting to load libEGL at /system/lib/egl/libGLES_mali.so ...
06-26 20:57:18.435: I/mgd_interceptor(9622): Attempting to load libEGL at /vendor/lib/egl/libEGL_mali.so ...
06-26 20:57:18.435: I/mgd_interceptor(9622): Attempting to load libEGL at /system/lib/egl/libEGL_mali.so ...
06-26 20:57:18.440: I/mgd_interceptor(9622): Loaded library libEGL from /system/lib/egl/libEGL_mali.so
06-26 20:57:18.445: I/Mali(9622): Mali API Version : 401
06-26 20:57:18.445: I/Mali(9622): Mali REVISION: Linux-r4p0-00rel0 BUILD_DATE: 2014-05-22 13:32:13
06-26 20:57:18.450: I/HWUI(9622): EGLImpl-HWUI Protected EGL context created
06-26 20:57:18.455: I/mgd_interceptor(9622): Attempting to load libGLESv2 at /vendor/lib/egl/libGLES_mali.so ...
06-26 20:57:18.455: I/mgd_interceptor(9622): Attempting to load libGLESv2 at /system/lib/egl/libGLES_mali.so ...
06-26 20:57:18.455: I/mgd_interceptor(9622): Attempting to load libGLESv2 at /vendor/lib/egl/libGLESv2_mali.so ...
06-26 20:57:18.455: I/mgd_interceptor(9622): Loaded library libGLESv2 from /vendor/lib/egl/libGLESv2_mali.so
Do I need special permision on manifest? I added INTERNET permission but did not work.
FYI: On builtin cammera app it dooes work.
There are no special permissions needed in the manifest because the socket we use is an abstract namespace AF_UNIX socket. This works on every production device we've tested it on because it's not located on the filesystem anywhere and therefore we don't need to ensure any visibility/permissions for it, but this is obviously not the case on your platform. I have seen this before however on a system which implemented a secure launcher. In short, you will need to investigate why there is a permission issue on abstract namespace AF_UNIX sockets, as this is causing the interceptor to be unable to talk to the daemon. If it works with the camera app, then that should provide some clues - what is different about how the permissions are set up for that application?...
Hope this helps,
P.S. over the weekend someone at our end hit the same issue, and solved it by disabling selinux with "setenforce 0", so if your device uses selinux that might solve it!
Dear vruiz,
As there's been no activity on this post for a couple of months I'm going to mark the question as assumed answered. Let us know if you want to open it back up.
Ellie