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
Brijesh Masrani
August 01, 2017
Technology
66
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
[JAWS Festa 2026]一番いい仕事は、請求書に現れない / jawsfesta2026
sh_fk2
2
380
AI時代の組織作り:チーム開発から「個人×AI」への移行と、持続可能な「開発資本」の築き方
ham0215
2
320
re:Invent の去年のスケジュールを公開します!
miu_crescent
PRO
0
320
増え続けるプロダクトの品質をどう担保するか。ProductSpecとTypeScriptによる取り組み
joere
3
1.2k
DBTS2026 盛り上がってますか!?Databricksが実現するAI時代のデータ基盤
akuwano
1
190
2026 Apache Flink Community Checkpoint
rmetzger
0
200
An Introduction to Context Ontology Accelerator (teaching AI agents what your data means)
inariku
PRO
1
150
Microsoft Entra Kerberos で実現するクラウド デバイス管理
tamaiyutaro
2
650
AIエージェントの監視、思考を見るか行動を見るか / Monitoring AI Agents: Thoughts or Actions
yusukeshimizu
2
170
レガシーコードに対する loop engineering的なAI開発プロセス導入について
kubell_hr
0
280
bpf_arenaとstruct_opsを使うのが難しかった話
masu_mi
0
210
コードレビューをなくして見えたもの
henteko
0
140
Featured
See All Featured
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
550
Building a Scalable Design System with Sketch
lauravandoore
464
34k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
630
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
310
Designing Experiences People Love
moore
143
24k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
980
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Between Models and Reality
mayunak
4
570
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Scaling GitHub
holman
464
140k
Large-scale JavaScript Application Architecture
addyosmani
516
110k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.9k
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