AOSP 源码编译与刷机

镜像源:

清华大学AOSP镜像:AOSP | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

中科大AOSP镜像:AOSP(Android) 镜像使用帮助 - LUG @ USTC

一、Repo配置
mkdir ~/bin

PATH=~/bin:$PATH

curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo

chmod +x repo

并将如下内容放入到~/.bashrc文件中

export REPO_URL=‘https://mirrors.tuna.tsinghua.edu.cn/git/git-repo’

二、下载源码

先找到自己手机(3XL)对应的分支:代号、标记和 build 号 | Android 开源项目 | Android Open Source Project

repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest -b android-10.0.0_r30

如果想编译原生镜像给手机用,因为手机涉及到真实的驱动程序,需要先确定某个手机的驱动版本和android系统版本是否匹配

先去查看出手机型号对应的驱动程序,地址:Driver Binaries for Nexus and Pixel Devices | Google Play services | Google Developers

根据之前找到的分支型号:QQ2A.200305.002找到手机3XL对就的驱动

接下来就是:

repo sync

注:可用下载脚本

#!/bin/bash

repo sync

while [ $? = 1 ]; do

echo “sync failed, re-sync again

sleep 3

repo sync

done

三、解压缩驱动文件

把以上两文件解压得到

extract-google_devices-crosshatch.sh

extract-qcom-crosshatch.sh

四、开始编译

1.source build/envsetup.sh

2.lunch

3.make -j8

维智物联全域定位,提供高性价比泛在网络定位服务,多终端适配、多平台集成、多网络融合

WAYZ LOT服务平台

https://lothub.newayz.com/
————————————————

原文链接:https://blog.csdn.net/weixin_36931768/article/details/127092102

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值