Android reverse dedicated ROM creation (continuous improvement...)

Rom is the flashing package, which consists of img format files, and these imgs are compiled by major mobile phone manufacturers based on Android source code, and some of their own codes are added in the compilation process, and various systems are finally derived :MIUI, EMUI, ColorOS, etc., and these systems are not open source. Since we want to build our own ROM, it must be based on open source. In this case, only the son of Google is the only one, and after understanding by Taobao Xianyu , I found that these devices are a bit expensive, so I can only find another way. After a period of searching, I finally found that the Android system has been integrated into the embedded field. Many developers have made development boards that can be flashed into the Android system. , And have open sourced the Android source code for its transplantation. For this reason, I bought a Jiuding RK3288 development board from Xianyu, and it is on the way...

.......After a day’s time, it has arrived, the test functions are normal, the test can normally flash the img firmware, the firmware is really small, only 500M, compared to the mobile phones of the big manufacturers, this kind of firmware is really suitable for testing However, there is an episode in the process of flashing the img. The official tutorial actually has an error. If you press recovery, you can display a loader device, and then when flashing the firmware, it always prompts that the device does not match, and then just follow my own ideas Here comes, I don’t think there is still a bootloader mode, and then I reboot the bootloader to execute it, and sure enough, I found a loader device, this official tutorial is really a pit, it seems that it is not written by a professional

Android source code compilation

I got stuck at the beginning of the compilation. The same problem is the same as the ubuntu version mentioned in the switching tutorial.

.......Downloading openjdk7 is a big problem, the official mirror source download always reports some inexplicable problems

......No way, just download the deb, and finally installed it, but it says that the system has installed openjdk11 and needs to uninstall and restart

......After restarting, start to execute the compilation command

......I just found one compiled under deepin, https://bbs.deepin.org/forum.php?mod=viewthread&tid=149812&extra=

Found a good way to download jdk in the comments: https://sdkman.io/jdks

......Okay, it feels better to compile with deepin

......The downloaded G source code was accidentally deleted, and you have to download it again

......After thinking about it, why is it so difficult to compile? Isn't it because of the environment configuration problem before compiling? Why can't it be compiled offline? There is an article I took https:// blog.csdn.net/qq_26914291/article/details/102659870

After two weeks of hard work, I finally compiled the img file that can run normally. Burning into the development board can already run normally. Next, I will record the key points in the compilation process.

First: Be sure to check the md5 value of the downloaded file to ensure the integrity of the file, otherwise there may be some strange problems during the later compilation, and no solution can be found

Second: If an error is reported after more than an hour of compilation, you can try to recompile

Third: If the compressed package name contains git characters, you will not see the file after decompression, you need to use the git command to export the file

Next, I will start my rom building journey

----2019-11-8------Update

I found that Nexus5 is super cheap and only more than 200, and you can flash the system between Android4.4-6.0.1, that’s great, then you don’t need that development board (when the development board was bought back, I found that I had to buy a camera ( 200 yuan), plus this development board has reached a total of more than 500, and it is bulky and not suitable for carrying), and then will be operated on this Nexus5

From this article ( https://source.android.com/source/build-numbers ) you can find the source code version corresponding to the model

From this article ( https://www.cnblogs.com/hixin/p/6884160.html ) can teach you how to compile the system source code

Source code modification

 

 

 

reference

Guess you like

Origin blog.csdn.net/qq_26914291/article/details/102477617