Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Putting Your APKs on Diet
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Brijesh Masrani
August 01, 2017
Technology
0
58
Putting Your APKs on Diet
Brijesh Masrani
August 01, 2017
Tweet
Share
More Decks by Brijesh Masrani
See All by Brijesh Masrani
Let's Stream that Video - an ExoPlayer Starters Guide
brijeshmasrani
0
180
Controlling APK Size When Using Native Library
brijeshmasrani
0
130
What's new in Android N
brijeshmasrani
1
220
Other Decks in Technology
See All in Technology
ZOZOにおけるAI活用の現在 ~開発組織全体での取り組みと試行錯誤~
zozotech
PRO
1
240
GCASアップデート(202510-202601)
techniczna
0
200
Zephyr RTOS の発表をOpen Source Summit Japan 2025で行った件
iotengineer22
0
290
AWS Devops Agent ~ 自動調査とSlack統合をやってみた! ~
kubomasataka
2
260
Databricks Free Edition講座 データサイエンス編
taka_aki
0
240
Oracle Cloud Infrastructure:2026年1月度サービス・アップデート
oracle4engineer
PRO
0
190
Web Intelligence and Visual Media Analytics
weblyzard
PRO
1
6.8k
あたらしい上流工程の形。 0日導入からはじめるAI駆動PM
kumaiu
2
370
MySQLのJSON機能の活用術
ikomachi226
0
110
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
13k
Azure SRE Agent x PagerDutyによる近未来インシデント対応への期待 / The Future of Incident Response: Azure SRE Agent x PagerDuty
aeonpeople
0
230
DEVCON 14 Report at AAMSX RU65: V9968, MSX0tab5, MSXDIY etc
mcd500
0
230
Featured
See All Featured
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
440
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
99
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
170
A Tale of Four Properties
chriscoyier
162
24k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
44
Technical Leadership for Architectural Decision Making
baasie
1
220
Being A Developer After 40
akosma
91
590k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
220
Designing for humans not robots
tammielis
254
26k
Documentation Writing (for coders)
carmenintech
77
5.2k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
110
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
69
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