Due to some work needs, ROM development on the Android platform is required. during the development process, the official documentation is very simple and there are many problems. Therefore, we need to organize the complete personal development process, share it with you. please correct me if you have any questions.
To compile a custom Android ROM, the first step is to build a reasonable hardware and software development environment. I. hardware development environment: 16 GB memory or above, high-performance CPU: it takes about half an hour to compile Android 2.3 with 8 GB memory PC, and a small-scale modification and re-compilation will take about 5 minutes; it takes about 80 minutes for Android 4.2 to compile for the first time. If Android 4.0 ROM is developed, use the above configuration. If more advanced configurations are required for compiling Android ROM, increase the compilation speed by considering that the source code of Android is about 10 Gb, therefore, we use idle 64 GB memory and two 64-bit E5620 CPU servers for development. 64-bit machine: To compile Android 2.3.x and later versions, the CPU requirement is 64-core. A single Andoid version requires about GB of Hard Disk Space: Each Android version requires about GB of space, mainly temporary files after compilation. Each version needs to be compiled separately for each device, it takes about 30 GB to compile a single device, and about GB of hard disk space is required to be compatible with all models. Ii. Software Development Environment: Operating System: Ubuntu 10.04 64-bit Desktop is relatively stable. Because Ubuntu 10.04 is no longer under maintenance, Google is running Ubuntu LTS (12.04 64-bit). We recommend that you select Ubuntu 10.04 64-bit. Note 1: if a problem occurs when a dual system or Ubuntu is installed on the new version of the notebook, use the GParted tool of the ubuntu Maintenance Disk to delete the Partition Table of the Native Windows system and format the entire hard disk. NOTE 2: server configuration. For various reasons, you can only use the server for development. Therefore, you need to configure some network and VNC to configure the network environment: Configure IP and DNSvim/etc/networking/interfaces
Auto eth0
Iface eth0 inet static
Address 10.109.254.15
Netmask 255.255.255.0
Gateway 10.109.254.1
# Dns-nameservers 10.3.9.4 10.3.9.5Configure DNSvim/etc/resolv. conf
Nameserver 10.3.9.4
Nameserver 10.3.9.5Restart the Network/etc/init. d/networking restart to install ssh.
Sudo apt-get install ssh
Install VNC
sudo apt-get install vnc4server
Vncserver: 3 check the use of df-h in the hardware environment to check the disk space usage and ensure that/home has sufficient space. Software Environment python: 2.6 or 2.7GNU Make: strict requirements 3.8.1JDK 1.6 Because Ubuntu 12.04 does not support Oracle JDK apt installation, the following provides the Installation Method
Sudo add-apt-repository ppa: webupd8team/java
Sudo apt-get update
Sudo apt-get install oracle-java6-installerNote: 1.6 JDK 69M download takes a long time of 10 ~ 30 minutes. Git 1.8.1 and later support https synchronization. git provides the latest version of git installation.
Sudo add-apt-repository ppa: git-core/ppa
Sudo apt-get update
Sudo apt-get install gitNote:
It takes 5 to 5 minutes to download 23 m ~ 10 minutes
You are expected to configure global settings after installing the new installation method.
Git config-global user. email "you@example.com"
Git config -- global user. name "Your Name"Ccache
Sudo apt-get install ccacheSet PATHvim ~ /. Add bashrc
Export USE_CCACHE = 1Source ~ /. Bashrc test setting successful: echo $ USE_CCACHE install related package
Sudo apt-get install git-core gnupg flex bison gperf build-essential \
Zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
X11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
Libgl1-mesa-dev g ++-multilib mingw32 tofrodos python-markdown \
Libxml2-utils xsltproc
For more details, please continue to read the highlights on the next page: