1、下载repo,直接上android.com
2、执行repo init初始化仓库,仓库名称可以上(https://android.googlesource.com/platform/manifest/+refs)获取
例如: repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.0_r26
执行repo sync下载代码
3、到(https://developers.google.com/android/nexus/drivers)网站上获取nexus固件驱动
4、lunch对应的分支,编译。