[Redmi 9 / Poco M2 Questions & Answers] captain_rock:
Note: For some reason there's duplicate new line after each line. So, whenever you see two empty lines together, it's actually meant to be only one. Probably important to note in the "Code" section (that is Windows 10 PowerShell), if there are TWO empty lines TOGETHER: then it's ONLY ONE, and if there is ONE empty line ALONE: then IT DOES NOT EXIST in reality!

Hi! I have an OPPO A5s (CPH1909) and just want TWRP. I have downloaded the needed TWRP file, and now want to flash it! The phone doesn't have fastboot mode, so I went with SP Flash Tool. Now, from tutorials, I could know that I need a Scatter .txt file (got it), a preloader .bin file (got it), a DA (Download Agent) .bin file (got it), and a .auth file (got it). I could also know that in SP Flash Tool it should be that it's wheather you use the DA and Auth, OR not use them but use the MTK-Bypass thing (I also got (downloaded) that as well).

Now, my problem is a "ERROR: STATUS_ERR (0xC0010001)" popup when clicking the "Download" button in SP Flash Tool (I'm using UART and selecting the correct port (in my case: "COM5"). And I'm using v5.1343, but same happens with other v5 too). I could also know that that popup message ("ERROR: STATUS_ERR (0xC0010001)") indicates a DA or Auth fail, so, SIMPLY, it SHOULD be that you JUST use a correct DA and Auth files, OR, OR, use the MTK-Bypass (I also used it (as will be mentioned below), a time before trying to flash using SP Flash Tool while DA and Auth are selected, and another time before trying to flash using SP Flash Tool while DA and Auth are NOT selected (both gave the same popup mentioned)).

So, it's wheather that there's a problem in my DA or Auth (or both) files, like that they are not the correct ones for my CPH1909, or a problem in the bypass. So, I'll provide what happened to my case here while using https://github.com/MTK-bypass/bypass_utility/releases (and the needed pip dependencies installed), and you can provide me links to correct DA or Auth files (or both) or even the correct SPFT (SP Flash Tool) version that should be used for CPH1909 (if it matters).

Here's what happens to me with bypass (Windows 10 64-bit Admin PowerShell):

### While the phone is POWERED OFF then VOL+ and VOL- are held. And no commands or flashings or anything happened to it since the POWER OFF:

PS C:\OPPO2\bypass_utility-v.1.4.2> py -3 main.py

[2024-02-25 15:28:15.401089] Waiting for device

[2024-02-25 15:28:21.062959] Found port = COM5

[2024-02-25 15:28:21.132054] Device hw code: 0x766

[2024-02-25 15:28:21.132054] Device hw sub code: 0x8a00

[2024-02-25 15:28:21.142464] Device hw version: 0xca00

[2024-02-25 15:28:21.142464] Device sw version: 0x0

[2024-02-25 15:28:21.152373] Device secure boot: True

[2024-02-25 15:28:21.152373] Device serial link authorization: False

[2024-02-25 15:28:21.152373] Device download agent authorization: True

[2024-02-25 15:28:21.162948] Disabling watchdog timer

[2024-02-25 15:28:21.162948] Disabling protection

[2024-02-25 15:28:21.212401] Protection disabled

# Then, without releasing the VOL+ and VOL-:

PS C:\OPPO2\bypass_utility-v.1.4.2> py -3 main.py --serial_port=COM5

[2024-02-25 15:28:36.172529] Device hw code: 0x766

[2024-02-25 15:28:36.172529] Device hw sub code: 0x8a00

[2024-02-25 15:28:36.172529] Device hw version: 0xca00

[2024-02-25 15:28:36.172529] Device sw version: 0x0

[2024-02-25 15:28:36.188171] Device secure boot: False

[2024-02-25 15:28:36.188171] Device serial link authorization: False

[2024-02-25 15:28:36.188171] Device download agent authorization: False

[2024-02-25 15:28:36.203796] Disabling watchdog timer

[2024-02-25 15:28:36.203796] Insecure device, sending payload using send_da

[2024-02-25 15:28:36.250903] Found send_dword, dumping bootrom to bootrom_766.bin

# The reason I ran "py -3 main.py --serial_port=COM5" is because I found it mentioned somewhere, and when I tried it, it made "Device secure boot: False" (instead of True as before) and "Device download agent authorization: False" (instead of True as before), which should be good for flashing using SPFT without a DA or Auth files (and should indeed be the fix for that error I got (the error I'm posting this for, "ERROR: STATUS_ERR (0xC0010001)")

# Moreover, if I ran "py -3 main.py" right afterwards running it (so, running it twice, while the first time is that time mentioned above), I get it stuck at "Waiting for device", unplugging and plugging in many times does nothing, just stuck like that:

[2024-02-25 16:04:54.918584] Waiting for device

