Open trufae opened 5 years ago
Btw, how do we change the destination for objection to locate the aapt directory?
or
whats the default pick up of objection for aapt?
It checks $PATH
for aapt
, so just modify $PATH
to include it's location.
Yep that works, but i was suggesting to make objection find those tools in default installation places, feel free to close the issue if you prefer to keep it like this
On 3 Jul 2019, at 11:42, Leon Jacobs notifications@github.com wrote:
It checks $PATH for aapt, so just modify $PATH to include it's location.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sensepost/objection/issues/244?email_source=notifications&email_token=ABRCGG3N4KSX3KHZTHOWMLTP5RYA3A5CNFSM4H2SLHD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZD4ZPA#issuecomment-508021948, or mute the thread https://github.com/notifications/unsubscribe-auth/ABRCGG6NLA2HZYWHF2PL4U3P5RYA3ANCNFSM4H2SLHDQ.
Will keep this open. Makes sense to try some sane defaults, but $PATH
modifications will always be the last resort.
Can you walk me through how to find $PATH and how to modify to include the directory? Cheers
There are plenty of resources available online for this. But in short, you would do something like export PATH=$PATH:/path/to/aapt
.
Many thanks! But it seems to have an error patching the APK, tried with --skip-resources then it went smooth. But when I open the app, it doesn't seem to hook with the objection.
Error without --skip-resources was:
> No architecture specified. Determining it using adb...
>Detected target device architecture as: arm64-v8a
>Using latest Github gadget version: 12.6.10
>Patcher will be using Gadget version: 12.6.10
>Unpacking app-ph-debug.apk
>An error may have occurred while extracting the APK.
>S: WARNING: Could not write to (/Users/adrianemagdaraog/Library/apktool/framework), using /var/folders/hd/pcgdyv2j3mj18brxj2ymhcwc0000gp/T/ instead...
>S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable
>App already has android.permission.INTERNET
>Target class not specified, searching for launchable activity instead...
>Smali not found in smali directory. This might be a multidex APK. Searching...
>Found smali at: /var/folders/hd/pcgdyv2j3mj18brxj2ymhcwc0000gp/T/tmpcy19pe25.apktemp/smali_classes22/com/s>quareup/leakcanary/internal/DisplayLeakActivity.smali
>Reading smali from: /var/folders/hd/pcgdyv2j3mj18brxj2ymhcwc0000gp/T/tmpcy19pe25.apktemp/smali_classes22/com/s>quareup/leakcanary/internal/DisplayLeakActivity.smali
>Injecting into an existing constructor
>Injecting loadLibrary call at line: 49
>Attempting to fix the constructors .locals count
>Current locals value is 1, updating to 2:
>Writing patched smali back to: /var/folders/hd/pcgdyv2j3mj18brxj2ymhcwc0000gp/T/tmpcy19pe25.apktemp/smali_classes22/com/s>quareup/leakcanary/internal/DisplayLeakActivity.smali
>Copying Frida gadget to libs path...
>Patching paused. The next step is to rebuild the APK. If you require any manual fixes, the current temp directory is:
/var/folders/hd/pcgdyv2j3mj18brxj2ymhcwc0000gp/T/tmpcy19pe25.apktemp
apktool = 2.4.0
Unfortunately I can't see the problem in that output. Ultimately, you will need to manually debug why apktool fails. Also, please don't add more comments to this feature request. It is unrelated.
Default installation of Android Studio (on Mac) is this:
It will be good if objection can just pick the bin from there, that will make initial setups easier for most users