asysbang

 找回密码
 立即注册
查看: 1749|回复: 2
打印 上一主题 下一主题

android_x86下载代码

[复制链接]

513

主题

2

好友

6404

积分

管理员

Rank: 80Rank: 80Rank: 80Rank: 80Rank: 80

最佳新人 活跃会员 热心会员 推广达人 宣传达人 灌水之王 突出贡献 优秀版主 荣誉管理 论坛元老

跳转到指定楼层
楼主
发表于 2022-1-14 14:35:07 |只看该作者 |倒序浏览
下载androidx86代码时,一起下载不行

可以手动修改manifes.xml

分成3-10个下载

如果某个下载不到可以到
https://android.googlesource.com/platform/
下载google原生的 git clone https://android.googlesource.com ... al/chromium-webview -b android-9.0.0_r54 --depth=1

如果是x86的就到
https://osdn.net/projects/android-x86/scm/下载


运行一些游戏需要arm 翻译库

可以看看lineage x86

编译   make -j8 iso_img KERNEL_DIR=kernel-4.19

repo sync -c --no-tags --prune --no-clone-bundle -j 4

1

回复

使用道具 举报

513

主题

2

好友

6404

积分

管理员

Rank: 80Rank: 80Rank: 80Rank: 80Rank: 80

最佳新人 活跃会员 热心会员 推广达人 宣传达人 灌水之王 突出贡献 优秀版主 荣誉管理 论坛元老

沙发
发表于 2022-5-5 16:27:11 |只看该作者
# coding=utf8
#repo sync for android x86 source code
#
#
# 1.cts 1.1G
# 2.

import  re
import  os

taggetTags = 'android-9.0.0_r54'

# 9.0-r2 和之前8不同分支待refs/tags/
x86TaggetTags = 'android-x86-9.0-r2'

def _GitCloneX86(line):
  #匹配有path的,注意其中'kernel','LLVM90'需要特殊处理
  #git clone https://scm.osdn.net/gitroot/android-x86/external-llvm.git --depth 1 -b android-x86-9.0-r2 external/llvm90
  m = re.match(r'.+name=\"(\S+)\".+path=\"(\S+)\".+upstream=\"(\S+)\"', line)
  if m:
    print 'get name : %s , path : %s , upstream : %s ' % (m.group(1) , m.group(2) , m.group(3))
    gitPath = m.group(2).replace('/', '-')
    cmd = 'git clone https://scm.osdn.net/gitroot/android-x86/{0}.git --depth 1 -b {1}  {2} \n'.format(gitPath, x86TaggetTags, m.group(2))
    print cmd
    os.system(cmd)
    with open("x86PathCloned.txt","a") as x86PathClonedFile:
      x86PathClonedFile.write(line)
      x86PathClonedFile.write(cmd)
    return

  #匹配不包含path的
  m = re.match(r'.+name=\"(\S+)\".+upstream=\"(\S+)\"', line)
  if m:
    print 'get name : %s ,  upstream : %s ' % (m.group(1) , m.group(2) )
    gitPath = m.group(1).replace('/', '-')
    cmd = 'git clone https://scm.osdn.net/gitroot/android-x86/{0}.git --depth 1 -b {1}  {2} \n'.format(gitPath, x86TaggetTags, m.group(1))
    print cmd
    os.system(cmd)
    with open("x86NoPathCloned.txt","a") as x86NoPathClonedFile:
      x86NoPathClonedFile.write(line)
      x86NoPathClonedFile.write(cmd)
  else:
    #剩下没有匹配的
    with open("x86UnCloned.txt","a") as x86UnClonedFile:
      x86UnClonedFile.write(line)
    return



def _GitCloneAndroid(line):
  #匹配有path的   'platform/build'和'platform/build/soong' 最好repo方式
  m = re.match(r'.+name=\"(\S+)\".+path=\"(\S+)\".+upstream=\"(\S+)\"', line)
  if m:
    print 'get name : %s , path : %s , upstream : %s ' % (m.group(1) , m.group(2) , m.group(3))
    cmd = 'git clone https://android.googlesource.com/{0} --depth 1 -b {1}  {2}'.format(m.group(1), taggetTags, m.group(2))
    print cmd
    os.system(cmd)
    return

  #匹配不包含path的
  m = re.match(r'.+name=\"(\S+)\".+upstream=\"(\S+)\"', line)
  if m:
    print 'get name : %s ,  upstream : %s ' % (m.group(1) , m.group(2) )
    cmd = 'git clone https://android.googlesource.com/{0} --depth 1 -b {1}  {2} \n'.format(m.group(1), taggetTags, m.group(1))
    print cmd
    os.system(cmd)
  else:
    #剩下没有匹配的
    with open("androidUnCloned.txt","a") as androidUnClonedFile:
      androidUnClonedFile.write(line)
    return


#clone 之后需要reset到对应的revision版本
def _GitCloneMaster(line):
  #匹配有path的  x86_64-linux-glibc2.11-4.6  这个需要特殊处理
  #git clone https://android.googlesource.com ... linux-glibc2.11-4.6  --depth 1 -b master prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6
  m = re.match(r'.+name=\"(\S+)\".+path=\"(\S+)\".+upstream=\"(\S+)\"', line)
  if m:
    print 'get name : %s , path : %s , upstream : %s ' % (m.group(1) , m.group(2) , m.group(3))
    cmd = 'git clone https://android.googlesource.com/{0} --depth 1 -b master  {1}'.format(m.group(1), m.group(2))
    print cmd
    #os.system(cmd)
    return


#分类判断每一行类型
def _GetType(line):
  if "remote=\"x86\"" in line:
      with open("x86.txt","a") as x86File:
        x86File.write(line)
      _GitCloneX86(line)
      return

  if "android-9.0.0_r54" in line:
      with open("android.txt","a") as androidFile:
        androidFile.write(line)
      _GitCloneAndroid(line)
      return

  if "master" in line:
      with open("master.txt","a") as masterFile:
        masterFile.write(line)
      return

  with open("unCloneLine.txt","a") as unCloneFile:
    unCloneFile.write(line)



#os.remove("*.txt")
#程序入口
f = open("android-x86-9.0-r2.xml")
while True:
    line = f.readline()
    if line:
        _GetType(line)
    else:
        break
f.close()


回复

使用道具 举报

513

主题

2

好友

6404

积分

管理员

Rank: 80Rank: 80Rank: 80Rank: 80Rank: 80

最佳新人 活跃会员 热心会员 推广达人 宣传达人 灌水之王 突出贡献 优秀版主 荣誉管理 论坛元老

板凳
发表于 2022-6-2 20:44:12 |只看该作者
git clone  https://scm.osdn.net/gitroot/android-x86/manifest.git --depth 1 -b android-x86-7.1-r5
可以下载不同的版本的manifest

git clone https://scm.osdn.net/gitroot/android-x86/system-vold.git -b nougat-x86 --depth 1 system/vold

git clone https://aosp.tuna.tsinghua.edu.cn/platform/system/webservd --depth 1 -b android-7.1.2_r39 system/webservd
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

Archiver|手机版|aSys-帮 ( 京ICP备13033689号 )

GMT+8, 2024-10-5 19:16 , Processed in 0.043963 second(s), 19 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部