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.
-
Enable developer options in Android.
- Android One: Go to Settings > System > About device and tap ‘Build number’ seven times to enable developer options.
-
Enable USB debugging in Android.
- Android One: Go to Settings > System > Developer options and enable USB debugging.
-
Connect your device to the computer and launch the application. The device is going to ask for authorisation, which you'll have to allow.
-
Wait for the application to detect your device. The device info should appear in the top left section.
The application doesn't work. Is there anything I should have installed?
Yes, it was developed in python so it needs it to run, version 3. You can install the latest version from here.
The app on Windows doesn't detect my device even though it's connected and USB debugging is enabled. What could be the issue?
Windows most likely doesn't recognise your device in ADB mode. Install the universal ADB drivers from here, reboot your PC and try again.