Current location - Quotes Website - Personality signature - How to transplant audio driver to android4.4
How to transplant audio driver to android4.4
Taking Xiaomi as an example, this paper explains how to transplant the brush package to Android phone.

First of all, clearly understand the hardware configuration of this model, that is, the motherboard platform scheme, resolution and so on. Generally, the success rate of ROM package transplantation of the same series of different models of CPU is higher.

Select the appropriate base package and transplant package, and the base package and transplant package should be as homologous as possible.

Find out the difference between the basic package and the transplant package: The purpose is to understand what changes need to be made to make other models of ROM available on your own model, and make a cross-comparison among the basic package, the native package and the transplant package.

Card ROM condition:

The computer must be the ROOT user first.

There must be a supported third-party recovery. If there is no third-party recovery, the transplant can only be extracted from the machine in reverse.

ROM supports card swiping. For Xiaobai, card swiping ROM is also the most convenient.

Transplant ideas and steps:

The underlying hardware drivers are different (kernel).

Delete the boot.img (kernel) in the migration package and the modules folder under system\lib. Replace the kernel file of this model.

The key configuration is different (key value).

Replace the keychars and keylayout folders under the migration package system\usr with folders of this model.

Different sensors (drive types)

Replace the hw folder under the migration package system\lib with a folder of this model.

Different system configuration files (driver classes)

Replace the four folders of Bluetooth, Firmware, Permission and wifi under the migration package system\etc with the folders of this model (if any);

The modem.img in the firmware is the baseband file responsible for communication! The files in the module are the underlying boot drivers. As long as these two places are replaced by KIS 1, this ROM can boot into the system normally, and there is a signal!

There are also enhanced.conf, media_profiles.xml (multimedia configuration file, i.e. audio-visual configuration file) and vold.fstab (storage partition configuration file);

Finally, pay attention to whether there are vendors and wifi folders under the system, which can be compared and modified directly with the file comparator;

Modify the build.prop (property)

Directly modify user-defined content, such as model, date, version number, etc. You can modify this parameter if you understand it. If you don't understand, it is recommended not to move, but to modify the model, date, version number, etc.

Modify the updater script (brush script)

Different models of ROM, the partition mount and format commands contained in the brush script are different. If you use it directly without modification, and mount and modify the partition that should not be changed, the mobile phone is at risk of brick replacement, provided that you know the partition structure of your machine.

There is a verification model at the beginning of the script. Please delete it. For example, assert (getprop) = = get * * x || getprop = =

Make fun of **xx)

This is the code to verify the model. If not, ignore it or change it to your own machine name. ROM package test; Packaging test, generally, if the kernel is compatible with the library file, and the library file is compatible with the upper framework, at least it can be turned on after brushing.

If the card is stuck above the fold, analyze the reasons and make a little investigation, mainly to see whether there is any problem with the updater-script script, whether the kernel has been replaced, and whether the library files such as sensors have been reasonably replaced.

Subsequent BUG fixes are mainly carried out in folders such as etc, lib and lib\hw.

Audio, camera, sensor, lighting. Wireless wifi, Bluetooth Bluetooth ... which one doesn't work properly, search KIS 1 driver with these English words and replace it!