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
58
What's new in Android N
brijeshmasrani
1
220
Other Decks in Technology
See All in Technology
プロダクトのコードから見るGoによるデザインパターンの実践 #go_night_talk
bengo4com
1
2.6k
OAuthからOIDCへ ― 認可の仕組みが認証に拡張されるまで
yamatai1212
0
140
「れきちず」のこれまでとこれから - 誰にでもわかりやすい歴史地図を目指して / FOSS4G 2025 Japan
hjmkth
1
320
能登半島地震において デジタルができたこと・できなかったこと
ditccsugii
0
250
React19.2のuseEffectEventを追う
maguroalternative
2
500
Digitization部 紹介資料
sansan33
PRO
1
5.6k
Data Hubグループ 紹介資料
sansan33
PRO
0
2.2k
HonoとJSXを使って管理画面をサクッと型安全に作ろう
diggymo
0
110
CoRL 2025 Survey
harukiabe
1
220
大規模サーバーレスAPIの堅牢性・信頼性設計 〜AWSのベストプラクティスから始まる現実的制約との向き合い方〜
maimyyym
10
5k
AI時代こそ求められる設計力- AWSクラウドデザインパターン3選で信頼性と拡張性を高める-
kenichirokimura
3
350
Biz職でもDifyでできる! 「触らないAIワークフロー」を実現する方法
igarashikana
0
260
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
697
190k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
Building an army of robots
kneath
306
46k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
Side Projects
sachag
455
43k
Raft: Consensus for Rubyists
vanstee
140
7.1k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
A better future with KSS
kneath
239
18k
Scaling GitHub
holman
463
140k
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