I tried before and is a pain in the ass.
It's extremely simple though: https://github.com/muun/recovery