working albeit ugly version. does successfully unbrick.