# And, if tried to run "py -3 main.py --serial_port=COM5" but without running "py -3 main.py" first (so, running "py -3 main.py --serial_port=COM5" while the phone is in the state mentioned in the first comment ("#" line)), I get same as if I ran "py -3 main.py" (however, the phone has to be plugged in already when executing (throws an error if executed while the phone is not plugged in (just an error that says it can't find that mentioned "COM5" in the command (which makes sense since the phone is not plugged in))), while "py -3 main.py" can actually be executed if the phone is not plugged in, resulting in that "Waiting for device" until it's plugged in):

PS C:\OPPO2\bypass_utility-v.1.4.2> py -3 main.py --serial_port=COM5

[2024-02-25 16:09:18.431559] Device hw code: 0x766

[2024-02-25 16:09:18.431559] Device hw sub code: 0x8a00

[2024-02-25 16:09:18.431559] Device hw version: 0xca00

[2024-02-25 16:09:18.447184] Device sw version: 0x0

[2024-02-25 16:09:18.447184] Device secure boot: True

[2024-02-25 16:09:18.447184] Device serial link authorization: False

[2024-02-25 16:09:18.462812] Device download agent authorization: True

[2024-02-25 16:09:18.462812] Disabling watchdog timer

[2024-02-25 16:09:18.462812] Disabling protection

[2024-02-25 16:09:18.510616] Protection disabled

# And running it ("py -3 main.py --serial_port=COM5") again (after running it once before, that was while the phone at the state mentioned in the first comment ("#")) results in normal as if being run after "py -3 main.py":

PS C:\OPPO2\bypass_utility-v.1.4.2> py -3 main.py --serial_port=COM5

[2024-02-25 16:09:12.282824] Device hw code: 0x766

[2024-02-25 16:09:12.282824] Device hw sub code: 0x8a00

[2024-02-25 16:09:12.282824] Device hw version: 0xca00

[2024-02-25 16:09:12.298490] Device sw version: 0x0

[2024-02-25 16:09:12.298490] Device secure boot: False

[2024-02-25 16:09:12.298490] Device serial link authorization: False

[2024-02-25 16:09:12.313862] Device download agent authorization: False

[2024-02-25 16:09:12.313862] Disabling watchdog timer

[2024-02-25 16:09:12.313862] Insecure device, sending payload using send_da

[2024-02-25 16:09:12.360749] Found send_dword, dumping bootrom to bootrom_766.bin

# Intrestingly, whatever the case is, keeping running "py -3 main.py --serial_port=COM5" (while the phone is plugged in and VOL+ and VOL- are held, normally) results in just the same above two things:

PS C:\OPPO2\bypass_utility-v.1.4.2> py -3 main.py --serial_port=COM5

[2024-02-25 16:09:18.431559] Device hw code: 0x766

[2024-02-25 16:09:18.431559] Device hw sub code: 0x8a00

[2024-02-25 16:09:18.431559] Device hw version: 0xca00

[2024-02-25 16:09:18.447184] Device sw version: 0x0

[2024-02-25 16:09:18.447184] Device secure boot: True

[2024-02-25 16:09:18.447184] Device serial link authorization: False

[2024-02-25 16:09:18.462812] Device download agent authorization: True

[2024-02-25 16:09:18.462812] Disabling watchdog timer

[2024-02-25 16:09:18.462812] Disabling protection

[2024-02-25 16:09:18.510616] Protection disabled

PS C:\OPPO2\bypass_utility-v.1.4.2> py -3 main.py --serial_port=COM5

[2024-02-25 16:09:22.391432] Device hw code: 0x766

[2024-02-25 16:09:22.406831] Device hw sub code: 0x8a00

[2024-02-25 16:09:22.422777] Device hw version: 0xca00

[2024-02-25 16:09:22.422777] Device sw version: 0x0

[2024-02-25 16:09:22.422777] Device secure boot: False

[2024-02-25 16:09:22.422777] Device serial link authorization: False

[2024-02-25 16:09:22.438316] Device download agent authorization: False

[2024-02-25 16:09:22.438316] Disabling watchdog timer

[2024-02-25 16:09:22.453709] Insecure device, sending payload using send_da

[2024-02-25 16:09:22.500588] Found send_dword, dumping bootrom to bootrom_766.bin

PS C:\OPPO2\bypass_utility-v.1.4.2> py -3 main.py --serial_port=COM5

[2024-02-25 16:09:26.027511] Device hw code: 0x766

[2024-02-25 16:09:26.027511] Device hw sub code: 0x8a00

[2024-02-25 16:09:26.027511] Device hw version: 0xca00

[2024-02-25 16:09:26.042895] Device sw version: 0x0

[2024-02-25 16:09:26.042895] Device secure boot: True

[2024-02-25 16:09:26.042895] Device serial link authorization: False

