本文介绍Android的通用编译技巧。
手机厂商或者芯片平台可能都封装了编译脚本命令,但是基本都没有脱离Google的原始编译逻辑。Google在开发者网站对相关命令有介绍。
可以参考Google的官方文档 https://source.android.google.cn/setup/build/building
基础编译流程
对于AOSP源码来讲,通用的编译流程如下:
cd /home/tanfuhai/data/code/android
source build/envsetup.sh # Add "lunch" (and other utilities and variables)
# to the shell environment.
lunch [-] # Choose the device to target.
m -j [] # Execute the configured build.

本文详细介绍了Android系统的编译流程和常用目标,包括dist、superimage、systemimage等,以及针对framework、kernel、SELinux和property属性的修改编译方法。提供了在不同场景下的编译技巧,如快速编译systemimage、vendorimage等。
最低0.47元/天 解锁文章
7977

被折叠的 条评论
为什么被折叠?



