Who knew un-rooting an Android smartphone could be so complicated?

I managed to figure it out in the end.