bkerler / edl

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

'edl modules oemunlock enable' error #448

Open vicfre opened 9 months ago

vicfre commented 9 months ago

Running 'edl modules oemunlock enable' returns the following:

Qualcomm Sahara / Firehose Client V3.61 (c) B.Kerler 2018-2023. main - Trying with no loader given ... main - Waiting for the device main - Device detected :) main - Mode detected: firehose main - Trying to connect to firehose loader ... firehose - Chip serial num: 1092952339 (0x41252113) firehose - Supported Functions (16): firehose - program firehose - read firehose - nop firehose - patch firehose - configure firehose - setbootablestoragedrive firehose - erase firehose - power firehose - firmwarewrite firehose - getstorageinfo firehose - benchmark firehose - emmc firehose - ufs firehose - fixgpt firehose - sha256init firehose - sha256final firehose - End of supported functions 16 firehose_client firehose_client - [LIB]: No --memory option set, we assume "UFS" as default ..., if it fails, try using "--memory" with "UFS","NAND" or "spinor" instead ! firehose firehose - [LIB]: Couldn't detect MaxPayloadSizeFromTargetinBytes firehose firehose - [LIB]: Couldn't detect TargetName firehose - TargetName=Unknown firehose - MemoryName=UFS firehose - Version=1 firehose - Trying to read first storage sector... firehose - Running configure... firehose - {'UFS fInitialized': '0x1', 'UFS Current LUN Number: ': ' 0xd0', 'UFS Total Active LU': '0x6', 'UFS wManufacturerID': '0x1ce', 'UFS Boot Partition Enabled': '0x1', 'UFS Raw Device Capacity: ': ' 0xee64000', 'UFS Min Block Size': '0x8', 'UFS Erase Block Size': '0x2000', 'UFS Allocation Unit Size': '0x1', 'UFS RPMB ReadWrite Size: ': ' 0x40', 'UFS Number of Allocation Uint for This LU': '0x0', 'UFS Logical Block Size': '0x0', 'UFS Provisioning Type': '0x0', 'UFS LU Write Protect': '0x0', 'UFS Boot LUN ID: ': ' 0x0', 'UFS Memory Type': '0x0', 'UFS LU Total Blocks': '0x0', 'UFS Supported Memory Types': '0x800f', 'UFS dEnhanced1MaxNAllocU': '0x7732', 'UFS wEnhanced1CapAdjFac': '0x300', 'UFS dEnhanced2MaxNAllocU: ': ' 0x0', 'UFS wEnhanced2CapAdjFac': '0x0', 'UFS dEnhanced3MaxNAllocU': '0x0', 'UFS wEnhanced3CapAdjFac': '0x0', 'UFS dEnhanced4MaxNAllocU': '0x0', 'UFS wEnhanced4CapAdjFac': '0x0', 'UFS LUN Enable Bitmask': '0x3f', 'UFS Logical Block Count': '0x0', 'UFS bConfigDescrLock': '0x0', 'UFS iManufacturerName String Index': '0x0', 'UFS iProductName String Index': '0x1', 'UFS iSerialNumber String Index': '0x2', 'UFS iOemID String Index': '0x3', 'UFS Inquiry Command Output': 'SAMSUNG KLUDG4U1EA-B0C1 0500 '} firehose - {'UFS fInitialized': '0x1', 'UFS Current LUN Number: ': ' 0xd0', 'UFS Total Active LU': '0x6', 'UFS wManufacturerID': '0x1ce', 'UFS Boot Partition Enabled': '0x1', 'UFS Raw Device Capacity: ': ' 0xee64000', 'UFS Min Block Size': '0x8', 'UFS Erase Block Size': '0x2000', 'UFS Allocation Unit Size': '0x1', 'UFS RPMB ReadWrite Size: ': ' 0x40', 'UFS Number of Allocation Uint for This LU': '0x0', 'UFS Logical Block Size': '0x0', 'UFS Provisioning Type': '0x0', 'UFS LU Write Protect': '0x0', 'UFS Boot LUN ID: ': ' 0x0', 'UFS Memory Type': '0x0', 'UFS LU Total Blocks': '0x0', 'UFS Supported Memory Types': '0x800f', 'UFS dEnhanced1MaxNAllocU': '0x7732', 'UFS wEnhanced1CapAdjFac': '0x300', 'UFS dEnhanced2MaxNAllocU: ': ' 0x0', 'UFS wEnhanced2CapAdjFac': '0x0', 'UFS dEnhanced3MaxNAllocU': '0x0', 'UFS wEnhanced3CapAdjFac': '0x0', 'UFS dEnhanced4MaxNAllocU': '0x0', 'UFS wEnhanced4CapAdjFac': '0x0', 'UFS LUN Enable Bitmask': '0x3f', 'UFS Logical Block Count': '0x0', 'UFS bConfigDescrLock': '0x0', 'UFS iManufacturerName String Index': '0x0', 'UFS iProductName String Index': '0x1', 'UFS iSerialNumber String Index': '0x2', 'UFS iOemID String Index': '0x3', 'UFS Inquiry Command Output': 'SAMSUNG KLUDG4U1EA-B0C1 0500 '} firehose - 0x1 firehose_client - Supported functions: program,read,nop,patch,configure,setbootablestoragedrive,erase,power,firmwarewrite,getstorageinfo,benchmark,emmc,ufs,fixgpt,sha256init,sha256final oneplus oneplus - [LIB]: No module named 'qrcode' Traceback (most recent call last): File "/usr/local/bin/edl", line 4, in import('pkg_resources').run_script('edlclient==3.60', 'edl') File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 656, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 1453, in run_script exec(code, namespace, namespace) File "/usr/local/lib/python3.10/dist-packages/edlclient-3.60-py3.10.egg/EGG-INFO/scripts/edl", line 399, in base.run() File "/usr/local/lib/python3.10/dist-packages/edlclient-3.60-py3.10.egg/EGG-INFO/scripts/edl", line 394, in run fh.handle_firehose(cmd, options) File "/usr/local/lib/python3.10/dist-packages/edlclient-3.60-py3.10.egg/edlclient/Library/firehose_client.py", line 901, in handle_firehose return self.firehose.modules.run(command=mcommand, args=moptions) File "/usr/local/lib/python3.10/dist-packages/edlclient-3.60-py3.10.egg/edlclient/Library/Modules/init.py", line 104, in run return self.generic.oem_unlock(enable) File "/usr/local/lib/python3.10/dist-packages/edlclient-3.60-py3.10.egg/edlclient/Library/Modules/generic.py", line 30, in oem_unlock if rpartition.sectors <= (0x8000//self.cfg.SECTOR_SIZE_IN_BYTES): AttributeError: 'generic' object has no attribute 'cfg'

And I'm unable to run fastboot oem unlock in order to flash TWRP. There is a "config" partition on my device (OnePlus 6) so I'm not sure whether that is the problem.

I hope this can be resolved :)

vicfre commented 9 months ago

Forgot to mention... My phone is soft-bricked, unable to boot. Flashing a stock OS with the MSMdownloadtool hasn't helped so it might be a defect on the motherboard. I did drop the thing a few times so I guess I only have myself to blame.

bkerler commented 9 months ago

If you flash a stock os, you need to make sure that you also activate the right slot and that you use the right projectid files. If msmdownloadtool flashed files don't work, then you might have bricked a critical partition that you need to reflash depending on what and how you bricked the device.

vicfre commented 9 months ago

I already figured that flashing the stock OS might break something, so I ran 'edl rl dumps --memory=ufs --genxml' before doing so. After restoring this backup using 'edl wl dumps --memory=ufs' I still run into the same error when trying to unlock the oem. If I understand correctly, the device should now be in the same condition as it was before flashing, right? I'm sorry, my technical knowledge on this subject is very limited.

gigoplast commented 5 months ago

Me Too i Fail To UNLOCK Device = Huawei Ascend G7-L01 Command ='edl modules oemunlock enable --lun=0 --loader=prog_emmc_firehose_8916.mbn --memory=eMMC' https://github.com/bkerler/edl/issues/490#issue-2079409433