Android source code download and compilation system experience ~ Illustration

Source: Internet
Author: User

Recently, with an eye on the attention and research of android4.0, the first time I put the source code of android4.0 down is only a matter of time, so I was not able to record the process as soon as possible. Today, I will write it down as soon as it is richer, I hope to give a simple reference to the heat engine friends who are burning on the Android platform and haven't obtained relevant resources in time. Well, if you don't talk much about it, I just need to map it directly. Now it's very simple, as long as you are a Linux system, and keep its development, it is not necessary to consider the problem of the previous JDK environment, directly from the basic environment to determine it, first open the http://www.android.com:

See getting
The source, click to enter, enter the page, there is a detailed download description, needless to say, step by step, very simple, as before, first create a directory: mkdir ~ /Bin, and then set the directory path environment: Path = ~ /Bin: $ path, and then download the repo script to execute the following tasks:

$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo

Then grant the permission: chmod A + x ~ /Bin/repo: the task to be executed is OK. Next, we need to create a directory to separately store the following file: mkdir working_directory (according to the official website, name it OK by yourself), and then enter its Directory: CD working_directory. Now I will initialize which version is to be executed, so let's directly go down the main version together:

 repo init -u https://android.googlesource.com/platform/manifest
If you execute this command:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1 
The above can only download the internal source code of android4.0,
So we should execute the previous command and put down the entire 4.0 source code. After the above is OK, we can start synchronizing the source code data:
repo sync
I cut some pictures and observe them. If you have an error:
This is the start of data synchronization. Basically, there is no error in downloading, no problem, and the speed is good. However, after the download is complete, it is very large. You should note whether the space can be retained, OK, after downloading, run the following command:
I did it directly. In fact, it was carried out according to an official Google command and operation. This is the corresponding verification. Well, I will not talk about it. After the above work is completed, you can start compiling. The compilation is very simple. Google simplifies the compilation operation this time. First, you need to initialize the environment and I will directly:, then you can start compiling through make-J4,
The compilation process is slow, and the CPU is basically full,

My previous versions will not last more than three hours, but I have compiled this version for as much as 12 hours (I went to bed before, and it seems that I have to upgrade my host, IBM notebook or I3), some simple screenshots are taken in the process:

I don't know if you have checked the compilation process or the logs after compilation when compiling the source code, some code that is not strictly compiled above will be prompted. The above figure shows the prompt in external/icu4c/i18n/calendar. CPP: In the member function 'void icu_46: calendar: setweekdata (const icu_46: locale &, const char *, uerrorcode &): 3260: 88: Warning: we recommend that you add [-wparentheses] 'in front of' & 'in the' | 'operand. Don't look at this simple tip. What does it mean as a programmer, I will not break it down here. I think it is necessary to develop a good habit of encoding. OK. Let's simply cut a few pictures of the compilation process, I will not describe it in detail. If you have time, I 'd like to take a look at it again:
, When you see this figure, that is, the Declaration, compilation ends:
Compile and generate the corresponding APK, with the token en, IMG, okay. If you have a device, you can 'roast chicken 'on it, but here, I will directly start the simulator to operate it, so it will not burn. If you love to burn it, you will burn it yourself and start the simulator. It is very simple:
$ emulator
After the camera is started: You can see the page and cut a few more images. For more information, see:. Now, the camera function can be used directly in the simulator, and the search operation is more convenient, the interface is clearer:
Okay. Let's take a look at this picture. I'm studying the source code. I will share it with you later. I hope it will be helpful to some scholars in a timely manner, let's take a simple structure diagram after source code compilation:
Some images, but the last one shows the number of files and the number of directories. This number is amazing. Well, what are you waiting for? Hurry up.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.