[2024-02-25 16:09:26.058520] Device download agent authorization: True

[2024-02-25 16:09:26.058520] Disabling watchdog timer

[2024-02-25 16:09:26.058520] Disabling protection

[2024-02-25 16:09:26.111084] Protection disabled

PS C:\OPPO2\bypass_utility-v.1.4.2> py -3 main.py --serial_port=COM5

[2024-02-25 16:09:28.194780] Device hw code: 0x766

[2024-02-25 16:09:28.194780] Device hw sub code: 0x8a00

[2024-02-25 16:09:28.194780] Device hw version: 0xca00

[2024-02-25 16:09:28.209990] Device sw version: 0x0

[2024-02-25 16:09:28.209990] Device secure boot: False

[2024-02-25 16:09:28.209990] Device serial link authorization: False

[2024-02-25 16:09:28.225616] Device download agent authorization: False

[2024-02-25 16:09:28.225616] Disabling watchdog timer

[2024-02-25 16:09:28.225616] Insecure device, sending payload using send_da

[2024-02-25 16:09:28.288119] Found send_dword, dumping bootrom to bootrom_766.bin

PS C:\OPPO2\bypass_utility-v.1.4.2> py -3 main.py --serial_port=COM5

[2024-02-25 16:09:31.456015] Device hw code: 0x766

[2024-02-25 16:09:31.468047] Device hw sub code: 0x8a00

[2024-02-25 16:09:31.473085] Device hw version: 0xca00

[2024-02-25 16:09:31.473085] Device sw version: 0x0

[2024-02-25 16:09:31.482816] Device secure boot: True

[2024-02-25 16:09:31.482816] Device serial link authorization: False

[2024-02-25 16:09:31.482816] Device download agent authorization: True

[2024-02-25 16:09:31.493004] Disabling watchdog timer

[2024-02-25 16:09:31.493004] Disabling protection

[2024-02-25 16:09:31.533057] Protection disabled

PS C:\OPPO2\bypass_utility-v.1.4.2> py -3 main.py --serial_port=COM5

[2024-02-25 16:09:33.275981] Device hw code: 0x766

[2024-02-25 16:09:33.275981] Device hw sub code: 0x8a00

[2024-02-25 16:09:33.275981] Device hw version: 0xca00

[2024-02-25 16:09:33.291372] Device sw version: 0x0

[2024-02-25 16:09:33.291372] Device secure boot: False

[2024-02-25 16:09:33.291372] Device serial link authorization: False

[2024-02-25 16:09:33.307014] Device download agent authorization: False

[2024-02-25 16:09:33.307014] Disabling watchdog timer

[2024-02-25 16:09:33.322625] Insecure device, sending payload using send_da

[2024-02-25 16:09:33.369502] Found send_dword, dumping bootrom to bootrom_766.bin

# And so on...

# Finally, there's a Windows 10 sound played: Sound-of-device-got-plugged-in -> 3 seconds or so of no sound -> Sound-of-device-got-unplugged -> 1 second or so of no sound -> Sound-of-device-got-plugged-in -> then repeat... That is all the time, without commands or SPFT or anything. Moreover, if I ran the command "py -3 main.py --serial_port=COM5" between the Sound-of-device-got-unplugged and the Sound-of-device-got-plugged-in, I get (That is also essentially what I get if ran "py -3 main.py --serial_port=COM5" while the phone is NOT plugged in):

PS C:\OPPO2\bypass_utility-v.1.4.2> py -3 main.py --serial_port=COM5

Traceback (most recent call last):

File "C:\OPPO2\bypass_utility-v.1.4.2\main.py", line 213, in <module>

main()

File "C:\OPPO2\bypass_utility-v.1.4.2\main.py", line 40, in main

device = Device(arguments.serial_port)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\OPPO2\bypass_utility-v.1.4.2\src\device.py", line 18, in __init__

self.dev = serial.Serial(port, BAUD, timeout=TIMEOUT)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\userr\AppData\Local\Programs\Python\Python311\Lib\site-packages\serial\serialwin32.py", line 33, in __init__

super(Serial, self).__init__(*args, **kwargs)

File "C:\Users\userr\AppData\Local\Programs\Python\Python311\Lib\site-packages\serial\serialutil.py", line 244, in __init__

self.open()

File "C:\Users\userr\AppData\Local\Programs\Python\Python311\Lib\site-packages\serial\serialwin32.py", line 64, in open

raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))

serial.serialutil.SerialException: could not open port 'COM5': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)

# Then if I tried to run "py -3 main.py --serial_port=COM5" again, I get:

PS C:\OPPO2\bypass_utility-v.1.4.2> py -3 main.py --serial_port=COM5

Traceback (most recent call last):

File "C:\OPPO2\bypass_utility-v.1.4.2\main.py", line 213, in <module>

