1. Binder (IPC)
Linux processes must communicate with each other to share resources and information. Therefore, the operating system kernel must provideInter-process communicationMechanism (IPC, inter-process communication ).
IPC Mechanism types: Named Pipe (name pipe), Message Queue (Message Queue), signal (signal), and Memory Sharing (share memory );
The communication between applications on Android terminals is almost invisible to these IPC communication methods, instead of the binder method.
The binder is implemented through the binder driver in Linux. The binder operation is similar to thread migration. Communication between two processes is like a process entering another process to execute code, then return with the execution result. See more>
2. Why did Android introduce the Dalvik Virtual Machine mechanism at the beginning?
Dalvik is a Java virtual machine designed by Google for the Android platform. The Dalvik virtual machine is a part of the android runtime. It connects the underlying core, peripheral libraries, and upper-layer applications and provides more automatic management functions:
See more>
3. Art replaces Dalvik
In KitKat, the art mode can be switched in "Developer options", but this option is not added to Sony 4.4. The reason is that the application needs to be optimized; otherwiseCompatibilityPoor risk, and optimization will delay the release time of the new system.
The art mode is faster than Dalvik, but it also has some disadvantages:
1. It will increase the storage space occupied by the Program (not a lot ).
2. More power consumption.
However, these may be temporary. The next version of Android will officially remove Dalvik.
4. Differences between DEX and odex
Odex is an executable file extracted from the application APK on Android, that is, the classes in the APK. the Dex file is optimized to generate. odex files are stored separately. the Dex file is retained.
This can speed up the software startup, pre-extract, and reduce the usage of RAM, because without odex, the system needs to extract Dex from the APK package and then run it.
Note:In the/system/app' APK file, there is no dexfile (for example, the left side of semcclock.apk is pull from the system). We know that Dex is Android.Executable files(/Data/<package name>/There is Dex below, which is a programFirst Run).
In this way, the vendor can ensure a certain degree of anti-piracy, because the APK without the DEX file cannot be installed normally (the installation prompt "a problem occurs when parsing the package 」).
5. Use of platform. x509.pem and platform. pk8
Quote:
Many netizens may need to access some system sensitive settings. What if they do not have the root permission? Platform. x509.pem and platform. pk8 allows you to obtain system permissions. Android uses the Linux ACL control mode in System Account Security and shares system account permissions by setting shareduserid in each app, such as Android: shareduserid = "android. UID. system. See more>
I have heard of this method. I have never tried to use share UID to obtain system-level permissions. I don't know if it works in KitKat or later versions.
So much for today.
9: 35 pm