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
Brijesh Masrani
August 01, 2017
Technology
63
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
200
Controlling APK Size When Using Native Library
brijeshmasrani
0
150
What's new in Android N
brijeshmasrani
1
220
Other Decks in Technology
See All in Technology
Power Automateアップデート情報
miyakemito
0
280
基調講演:人とAIをつなぐIoTの今と未来 ー 「フィジカル」と「デジタル」が出会うその先へ【SORACOM Discovery 2026】
soracom
PRO
0
360
セキュリティ研修【MIXI 26新卒技術研修】
mixi_engineers
PRO
31
26k
エンタープライズデータへ安全につなぐ Production-ready なエージェント設計 ― AI × MCP リファレンスアーキテクチャ ― #AIDevDay
cdataj
1
340
オートマトンと字句解析でRoslynを読む
tomokusaba
0
130
LangfuseによるLLMOps基盤の構築と活用事例
zozotech
PRO
1
190
Amazon Bedrock Managed Knowledge BaseDive Deep
ren8k
0
270
AI驚き屋発見器
yama3133
1
380
「待ち時間」の消滅と「自我消耗」の加速:生成AI時代のエンジニアを救うメンタル・リソース管理
poropinai1966
0
350
plamo-3-translateの開発
pfn
PRO
0
200
最新IoT事例11選に学ぶ!現場の成功パターンと実践のコツ【SORACOM Discovery 2026】
soracom
PRO
0
120
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
110k
Featured
See All Featured
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
780
Tell your own story through comics
letsgokoyo
1
1k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
400
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.7k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Facilitating Awesome Meetings
lara
57
7k
Designing Powerful Visuals for Engaging Learning
tmiket
1
470
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Designing for humans not robots
tammielis
254
26k
[SF Ruby Conf 2025] Rails X
palkan
2
1.2k
Test your architecture with Archunit
thirion
1
2.3k
Raft: Consensus for Rubyists
vanstee
141
7.6k
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