main()

File "C:\OPPO2\bypass_utility-v.1.4.2\main.py", line 44, in main

config, serial_link_authorization, download_agent_authorization, hw_code = get_device_info(device, arguments)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\OPPO2\bypass_utility-v.1.4.2\main.py", line 136, in get_device_info

hw_code = device.get_hw_code()

^^^^^^^^^^^^^^^^^^^^

File "C:\OPPO2\bypass_utility-v.1.4.2\src\device.py", line 190, in get_hw_code

return from_bytes(hw_code, 2)

^^^^^^^^^^^^^^^^^^^^^^

File "C:\OPPO2\bypass_utility-v.1.4.2\src\common.py", line 17, in from_bytes

return {

^

File "C:\OPPO2\bypass_utility-v.1.4.2\src\common.py", line 19, in <lambda>

2: lambda: struct.unpack(endian + 'H', value)[0],

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

struct.error: unpack requires a buffer of 2 bytes

# Then, if I tried to run "py -3 main.py --serial_port=COM5" again, I get nothing (nothing without the prompt to enter a command, so that the command is WAITING for something or STUCK), if unplugged the phone while WAITING or STUCK, I get:

Traceback (most recent call last):

File "C:\OPPO2\bypass_utility-v.1.4.2\main.py", line 213, in <module>

main()

File "C:\OPPO2\bypass_utility-v.1.4.2\main.py", line 44, in main

config, serial_link_authorization, download_agent_authorization, hw_code = get_device_info(device, arguments)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\OPPO2\bypass_utility-v.1.4.2\main.py", line 134, in get_device_info

device.handshake()

File "C:\OPPO2\bypass_utility-v.1.4.2\src\device.py", line 92, in handshake

self.write(0xA0)

File "C:\OPPO2\bypass_utility-v.1.4.2\src\device.py", line 144, in write

self.dev.write(data)

File "C:\Users\userr\AppData\Local\Programs\Python\Python311\Lib\site-packages\serial\serialwin32.py", line 325, in write

raise SerialTimeoutException('Write timeout')

serial.serialutil.SerialTimeoutException: Write timeout

# And surely after that the prompt is back (so that I can enter commands again). Finally, if I tried to run "py -3 main.py --serial_port=COM5" again, I get the same: Nothing and no prompt, just stuck. And same error if I unplugged the phone. And so on...

Okay, so, what I really need is just to flash and boot into TWRP, nothing more and nothing less. Surely, saying more information will help other people with other but similar issue.

HERE IS THE IMPORTANT PART : WHAT I HAVE TRIED:

In all of those numbers, it's WITHOUT selecting a preloader.bin file, only the twrp img file is selected, and with same Scatter file (that is: "MT6765_Android_scatter.txt" attached), and with UART mode (correct port (COM5) is selected), and with VOL+ and VOL- held before and after plugging in (NEVER released). And all of those numbers are done TWICE: Once after running "py -3 main.py" followed by "py -3 main.py --serial_port=COM5" (those result in success and their output is mentioned above). And once WITHOUT running those two commands (while the phone got booted into normal mode then powered off, so NO commands or anything attempt to it since the power off (so that should means without Bypassing):

1. With the default DA (that is: "MTK_AllInOne_DA.bin" attached (the default of the SPFT v5.1343), and WITHOUT an Auth .auth file: Clicking the "Download" button results in the "ERROR: STATUS_ERR (0xC0010001)".

2. With the default DA, and WITH two Auth .auth files (so, this Number 2 is done TWICE, once with the first Auth .auth file, and another time with the other Auth .auth file) (those are: "auth_sv5.auth" and "oppo-mt6765", COULD NOT be attached): Clicking the "Download" button results in the "ERROR: STATUS_ERR (0xC0010001)".

3. With a custom DA (that is: "DA_MT6765.bin" attached), and WITHOUT Auth .auth files: Clicking the "Download" button results in the "ERROR: STATUS_ERR (0xC0010001)".

4. With same custom DA (that is the same in Number 3), and WITH the two Auth .auth files same as Number 2 (same "auth_sv5.auth" and "oppo-mt6765", and this Number 4 is tried TWICE just like Number 2, once with the one .auth file and another time with the other .auth file): Clicking the "Download" button results in the "ERROR: STATUS_ERR (0xC0010001)".

Anyway, the question is very clear: How to fix that error: "ERROR: STATUS_ERR (0xC0010001)" in my case that I mentioned in all this message. Of course, the phone model is: "CPH1909", so if the problem shall be fixed with a DA or Auth files (or any files that can be downloaded), you can tell me the correct ones for "CPH1909" so you can help me in my case, that the phone is not mine and should have TWRP quickly. Furthermore, that's my first forum message in my life, so let me like it!

Thank you so much!