finished android part, except password algorithm