Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3 -m unisoc_unlock command isn't working (on rg405m) #2

Open
Wildtick opened this issue Nov 21, 2023 · 4 comments
Open

python3 -m unisoc_unlock command isn't working (on rg405m) #2

Wildtick opened this issue Nov 21, 2023 · 4 comments

Comments

@Wildtick
Copy link

Preparing to unlock the bootloader
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/home/wild/.local/lib/python3.11/site-packages/unisoc_unlock/main.py", line 3, in
main()
File "/home/wild/.local/lib/python3.11/site-packages/unisoc_unlock/cli.py", line 119, in main
cmd()
File "/home/wild/.local/lib/python3.11/site-packages/unisoc_unlock/cli.py", line 71, in call
self.prepare()
File "/home/wild/.local/lib/python3.11/site-packages/unisoc_unlock/cli.py", line 40, in prepare
self.dev.ConnectDevice()
File "/home/wild/.local/lib/python3.11/site-packages/unisoc_unlock/bundled_adb/fastboot.py", line 255, in ConnectDevice
self._handle = common.UsbHandle.FindAndOpen(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/wild/.local/lib/python3.11/site-packages/unisoc_unlock/bundled_adb/common.py", line 221, in FindAndOpen
dev.Open()
File "/home/wild/.local/lib/python3.11/site-packages/unisoc_unlock/bundled_adb/common.py", line 117, in Open
handle = self._device.open()
^^^^^^^^^^^^^^^^^^^
File "/home/wild/.local/lib/python3.11/site-packages/usb1/init.py", line 2055, in open
mayRaiseUSBError(libusb1.libusb_open(self.device_p, byref(handle)))
File "/home/wild/.local/lib/python3.11/site-packages/usb1/init.py", line 127, in mayRaiseUSBError
__raiseUSBError(value)
File "/home/wild/.local/lib/python3.11/site-packages/usb1/init.py", line 119, in raiseUSBError
raise __STATUS_TO_EXCEPTION_DICT.get(value, __USBError)(value)
usb1.USBErrorAccess: LIBUSB_ERROR_ACCESS [-3]
[wild@fedora ~]$ unisoc_unlock
Preparing to unlock the bootloader
Traceback (most recent call last):
File "/home/wild/.local/bin/unisoc_unlock", line 8, in
sys.exit(main())
^^^^^^
File "/home/wild/.local/lib/python3.11/site-packages/unisoc_unlock/cli.py", line 119, in main
cmd()
File "/home/wild/.local/lib/python3.11/site-packages/unisoc_unlock/cli.py", line 71, in call
self.prepare()
File "/home/wild/.local/lib/python3.11/site-packages/unisoc_unlock/cli.py", line 40, in prepare
self.dev.ConnectDevice()
File "/home/wild/.local/lib/python3.11/site-packages/unisoc_unlock/bundled_adb/fastboot.py", line 255, in ConnectDevice
self._handle = common.UsbHandle.FindAndOpen(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/wild/.local/lib/python3.11/site-packages/unisoc_unlock/bundled_adb/common.py", line 221, in FindAndOpen
dev.Open()
File "/home/wild/.local/lib/python3.11/site-packages/unisoc_unlock/bundled_adb/common.py", line 117, in Open
handle = self._device.open()
^^^^^^^^^^^^^^^^^^^
File "/home/wild/.local/lib/python3.11/site-packages/usb1/init.py", line 2055, in open
mayRaiseUSBError(libusb1.libusb_open(self.device_p, byref(handle)))
File "/home/wild/.local/lib/python3.11/site-packages/usb1/init.py", line 127, in mayRaiseUSBError
__raiseUSBError(value)
File "/home/wild/.local/lib/python3.11/site-packages/usb1/init.py", line 119, in raiseUSBError
raise __STATUS_TO_EXCEPTION_DICT.get(value, __USBError)(value)
usb1.USBErrorAccess: LIBUSB_ERROR_ACCESS [-3]

@patrislav1
Copy link
Owner

LIBUSB_ERROR_ACCESS can be a permission issue. Maybe the udev rule for fastboot devices is not installed? (/lib/udev/rules.d/51-android.rules)

When you install the common adb tools (sudo apt install android-sdk-platform-tools-common on Ubuntu) it will install the udev rule and there should be no more permission issues.

@Wildtick
Copy link
Author

i'm using fedora

@Wildtick
Copy link
Author

ok just tried it and now it says

No match for argument: android-sdk-platform-tools-common
Error: Unable to find a match: android-sdk-platform-tools-common

i'm i typing it in wrong or what?

@patrislav1
Copy link
Owner

I don't have a Fedora system so I can't give a step by step instruction here.

If your issue is caused by lack of access permissions, your choices are (in order of preference):

  • Install udev rules to make the fastboot device user-accessible
  • If you can't do that, find the fastboot device file with lsusb and chmod a+rw it to make it world accessible
  • If that also fails, run unisoc-unlock as root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants