miunlock icon indicating copy to clipboard operation
miunlock copied to clipboard

PATCHED: 'Please use the common user tool on the official website.'

Open unfairDude opened this issue 2 years ago • 15 comments

i get this error after confirming to proceed with unlock

ERROR:root:invalid code != 0: {'code': 20045, 'description': '请使用官网普通用户解锁工具进行操作', 'descCN': '请使用官网普通用户解锁工具进行操作', 'descEN': 'Please use the common user tool on the official website.', 'uid': '8150708967'} Traceback (most recent call last): File "/home/anon/Desktop/miunlock/main.py", line 111, in data = r.run() File "/home/anon/Desktop/miunlock/request.py", line 117, in run raise XiaomiError(STRINGS["en"].get(data.get("code", -1), STRINGS["en"][-1]).format(**data), data.get("code", 6)) request.XiaomiError: [ERROR]: Unknown error 20045

unfairDude avatar Aug 12 '22 14:08 unfairDude

2 days ago it was working but i had to wait 77 hours remaining... now it just gives this error after typing the getvar token

unfairDude avatar Aug 12 '22 15:08 unfairDude

just found out someone had same issue using miunlock tool and fixed using miflash unlock-en 6.5.314.7 version and someone else using miflash_unlock-en-5.5.224.24 maybe you can fix using that specific version @Canny1913

Edit: version 5.5 is not working

unfairDude avatar Aug 12 '22 15:08 unfairDude

I have same issue

Practicalbutterfly5 avatar Aug 13 '22 15:08 Practicalbutterfly5

3/4 days ago it was working but i had to wait 77 hours remaining... now it just gives this error after typing the getvar token

unfairDude avatar Aug 13 '22 19:08 unfairDude

Can confirm, I just tried unlocking my phone for the first time and got this message:

ERROR:root:invalid code != 0: {'code': 20045, 'description': '请使用官网普通用户解锁工具进行操作', 'descCN': '请使用官网普通用户解锁工具进行操作', 'descEN': 'Please use the common user tool on the official website.', 'uid': '***'}

zeGolem avatar Aug 21 '22 01:08 zeGolem

just found out someone had same issue using miunlock tool and fixed using miflash unlock-en 6.5.314.7 version and someone else using miflash_unlock-en-5.5.224.24 maybe you can fix using that specific version @Canny1913

Edit: version 5.5 is not working

try editing this line and all other version strings https://github.com/Canny1913/miunlock/blob/master/main.py#L30

thing is i cant reproduce this at all

Canny1913 avatar Aug 22 '22 23:08 Canny1913

try editing this line and all other version strings

Just did that, didn't help :/

thing is i cant reproduce this at all

I can reproduce the issue on my Mi Mix 3, though I haven't waited 7 days since creating my Xiaomi account, so maybe that's the issue, and it's just a cryptic message?

zeGolem avatar Aug 23 '22 13:08 zeGolem

Issue applies for me, old account, already unlocked same phone before. Tried various version strings including 4.5.813.51, 5.5.224.24, 6.5.224.28, 6.5.406.31 (which seems to be the latest?). Replaced in both three clientVersion strings. 20045 while calling https://github.com/Canny1913/miunlock/blob/59129dacd05192c1a5c88177acf338d36cab2b96/main.py#L92 (mtk device)

stamgit avatar Aug 23 '22 19:08 stamgit

I think I found a solution for this issue. Looks like the only thing that changed is pcId being now a constant, so that value ?d in screenshots below is what we need.

Response location from JS injection: loc-old

Response location from MiFlash: loc-new

In MiFlash it looks like they are using MD5 hash instead of UUID, but both of them are valid when putted in UnlockRequests.

After I replaced random uuid (here) with a MD5 value from miflash link, I've finally got a different error! Screenshot from 2022-08-29 02-27-15

tfuxu avatar Aug 29 '22 01:08 tfuxu

Same issue, even when applying your PR #17 Please help

Andre8900 avatar Sep 07 '22 22:09 Andre8900

I am sorry to spam you @tfuxu but can you help me with this? I really need my phone unlocked

Andre8900 avatar Sep 09 '22 16:09 Andre8900

I am sorry to spam you @tfuxu but can you help me with this? I really need my phone unlocked

I have no idea what I would need to change here to get this to work, honestly. Maybe I'll try to use a Wireshark to check if requests has been changed in a official tool, but I can't promise that I'll be able to get this program working again.

tfuxu avatar Sep 09 '22 18:09 tfuxu

I have no idea what I still need to change here to get this to work, honestly. Maybe I'll try to use a Wireshark to check if requests has been changed in a official tool, but I can't promise that I'll be able to get this program working again.

Alright, I have unlocked my phone now using a friend's Windows computer. Thanks a lot anyways for your effort and for having created that tool. And f*ck Xiaomi for bothering Linux/Mac users.

Andre8900 avatar Sep 13 '22 20:09 Andre8900

Getting the same issue with qcom device. I tried changing applying the patch and changing the clientVersion to latest version of MiFlash, but without any success. I am still getting unknow error 20045.

mozkomor05 avatar Oct 11 '22 04:10 mozkomor05

requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://in-unlock.update.intl.miui.com/api/v2/nonce

@RohitVerma882? Any help is much appreciated.

jerinphilip avatar Sep 16 '23 13:09 jerinphilip