Joshua's Cheatsheets - Android
Light
help

Android APK Inspecting / Decompiling

  1. Pull the APK off the phone

    • You could use a dev tool, Titanium Backup Pro, or something simple like "APK Extractor"
    • Send to yourself, sync via Dropbox, or transfer via USB
  2. You have two options for getting readable content

    • A) Use an online decompiler, like this one
    • B) Manually process the APK, by hand

      • First, unpack the archive (.apk), using something like Peazip.

        • Depending on how the APK was produced, you might have readable content right away, or you might need to keep going through steps
      • If the AndroidManifest.xml appears garbled, it probably was converted to a binary asset before packaging.

        • If you have the Android SDK tools already installed, you can use appt.exe dump xmltree {APK_PATH} AndroidManifest.xml > manifest_dump.txt to get extracted values
      • Many XML files might appear garbled, due to binary asset conversion

        • You can use Apktool (see below) to extract
        • You could also keep using aapt, but that is not going to produce clean XML

          • aapt.exe dump xmltree {APK_PATH} {ASSET_PATH} > asset_dump.txt
    • C) (Best option) - Process APK with Apktool

      • Instructions here
      • Without wrapper script: java -jar apktool_2.4.1.jar decode {APK_FILE}.apk
  3. For finding intent strings, AndroidManifest.xml is a good place to start

Intents

Generally speaking, Intents in Android are a common way for an app to:

  • Request that a specific action be carried out

    • Known as a "Explicit Intent"
    • "Open this specific app and perform this specific action"
  • Request that a general action be carried out

  • Request that a message be broadcasted across the system.

Docs: Intents and Intent Filters

Intents are great for automation, because they offer an easy way to "listen" for signals from the system (OS) and applications, as well as triggering actions to be executed

OS Level Intents

The Android Operating System itself broadcasts (and relays) many intents as it runs. For example, android.intent.action.ACTION_POWER_CONNECTED is broadcasted when the phone is plugged into a power source (e.g. wall charger).

I have found it difficult to find a complete list of all Android OS intents that are broadcasted, but here are some good starting spots:

Rooting / ROM Info

Moto G (First-Gen 4G) (xt1045) (aka Peregrine)

Automagic App

See Automagic Cheatsheet

Markdown Source Last Updated:
Wed Jun 24 2020 06:55:01 GMT+0000 (Coordinated Universal Time)
Markdown Source Created:
Mon Jan 06 2020 20:17:04 GMT+0000 (Coordinated Universal Time)
© 2020 Joshua Tzucker, Built with Gatsby