This is a modification of Ryan Bradley's script to support RM5XX Series modems. It works for the RM520N-GL, RM502Q-AE, RM500Q-AE, EM120K-GL, and others. For more information, see Unlocking ADB. This will allow you to replace the Quectel Forums step of the guide with an easier and faster method.
Modified by carp4 to allow AT+QADBKEY? to be entered directly and result displayed for RM5XX series modems.
Modified by iamromulan to remove the sudo reqirement and query the user to input the AT+QADBKEY? response from the modem.
-
To use this script, simply go to the following URL: https://onecompiler.com/python/4592mhb32
-
Then replace the 12345678 with your responce from AT+QADBKEY? and click run
Your adb unlock key command will be generated under output
Alternatively, download and run the script with any Python 3 interpreter. It only uses the standard library and no longer needs the crypt module (removed from Python 3.13), so it runs on Linux, macOS, Windows, Termux and so on:
$ python3 /path/to/qadbkey-unlock2.pyYou can check the key derivation still works on your interpreter with the built-in self test (it compares against MD5-crypt vectors known to match glibc crypt()):
$ python3 qadbkey-unlock2.py --self-test
self-test OK (8 vectors)Example:
- In this example the script exists in the users home directory
user@linuxcomputer:~$ python3 qadbkey-unlock2.py
Enter the AT+QADBKEY? response: 12345678
AT+QADBKEY="0jXKXQwSwMxYoeg"
- hornetfighter515 — Basic script structure and debugging.
- Ryan Bradley – Tweaking and debugging.
- igem – Original source code.