Most probably you've forgot to explicitly specify some stuff. Defaults differ between devices, and code which works on one GPU will fail on another one. Please make sure you've set all of these:
GLES20.glEnable(GLES20.GL_DEPTH_TEST); // enable depth test
GLES20.glDepthMask(true); // write to z-buffer
GLES20.glDepthFunc(GLES20.GL_LEQUAL); // specify the way depth test works
When drawing geometry, always clean both color and depth buffers:
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT); // clear both color and z-buffer
And finally, ensure that you've properly initialized your OpenGL context and you do have depth buffer for used EGL config (EGL_DEPTH_SIZE
is not 0). You can find a list of all available EGL configs for Desire S here: http://gfxbench.com/device.jsp?benchmark=gfx27&D=HTC+Desire+S&testgroup=egl