windows下怎么下载android源码?很简单!GO!GO!
首先得下载一个GIT在windows可以用PortableGit。有了git只能手动的输入要下载android源码的某部分,不过可以从以下地址http://android.git.kernel.org/?a=project_index 得到所有可以下载的源码。由于这个列表并不能直接用在PortableGit命令中所以我写了一个VBS脚本来转换szFolder ="K:\Hemowolf\SRC_Android"'存放android源码目录Set Fso = CreateObject("Scripting.FileSystemObject")Set inFile =Fso.OpenTextFile("1.txt")'get TXT 文件Set outFile =Fso.CreateTextFile("android.sh")'输出文件用于执行的Do While Not ( inFile.AtEndOfLine Or inFile.AtEndOfStream)szLine =inFile.ReadLine()If (szLine <>"") ThenszLine = Trim(Replace(szLine,"Android+Open+Source+Project",""))Item = Split(szLine, "/")szPath =szFolderFor i = 0 To UBound(Item)szPath = szPath & "\" & Item(i)If Not Fso.FolderExists(szPath) Then Call Fso.CreateFolder(szPath)NextoutFile.WriteLine "git clone git://android.git.kernel.org/" & szLine & " " &Replace(szPath,"\","/")End ifLoopinFile.CloseoutFile.CloseMsgBox "ok"
脚本会自动在android存放源码的目录里创建相应的子目录。转换后把android.sh放到PortableGit目录下或PortableGit定位(cd)到android.sh目录下输入android.sh就可以下载了!
页:
[1]