bkerler / edl

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

setactiveslot: patch size too large. debugmode used. #472

Open dsb-y opened 7 months ago

dsb-y commented 7 months ago

error.txt The command's output is attached.

The command was: edl setactiveslot a --debugmode

I had unlocked my bootloader with an unlock token. The way that I bricked my phone was by using a fastboot script to convert to the 'global' variant from the tmobile one but the images were too old. The script gave out errors 'cannot flash to a trusted partition' for some of the partitions. Now it looks like it doesn't have the right firmware. Looks like the script only wrote to the b slot partitions and was thinking to set the active slot to a, but got the attached error. I backed up as much of the phone as I knew how, and compared to the edl r from the a slots and they match, so the a slots should be good.

RenateUSB commented 7 months ago

Why is size_in_bytes="128" when there are only 92 bytes of data supplied in value? Why is anybody using patch when you can just read and write?

dsb-y commented 7 months ago

Good eye. Don't ask me I didn't write the program I just ran 'edl setactiveslot a --debugmode' and I'm not familiar with the protocol. I didn't get what you were try to say at the end there.

RenateUSB commented 7 months ago

Ha, ha, the markup here hates angle brackets in the text. I updated the last comment. You can just read a sector, edit it on the desktop and write it back instead of patch'ing.

dsb-y commented 7 months ago

Oh I see. Well idk where the memory location for the active slot is and also my writes weren't working, I was getting the same issue as https://github.com/bkerler/edl/issues/321 Do you know how the oneplus params module works? I want to switch my version from tmobile to eu. I was able to unbrick it by using the msm download tool, but it still has bad wlan firmware I might be able to fix it with an adb shell cli utility. Also, do you know how to disable the secure boot? The unlock token unlocks the bootloader but it still has secure boot.

RenateUSB commented 7 months ago

In your patch it says start_sector="4096". I know nothing about your device, but you can read that sector and see if it's all zeroes already.

Device working, but WiFi dead is usually mismatch between kernel version and kernel modules version. It's usually caused by flashing the wrong boot image.

dsb-y commented 7 months ago

Ha the android wifi settings is so stupid the reason the connect button was grayed out was not bad firmware it was that my wifi password was too short so I connected to another network with a longer password and it worked. I then redid the install steps for this repo and I couldn't get it to work. It worked before, idk what happened. It gave an error that at the last line from this code block from the edl program object 'req' had no version attribute:

        conninfo = self.doconnect(loop)
        mode = conninfo["mode"]
        if not "data" in conninfo:
            version = 2
        else:
            version = conninfo["data"].version