Under currenty law, there are four ways of changing custody.
(1) By agreement of the parents (even that is not a guarantee in some counties like Anoka and Sherburne)
(2) The child is integrated into the Non-custodial parent's household by agreement of the parties;
(3)There has been a systematic and continuous deprivation of parental rights;
(4) The child is endangered in their current environment physically, emotionally or developmentally and the benefit of the change outweighs any harm.
The statute itself is Minnesota Statutes Sec. 518.18 located online at http://www.revisor.leg.state.mn.us/stats/518/18.html