Skip to content

titulebolide/huawei-oem-bruteforce

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unlock Huawei bootloader with bruteforce

Summary

After closing the official EMUI website, which allowed you to retrieve the code to unlock the bootloader of Huawei/Honor phones, here is a python script to retrieve it by yourself.

It uses a bruteforce method, based on the Luhn algorithm and the IMEI identifier used by the manufacturer to generate the unlocking code.

The original version was developed by SkyEmi. I made some tweaks for saving failed attempts to file, because brutforcing is taking a looooooong time.

Instructions

Prerequisites

  • Python > 3.7
  • PyPI
  • ADB
  • Fastboot

Connecting a device in ADB mode

  1. Enable developer options in Android at your phone.

    • Go to Settings > System > About device > tap Build number seven times to enable developer options.
  2. Enable USB debugging and OEM unlock in Android.

    • Go to Settings > System > Developer options.
  3. Connect your device to the computer

  4. Replace IMEI_OF_YOUR_DEVICE by the first IMEI of your phone in this script:

https://github.com/titulebolide/huawei-oem-bruteforce.git
cd huawei-oem-bruteforce
python3 -m pip install -r requirements.txt
python3 unlock.py IMEI_OF_YOUR_DEVICE
  1. Some devices have a bruteforce protection, preventing trying more than five codes. In this case, you will have to invoke the script with the option attempt-limit:
python3 unlock.py --attempt-limit 5 IMEI_OF_YOUR_DEVICE
  1. If you want to pause the process you can simply exit the script by pressing CTRL+C. Write down the last shown "Attempt no.".

    • To resume invoke the script like so: python3 --resume-count ATTEMPT_NO IMEI_OF_YOUR_DEVICE
    • If you were using an attempt-limit use: python3 --resume-count ATTEMPT_NO --attempt-limit 5 IMEI_OF_YOUR_DEVICE
  2. Make a few cups of coffee or tea => sleep => repeat :D

FAQ & Troubleshooting

If adb and fastboot are not found, you can try manually setting their path with the flags --adb and --fastboot. All in all, the python3 unlock.py --help manual can always be resourceful.

About

Huawei-unlock-bootloader

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%