Saturday, March 29, 2014

Asked one: android source code, how to switch versions.


Looking at Google's tutorial, download android source code.

Default branch is android-4.0.1_r1.
$ repo init-u https://android.googlesource.com/platform/manifest-b android-4.0.1_r1

Code download is complete, and also compile and run on a virtual machine.

The big question is:
how to code version 2.3.6 from 4.0.1 down to it?

Documents online to find a switch branch is unsuccessful.
question: is not switching branch, you can change the version of android code
?
Document as follows:
View switchable branch
cd .repo / manifests
git branch-a | cut-d /-f 3


With gingerbread-release branch for example
repo init-b gingerbread-release
repo sync (not needed if your local copy is up to date)
repo start gingerbread-release - all
View the current branch
repo branches


Android run in the root directory of the source code of this sentence:
repo init-b gingerbread-release

Error,
Information is as follows

yu @ yu-laptop: ~ / WORKING_DIRECTORY $ repo init-b gingerbread-release

... A new repo command (1.18) is available.
... You should upgrade soon:

cp / home / yu / WORKING_DIRECTORY / .repo / repo / repo / home / yu / bin / repo

Traceback (most recent call last):
File "/ home / yu / WORKING_DIRECTORY / .repo / repo / main.py", line 408, in
_Main (Sys.argv [1:])
File "/ home / yu / WORKING_DIRECTORY / .repo / repo / main.py", line 388, in _Main
result = repo._Run (argv) or 0
File "/ home / yu / WORKING_DIRECTORY / .repo / repo / main.py", line 138, in _Run
result = cmd.Execute (copts, cargs)
File "/ home / yu / WORKING_DIRECTORY / .repo / repo / subcmds / init.py", line 322, in Execute
self._SyncManifest (opt)
File "/ home / yu / WORKING_DIRECTORY / .repo / repo / subcmds / init.py", line 192, in _SyncManifest
m.MetaBranchSwitch (opt.manifest_branch)
File "/ home / yu / WORKING_DIRECTORY / .repo / repo / project.py", line 2151, in MetaBranchSwitch
self.Sync_LocalHalf (syncbuf)
File "/ home / yu / WORKING_DIRECTORY / .repo / repo / project.py", line 1041, in Sync_LocalHalf
lost = self._revlist (not_rev (revid), HEAD)
File "/ home / yu / WORKING_DIRECTORY / .repo / repo / project.py", line 1816, in _revlist
return self.work_git.rev_list (* a, ** kw)
File "/ home / yu / WORKING_DIRECTORY / .repo / repo / project.py", line 1961, in rev_list
p.stderr))
error.GitError: manifests rev-list ('^ 12303f87b9f90c07bf4aec4c4353ba514ee70c8a', 'HEAD', '-'): fatal: bad revision 'HEAD'


Begged heroes generous advice.

<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Delete all files other than the repo repo folder directory, re-run the inti and sync, I tried to be.
Reply:
Very good, very good
Reply:
People do not prompt you
cp / home / yu / WORKING_DIRECTORY / .repo / repo / repo / home / yu / bin / repo
Perform the following, and then try to download!
Reply:
cited a floor Thinkingword reply:
delete all the files other than the repo repo folder directory, re-run the inti and sync, I tried. You can too.

Yes
Reply:
Test, the repo deleted, re-download the source code with what is the difference?
so it did not rub git

No comments:

Post a Comment