From b8bfa8190dcdb9e44d697f3b45a8502f2a292a44 Mon Sep 17 00:00:00 2001 From: zyb Date: Wed, 19 Jun 2024 14:19:51 +0800 Subject: [PATCH] modified: patch.py --- patch.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/patch.py b/patch.py index bc02cd3..e1046b5 100644 --- a/patch.py +++ b/patch.py @@ -82,7 +82,9 @@ def patch_bootloader(key_dict,boot_dev): print(']') stdout,stderr = run_shell_command(f"lsblk -no pkname {boot_dev}") - with open(f'/dev/{stdout.decode()}','wb') as f: + print(f'{stdout.decode().strip()}') + print(f'/dev/{stdout.decode().strip()}') + with open(f'/dev/{stdout.decode().strip()}','wb') as f: f.seek(0x100) f.write(bytes.fromhex('00000000000000000000BDE800000000')) f.seek(0x150)