注入安卓服务或APK neweglSwapBuffers
用法:
injector com.target.apk /data/local/tmp/libmy.so
injector /system/bin/surfaceflinger /data/local/tmp/libmy64bit.so
static EGLBoolean neweglSwapBuffers(EGLDisplay dpy, EGLSurface surf) {
LOGE("hookSuccess");
if (NULL == original) {
LOGE("failed to get original eglSwapBuffers");
return EGL_FALSE;
}
glClearColor ( 1. , 0. , 0. , 1); // background color
return original(dpy, surf);
}