The Binder framework is one of the new
features that Android introduces for Linux Kernel. It is meant for
inter-process communication. Therefore, processes and thread are needed to
understand the binder framework, a thorough concept on the underlying theories,
such as multitasking.
Android is developed by the Open Handset
Alliance and Google on the basis of the Linux 2.6 standard kernel with new
features for use in mobile devices. Out of various kernel modules, Binder driver
offers a new IPC mechanism for Linux. Systems are developed by using four
programming languages. The Java native interface enables Java to overcome
obstacles in direct execution of native code.
Although The Dalvik virtual machine (DVM)
does not claim to be a Java virtual machine (JVM) due to licensing reasons but
serves the same purpose. It is well adapted to ARM hardware. This different
design principle is essential for mobile purposes with limited battery capacity.
The use of native libraries can allow bypassing the type and border checking of
the virtual machine and opens the door to stack-overflow attacks.
How does the binder framework work?
Once the DVM is started each of its new
instances is cloned a system service called Zygote. When an Android application
starts, this process enables it for the manipulation of the heap without using
the original data. It also makes a similar layout for each application.
Each application of Android is written
with up to 4 different components at a time. Each component has a special
subject for long duration purposes. The activity enables applications to
perform screening and receiving interaction created by the user. The service
component is used by Android for longer performance and all background tasks must
be done here. The content provider enables an interface to access data
like a file or network streams such as SQL-like databases. The broadcast
receiver handles the messages like ‘new message’, ‘low battery’, etc. The
application manifest stores information Android.
Different data are exchanged through
inter-component communication, or inter-process communication, provided the
specific components belong to different processes (apps). The communication
works with a basic data-structure. The operation of services is controlled by
IPC. Actually, the IPC Binder mechanism is the key technology for the
distributive system in the Android OS. There is a three-layer security measure
in Android. The basic layer consists of two partitions, called system and data.
DAC model Linux is used for separation among apps and the identification of the
author. Then the MAC model is used. This model has a set of permissions and a
set of exported services inclusive of access restrictions. The problem created
because of same UID and GID has been overcome by the system of differentiation
of apps into type A and type B.
What are the advantages of the binder framework over other operating systems?
Developed under the leadership of Dianne
Hackborn, the binder provides a richer abstraction that the traditional modern
operating system cannot provide. More specifically, the Binder imposes bindings
upon functions and data in a different execution environment. And, Android’s
Binder is a customized implementation of OpenBinder.
The Binder framework provides some
advanced facilities that a simple interprocess messaging system cannot provide.
The most crucial enhancement is that methods on remote objects can be called
like a local object method by using synchronous method call. There are some concepts
behind such facilities. Firstly, the communication model can simultaneously
work on the client service and on the server side by using a client-side proxy
and a thread pool. Secondly, sending data from one process to another process
is called transaction. During the transaction process of data, various
types of fields are used, such as cookie field, data field, target command
field etc. Moreover, this concept facilitates the implementation of the
asynchronous IPC protocol. Thirdly, from the object’s point of view, the
transaction data are called parcel. This is, actually, the transmitted
data structure. The process of parcel building is called marshaling or flattening
an object. Fourthly, the death notification is provided to a local
Binder object when a remote Binder object is terminated.
The context manager is a special
module of the Binder framework. This is needed to establish communication
between clients and remote Binder without hampering security feature of the
Binder. However, in Android, this is called service manager. An intent
is a type of message used on Java API layer by the developers. This is abstract
in this sense that the performer of the expected operation should not
necessarily be defined. The Binder is widely used in Android for communication
between processes. So, it’s a very important module. The Binder security
model secures the communication channel between the processes and
guarantees identification. It checks security matters before delivering the PID
and UID numbers.
Where is the binder framework is used? (Use of the binder framework)
Implementation of the Binder framework
includes AIDL, Java API Wrapper, JNI Wrapper, C++ Middleware and C Kernel
Driver. Kernel Driver is written in C language and is the central unit of the
Binder framework; therefore, it uses several mechanisms such as Binder Tread
Support, Binder Transactions and several others. The example of IPC Message
Flow includes Testing Environment, Message Flow, and Call Stacks.
No comments:
Post a Comment