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
Witchcraft for Memory
pocke
1
300
mrubyと micro-ROSが繋ぐロボットの世界
kishima
2
240
Javaで作る RAGを活用した Q&Aアプリケーション
recruitengineers
PRO
1
110
GitHub Copilot の概要
tomokusaba
1
130
セキュリティの民主化は何故必要なのか_AWS WAF 運用の 10 の苦悩から学ぶ
yoh
1
130
本が全く読めなかった過去の自分へ
genshun9
0
230
2年でここまで成長!AWSで育てたAI Slack botの軌跡
iwamot
PRO
4
700
LinkX_GitHubを基点にした_AI時代のプロジェクトマネジメント.pdf
iotcomjpadmin
0
170
25分で解説する「最小権限の原則」を実現するための AWS「ポリシー」大全 / 20250625-aws-summit-aws-policy
opelab
9
1.1k
SalesforceArchitectGroupOsaka#20_CNX'25_Report
atomica7sei
0
160
フィンテック養成勉強会#54
finengine
0
180
エンジニア向け技術スタック情報
kauche
1
250
Featured
See All Featured
Adopting Sorbet at Scale
ufuk
77
9.4k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
A Tale of Four Properties
chriscoyier
160
23k
Building Applications with DynamoDB
mza
95
6.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.4k
GitHub's CSS Performance
jonrohan
1031
460k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
790
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.8k
Music & Morning Musume
bryan
46
6.6k
Facilitating Awesome Meetings
lara
54
6.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
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