Aldeshov / ADBFileExplorer

File Explorer for Android devices
GNU General Public License v3.0
166 stars 24 forks source link

Can't delete or rename files or folders with parentheses in their names #24

Open Plut0nio opened 1 year ago

Plut0nio commented 1 year ago

Whenever I try deleting or renaming a file or folder with parentheses in its name while it's on my phone, the operation fails with the error "/system/bin/sh: syntax error: unexpected '('". According to a couple of posts I found on Stack Exchange, this is apparently because dash is being used instead of bash. Idk how to fix this, assuming this is truly an issue on my end.

I'm running this on Windows 10 x64, and "python -VV" reports "Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]"

My src/app/settings.json is as follows:

{
  "adb_path": "adb",
  "adb_core": "external",
  "adb_kill_server_at_exit": false,
  "preserve_timestamp": true,
  "adb_run_as_root": false
}

I've tried running it with "adb_core": "external", commented out or removed, but it gave me the following error in the console window:

─────────────────────────────────
ADB File Explorer v1.3.0
Copyright (C) 2022 Azat Aldeshov
─────────────────────────────────
Platform Windows-10-10.0.19041-SP0
adb server stopped.
Using Python "adb-shell" version 0.4.3
ERROR:root:Unexpected error=LIBUSB_ERROR_NOT_SUPPORTED [-12], type(error)=<class 'usb1.USBErrorNotSupported'>
Traceback (most recent call last):
  File "C:\Other Programs\ADB File Explorer\src\app\data\repositories\python_adb.py", line 226, in devices
    device_id = device.getSerialNumber()
  File "C:\Other Programs\ADB File Explorer\venv\lib\site-packages\usb1\__init__.py", line 2019, in getSerialNumber
    return self.open().getSerialNumber()
  File "C:\Other Programs\ADB File Explorer\venv\lib\site-packages\usb1\__init__.py", line 2055, in open
    mayRaiseUSBError(libusb1.libusb_open(self.device_p, byref(handle)))
  File "C:\Other Programs\ADB File Explorer\venv\lib\site-packages\usb1\__init__.py", line 127, in mayRaiseUSBError
    __raiseUSBError(value)
  File "C:\Other Programs\ADB File Explorer\venv\lib\site-packages\usb1\__init__.py", line 119, in raiseUSBError
    raise __STATUS_TO_EXCEPTION_DICT.get(value, __USBError)(value)
usb1.USBErrorNotSupported: LIBUSB_ERROR_NOT_SUPPORTED [-12]