support android platform and correct some bugs