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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
140
What's new in Android N
brijeshmasrani
1
220
Other Decks in Technology
See All in Technology
Chainlitで作るお手軽チャットUI
ynt0485
0
210
Disciplined Vibes: Scaling AI-Assisted Engineering
sheharyar
0
140
新しいVibe Codingと”自走”について
watany
6
300
2026 TECHFRESH 畢業分享會 - AI-Native 重塑軟體工程與虛擬講師
line_developers_tw
PRO
0
860
MCP Appsを作ってみよう
iwamot
PRO
4
560
小さく始める AI 活用推進 ― 日経電子版 Web チームの事例/nikkei-tech-talk47
nikkei_engineer_recruiting
0
230
中期計画、2回作ってみた ~業務委託と正社員、両方の視点から~
demaecan
1
690
"何を作るか"を任される エンジニアは、どう育つのか
yutaokafuji
1
610
Agent Skills設計で柔軟性と硬さのバランスが難しい話
nassy20
0
130
SIer20年! 培ったスキルがスタートアップで輝く時
shucho0103
0
840
10倍の生産性を実現するAI駆動並列エージェントのすべて
kumaiu
5
1.4k
Microsoft Build Keynoteふりかえり
tomokusaba
0
120
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
860
Believing is Seeing
oripsolob
1
140
WENDY [Excerpt]
tessaabrams
11
38k
A better future with KSS
kneath
240
18k
Making Projects Easy
brettharned
120
6.7k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
360
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
380
First, design no harm
axbom
PRO
2
1.2k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
420
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
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