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

Unexpected output, expected 0xfd got 0xa0 #53

Open
Tooniis opened this issue Aug 31, 2021 · 5 comments
Open

Unexpected output, expected 0xfd got 0xa0 #53

Tooniis opened this issue Aug 31, 2021 · 5 comments

Comments

@Tooniis
Copy link

Tooniis commented Aug 31, 2021

Trying to run this on a MT6737T device (Galaxy Grand Prime+), and I'm getting this:

$ ./main.py
[2021-08-31 07:26:26.592030] Waiting for device
[2021-08-31 07:26:32.107721] Found device = 0e8d:2000
Traceback (most recent call last):
  File "/home/$USER/Code/Source/bypass_utility/./main.py", line 237, in <module>
    main()
  File "/home/$USER/Code/Source/bypass_utility/./main.py", line 42, in main
    config, serial_link_authorization, download_agent_authorization, hw_code  = get_device_info(device, arguments)
  File "/home/$USER/Code/Source/bypass_utility/./main.py", line 160, in get_device_info
    hw_code = device.get_hw_code()
  File "/home/$USER/Code/Source/bypass_utility/src/device.py", line 265, in get_hw_code
    self.echo(0xFD)
  File "/home/$USER/Code/Source/bypass_utility/src/device.py", line 176, in echo
    self.check(from_bytes(self.read(size), size), words)
  File "/home/$USER/Code/Source/bypass_utility/src/device.py", line 132, in check
    raise RuntimeError("Unexpected output, expected {} got {}".format(gold, test))
RuntimeError: Unexpected output, expected 0xfd got 0xa0

There's this line in lsusb:

Bus 001 Device 009: ID 0e8d:2000 MediaTek Inc. MT65xx Preloader

I'm using the patched kernel from https://github.com/amonet-kamakiri/prebuilt-kernels/tree/master/arch

@Tooniis
Copy link
Author

Tooniis commented Sep 24, 2021

Apparently it was booting into the preloader. There seems to be no button combination (including not pressing anything) to make it boot to the boot ROM, so I crashed it into BROM with this https://github.com/cyrozap/mediatek-lte-baseband-re/blob/master/SoC/common/usbdl.py and it worked afterwards.

Doesn't bypass_utility also have a crash_preloader function to do this? Why isn't it being called in this case?

@halitoff
Copy link

so I crashed it into BROM with this

Can you help me with it? I flashed wrong preloader and now my phone don't want to flash

@lucaslira95
Copy link

Still having the same error here

@s-b-repo
Copy link

s-b-repo commented Dec 17, 2023

same for me but on redmi 9c on windows

@s-b-repo
Copy link

It looks like there's an issue in your Python script, specifically in the "get_hw_code" method of the "device.py" module. The error is indicating that the script expected to receive the hexadecimal value 0xFD but instead received 0xA0.

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

No branches or pull requests

4 participants