From 3d6161ba9cb77bfa788c23cc8288c8d33c75fcdf Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Sat, 12 Nov 2022 12:12:44 +0100 Subject: [PATCH] Use aapt2 by default From https://developer.android.com/studio/command-line/aapt2 > Prior to AAPT2, AAPT was the default version of Android Asset Packaging Tool and it has now been deprecated. Although AAPT2 should immediately work with older projects, this section describes some behavior changes that you should be aware of. --- objection/commands/mobile_packages.py | 2 +- objection/console/cli.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/objection/commands/mobile_packages.py b/objection/commands/mobile_packages.py index 7cb83cb..d979795 100644 --- a/objection/commands/mobile_packages.py +++ b/objection/commands/mobile_packages.py @@ -99,7 +99,7 @@ def patch_ios_ipa(source: str, codesign_signature: str, provision_file: str, bin def patch_android_apk(source: str, architecture: str, pause: bool, skip_cleanup: bool = True, enable_debug: bool = True, gadget_version: str = None, skip_resources: bool = False, network_security_config: bool = False, target_class: str = None, - use_aapt2: bool = False, gadget_name: str = 'libfrida-gadget.so', + use_aapt2: bool = True, gadget_name: str = 'libfrida-gadget.so', gadget_config: str = None, script_source: str = None, ignore_nativelibs: bool = True, manifest: str = None, skip_signing: bool = False) -> None: """ diff --git a/objection/console/cli.py b/objection/console/cli.py index 8725d6a..2d7ca6d 100644 --- a/objection/console/cli.py +++ b/objection/console/cli.py @@ -268,8 +268,8 @@ def patchipa(source: str, gadget_version: str, codesign_signature: str, provisio @click.option('--skip-signing', '-C', is_flag=True, default=False, help='Skip signing the apk file.', show_default=False) @click.option('--target-class', '-t', help='The target class to patch.', default=None) -@click.option('--use-aapt2', '-2', is_flag=True, default=False, - help='Use the aapt2 binary instead of aapt as part of the apktool processing.', show_default=True) +@click.option('--use-aapt2', '-2', is_flag=True, default=True, + help='Use the aapt2 binary instead of aapt au part of the apktool processing.', show_default=True) @click.option('--gadget-name', '-g', default='libfrida-gadget.so', help=( 'Name of the gadget library. Can be named whatever you want to dodge anti-frida '