Run callback on SurfaceView Thread to avoid random crash on android.
Fix bash script.