Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Compilation Analysis of Android4.4 Old Source Code

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "Android4.4 old source code compilation and analysis". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

In the network disk directory, "iTOP4412 development board data collection (excluding CD contents)\ iTOP-4412 development board system source"

Download Android4.4.4 files in Code and Image (other)\ android_4.4.4 Source Code and corresponding Kernel Source Code

System, and download uboot through github (the uboot source code of Android4.4 is exactly the same as Android4.0.3)

And kernel source code (see Appendix VI).

5.4.2.1 compilation of uboot

Android4.4.4 corresponds to uboot source code, compiler, parameter configuration, compilation script, compilation parameters and

Android4.0.3 's uboot is all exactly the same.

5.4.2.2 compilation of Linux kernel

Source code directory

Download the source code corresponding to Android4.4.4 on the network disk. On the iTOP-4412 development board system source code and mirror image (its

He) "→" android_4.4.4 source code and mirror "directory.

Compiler

The Android4.4.4 kernel compiler is exactly the same as the Android4.0.3 kernel compiler.

Parameter configuration

Kernel compilation is a combined configuration file, the basic configuration file name is "config_for_android_YY", YY table

Instead, use the parameters shown in the following table.

As shown in the table above, if you need Android4.4.4 to support WiFi, you need to configure the corresponding parameters.

Examples of compiling and generating kernel images

Like the Android4.0.3 kernel, if you need to compile the kernel corresponding to the core board, first use the cp command to match the

Overwrite ".config" and then execute the compile command "make zImage".

The directory where the kernel image is generated is also "arch"-- > "arm"-- > "boot".

5.4.2.3 compilation of Android4.4.4

Android4.4.4 source code in the network disk "iTOP-4412 development board system source code and mirror (other)\ android_4.4.4"

The source code and the corresponding Kernel source code are downloaded from the directory, and the compiler and parameter configuration are exactly the same as Android4.0.3.

Update environment javap

To compile Android4.4.4, a "javap" command is also missing. Use the command:

"update-alternatives-install" / usr/bin/javap "" javap "

"/ usr/lib/jvm/jdk1.6.0_43/bin/javap" 1 "

Update, as shown in the following figure.

Source code download

The source code of the kernel can also be downloaded from github. For more information, please refer to Appendix 6.2 of the user's manual.

Android4.4 corresponds to the download address of kernel source code github.

The appendix to the user manual describes how repo downloads the Android4.4 source code, but starting from this year (2016)

Repo is often unable to download and use. Therefore, it is best to download the source code from the Baidu network disk (compiled by the directory reference user manual).

Translation chapter), select the directory with the latest date to download.

The source code package in the network disk is generally the gz suffix, 7z or rar suffix. The gz suffix can be decompressed directly under Ubuntu.

For both 7z and rar suffixes, you need to extract the gz suffix package under windows and then decompress it under Ubuntu.

Kernel and Android source path

When compiling Android4.4 source code, be sure to pay attention to the directory of the kernel source code. In and Android source directory

Under the same level directory of "iTop4412_KK4.4_git", create a new kernel directory, and then put the kernel source code into

Under the kernel directory, use the default file name "iTop4412_Kernel_3.0".

For example: under the source directory of Android4.4, use the command

"ls.. / kernel/iTop4412_Kernel_3.0/", as shown in the following figure, the kernel directory is correct.

In addition, before compiling Android4.4, the kernel corresponding to Android4.4 must be compiled successfully.

Then go to the folder "iTop4412_KK4.4" after decompressing the Android4.4.4 source code, and use the command

". / build_android.sh", run the one-click compilation script to start compiling Android4.4.4. Note: compile

Android4.4.4 must ensure that more than 3G memory is provided to Ubuntu systems. The meaning of "providing more than 3G memory"

Thinking is not just about setting up the allocation of 3G memory in the VMware Workstations virtual machine. For example, the user is compiling the

At that time, the total memory of the PC machine is 4G, and the 3G memory is set to be allocated in the virtual machine, but under the Windows system,

With QQ, antivirus software, music player, browser, etc., it takes up almost 2 gigabytes of memory under Windows.

Then the virtual machine is automatically adjusted to occupy only 2 gigabytes or even less than 2 gigabytes of memory, which cannot be compiled and passed.

The correct way to allocate memory is to first allocate more than 3G memory to the virtual machine, and then turn it off under Windows as much as possible.

If there are more unnecessary applications, turn off the background programs for as many applications as possible.

Of course, if the user's PC is 8 gigabytes or 16 gigabytes of memory, whatever you want.

As shown in the following figure, the compilation is complete. In the folder

In "iTop4412_KK4.4/out/target/product/smdk4x12", generate the image "system.img" and

"ramdisk-uboot.img".

Users completely follow the steps to compile the error. You can use "df-l" to check how much space is left in the drive letter, as follows

As shown in the figure, if 100% has been used, there is not enough space.

This is the end of the content of "compilation and Analysis of Android4.4 Old Source Code". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report