asysbang
标题:
android_x86下载代码
[打印本页]
作者:
admin
时间:
2022-1-14 14:35
标题:
android_x86下载代码
下载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
作者:
admin
时间:
2022-5-5 16:27
# 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()
作者:
admin
时间:
2022-6-2 20:44
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
欢迎光临 asysbang (http://asysbang.com/)
Powered by Discuz! X2.5