If you all haven’t noticed, kernel.org suffered an attack and as such, all of its servers have been taken down and are in the process of coming back online. For Cyanogenmod developers, this means that the AOSP repository (android.git.kernel.org) is unavailable, which causes many problems for syncing and initializing the repository on our machines. Luckily, Steve Kondik has come to the rescue and pushed the AOSP projects to github.com/CyanogenMod.
STATUS: Steve Kondik, the lead designer of CyanogenMod has pushed all of the AOSP projects to github.com/CyanogenMod and has updated the manifests to reflect this change. So getting it working is easy now. Everything is tested and works perfectly again. Say thanks to Steve!
So here’s the deal! You right now can be one of three people:
1. Your code builds fine and it’s the same code from before kernel.org went offline. (This used to be a valid issue but with Steve’s work you should be syncing fine now. If you’re still having problems, follow the guide for person 2).
2. You previously have been to my blog and tried version 1 of my fix, but no matter what, it will not build or sync!
3. You’re pulling the source code for the first time or you’re initializing the source code on a new machine.
Decide who you are and scroll down to the appropriate section.
Person 1 -
You used to have problems, but with Steve’s fixes pushed to CyanogenMod’s source, you should be having no issues. If you’re still having sync problems, continue on to “Person 2″.
Person 2 -
You previously have been to my blog and tried version 1 and 2 of my fix, but no matter what, it will not build or sync!
Well first, thank you if you’ve commented about any problems you’ve had. You might not know it, but your complaints helped me find the solution to your problems, so thank you indeed! Anyways, here’s your solution:
First, remove the git config edit from the first version of my solution:
git config --global --unset url.git://codeaurora.org.insteadof
Then follow these steps to reconfigure your manifest to use CyanogenMod’s manifest again.
cd ~/android/system/.repo rm -rf manifests* rm -rf repo cd ~/android/system repo init -u git://github.com/CyanogenMod/android.git -b gingerbread --repo-url=git://github.com/android/tools_repo.git repo sync -j16
If you still have problems, “rm -rf ~/android” and continue on to “Person 3″.
Person 3 -
How exciting! You’re building the source code for the first time or you’re initializing the source code on a new machine!
Follow the proper guide for building source code for your device located HERE. If your device does not have a guide up, follow the directions under the section “Prepare the Build Environment” located in the Android SDK Emulator building instructions, located HERE. The steps for setting up your build environment are the same for every device.
When the guide asks you to run the following line of code in your terminal:
curl http://android.git.kernel.org/repo > ~/bin/repo
INSTEAD run this line:
curl https://raw.github.com/android/tools_repo/master/repo > ~/bin/repo
And when the guide asks you to run the following line of code in your terminal:
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
INSTEAD run this line:
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread --repo-url=git://github.com/android/tools_repo.git
And then follow the rest of the guide, and you will have your code all good to go!
When the korg servers come back online, you won’t have to do anything! Just keep syncing like normal!
Thanks: After spending countless hours debugging my previous method of pulling the source from Code Aurora, I found that it was hit-or-miss with users. For some, my method worked fine, but for others, the code would fail to sync. I was one of those whose code was working fine, so debugging the issue was difficult alone. Thanks goes to Midnight Programmer for being my testing guinea pig and helping find the solution to his problems.