Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Putting Your APKs on Diet
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Brijesh Masrani
August 01, 2017
Technology
65
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Putting Your APKs on Diet
Brijesh Masrani
August 01, 2017
More Decks by Brijesh Masrani
See All by Brijesh Masrani
Let's Stream that Video - an ExoPlayer Starters Guide
brijeshmasrani
0
210
Controlling APK Size When Using Native Library
brijeshmasrani
0
160
What's new in Android N
brijeshmasrani
1
220
Other Decks in Technology
See All in Technology
ウォンテッドリーの最近のプロダクトと技術の紹介
stomk
0
100
Rust で関数型ドメインモデリング
takonda
0
140
AIにシークレットを見せない、WSL2で安全な開発環境
yazm
0
300
AI × アーキテクト 第1・2章|生成AIの課題とアーキテクトの素養
daidaidai
0
170
オントロジーって 結局なにもの? AI エージェントに「意味」を渡す知識設計の話
greenmidori
0
220
古い指輪から広がった JAVA コミュニティ とのつながり
yamad
0
120
アウトプット初心者、半年間のふりかえり
4o1sobblue
0
440
継続的なAIコスト最適化
bgpat
1
340
遠藤な_めぐろLT #38 「社内のAI活用推進」@麻布台_20261009
endonanana
0
130
DevelopersIO 2026 知識の地図を描く ─ オントロジーとは何か?
ishikawa_satoru
1
1.7k
How to Design Configuration for Rails Applications
willnet
1
810
実践!Cloud Run ハンズオン!! / Cloud Run handson
y0hgi
2
280
Featured
See All Featured
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
380
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
540
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
280
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
260
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
570
Chasing Engaging Ingredients in Design
codingconduct
0
360
Technical Leadership for Architectural Decision Making
baasie
3
600
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.3k
Transcript
Putting Your APKs on Diet - Brijesh Masrani (@brijeshmasrani)
What’s Inside APK?
APK Teardown 1. classes.dex 2. res 3. resources.arsc 4. AndroidManifest.xml
5. libs 6. assets 7. META-INF
classes.dex Contains compiled application code, transformed into Dex bytecode. •
Remove extra code. • Use Proguard ◦ It will try to strip any unused classes and class members, as well as rename any identifiers using shorter names. • Reuse whenever possible Rotate Images, Use Porterduff to change Color
Custom Proguard configs
Custom Proguard configs
res • WebP and SVG • Optimize png images •
Remove unused resources
libs • ndkFilters https://android.jlelse.eu/controlling-apk-size-when-using-native-libraries-45c6c0 e5b70a • ABI split
assets • Keep an eye on assets folder • font
files, json files, or game data Optimizations • Downloadable Fonts
External Libraries • Use only required libraries ◦ Google Play
Services, Analytics, Maps, Awareness, FCM
• Be opinionated about resources hdpi, xhdpi and xxhdpi OR
xxhdpi • minifyEnabled true • shrinkResources true • defaultConfig { ... resConfigs "en", ... } Gradle Changes
General Tips • Use APK analyser
References • https://android.jlelse.eu/controlling-apk-size-when-using-native-libraries-45c 6c0e5b70a • https://medium.com/google-developers/smallerapk-part-1-anatomy-of-an-a pk-da83c25e7003 • https://medium.com/google-developers/smallerapk-part-3-removing-unuse d-resources-1511f9e3f761
• https://www.youtube.com/watch?v=xctGIB81D2w • https://www.youtube.com/watch?v=AdfKNgyT438&t=3