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
120
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
57
What's new in Android N
brijeshmasrani
1
220
Other Decks in Technology
See All in Technology
ハードウェアとソフトウェアをつなぐ全てを内製している企業の E2E テストの作り方 / How to create E2E tests for a company that builds everything connecting hardware and software in-house
bitkey
PRO
1
140
【NoMapsTECH 2025】AI Edge Computing Workshop
akit37
0
180
下手な強制、ダメ!絶対! 「ガードレール」を「檻」にさせない"ガバナンス"の取り方とは?
tsukaman
2
450
DroidKaigi 2025 Androidエンジニアとしてのキャリア
mhidaka
2
280
大「個人開発サービス」時代に僕たちはどう生きるか
sotarok
20
10k
Practical Agentic AI in Software Engineering
uzyn
0
110
2つのフロントエンドと状態管理
mixi_engineers
PRO
3
110
「Linux」という言葉が指すもの
sat
PRO
4
130
2025年夏 コーディングエージェントを統べる者
nwiizo
0
170
Django's GeneratedField by example - DjangoCon US 2025
pauloxnet
0
150
allow_retry と Arel.sql / allow_retry and Arel.sql
euglena1215
1
170
Generative AI Japan 第一回生成AI実践研究会「AI駆動開発の現在地──ブレイクスルーの鍵を握るのはデータ領域」
shisyu_gaku
0
270
Featured
See All Featured
Optimizing for Happiness
mojombo
379
70k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
840
It's Worth the Effort
3n
187
28k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Rails Girls Zürich Keynote
gr2m
95
14k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Being A Developer After 40
akosma
90
590k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
Docker and Python
trallard
45
3.6k
GraphQLとの向き合い方2022年版
quramy
49
14k
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