8th . Download and compilation of Android 4.0 system
The first preparation of this chapterAndroiddownload and compile the environment, the content is mainly divided into: PrepareAndroiddownload and compile the environment, download source code, compile source code and kernel source code. DownloadAndroid 4.0andGoldfishThe source code includes downloading and initializingRepoTools, DownloadsAndroidSource code, other source code download, download simulatorGoldfishKernel source code. CompilingAndroidandGoldfishswitch to the kernel source.AndroidSource Directory command:$CDWorking_directory
Execute the following command to load the command and environment variables used during compilation:$source build/envsetup.sh. Androidcompilation process Analysis,GoogleThe following steps are given for the compilation process: (1)Source build/envsetup.sh:load Command (2)Lunch: Select target Platform compilation options (3)Make :perform the compilation. According toAndroidthe analysis of the start-up process indicates that the customization can be accelerated as follows: customizing local services, customizingAndroidsystem services, optimizationZygoteinitdedeclass pre-loadingpreloadclassesand resource pre-loadingpreloadresourcesmechanisms,PackagemanagerserviceScan, checkAPKinstallation package information.
InAndroidSystem Enterprise-class customization, boot-up has2type boot start mode1, the receiving system initiates the broadcast:boot_completed,implementation of application startup in broadcast receiver code2, write a desktop program, replace the system defaultLauncherapplication. Re-compilingFrameworks/base,Frameworks/ex: $source build/envsetup.sh $makererun the emulator, using the newly translatedAndroidsystem that can watch the system start up on it into ourMylauncherapplication, implementation of the desktop from the implementation of the replacement.
This chapter introduces the General compilation process of compiling Android system, after analyzing the compilation process and configuration file, focus on the specific platform under the Android system compilation and custom phone simulator ROM, and learned this knowledge by itself benefited.
8th download and compilation of Android 4.0 system