Authorities say 28 of the detainees were charged with violating rules on residence permits and 12 with other minor offenses .