Apktool M Tutorial ◉ <CERTIFIED>

If you're looking to modify Android apps directly on your phone, Apktool M is a powerful, mobile-friendly alternative to the traditional PC-based Apktool . It allows you to decompile, edit, and recompile APKs without needing a computer. Getting Started with Apktool M

Download and Install: Since it isn't on the Play Store, you’ll need to find the official Apktool M project page or a trusted community source like XDA Developers.

Grant Permissions: Open the app and grant it access to your files. This is necessary for it to read your installed apps or standalone APK files. Step-by-Step: Decompiling and Rebuilding

Select an APK: Tap on the file you want to edit. You can choose from your internal storage or select an "Installed App."

Decompile: Select Decompile (or "Quick Edit" for basic changes). This breaks the APK down into readable components like AndroidManifest.xml, resources, and smali code. Make Your Changes: apktool m tutorial

Resources: Change icons, strings, or layouts in the res folder.

Manifest: Modify app permissions or entry points in AndroidManifest.xml.

Compile and Sign: Once your edits are finished, tap Build. Apktool M will re-package the files. Most versions include an Auto-Sign feature, which is crucial because Android won't install an unsigned APK.

Install: After building, the app will offer to install the modified version. You may need to uninstall the original app first to avoid signature conflicts. Why Use It? If you're looking to modify Android apps directly

Unlike standard decompilers like JADX , which are best for just reading code, Apktool M is a full-service workshop for reverse engineering. It’s ideal for fixing bugs, translating apps, or learning how Android applications are structured.

Important Note: Always respect intellectual property. Decompiling copyrighted apps without permission can lead to legal issues. Use these tools for educational purposes or on apps you have the right to modify.


Chapter 2: Installation and First Launch

Rebuilt app crashes instantly

  • Cause: Smali error or bad resource edit.
  • Fix: Compare original and modified smali. Use logcat (via ADB or Matlog app) to see crash reason.

Common Commands Overview

  • Decode (decode resources and smali):
    apktool d app.apk -o app_decoded
    
  • Build (rebuild APK from decoded folder):
    apktool b app_decoded -o rebuilt.apk
    
  • Install framework (for apps that use framework resources):
    apktool if framework-res.apk
    
  • Decode with no sources (resources only):
    apktool d -r app.apk
    
  • Force decode/build (overwrite):
    apktool d -f app.apk
    apktool b -f app_decoded
    

Step 4.5: Sign and Install

After successful rebuild:

  1. A popup appears: "Sign APK?"
  2. Choose Test Key (for personal use) or import your own keystore.
  3. Select Zipalign (optimize).
  4. Once signed, tap Install.

The modified app will be installed alongside the original (different signature may cause conflict – uninstall original first). Chapter 2: Installation and First Launch Rebuilt app


Step 4.3: Remove a Banner Ad (Layout Edit)

Many banner ads are in layout XML files.

  1. Navigate to res/layout/activity_main.xml (name varies).
  2. Look for elements like AdView, com.google.android.gms.ads.AdView, or an id @+id/adView.
  3. Delete that entire block or set android:visibility="gone".
    <com.google.android.gms.ads.AdView
        android:id="@+id/adView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />
    
    Change to: android:visibility="gone" or delete.
  4. Save.

Note: Removing ads may break some apps if they call ad methods. For beginner practice, it’s fine.

5.3. Installing Frameworks (for OEM skins like MIUI)

If an app uses custom framework resources:

  1. Obtain framework-res.apk and miui.apk from a device (or online).
  2. In APKTool M: Tools → Install Framework.
  3. Select the framework APK. Now you can decompile MIUI apps without errors.