7

On windows, I have Android Commander installed so whenever I double click on an APK file, the information about it (ie: package name, version, etc) is displayed. I'm looking for something similar for a Mac OS X. What are my options?

5 Answers 5

7

The best and quickest way to use it is to obtain the tool from the Android SDK, called aapt and invoke it from the command line like this:

aapt d --values badging some_apk_name.apk

An example of the output is shown:

package: name='foo.bar' versionCode='1' versionName='1.00'
sdkVersion:'7'
targetSdkVersion:'16'
application: label='FooBar' icon='res/drawable/ic_launcher_icon.png'
launchable activity name='foo.bar.activity'label='FooBar' icon=''
uses-permission:'android.permission.WRITE_EXTERNAL_STORAGE'
uses-feature:'android.hardware.touchscreen'
main
other-activities
other-receivers
other-services
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '120' '160' '240' '320'

This will extract certain but limited values and parse the encoded AndroidManifest.xml (which is binary encoded upon compilation from Java source to APK binary).

1
  • 1
    You can alias aapt="$(\ls -d $HOME/Library/Android/sdk/build-tools/* | tail -n 1)/aapt" within your .zshrc to always have the latest aapt available in your terminal. Commented Dec 30, 2023 at 7:23
3

You can use QuickLookAPK, a APK Quicklook plugin. It's actually a wrapper of the aapt tool t0mm13b mentioned here.

Instructions:

  1. Download QuickLookAPK.qlgenerator zip file, unzip and put it in: ~/Library/QuickLook.

  2. Run qlmanage -r ; qlmanage -m

  3. Now press space key for selected APK file in Finder and view the AndroidManifest file info.
3
  • This works but APKs compiled with newer SDKs won't show their version and package name, because the version of aapt included with QuickLookAPK is too old. To fix this you just have to copy a newer version of aapt in the following directory: "~/Library/QuickLook/QuickLookAPK.qlgenerator/Contents/Resources" (aapt is included with the Android SDK and you can also get it by downloading the latest Adobe AIR SDK)
    – OMA
    Commented Jan 31, 2019 at 11:51
  • QuickLookAPK doesn't work on Mojave anymore. Any alternatives for quick look functionality?
    – Slav
    Commented Mar 18, 2019 at 18:21
  • @Slav Have you checked OMA's comment back when you posted your comment 5 years ago? The solution is to run cp "$(\ls -d $HOME/Library/Android/sdk/build-tools/* | tail -n 1)/aapt" "$HOME/Library/QuickLook/QuickLookAPK.qlgenerator/Contents/Resources/" to update aapt. Commented Dec 30, 2023 at 7:20
1

You might want to take a look at e.g. apktool, which is written in Java and will run on a Mac -- the linked page even contains the installation instructions.

You might also want to take a look at APKInspector (written in Python, it seems). Not having a Mac, I cannot say for sure whether it will run on it.

Mentioned for completeness: APK Multi Tool. Will probably not run on a Mac, as the page only advertizes a Windows and a Linux version -- but maybe the latter can be made working with minor effort, so you might want to contact its developer.

1

As others have mentioned, apk is just a renamed zip file. For a quick look at its content, on the mac terminal, you can type

zipinfo apk-file.apk

you can also use the command unzip to extract its content.

-1

You might want to try apktool. This will run on your Mac.

And as @Izzy mentioned, you can try APK Multi Tool to get the APK properties.

One last thing you could try is viewing the contents of the APK. This can be done by renaming your apk file to .zip and extracting its contents. You will then see a file called AndroidManifest.xml, this will show app version, package name, etc.

6
  • 2
    -1 from me, in the last paragraph of your answer - by renaming the apk to zip, and unzipping, the manifest is in binary encoded format.
    – t0mm13b
    Commented Mar 20, 2013 at 1:53
  • No its not. I can read the manifest.XML fine. Its probably just your machine. Commented Mar 21, 2013 at 5:45
  • 1
    It may be viewable using apktool and other similar tool s etc... I stand by that comment!
    – t0mm13b
    Commented Mar 21, 2013 at 12:49
  • 1
    No! Using Linux here, using tools such apktool etc, do go through the trouble in parsing and analyzing the AndroidManifest.xml - it might help you to learn that the xml you see using those tools are not exactly what was on the developer's build environment originally - FYI - see this Its well known its encoded in a proprietary binary format which when using aapt or similar can decode it. End of conversation!
    – t0mm13b
    Commented Mar 22, 2013 at 17:20
  • 1
    t0mm13b is fully right. The AndroidManifest.xml file is encoded. Commented Oct 17, 2014 at 13:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .