patrislav1 / unisoc-unlock

Python tool to (un)lock a Unisoc/Spreadtrum Android bootloader
51 stars 7 forks source link
anbernic anbernic-rg405m bootloader gammaos spreadtrum unisoc

unisoc-unlock

This is a tool to lock/unlock a Unisoc / Spreadtrum (SPD) Android bootloader using its Identifier Token.

It is a port of a WebUSB based tool ([0], original [1]) to Python. The WebUSB based tool does not work on Linux for some reason. There is also a custom fastboot binary in circulation [2] which implements a custom command for unlocking the bootloader. unisoc-unlock implements the same functionality, but without resorting to a custom fastboot binary. Since it is a pure Python solution it should be able to run on any platform running Python.

python-adb

unisoc-unlock is implemented with python-adb [3]. Since python-adb is abandoned and requires some tweaking to work with the Unisoc, it is not referenced as dependency, but bundled instead.

Installation

Install with pip:

pip3 install unisoc-unlock

Usage

usage: unisoc_unlock [-h] [--version] [command]

Lock/Unlock tool for Spreadtrum/Unisoc bootloader

positional arguments:
  command     Command (lock|unlock), default=unlock

options:
  -h, --help  show this help message and exit
  --version   show program's version number and exit

References

[0] https://github.com/turtleletortue/turtleletortue.github.io

[1] https://github.com/unisoc-android/unisoc-android.github.io

[2] https://www.hovatek.com/forum/thread-32287.html

[3] https://github.com/google/python-adb