This has worked for numerous users: https://forums.ubports.com/post/13645. I've found running these commands works more reliably from fastboot mode.