Fix device permission.