3

I want to build cyanogenmod 9.0.0 for samsung galaxy s2. I have read http://wiki.cyanogenmod.org/w/Build_for_i9100 and compiled the stuff successfully. But what has been built is cm-11, while I need 9.0.0. (I'm hunting a bug in the code written by another person, and I need this version to understand what is going on.)

The command

$ repo init -u git://github.com/CyanogenMod/android.git -b cm-9.0.0

breaks with

error: in `init -u git://github.com/CyanogenMod/android.git --repo-url=https://gerrit.googlesource.com/git-repo --repo-branch=stable`: revision refs/heads/master in manifests not found

but the help says that -b specifies the manifest branch or revision, so unless the description is misleading it should be possible to use the latest manifest and later checkout the necessary version.

So I used the command

$ repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0

But now I get:

$ repo branch
   (no branches)
$ repo branches
   (no branches)

For comparison, in the directory where cm-11 has been built, I also get (no branches).

In https://stackoverflow.com/a/10820464/755804 I read that I should use a manifest file specific to the build in question, but where/how do I get it? (The file lists a revision for each of the git repositories in the repo tree; obtaining this list manually would be an odious task, there should be a script able to do this. Or maybe the files to repeat each build are stored somewhere and I just don't know where?)

So: How do I check out a particular revision of Cyanogenmod source? (In particular, cm-9.0.0-galaxys2?)

UPDATE

Found repo help forall -- run a shell command in each project. BUT repo forall -c 'git branch' shows a (no branch) for each project. UPD: because it should be repo forall -c git branch -a, but the set of shown branches will depend on the parameter passed with the -b key to repo init.

UPDATE 2

The answer below shows how to checkout the sources. The next step is to run breakfast i9100 (what a stupid non-descriptive name!) Unfortunately, it does not work because since some moment in the past github api began to require application authentication (and the no-auth quote is not enough for breakfast). Thus, a change in github access policy has broken a version control script and in fact has turned the commit history into useless old rubbish: one cannot rebuild the old version. I would say, it's an epic fail of the version control systems in general: it turned out that a version control system cannot replace a directory with zipped copies of the source tree. (And the amount of sub-projects and the use of a 3rd-party script to manage them are key components in that failure.)

Community
  • 1
  • 1
18446744073709551615
  • 16,368
  • 4
  • 94
  • 127

1 Answers1

1

I am not sure one can build it, but this is how one can at least retrieve the 9.0.0 sources.

First, you do

repo init -u git://github.com/CyanogenMod/android.git -b cm-9.0.0
repo sync

and you get an error message like

Syncing work tree:  58% (144/248)  error: in `sync`: revision refs/heads/cm-9.0.0 in CyanogenMod/android_frameworks_base not found

I have to note that if it was cm-9.1.0, this would succeed.

Now, let us mend the errors that appear:

for each error like

error: in `sync`: revision refs/heads/cm-9.0.0 in CyanogenMod/android_packages_apps_Settings not found

do

  1. the link .repo/manifest.xml points to .repo/manifests/default.xml;
  2. find "android_packages_apps_Settings" in that file, something like: <project path="packages/apps/Settings" name="CyanogenMod/android_packages_apps_Settings"/>
  3. add revision="cm-9.1.0", it then will look like <project path="packages/apps/Settings" name="CyanogenMod/android_packages_apps_Settings" revision="cm-9.1.0"/>
  4. manually delete the directory specified as the path, namely packages/apps/Settings in this example
  5. run repo sync again

You will get a mix of 9.0.0 and 9.1.0 sources; for the most part, it will be 9.0.0.

Now, cd vendor/cm; ./get-prebuilts will fail, but since it says

# Get Android Terminal Emulator (we use a prebuilt so it can update from the Market)

it is ok to use ./get-prebuilts from cm-11, which will succeed.

18446744073709551615
  • 16,368
  • 4
  • 94
  • 127