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

AttributeError: 'NoneType' object has no attribute 'generatetoken' #237

Open
ikeboy opened this issue Feb 18, 2022 · 2 comments
Open

AttributeError: 'NoneType' object has no attribute 'generatetoken' #237

ikeboy opened this issue Feb 18, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ikeboy
Copy link

ikeboy commented Feb 18, 2022

Trying to erase boot partition on a Oneplus 9 Pro, and get

edl e boot_b --lun=4

program,read,nop,patch,configure,setbootablestoragedrive,erase,power,firmwarewrite,getstorageinfo,benchmark,emmc,ufs,fixgpt,getsha256digest,demacia,setprojmodel,SetNetType
firehose - 
Erasing from physical partition 4, sector 538267, sectors 49152
Traceback (most recent call last):
  File "/usr/local/bin/edl", line 4, in <module>
    __import__('pkg_resources').run_script('edlclient==3.60', 'edl')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 651, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1448, in run_script
    exec(code, namespace, namespace)
  File "/usr/local/lib/python3.9/dist-packages/edlclient-3.60-py3.9.egg/EGG-INFO/scripts/edl", line 380, in <module>
    base.run()
  File "/usr/local/lib/python3.9/dist-packages/edlclient-3.60-py3.9.egg/EGG-INFO/scripts/edl", line 376, in run
    fh.handle_firehose(cmd, options)
  File "/usr/local/lib/python3.9/dist-packages/edlclient-3.60-py3.9.egg/edlclient/Library/firehose_client.py", line 798, in handle_firehose
    self.firehose.cmd_erase(lun, partition.sector, partition.sectors)
  File "/usr/local/lib/python3.9/dist-packages/edlclient-3.60-py3.9.egg/edlclient/Library/firehose.py", line 566, in cmd_erase
    data += self.modules.addprogram()
  File "/usr/local/lib/python3.9/dist-packages/edlclient-3.60-py3.9.egg/edlclient/Library/Modules/init.py", line 66, in addprogram
    return self.ops.addprogram()
  File "/usr/local/lib/python3.9/dist-packages/edlclient-3.60-py3.9.egg/edlclient/Library/Modules/oneplus.py", line 239, in addprogram
    pk, token = self.ops.generatetoken(True)
AttributeError: 'NoneType' object has no attribute 'generatetoken'

Trying to fix a bricked phone, just writing the boot partitions isn't helping so trying to erase and reflash them.

@bkerler bkerler self-assigned this Jun 28, 2022
@bkerler bkerler added the bug Something isn't working label Jun 28, 2022
@rkorn86
Copy link

rkorn86 commented Jul 22, 2022

I have the same problem on my OnePlus 8 Pro. Do you need some more information to fix this issue?

@mewzik86
Copy link

mewzik86 commented Aug 21, 2022

I have a Oneplus 9 TMO (LE2117). Also came across this bug. Tracked it down to:
if projid == "": res = self.fh.detect_partition(arguments=args, partitionname="param")
lines 140. 141 in oneplus.py. It seems like this method returns false and the projid is blank when self.ops = self.convert_projid(fh, projid, serial) is called on line 161. So the that method returns None.

This only seem to occur for me when truing to "wl" on any lun other than lun0. (is it because the partitionname="param" only exixts on lun0?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants