Android apps for “armeabi-v7a” and “x86” architecture: SoC vs. Processor vs. ABI
INSTRUCTION SET:
Processors are made of semiconductor dies, usually electronic-grade mono-crystalline silicon. They don't know English or any other human language, they understand only 0
and 1
. So the designer of processor tells us in what sequence of zero's and one's we can instruct that specific processor. This numerical language of instructions is standardized as Machine Language
and the set of machine instructions is called Instruction Set
. A processor can act upon only specific type(s) of instruction set.
Instruction sets can be 8/16/32/64-bit (defines how many instructions a processor can process at a time), last 2 being the common one these days.
LOW LEVEL LANGUAGES:
But writing program code (instructions) directly in machine language (the executable file) is near to impossible because it will take years to write and debug a reasonably larger program (that we can write in a few hours these days). So to put programmers at ease, Assembly Language was developed, still a processor-specific language but relatively easy to understand. Code written in Assembly Language is converted into machine code by Assembler
- a program written in Machine language. Both of these are called Low Level languages.
HIGH LEVEL LANGUAGES:
To further reduce human effort in communicating with hardware, high level languages were developed which are not bound to a specific instruction set (denoting a specific architecture). These are identical to human languages, hence easy to write, understand, debug and apply to multiple architectures. Code written in high level language is converted into low level language by Compiler
- a program written in low level language. One of the most commonly used high level languages is C. But sometimes code is not pre-compiled to machine code, instead directly executed (or compiled during execution) by Interpreter
. Java is one of such "write once, run anywhere" (WORA) languages which is compiled to byte-code
and then interpreted by Virtual Machine
- again a compiled program.
APPLICATION BINARY INTERFACE (ABI):
Since an architecture-independent program (code) can be converted to architecture-dependent code for any processor, it's the duty of compiler to take care of all the requirements of a specific architecture. That's what Application Binary Interface (ABI) defines. In simple terms, an ABI represents one or more specific architectures. Further details on Embedded ABIs require an insight into stages of Assembling and Compiling; object code, Executable and Linkable Format (ELF), static (archiving) and dynamic linking of libraries etc.
Now coming to your question:
WHAT ARE x86
AND ARM
?
x86 is a family of instruction sets, mainly developed and manufactured by Intel and AMD. ARM is another family, designed by a single entity ARM Holdings
and being licensed to many embedded solution manufacturers including Qualcomm, Mediatek, Samsung and Huawei. Snapdragon, Exynos and Kirin are their brand names. They are not processor manufacturers but they have licenses to include ARM processors with their own System on Chip (SoC) circuits.
WHAT IS SoC?
A System on Chip (SoC) is a small circuit that includes processors along with other components such as GPU, RAM, Flash/eMMC (equivalent of HDD or SSD), WiFi and bluetooth module, USB connectivity, UART (serial ports), JTAG (a very lower level serial communication protocol), GPS, modems (for cellular connectivity) and possibly others.
ARM ABIs:
Though the major part of Android apps is written in Java, one can program in native languages like C and C++, which needs to be compiled. Android provides its own Native Development Kit (NDK) including (libraries, header files and) a compiler that can compile code for multiple ABIs including armeabi-v7a
(armhf
in Linux community) and x86
.
Android (Java) app itself isn't specific to an architecture. During app build process Android SDK converts Java source to bytecode (.class
files) and then compiles it to Dalvik EXecutable (.dex
) file which is packed with .apk
files. This Dalvik bytecode is interpreted and run in a separate instance of Dalvik Virtual Machine
/ART
for every app by a process named Zygote
. Or it can be permanently compiled to native machine code (.odex
or .oat
) according to the architecture of the device during installation of app (or later). But if the apk (zip) file additionally contains ELF binaries/libraries, those are architecture-specific. Developers usually include native libraries for multiple architectures in their apps.
Native applications/programs/binaries/executable/libraries built with compiler suites targeting ARM Embedded ABI v7a
(armeabi-v7a) can be run on Application profile of 7th version of ARM processors
(Armv7-A).
Code compiled with toolchains provided by other vendors, targeting same architecture (though with different ABI names) should also run on Android devices.
32-BIT VS. 64-BIT:
ARM processor can be 32-bit or 64-bit. It depends on SoC manufacturers what they want to build with their embedded system e.g. Snapdragon can be 32-bit or 64-bit. 32-bit ARM processors were improved for performance and new capabilities were added from version 2 to version 7. 64-bit support was introduced in ARMv8.
To find out if a device is 32-bit or 64-bit, you need to check the specifications of its SoC and then of its processor. For instance SoC in Redmi Note 4 is Qualcomm Snapdragon 625 (MSM 8953), which contains processor Cortex-A53
. It's evident from technical specifications of Cortex-53 that it's based on ARMv8
architecture, which can process 2 types of Instruction Sets: aarch64
(which Android's arm64-v8a ABI uses) and aarch32
(which Android's armeabi-v7a ABI uses i.e. backward compatible with ARMv7
).
So it can run binaries/libraries compiled for both of these ABIs, but not for x86 or armeabi
(called armel in Linux community; which targeted architecture ARMv5/v6
, and was removed in NDK r17
).
source from:
Android apps for “armeabi-v7a” and “x86” architecture: SoC vs. Processor vs. ABI的更多相关文章
- Android Apps开发环境搭建
一 Android开发工具简介 用于Eclipse的Android开发工具(AdnroidDeveloper Tools,简称ADT)插件提供了专业级别的开发环境,利用该环境来构建AndroidApp ...
- Building Android Apps 30条建议
Building Android Apps — 30 things that experience made me learn the hard way There are two kinds of ...
- FFmpeg: mac下手动编译android上使用的FFmpeg(支持x86、armeabi-v7a、arm64-v8a)
之前一直在linux下编译FFmpeg,最近换电脑了,尝试了下在mac下编译ffmpeg,特记录之. 一. 准备工作 1. 下载FFmpeg.(http://ffmpeg.org/download.h ...
- Multi-threading Android Apps for Multi-core Processors – Part 1 of 2
Can my single-threaded application benefit from multiple cores? How? Even a single-threaded applicat ...
- 创建Android Apps的30个经验教训
这个世界上有两种人-从经验教训中学习的人以及听从别人建议的人.这里是我一路走来学到的一些东西,分享给大家: 在添加任何第三方party之前,请三思:这真的是一个成熟的项目吗? 如果一个东西用户看不到, ...
- Android 关于arm64-v8a、armeabi-v7a、armeabi、x86下的so文件兼容问题
Android 设备的CPU类型(通常称为”ABIs”) 引用: https://blog.csdn.net/ouyang_peng/article/details/51168072 armeabiv ...
- 关于Android开发中Arm、X86和Mips(草稿)
一.架构 1.Arm架构 是一个32位精简指令集(RISC)处理器架构,其广泛地使用在许多嵌入式系统设计. 2.X86架构 是一个intel通用计算机系列的标准编号缩写,也标识一套通用的计算机指令集合 ...
- armeabi,armeabi-v7a ,x86 和mips 都是什么?
首先要明白ABI的概念: ABI(Application Binary Interface)实际就是指应用程序基于哪种指令集来进行编译,我们能用到的ABI 也就四种 armeabi,armeabi ...
- Android NDK: Application targets deprecated ABI(s): armeabi Open File
Error:(81) Android NDK: Application targets deprecated ABI(s): armeabi Error:(82) Android NDK: Suppo ...
随机推荐
- WPF DataGrid 使用CellTemplateSelector 时SelectTemplate方法Item参数为NULL
首先说明 在SelectTemplate中并Item参数并不是真的一直为Null.而是先执行空参数,之后再会执行有参数的. 至于原因 我也不知道... 具体验证过程是 也就说 做好非空检测即可
- 【Python3爬虫】最新的12306爬虫
一.写在前面 我在以前写过一次12306网站的爬虫,当时实现了模拟登录和查询车票,但是感觉还不太够,所以对之前的代码加以修改,还实现了一个订购车票的功能. 二.主要思路 在使用Selenium做模拟登 ...
- winform按钮美化(非图片)
在开发过程中,突然发现vs自带的按钮属性中通过修改Button控件的BackColor的颜色和字体颜色(ForeColor属性)及大小,如下图 就能达到简单美化按钮的效果,下面是显示效果 有兴趣的同学 ...
- 调试 Go 的代码生成
原文:https://studygolang.com/articles/19815 这是一个创建于 2019-04-17 23:12:26 的文章,其中的信息可能已经有所发展或是发生改变. 2016 ...
- 二、NodeJS入门——准备工作(2)——MongoDB安装以及客户端Robomongo安装和使用
目录 1.介绍 2.下载地址 3.MongoDB安装过程 4.MongoDB的使用 5.MongoDB添加管理员账户 6.RoboMongo安装过程 ...
- sqlserver 远程链接
远程链接的文档就不说了,网上好多. 这里就说下我遇到的情况,如果是阿里云的服务器的话,他的端口配置都是要到阿里云里的安全组里去配置的,第一次一直没想到,搞了一天才发现,在这里提醒各位好友.
- QML 移动端适配一个参考思路
参考: Qt Quick 准确的移动平台屏幕适配 qt qml 高宽自动适配android设备 QML 从无到有 (移动适配) 思路:以一个平台分辨率为基准(如320*480),考虑其与其它平台的比例 ...
- 如何开发出成功的iOS应用(流程图)
转自:http://mobile.51cto.com/hot-307342.htm 近来,肥沃的应用开发土壤不断孕育出一个个振奋人心的故事,成千上万的人都觊觎从这个机遇无限的领域中分一杯羹.虽然现在的 ...
- Android 中发送邮件
第一步.导入第三方jar包 Android实现发送邮件,首先需要依赖additional.jar.mail.jar和activation.jar这3个jar包. Google提供了下载地址:https ...
- CDA数据分析【数据收集】
一.机器收集数据 机器收集数据会从不同角度对数据进行抓取和采集,与之前手动收集数据不同,机器收集数据不再是用小样本.特定样本来采集和分析整体数据,而是采用大样本或整体数据进行分析,这打破了原来的数据分 ...