Recently, I have received help from many other brothers and answered numerous questions similar to the following:
How to compile the android native code to get a ROM and then run it to a certain mobile phone.
As many of my brothers do not know this, I will give a simple answer here.
1 Rom contains two basic images, one of which is boot. image. This image mainly contains things in the kernel and file system/directory. I won't talk about the kernel. The/directory mainly contains the init and related configuration files.
System. image is the core of userpace In the Android system, including something in/system/bin, system/lib, and system/app.
2. Different mobile phones use different chips and configurations. In addition, the android Source Code does not contain hardware-related code. That is to say, the compiled standard source code can only run on the simulator,
You may be able to run on a real machine, but you can use your mobile phone as a simulator. The phone, audio, WiFi, and other hardware-related devices cannot be used. There is no reason for this. The hardware-related driver is the vendor's closed source code,
It cannot be released. However, Android comes with some of the HTC/sumsing binary Hal layer so, which is also copied to system. image when compiling the corresponding device.
Therefore, based on the above understanding, the brothers should not think about using the standard source code to create a ROM that can be carried out. In addition, there are AP/BP in the mobile phone. The BP code is another set, which is equivalent to another OS, used
MODEM communication. Even if you can deal with the AP, BP does not need to think about it.
How did 3 CM come out? CM is not a fairy. I guess it can be completed in the following aspects:
1 Boot. image, which may be directly based on the vendor. For example, in the HTC G7 port, the G7 official Rom is used directly.
2. In system and image, it has nothing to do with hardware (that is, non-Hal-Layer Code.
3. In system. Image, if it is related to hardware, first use ADB pull to get the official so and then put it in its own Rom. It is difficult to work here, but theoretically it can be Binary compatible.
We can see from the above that, if the official does not provide 4.0 Rom, CM will also take a rest. (I personally think it is possible to use 4.0 so in 2.3. The method can be loaded in dlopen mode, and an isolation layer is implemented in the middle. However, if
The dependent header file has changed, so the workload will increase)
4. miui is a secondary development on CM. The pull of Chinese people makes miui, snacks, and other companies clamoring for Rom.
In summary, the brothers should not think about having to build a cow ROM on their own. It is unnecessary and meaningless.
1. If you want to implement Rom, we recommend that you perform secondary development on the basis of cm, and do not touch all hardware-related tasks.
2. If you want to change the UI, you can change the image based on the existing system. image, and then package it into an image. There are many practices on the Internet. The technical content is not high. You can play with it.
Any way. Thank you for your trust. You are welcome to learn the above knowledge points and learn about argue.