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
110
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
Winning at PHP in Production in 2025
beberlei
1
280
正式リリースされた Semantic Kernel の Agent Framework 全部紹介!
okazuki
1
1k
newmo の創業を支える Software Architecture と Platform Engineering
110y
1
210
エンジニアリングで組織のアウトカムを最速で最大化する!
ham0215
1
300
Serverlessだからこそコードと設計にはこだわろう
kenichirokimura
2
900
Compose におけるパスワード自動入力とパスワード保存
tonionagauzzi
0
210
AndroidアプリエンジニアもMCPを触ろう
kgmyshin
2
640
本当に必要なのは「QAという技術」だった!試行錯誤から生まれた、品質とデリバリーの両取りアプローチ / Turns Out, "QA as a Discipline" Was the Key!
ar_tama
9
4k
データベース04: SQL (1/3) 単純質問 & 集約演算
trycycle
PRO
0
730
TanStack Start 技術選定の裏側 / Findy-Lunch-LT-TanStack-Start
iktakahiro
0
100
続・やっぱり余白が大切だった話
kakehashi
PRO
2
300
MySQL Indexes and Histograms – How they really speed up your queries
lefred
0
150
Featured
See All Featured
Six Lessons from altMBA
skipperchong
28
3.8k
How to Ace a Technical Interview
jacobian
276
23k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
Automating Front-end Workflow
addyosmani
1370
200k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
47
2.7k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Designing for humans not robots
tammielis
253
25k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.5k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Building an army of robots
kneath
305
45k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
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