@Harry glad you fixed the issue.
Another possible solution for Androids (for anyone reading this thread) is to "Google lock" your phone. Boot into bootloader/recovery, select option for factory reset the phone. Once you boot the phone after that, it'll ask you to sign into your Gmail account (the same one you used that was linked to the phone). If you forget your Gmail password, you can go to any web browser to resolve that. In Google lock, there's also an SMS validation option.