Skip to content

天楚锐齿

人工智能 云计算 大数据 物联网 IT 通信 嵌入式

天楚锐齿

  • 下载
  • 物联网
  • 云计算
  • 大数据
  • 人工智能
  • Linux&Android
  • 网络
  • 通信
  • 嵌入式
  • 杂七杂八

使用GitBash同步android AOSP源码以及使用国内镜像来做本地AOSP镜像

2020-09-19

通过国内Android AOSP镜像来做本地镜像:

参考(国内清华和中科大两个镜像站点的地址):
https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/
https://lug.ustc.edu.cn/wiki/mirrors/help/aosp/

先安装git。

配置缓存大小为1GB-1:
# git config –global https.postBuffer 1073741823
# git config –global http.postBuffer 1073741823
# git config –global git.postBuffer 1073741823
配置git用户信息:
# git config –global user.name “Max Shu”
# git config –global user.email “maxshu_cn@163.com”

安装repo:

# curl https://storage.googleapis.com/git-repo-downloads/repo > ~/repo
# sudo mv ~/repo /bin/repo
# sudo chmod a+x /bin/repo

镜像并同步:

# mkdir /AOSP_mirror
# cd /AOSP_mirror
# repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest –mirror –repo-url=https://mirrors.tuna.tsinghua.edu.cn/git/git-repo
或者:# repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/aosp/mirror/manifest –mirror
# repo sync
执行多次,一直到同步完成(以后需要定期同步)。
查看一下从哪里镜像过来的:
# vi .repo/manifests.git/config
[remote “origin”]
        url = git://mirrors.ustc.edu.cn/aosp/platform/manifest
        fetch = +refs/heads/*:refs/remotes/origin/*

做本地git://镜像:

# yum install git-daemon
# git daemon –verbose –export-all –base-path=/AOSP_mirror
测试下:
(到别的目录或机器执行克隆)$ git clone git://172.18.1.23/device/google/bonito-kernel
启动到后台(默认端口为9418):
# git daemon –verbose –export-all –base-path=/AOSP_mirror  –detach

到其他机器上测试:

$ repo init -u git://172.18.1.23/platform/manifest –repo-url=https://mirrors.tuna.tsinghua.edu.cn/git/git-repo
$ repo sync

替换已有代码里面的https://镜像为git方式:

$ vi .repo/manifests.git/config
[remote “origin”]
#       url = http://aosp.tuna.tsinghua.edu.cn/platform/manifest
        url = git://172.18.1.23/platform/manifest
        fetch = +refs/heads/*:refs/remotes/origin/*
或者:
$ git config –global url.git://172.18.1.23/.insteadof    https://android.googlesource.com
$ git config –global url.git://172.18.1.23/.insteadof    http://android.googlesource.com
少量的则可以修改android AOSP的url为国内镜像的来下载也可以:
$ git config –global url.https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/.insteadof    https://android.googlesource.com

使用GitBash同步Adnroid的AOSP源码:

必须使用系统管理员方式打开GitBash。

设置代理,以便能访问adnroid aosp网站:

$ export http_proxy=”127.0.0.1:1080″
$ export https_proxy=”127.0.0.1:1080″

安装repo:

$ mkdir aosp
$ cd aosp
$ wget https://storage.googleapis.com/git-repo-downloads/repo
$ chmod a+x ./repo

配置缓存大小:

$ git config –global https.postBuffer 2147483648
$ git config –global http.postBuffer 2147483648

初始化是否能行:

$ ./repo init -u https://android.googlesource.com/platform/manifest
如果pgp校验出错(gpg: keyblock resource ‘/e/Work/AOSP_mirror/.repo/repo/C:\Users\maxsh/.repoconfig\gnupg/pubring.kbx’: No such file or directory):
$ cd .repo/
$ git clone https://gerrit.googlesource.com/git-repo
$ rm -rf repo/
$ mv git-repo repo
$ cd ..

重新初始化:

$ ./repo init -u https://android.googlesource.com/platform/manifest

同步:

$ ./repo sync
可能执行多次,一直到同步完成。
216次阅读

Post navigation

前一篇:

Android9下用ethernet 的Tether模式来做路由器功能

后一篇:

Android下的socket怎么区分不同Network的

1条评论

  1. maxshu说道:
    2020-09-19 12:01

    这个好

    回复

发表评论 取消回复

电子邮件地址不会被公开。 必填项已用*标注

个人介绍

需要么,有事情这里找联系方式:关于天楚锐齿

=== 美女同欣赏,好酒共品尝 ===

微信扫描二维码赞赏该文章:

扫描二维码分享该文章:

分类目录

  • Linux&Android (72)
  • 下载 (28)
  • 云计算 (36)
  • 人工智能 (8)
  • 大数据 (23)
  • 嵌入式 (25)
  • 杂七杂八 (34)
  • 物联网 (49)
  • 网络 (22)
  • 通信 (20)

文章归档

近期文章

  • Windows下安装QEMU并在qemu上安装ubuntu和debian
  • Android下使用pm disable命令或package-restrictions.xml配置文件来禁止某个app的使用或自启动
  • 使用gperftools和btrace来分析java的堆外内存泄露
  • Android下的socket怎么区分不同Network的
  • 使用GitBash同步android AOSP源码以及使用国内镜像来做本地AOSP镜像

近期评论

  • maxshu发表在《腾讯云主机默认配置下/run分区空间占满的问题》
  • llipengbo发表在《腾讯云主机默认配置下/run分区空间占满的问题》
  • maxshu发表在《使用GitBash同步android AOSP源码以及使用国内镜像来做本地AOSP镜像》
  • 林先生发表在《支持农历提醒的生日提醒、节假日提醒app》
  • max发表在《ARM交叉编译环境》

阅读量

  • 使用Android的HIDL+AIDL方式编写从HAL层到APP层的程序 - 3,413次阅读
  • 车机技术之Android Automotive - 2,887次阅读
  • 车机技术之车规级Linux-Automotive Grade Linux(AGL) - 2,636次阅读
  • 卸载深信服Ingress、SecurityDesktop客户端 - 2,132次阅读
  • 某云计算中心网络架构图 - 1,873次阅读
  • ISO27000 信息技术安全系列标准 - 1,809次阅读
  • linux的tee命令导致ssh客户端下的shell卡住不动 - 1,803次阅读
  • 车机技术之360°全景影像(环视)系统 - 1,751次阅读
  • 关于天楚锐齿 - 1,668次阅读
  • Linux策略路由及iptables mangle、ip rule、ip route关系及一种Network is unreachable错误 - 1,617次阅读

功能

  • 文章RSS
  • 评论RSS

联系方式

地址
深圳市科技园

时间
周一至周五:  9:00~12:00,14:00~18:00
周六和周日:10:00~12:00

标签

android AT命令 centos Hadoop hdfs ip ipv6 kickstart linux mapreduce mini6410 modem OAuth openstack os python socket ssh uboot 内核 协议 安装 嵌入式 性能 报表 授权 操作系统 数据 数据库 月报 模型 汽车 测试 深信服 深度学习 源代码 神经网络 统计 编译 网络 脚本 虚拟机 调制解调器 车机 金融
© 2021 天楚锐齿