clugh / coc-patcher

A small utility to patch and sign the Clash of Clans APK
15 stars 9 forks source link

Fix libg.so check for ARM #6

Open HorridModz opened 1 year ago

HorridModz commented 1 year ago

Hey, I know this is old, and IDK it if still works. However, I was curious about it, so I read through the code. When I was reading through it, I noticed a mistake:

This code checks that the x86 and arm versions of libg.so are not missing:

if not os.path.isfile(LIBG_X86):
    print('ERROR: arm libg.so is missing.', file=sys.stderr)
    sys.exit(1)

if not os.path.isfile(LIBG_X86):
    print('ERROR: x86 libg.so is missing.', file=sys.stderr)
    sys.exit(1)

But this code has a mistake: The check for the arm version of ligb.so actually checks for the x86 version.

Here's the fixed version:

if not os.path.isfile(LIBG_ARM):
    print('ERROR: arm libg.so is missing.', file=sys.stderr)
    sys.exit(1)

if not os.path.isfile(LIBG_X86):
    print('ERROR: x86 libg.so is missing.', file=sys.stderr)
    sys.exit(1)