{"id":17773594,"url":"https://github.com/patrislav1/unisoc-unlock","last_synced_at":"2025-04-05T16:04:47.353Z","repository":{"id":200284320,"uuid":"705165869","full_name":"patrislav1/unisoc-unlock","owner":"patrislav1","description":"Python tool to (un)lock a Unisoc/Spreadtrum Android bootloader","archived":false,"fork":false,"pushed_at":"2025-01-06T17:25:42.000Z","size":24,"stargazers_count":73,"open_issues_count":1,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T15:05:03.813Z","etag":null,"topics":["anbernic","anbernic-rg405m","bootloader","gammaos","spreadtrum","unisoc"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patrislav1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-15T08:19:28.000Z","updated_at":"2025-03-26T15:38:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"5f29d085-27d9-4b09-b136-ff7385876070","html_url":"https://github.com/patrislav1/unisoc-unlock","commit_stats":null,"previous_names":["patrislav1/unisoc-unlock"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrislav1%2Funisoc-unlock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrislav1%2Funisoc-unlock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrislav1%2Funisoc-unlock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrislav1%2Funisoc-unlock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrislav1","download_url":"https://codeload.github.com/patrislav1/unisoc-unlock/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247361615,"owners_count":20926642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anbernic","anbernic-rg405m","bootloader","gammaos","spreadtrum","unisoc"],"created_at":"2024-10-26T21:45:14.279Z","updated_at":"2025-04-05T16:04:47.334Z","avatar_url":"https://github.com/patrislav1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# unisoc-unlock\n\nThis is a tool to lock/unlock a Unisoc / Spreadtrum (SPD) Android bootloader using its Identifier Token.\n\nIt is a port of a WebUSB based tool ([[0]](#references), original [[1]](#references)) to Python. The WebUSB based tool does not work on Linux for some reason.\nThere is also a custom fastboot binary in circulation [[2]](#references) which implements a custom command for unlocking the bootloader.\n`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.\n\n## Disclaimer\n\nI could only test this tool with a **Unisoc T618** (on a Anbernic RG405M). The leaked key `rsa4096_vbmeta.pem` may or may not work with other Unisoc chipsets. YMMV.\n\nIf you receive a `FastbootRemoteFailure` and/or error messages such as `Unlock bootloader fail`, check the model of your Unisoc chipset and please don't open an issue\nif your chipset is not the above mentioned T618. Since I don't have any other Unisoc based device, I have no way of porting this tool to other chipsets. Presumably\nthey have a different bootloader key and there is no way to make this tool work until that key is leaked as well.\n\nTL;DR: *please don't create issues related to other Unisoc chipsets than the T618*\n\nIf you manage to make this tool work on other chipsets, feel free to open a PR.\n\n## python-adb\n\n`unisoc-unlock` is implemented with python-adb [[3]](#references). Since python-adb is abandoned and\nrequires some tweaking to work with the Unisoc, it is not referenced as dependency, but bundled instead.\n\n## Installation\n\nInstall with pip:\n```bash\npip3 install unisoc-unlock\n```\n\n## Usage\n\n```\nusage: unisoc_unlock [-h] [--version] [command]\n\nLock/Unlock tool for Spreadtrum/Unisoc bootloader\n\npositional arguments:\n  command     Command (lock|unlock), default=unlock\n\noptions:\n  -h, --help  show this help message and exit\n  --version   show program's version number and exit\n```\n\n* Reboot device into fastboot mode\n```\nadb reboot bootloader\n```\n\n* Wait for 'fastboot mode' to show up on the device screen\n\n* Run the python script\n```\npython3 -m unisoc_unlock unlock  # To unlock the bootloader\npython3 -m unisoc_unlock lock    # To re-lock the bootloader\n```\n\n* Confirm unlocking on the device\n\n  Note: on the RG405M, the text on the device screen will ask for 'volume down' button to confirm unlock,\n  but the home/back button has to be pressed instead!\n\n## Troubleshooting\n\n### Permission issues (`LIBUSB_ERROR_ACCESS` or similar)\n\nUse one of these workarounds:\n\n* Install udev rules to make the fastboot device user-accessible\n* If that is not an option, find the fastboot device file with `lsusb` and `chmod a+rw` it to make it world accessible\n* If that also doesn't work, run unisoc-unlock as root\n\n### `FastbootRemoteFailure`, `Unlock bootloader fail` etc.\n\nYour device is probably not supported. See also [Disclaimer](#disclaimer)\n\n## References\n\n[0] https://github.com/turtleletortue/turtleletortue.github.io\n\n[1] https://github.com/unisoc-android/unisoc-android.github.io\n\n[2] https://www.hovatek.com/forum/thread-32287.html\n\n[3] https://github.com/google/python-adb\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrislav1%2Funisoc-unlock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrislav1%2Funisoc-unlock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrislav1%2Funisoc-unlock/lists"}