---
title: "Windows+Cygwin获取Android源码"
author: "longforfreedom"
date: "2011-02-12T17:27:21Z"
tags: []
categories: ["移动开发"]
slug: "windows-cygwin-android"
draft: false
lastmod: "2011-02-12T17:27:21Z"
id: 904740
url: "https://migle.iteye.com/blog/904740"
---

Windows是Win7，Cygwin及安装就不介绍了  
Cygwin需要把Git装上，默认好像没装上，如果没装自己上吧  

```
 $ curl http://android.git.kernel.org/repo > repo 
```

 

repo好像2.6以上的版本不支持，Cygwin默认装的是2.6 而且Cygwin的Python和Windows本身的Python（2.7）冲突，  
所以用带版本号的，把repo打开，把里面一的句exec python 换成 exec python2.5

```
$ sh repo init -u git://android.git.kernel.org/platform/manifest.git
```

 

 过一会儿会出现提示，就用户名填了个邮箱，密码跳过，其它的都是Y，完了之后再

 

```
    $ python2.5 repo sync   #如果只有一个Python的话，可以直接python .. ..  .. 
```

 

慢慢等吧，很大的，应该有5G