[*] 优化
This commit is contained in:
36
docs/AOSP.md
36
docs/AOSP.md
@@ -1,38 +1,41 @@
|
|||||||
# AOSP
|
# AOSP
|
||||||
|
|
||||||
本文档内容旨在独立定制编译`AOSP`系统,非必需使用。
|
本文档内容旨在定制编译`AOSP`系统,并非必需使用。
|
||||||
|
|
||||||
## 参考文档
|
## 参考文档
|
||||||
|
|
||||||
|
* https://developers.google.cn/android/drivers
|
||||||
* https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/
|
* https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/
|
||||||
* https://source.android.google.cn/source/initializing?hl=zh-cn
|
* https://source.android.google.cn/source/initializing?hl=zh-cn
|
||||||
* https://source.android.google.cn/docs/setup/about/build-numbers?hl=zh-cn
|
* https://source.android.google.cn/docs/setup/about/build-numbers?hl=zh-cn
|
||||||
* https://developers.google.cn/android/drivers#sargosp2a.220505.008
|
|
||||||
|
|
||||||
## 机器配置
|
## 机器配置
|
||||||
|
|
||||||
* 内存`32G`
|
* 内存`32G`
|
||||||
* 十六核`CPU`
|
|
||||||
* 硬盘`300G`
|
* 硬盘`300G`
|
||||||
|
* 十六核`CPU`
|
||||||
* 系统`Ubuntu 18.xx`
|
* 系统`Ubuntu 18.xx`
|
||||||
* 公司网络`100Mbps/s`
|
* 公司网络`1000Mbps/s`
|
||||||
* 整个下载过程大概需要四到五个小时
|
* 整个下载过程大概需要三到五个小时
|
||||||
* 整个编译过程大概需要半到一个小时
|
* 整个编译过程大概需要半到一个小时
|
||||||
|
|
||||||
## 源码
|
## 源码
|
||||||
|
|
||||||
```
|
```
|
||||||
# 工具
|
# 下载目录
|
||||||
mkdir /data/android
|
mkdir /data/android
|
||||||
cd /data/android
|
cd /data/android
|
||||||
|
|
||||||
|
# 下载工具
|
||||||
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo
|
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo
|
||||||
chmod a+x repo
|
chmod a+x repo
|
||||||
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'
|
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'
|
||||||
|
|
||||||
|
# 配置GIT
|
||||||
git config --global user.email "taoyao@acgist.com"
|
git config --global user.email "taoyao@acgist.com"
|
||||||
git config --global user.name "acgist"
|
git config --global user.name "acgist"
|
||||||
|
|
||||||
# 源码
|
# 开始同步
|
||||||
./repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest -b android-12.1.0_r27
|
./repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest -b android-12.1.0_r27
|
||||||
./repo sync
|
./repo sync
|
||||||
```
|
```
|
||||||
@@ -40,22 +43,29 @@ git config --global user.name "acgist"
|
|||||||
## 裁剪
|
## 裁剪
|
||||||
|
|
||||||
```
|
```
|
||||||
# 应用
|
# app
|
||||||
build/target/product/handheld_*.mk
|
build/target/product/handheld_*.mk
|
||||||
|
|
||||||
# root
|
# root
|
||||||
|
|
||||||
# framework
|
# framework
|
||||||
```
|
```
|
||||||
|
|
||||||
## 驱动
|
## 驱动
|
||||||
|
|
||||||
`Google`官方只提供了`Nexus`和`Pixel`的驱动
|
`Google`官方只提供了`Nexus`和`Pixel`的驱动,其他机型驱动需要厂商提供。
|
||||||
|
|
||||||
## 编译
|
## 编译
|
||||||
|
|
||||||
```
|
```
|
||||||
|
# 设置环境
|
||||||
source build/envsetup.sh
|
source build/envsetup.sh
|
||||||
lunch aosp_arm64-user
|
lunch aosp_arm64-user
|
||||||
|
|
||||||
|
# 开始编译
|
||||||
make -j 16
|
make -j 16
|
||||||
|
|
||||||
|
# 打包文件
|
||||||
make udpatepackage
|
make udpatepackage
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -64,10 +74,10 @@ make udpatepackage
|
|||||||
```
|
```
|
||||||
adb reboot bootloader
|
adb reboot bootloader
|
||||||
fastboot flashall
|
fastboot flashall
|
||||||
fastboot -w update aosp_arm64-img-eng.xxx.zip
|
fastboot -w update aosp_arm64-img-user.xxx.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
## ADB命令
|
## adb命令
|
||||||
|
|
||||||
```
|
```
|
||||||
adb devices
|
adb devices
|
||||||
@@ -82,13 +92,13 @@ adb install
|
|||||||
adb uninstall
|
adb uninstall
|
||||||
```
|
```
|
||||||
|
|
||||||
## 刷机命令
|
## fastboot命令
|
||||||
|
|
||||||
```
|
```
|
||||||
fastboot devices
|
fastboot devices
|
||||||
fastboot reboot
|
fastboot reboot
|
||||||
fastboot reboot-bootloader
|
|
||||||
fastboot reboot-recovery
|
fastboot reboot-recovery
|
||||||
|
fastboot reboot-bootloader
|
||||||
fastboot erase boot
|
fastboot erase boot
|
||||||
fastboot erase recovery
|
fastboot erase recovery
|
||||||
fastboot erase system
|
fastboot erase system
|
||||||
|
|||||||
Reference in New Issue
Block a user