Android APK Analyzer: Manifest, Permissions & Size Guide
Use Android Studio's APK Analyzer to inspect what's inside your APK or AAB, understand permission declarations, read DEX class structure, and apply R8 shrinking to reduce app size for Google Play.
APK vs AAB: Which to Use
| Feature | APK | AAB (Android App Bundle) |
|---|---|---|
| Required by Play Store | Legacy apps only | Yes, for new apps since 2021 |
| Delivered size | Same for all devices | Optimized per device (smaller) |
| Direct install | Yes (adb install) | No (requires bundletool or Play Store) |
| Average size reduction | Baseline | 15–65% smaller download |
| Dynamic feature modules | No | Yes |
Using APK Analyzer in Android Studio
Open APK Analyzer from the menu: Build > Analyze APK... and select your .apk or .aab file. You'll see a breakdown of every file and its raw and download size.
# Build a release APK for analysis
cd android
./gradlew assembleRelease
# The APK is at:
# android/app/build/outputs/apk/release/app-release.apk
# Or build an AAB (for Play Store):
./gradlew bundleRelease
# android/app/build/outputs/bundle/release/app-release.aab
# Analyze from command line with bundletool
java -jar bundletool.jar dump manifest --bundle=app-release.aab
java -jar bundletool.jar dump resources --bundle=app-release.aab Reading AndroidManifest.xml Permissions
In APK Analyzer, click AndroidManifest.xml to see all declared permissions. Review each one for necessity:
<!-- AndroidManifest.xml — permission examples -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Required for any network access -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- Runtime permission — user must approve -->
<uses-permission android:name="android.permission.CAMERA" />
<!-- maxSdkVersion limits to older OS versions -->
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<!-- Precise vs approximate location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<!-- Only add FINE_LOCATION if you truly need GPS precision -->
</manifest> Permissions added automatically by third-party libraries (called "permission leakage") are a common issue. Add tools:node="remove" to strip permissions added by libraries you can't modify:
<manifest xmlns:tools="http://schemas.android.com/tools">
<!-- Remove a permission added by a library -->
<uses-permission
android:name="android.permission.READ_PHONE_STATE"
tools:node="remove" />
</manifest> Reducing APK Size with R8 and Resource Shrinking
Enable R8 code shrinking and resource shrinking in your release build configuration:
// android/app/build.gradle
android {
buildTypes {
release {
minifyEnabled true // Enable R8 shrinking + obfuscation
shrinkResources true // Remove unused resources
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro'
}
}
// Exclude specific ABIs to reduce native library size
// Include only the architectures you target
splits {
abi {
enable true
reset()
include 'arm64-v8a', 'armeabi-v7a' // Covers 99%+ of Android devices
universalApk false
}
}
} Analyze DEX Method Count
In APK Analyzer, click on a .dex file to see a tree view of all packages and their method counts. If you're approaching the 64K limit, R8 shrinking is the primary solution:
# Check method count from command line
# Install dx tool (part of Android SDK build-tools)
dx --dex --output=temp.dex classes.dex 2>&1 | grep "method count"
# Or use dexcount-gradle-plugin to get method count in CI
# In build.gradle:
# apply plugin: 'com.getkeepsafe.dexcount'
# Run: ./gradlew assembleRelease
# Check: app/build/outputs/dexcount/ Frequently Asked Questions
What is Android APK Analyzer?▼
APK Analyzer is a built-in tool in Android Studio (Build > Analyze APK) that inspects the contents of an APK or AAB file. It shows the size of each component (DEX files, resources, native libraries, AndroidManifest.xml), lists all declared permissions, and shows the method count per DEX file. It's the first tool to open when investigating APK size issues.
What is the difference between APK and AAB?▼
APK (Android Package) is the traditional distribution format — a single file containing all code and resources for all device configurations. AAB (Android App Bundle) is Google's newer format that lets the Play Store generate optimized APKs per device. AAB results in smaller downloads because users only receive the code and resources for their specific device, language, and screen density. The Play Store now requires AAB for new apps.
How do I read AndroidManifest.xml permissions?▼
In APK Analyzer, click on AndroidManifest.xml to see the decoded XML. Look for <uses-permission> elements — each one is a permission your app declares. Review every permission: INTERNET (network), CAMERA, READ_CONTACTS, and ACCESS_FINE_LOCATION are the most sensitive. Remove any permissions not actively used, as users and app stores scrutinize the declared permission list.
What is ProGuard/R8 and how does it reduce APK size?▼
R8 is the Android code shrinker and obfuscator (it replaced ProGuard in Android Gradle Plugin 3.4). When enabled, R8 removes unused classes, methods, and fields (shrinking), renames identifiers to short names (obfuscation), and applies code optimizations. Together these can reduce DEX size by 30–60%. Enable with minifyEnabled = true in your release build configuration.
How do I reduce my APK/AAB size?▼
Key strategies: (1) Enable R8 shrinking with minifyEnabled = true. (2) Enable resource shrinking with shrinkResources = true. (3) Use Android App Bundle (AAB) instead of APK. (4) Compress and convert images to WebP. (5) Use vector drawables instead of raster images where possible. (6) Audit your dependencies — many bring in large transitive dependencies. (7) Use ABI splits or ABIs filter to exclude unnecessary native library architectures.
What is a DEX file and why does method count matter?▼
DEX (Dalvik Executable) is the bytecode format for Android apps. Each DEX file has a hard limit of 65,536 method references (the '64K limit'). When your app exceeds this, you need multidex, which splits code into multiple DEX files. Multidex increases startup time on older Android versions. R8 shrinking typically reduces your method count significantly, helping avoid or minimize multidex overhead.
Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →AI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →You Might Also Need
Web Performance Checklist
Interactive web performance checklist covering images, fonts, JavaScript, CSS, caching, and server. Check off items to track your score out of 100 and export as Markdown.
Open free tool →
Lighthouse Score Simulator
Estimate Lighthouse performance scores based on JS bundle size, CSS, images, TTFB, and render-blocking resources. Get LCP, FID, CLS, FCP estimates.
Open free tool →
Web Vitals Budget Planner
Plan Core Web Vitals budgets. Set LCP/CLS/INP targets for e-commerce, blog, SaaS, or custom pages. Get resource size limits, JS execution budget, and third-party script allowances.
Open free tool →
More Free Tools
Related Articles
React Native 0.74+ New Architecture: Bridgeless Mode & JSI Deep Dive
Explore React Native's New Architecture in 0.74 and beyond. Learn how Bridgeless Mode, JSI, TurboModules, and Fabric renderer eliminate the legacy bridge bottleneck and transform app performance.
Expo SDK 52: Universal Apps with Native Modules
Expo SDK 52 brings React Native New Architecture as default, Expo Modules API, DOM Components, and React Native DevTools integration. Build universal apps with native modules the modern way.
Flutter vs React Native in 2026: Performance Benchmarks & Honest Comparison
Flutter vs React Native 2026: real performance benchmarks, architectural differences, developer experience, ecosystem maturity, and which framework wins for your next mobile project.
Flutter vs React Native 2026: Complete Cross-Platform Comparison
An in-depth comparison of Flutter and React Native for cross-platform mobile development in 2026. Performance, ecosystem, hiring market, code examples, and when to choose each framework.
Flutter vs React Native vs Kotlin Multiplatform 2026: Which Should You Choose?
Deep comparison of Flutter, React Native, and Kotlin Multiplatform in 2026. Performance benchmarks, developer experience, ecosystem, hot reload, native modules, and real code examples to help you pick the right cross-platform framework.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →