bkerler / edl

Inofficial Qualcomm Firehose / Sahara / Streaming / Diag Tools :)
GNU General Public License v3.0
1.47k stars 356 forks source link

edl failed to install on Win11 #491

Closed NinjaAdmin42 closed 5 months ago

NinjaAdmin42 commented 5 months ago

I installed mtkclient without failure. Everything went smoothly. Then I updated to the current Python 3.12, current Git, current UsbDK, and updated pip. I then proceeded to install edl using the process below. I used the old-school installer for Python 3.12, not the Microsoft Store.

git clone https://github.com/bkerler/edl cd edl git submodule update --init --recursive pip3 install -r requirements.txt

python setup.py build returns with:

C:\platform-tools\edl>python setup.py build Traceback (most recent call last): File "C:\platform-tools\edl\setup.py", line 2, in from setuptools import setup, find_packages ModuleNotFoundError: No module named 'setuptools'

python setup.py install returns with:

C:\platform-tools\edl>python setup.py install Traceback (most recent call last): File "C:\platform-tools\edl\setup.py", line 2, in from setuptools import setup, find_packages ModuleNotFoundError: No module named 'setuptools'

While running any edl command such as 'edl --serial' returns with:

C:\platform-tools\edl>edl --serial 'edl' is not recognized as an internal or external command, operable program or batch file.

I'm not really sure where I went wrong? Is this an issue on my part? Did I miss a step, or is this possibly due to a faulty install or PC issue? If I could get any help, I would greatly appreciate it as I tried searching the web, and the results were null.

RenateUSB commented 5 months ago

You can rename edl to edl.py You can run it through file associations if that is setup or else python edl.py You can install missing requirements using pip.

NinjaAdmin42 commented 5 months ago

Ok, changing the file association did the trick I believe as the edl program tries to connect. I'm not achieving a connection though, and the device I am using is a OnePlus Nord N200 5G - Metro for reference. I installed the WinUSB drivers through Zadig, but still am not reaching a connection. I moved the UFS loaders into the 'Loaders folder,' though I am not sure they have been properly converted. Apologies for my laymen understanding, I am no developer and everything I know is self taught so this is another crash course for me. The following is the return I get upon entering EDL mode and trying to connect:

C:\platform-tools\edl>python edl.py rl dumps --memory=ufs --genxml Capstone library is missing (optional). Qualcomm Sahara / Firehose Client V3.62 (c) B.Kerler 2018-2023. main main - [LIB]: ←[33mPlease first install libusb_win32 driver from Zadig←[0m main - Trying with no loader given ... main - Waiting for the device Traceback (most recent call last): File "C:\platform-tools\edl\edl.py", line 386, in base.run() File "C:\platform-tools\edl\edl.py", line 289, in run conninfo = self.doconnect(loop) ^^^^^^^^^^^^^^^^^^^^ File "C:\platform-tools\edl\edl.py", line 199, in doconnect self.cdc.connected = self.cdc.connect(portname=self.portname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\platform-tools\edl\edlclient\Library\Connection\usblib.py", line 240, in connect self.configuration = self.device.get_active_configuration() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\theye\AppData\Roaming\Python\Python312\site-packages\usb\core.py", line 921, in get_active_configuration return self._ctx.get_active_configuration(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\theye\AppData\Roaming\Python\Python312\site-packages\usb\core.py", line 113, in wrapper return f(self, *args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\theye\AppData\Roaming\Python\Python312\site-packages\usb\core.py", line 249, in get_active_configuration self.managed_open() File "C:\Users\theye\AppData\Roaming\Python\Python312\site-packages\usb\core.py", line 113, in wrapper return f(self, args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\theye\AppData\Roaming\Python\Python312\site-packages\usb\core.py", line 131, in managed_open self.handle = self.backend.open_device(self.dev) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\theye\AppData\Roaming\Python\Python312\site-packages\usb\backend\libusb1.py", line 804, in open_device return _DeviceHandle(dev) ^^^^^^^^^^^^^^^^^^ File "C:\Users\theye\AppData\Roaming\Python\Python312\site-packages\usb\backend\libusb1.py", line 652, in init _check(_lib.libusb_open(self.devid, byref(self.handle))) File "C:\Users\theye\AppData\Roaming\Python\Python312\site-packages\usb\backend\libusb1.py", line 600, in _check raise NotImplementedError(_strerror(ret)) NotImplementedError: Operation not supported or unimplemented on this platform

Also, for some reason my cold install of Python was not working so I went ahead and installed through the Microsoft Store, and all requirements were properly installed using 'pip3 install -r requirements.txt.'

NinjaAdmin42 commented 5 months ago

It may help if I explain what I am trying to do. I figured out how to run mtkclient pretty quickly, and flashing the stock firmware through the BRom mode exploit reset the entire device back to stock. I forget my credentials with my OP device, and I want to flash with the stock firmware to reset the frp lock. There is no MSMTools for the Metro variant currently, and as such, edl is my only option. It works on mediatek phones through the BRom mode exploit with mtkclient so I figured edl should do the same in edl mode on qualcomm.

RenateUSB commented 5 months ago

OnePlus Nord N200 5G is Qualcomm SM4350 Snapdragon 480. I don't know why you are talking about BRom mode or mtkclient. Is your device in USB 05c6/9008?

NinjaAdmin42 commented 5 months ago

Qualcomm HS-USB QDLoader 9008 (COM9)

RenateUSB commented 5 months ago

You can install Zadig WinUSB drivers (instead of Qualcomm drivers) and avoid this COM port silliness.

NinjaAdmin42 commented 5 months ago

I installed Zadig - WinUSB while the N200 was connected and registered, and the install was successful.

I believe my main issue now is a proper loader for the N200. I noticed in the other issue created for the N200, the problem I saw immediately was his lack of a proper loader.

Seeing as the N100 is where the uploaded loaders stop for the OnePlus model, I need to make one. However, there is nothing on the internet that is easily accessible on how to make a loader.

I have both the dre8t.ops and selen_ufs.bin files, as well as a full payload.bin file for the N200. If you could help me out with a little direction on creating a proper loader either from yourself or through resources to read, I would appreciate it.

Edit: I see edl printgpt will answer my question about msmid and pkhash if I can get edl to run

NinjaAdmin42 commented 5 months ago

C:\platform-tools\edl>python edl.py --serial Capstone library is missing (optional). Qualcomm Sahara / Firehose Client V3.62 (c) B.Kerler 2018-2023. main - Trying with no loader given ... main - Waiting for the device Detected 0x5c6:0x9008 device at: COM1 Traceback (most recent call last): File "C:\platform-tools\edl\edl.py", line 386, in base.run() File "C:\platform-tools\edl\edl.py", line 289, in run conninfo = self.doconnect(loop) ^^^^^^^^^^^^^^^^^^^^ File "C:\platform-tools\edl\edl.py", line 199, in doconnect self.cdc.connected = self.cdc.connect(portname=self.portname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\platform-tools\edl\edlclient\Library\Connection\seriallib.py", line 56, in connect self.device.open() File "C:\Users\theye\AppData\Roaming\Python\Python312\site-packages\serial\serialwin32.py", line 64, in open raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError())) serial.serialutil.SerialException: could not open port 'COM1': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)

RenateUSB commented 5 months ago

You're using the WinUSB driver, lose the "--serial". Something is screwy. Either the driver didn't go in. Look in Device Manager. There should be no port called "Comx Qualcomm..."