modified: patch.py

This commit is contained in:
zyb 2024-07-12 08:34:05 +08:00
parent abf5707954
commit ff3b34b112

View File

@ -141,9 +141,9 @@ def patch_npk_file(key_dict,kcdsa_private_key,eddsa_private_key,input_file,outpu
stdout, stderr = run_shell_command(f"file {os.path.join(extract_dir,'sbin/sysinit')}")
print(stdout.decode())
keygen = os.path.join(extract_dir,'bin/keygen')
if 'x86-64' in stdout.decode():
if '80386' in stdout.decode():
run_shell_command(f"sudo cp keygen/keygen_x86_64 {keygen}")
elif 'aarch64' in stdout.decode():
elif 'ARM' in stdout.decode():
run_shell_command(f"sudo cp keygen/keygen_aarch64 {keygen}")
run_shell_command(f"sudo chmod a+x {keygen}")
print(f"pack {extract_dir} ...")