Build a specific version of the cyanogenmod (namely 9.0.0-galaxys2)
I want to build cyanogenmod 9.0.0 for samsung galaxy s2. I read http://wiki.cyanogenmod.org/w/Build_for_i9100 and compiled the stuff successfully. But what was built is cm-11 and I need 9.0.0. (I was looking for a bug in another person's code, and I need this version to understand what's going on.)
Command
$ repo init -u git://github.com/CyanogenMod/android.git -b cm-9.0.0
breaks down 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
the branch or revision points to the manifest , so if the description is not misleading, it should be possible to use the latest manifest and then check the required version.
So, I used the command
$ repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
But now I am getting:
$ repo branch
(no branches)
$ repo branches
(no branches)
For comparison, in the directory where cm-11 was built I also get (no branches)
.
In qaru.site/questions/1415193 / ... I have read that I have to use a manifest file that is specific for the given build, but where / how can I get it? (The file lists the revision for each of the git repos in the repo tree, getting that list manually would be an odious task, it might be a script. Or maybe the files to repeat each build are stored somewhere and I just don't know where? )
So: How do I check a specific revision of the Cyanogenmod source? (Specifically 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 branches displayed will depend on the parameter passed with the key -b
to repo init
.
UPDATE 2
Below is an example of checking sources. The next step is to run breakfast i9100
(what a stupid non-descriptive name!) Unfortunately it didn't work because from some point in the past the github api started to require app authentication (and no-auth quotes are not enough for breakfast
). So changing the github access policy broke the script's version control and effectively turned the commit history into useless old garbage: the old version cannot be restored. I would say this is an epic failure of version control in general: it turns out that a version control system cannot replace a directory with zipped copies of the source tree. (And the number of subprojects and the use of a third-party script to manage them are key components in this failure.)
source to share
I'm not sure if you can build it, but this is how you can restore 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 will get an error 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 must point out that if it was cm-9.1.0
, it will be successful.
Now let's get down to the errors:
for every error like
error: in `sync`: revision refs/heads/cm-9.0.0 in CyanogenMod/android_packages_apps_Settings not found
to do
- link
.repo/manifest.xml
points to.repo/manifests/default.xml
; - find "android_packages_apps_Settings" in that file, for example:
<project path="packages/apps/Settings" name="CyanogenMod/android_packages_apps_Settings"/>
- add
revision="cm-9.1.0"
then it will look like<project path="packages/apps/Settings" name="CyanogenMod/android_packages_apps_Settings" revision="cm-9.1.0"/>
- manually delete the directory given as path, namely
packages/apps/Settings
in this example - start
repo sync
again
You will get a combination of 9.0.0 and 9.1.0 sources; for the most part, it will be 9.0.0.
Will now cd vendor/cm; ./get-prebuilts
fail, but as 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 be successful.
source to share