Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
170
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
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
生成AI・AIエージェント時代、データサイエンティストは何をする人なのか?そして、今学生であるあなたは何を学ぶべきか?
kuri8ive
2
2.1k
学習データって増やせばいいんですか?
ftakahashi
1
240
AI時代におけるアジャイル開発について
polyscape_inc
0
130
AI 駆動開発勉強会 フロントエンド支部 #1 w/あずもば
1ftseabass
PRO
0
210
Agentic AI Patterns and Anti-Patterns
glaforge
1
200
第4回 「メタデータ通り」 リアル開催
datayokocho
0
120
Edge AI Performance on Zephyr Pico vs. Pico 2
iotengineer22
0
110
Overture Maps Foundationの3年を振り返る
moritoru
0
160
Ruby で作る大規模イベントネットワーク構築・運用支援システム TTDB
taketo1113
1
210
EM歴1年10ヶ月のぼくがぶち当たった苦悩とこれからへ向けて
maaaato
0
270
ブロックテーマとこれからの WordPress サイト制作 / Toyama WordPress Meetup Vol.81
torounit
0
490
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The Invisible Side of Design
smashingmag
302
51k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
Leading Effective Engineering Teams in the AI Era
addyosmani
8
1.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Become a Pro
speakerdeck
PRO
31
5.7k
The Cult of Friendly URLs
andyhume
79
6.7k
Fireside Chat
paigeccino
41
3.7k
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