updated read_xyz for android