8000 allow cmd_read_buffer to handle raw bytes and dicts (Fixes issue #740) by ryjelsum · Pull Request #835 · bkerler/edl · GitHub
[go: up one dir, main page]

Skip to content

allow cmd_read_buffer to handle raw bytes and dicts (Fixes issue #740) - #835

Open
ryjelsum wants to merge 1 commit into
bkerler:masterfrom
ryjelsum:master
Open

ryjelsum wants to merge 1 commit into
bkerler:masterfrom
ryjelsum:master

Conversation

@ryjelsum
Copy link
Copy Markdown

Fix from @ambercaravalho https://github.com/ambercaravalho/tcl-flip-4-root/blob/main/docs/PATCHES.md (patch 1 only), I am just taking responsibility for upstreaming it after testing it in a few more contexts than she did.

I will admit that I do not fully understand the problem and the fix, but this change alone was enough to get a flash dump from some fussy phones, like a TCL T440W and T790S (as I have personally tested) along with Amber's other tips, namely using --skipresponse for reads. It also does not compromise any functionality I have used in the past. Unsure if my own base commit message is a good explanation of the change. Guidance is very welcome.

I'll try to describe it, to the best of my ability:

Some phones' EDL loaders (most notably KaiOS phones and some TCL phones, for example the TCL T435S, T440W, T790S, some other phone models in the referenced issue) seem to return their responses in a format which edl does not expect. This causes the error "TypeError: a bytes-like object is required, not 'str'".

There have been a few workarounds presented for this in issue (#740) but this seems to be the 'most correct' fix to my untrained eyes.

I'm also able to doing a bit of messaging back-and-forth on characterizing what exactly is going on with these TCL phones in particular, if you want. I now have a few models of phone with different SoCs that are affected by this issue in a seemingly identical manner and working Firehose loaders for all of them (hopefully coming your way soon as well), but I haven't yet looked at the raw XML that is being sent and received to see how it actually differs between these devices and a more typical case.

Fix from https://github.com/ambercaravalho/tcl-flip-4-root/blob/main/docs/PATCHES.md
(patch 1 only)

I will admit that I do not fully understand the problem and the fix, but this
patch alone was enough to get a flash dump from some fussy phones, like a T790S,
along with Amber's other tips (namely using --skipresponse for reads).

I'll try to describe it, to the best of my ability:

Some phones' EDL loaders (most notably KaiOS phones and some TCL phones, for
example the TCL T435S, T440W, T790S) seem to return their responses in a format
which edl does not expect. This causes the error "TypeError: a bytes-like object
is required, not 'str'".

There have been a few workarounds presented for this in issue bkerler#740
(bkerler#740) but this seems to be the 'most
correct' fix to me.
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

Successfully merging this pull request may close these issues.

1 participant

0