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
Controlling APK Size When Using Native Library
Search
Brijesh Masrani
July 02, 2017
Technology
0
130
Controlling APK Size When Using Native Library
Brijesh Masrani
July 02, 2017
Tweet
Share
More Decks by Brijesh Masrani
See All by Brijesh Masrani
Let's Stream that Video - an ExoPlayer Starters Guide
brijeshmasrani
0
160
Putting Your APKs on Diet
brijeshmasrani
0
58
What's new in Android N
brijeshmasrani
1
220
Other Decks in Technology
See All in Technology
AIエージェントによるエンタープライズ向けスライド検索!
shibuiwilliam
1
130
技術の総合格闘技!?AIインフラの現在と未来。
ebiken
PRO
0
250
ある編集者のこれまでとこれから —— 開発者コミュニティと歩んだ四半世紀
inao
4
1.9k
Introducing RFC9111 / YAPC::Fukuoka 2025
k1low
1
220
Post-AIコーディング時代のエンジニア生存戦略
shinoyu
0
260
「O(n log(n))のパフォーマンス」の意味がわかるようになろう
dhirabayashi
0
110
CDKの魔法を少し解いてみる ― synth・build・diffで覗くIaCの裏側 ―
takahumi27
1
140
プログラミング言語を書く前に日本語を書く── AI 時代に求められる「言葉で考える」力/登壇資料(井田 献一朗)
hacobu
PRO
0
150
AIを前提に、業務を”再構築”せよ IVRyの9ヶ月にわたる挑戦と未来の働き方 (BTCONJP2025)
yueda256
1
280
What's the recommended Flutter architecture
aakira
3
1.3k
Spring Boot利用を前提としたJavaライブラリ開発方法の提案
kokihoshihara
PRO
2
170
仕様駆動 x Codex で 超効率開発
ismk
2
1.4k
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
329
39k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
Thoughts on Productivity
jonyablonski
73
4.9k
What's in a price? How to price your products and services
michaelherold
246
12k
It's Worth the Effort
3n
187
28k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Music & Morning Musume
bryan
46
6.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
2.9k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8k
Into the Great Unknown - MozCon
thekraken
40
2.2k
[RailsConf 2023] Rails as a piece of cake
palkan
57
6k
Transcript
Controlling APK Size When Using Native Library
I am Brijesh Masrani @
Outline • What are the major components in APK? •
APK Splitting • What is ABI and how it works? • Understanding ABI in detail • Problems with ABI split • Solving Issues with abiFilters
What are the major components in APK? • Class files
• Resources • Manifest file • Native libraries
APK Splitting Density and Application Binary Interface (ABI)
Application Binary Interface • The ABI defines, with great precision,
how an application’s machine code is supposed to interact with the system at runtime. • You must specify an ABI for each CPU architecture you want your app to work with. • mips, mips64, X86, X86–64, arm64-v8a, armeabi, armeabi-v7a
Analysis of the APK file
APK details after adding Realm
None
Realm distribution for different CPU architecture
Realm adds .so file for 5 CPU architectures mips, X86,
X86–64, armeabi-v7a, and arm64-v8a this increases the apk size by 4.8 MB; remaining ~130KB is increased in dex size.
ABI split
None
Multiple APK files generated after enabling split
None
Amazing right! We went from 74KB to 5MB and came
back to 1.3 MB. But But But….
NDK abiFilters
APK with “armeabi-v7a” and “x86” libs
TL;DR — Detail about CPU Architecture
Google Maps with ABI filters
None
Thank You You can find me at @brijeshmasrani