Mainly to sort out the relationship between the program and the system, so that the program can adapt to the updated system. The program's configuration data in the system may be updated; the program's compilation cache may be cleared and updated; the system may be The new function records the program... In short, there are many things, and they are different according to each update.
To give a simple example, if a certain system adds or optimizes a function to wake it up, then it is necessary to recalculate whether each program contains a wake-up broadcast receiver, what is the wake-up time, and record this information Serves the alignment wakeup function.
First of all, to answer the original poster’s question, the optimization after updating the system is to convert the dex files in all apk in the system into odex files. Why do we need to do this operation? Let’s talk about Dalvik and ART. Before Android 4.4, we all used Dalvik, which was interpreted and executed. After Android 4.4, Google introduced the ART runtime environment, and after 5.0, it fully switched to ART. It uses a pre-compiled mechanism to The dex file is pre-converted into an odex file and the bytecode is pre-compiled into machine language, so that the application execution will be more efficient and the startup will be faster.
Mainly to sort out the relationship between the program and the system, so that the program can adapt to the updated system. The program's configuration data in the system may be updated; the program's compilation cache may be cleared and updated; the system may be The new function records the program... In short, there are many things, and they are different according to each update.
To give a simple example, if a certain system adds or optimizes a function to wake it up, then it is necessary to recalculate whether each program contains a wake-up broadcast receiver, what is the wake-up time, and record this information Serves the alignment wakeup function.
First of all, to answer the original poster’s question, the optimization after updating the system is to convert the dex files in all apk in the system into odex files.
Why do we need to do this operation? Let’s talk about Dalvik and ART. Before Android 4.4, we all used Dalvik, which was interpreted and executed. After Android 4.4, Google introduced the ART runtime environment, and after 5.0, it fully switched to ART. It uses a pre-compiled mechanism to The dex file is pre-converted into an odex file and the bytecode is pre-compiled into machine language, so that the application execution will be more efficient and the startup will be faster.