Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
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
170
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
Bedrock AgentCore Memoryの新機能 (Episode) を試してみた / try Bedrock AgentCore Memory Episodic functionarity
hoshi7_n
2
1.9k
AWSの新機能をフル活用した「re:Inventエージェント」開発秘話
minorun365
2
460
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
1
1.9k
MySQLのSpatial(GIS)機能をもっと充実させたい ~ MyNA望年会2025LT
sakaik
0
120
松尾研LLM講座2025 応用編Day3「軽量化」 講義資料
aratako
6
3.7k
Microsoft Agent Frameworkの可観測性
tomokusaba
1
110
『君の名は』と聞く君の名は。 / Your name, you who asks for mine.
nttcom
1
120
意外と知らない状態遷移テストの世界
nihonbuson
PRO
1
260
Introduce marp-ai-slide-generator
itarutomy
0
130
NIKKEI Tech Talk #41: セキュア・バイ・デザインからクラウド管理を考える
sekido
PRO
0
210
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
1
770
New Relic 1 年生の振り返りと Cloud Cost Intelligence について #NRUG
play_inc
0
240
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
The SEO identity crisis: Don't let AI make you average
varn
0
39
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
680
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
120
Test your architecture with Archunit
thirion
1
2.1k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
330
Building an army of robots
kneath
306
46k
Odyssey Design
rkendrick25
PRO
0
440
So, you think you're a good person
axbom
PRO
0
1.8k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.4k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
120
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