based of github.com/broodplank/i9505_bootimg_creator. no commitment on making this any better.