Android Source: Repo not displaying any initialization message - android

I've followed the instructions Google has provided on downloading the Source Tree, but after I run the command
$ repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.7_r1
and I receive the following error message :
$ repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.7_r1
Traceback (most recent call last):
File "/Users/roboguy12/bin/repo", line 690, in <module>
main(sys.argv[1:])
File "/Users/roboguy12/bin/repo", line 657, in main_Init(args)
File "/Users/roboguy12/bin/repo", line 189, in _Init_CheckGitVersion()
File "/Users/roboguy12/bin/repo", line 214, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
What did I do wrong? Or is this just an error on behalf of Repo?
UPDATE: Now that I've installed Python 2.7, I still have almost the exact same error message:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.7_r1
Traceback (most recent call last):
File "/Users/roboguy12/bin/repo", line 690, in <module>
main(sys.argv[1:])
File "/Users/roboguy12/bin/repo", line 657, in main_Init(args)
File "/Users/roboguy12/bin/repo", line 189, in _Init_CheckGitVersion()
File "/Users/roboguy12/bin/repo", line 214, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672, in __init__
errread, errwrite)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I call $ python -V and it says Python 2.7.1, so I don't know what else I can do.

Seems to me you might have not done a couple of things: chmod'd the repo to +x and/or put it in your $PATH statement as the first directory to look for (and could be using another version of repo). Have you tried 'ls -al' instead? The directory you're looking for is hidden and you need the -a argument in ls to view hidden files/directories.
UPDATE: Ah, just saw your update. Since you're using a Mac, you need to use Python 2.7. To do so, you'll need to MacPort it. This website provided much help to me: INSTALLING PYTHON 2.7, EASY_INSTALL, PIP, VIRTUALENV AND VIRTUALENVWRAPPER ON MAC OS X

Related

Using repo in Cygwin to download Android source

Following the instructions on http://source.android.com/source/downloading.html and https://honey200.wordpress.com/2011/11/17/download-android-source-code-in-windows/ I can't initialize a repo when running under Cygwin on Windows. I've done this before on Linux and everything has worked.
In the cygin terminal I've got git and curl installed, but when I run:
repo init -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r7
I get the following:
Get https://android.googlesource.com/platform/manifest
Traceback (most recent call last):
File "/cygdrive/e/lollipop/source/.repo/repo/main.py", line 531, in <module>
_Main(sys.argv[1:])
File "/cygdrive/e/lollipop/source/.repo/repo/main.py", line 507, in _Main
result = repo._Run(argv) or 0
File "/cygdrive/e/lollipop/source/.repo/repo/main.py", line 180, in _Run
result = cmd.Execute(copts, cargs)
File "/cygdrive/e/lollipop/source/.repo/repo/subcmds/init.py", line 390, in Execute
self._SyncManifest(opt)
File "/cygdrive/e/lollipop/source/.repo/repo/subcmds/init.py", line 163, in _SyncManifest
m._InitGitDir(mirror_git=mirrored_manifest_git)
File "/cygdrive/e/lollipop/source/.repo/repo/project.py", line 2148, in _InitGitDir
self.bare_objdir.init()
File "/cygdrive/e/lollipop/source/.repo/repo/project.py", line 2644, in runner
p.stderr))
error.GitError: manifests init: fatal: Could not switch to '/cygdrive/e/lollipop/source/.repo/': No such file or directory
What am I missing?

Move Android Sources to another Machine

So, Basically I've synced all the Cm-11.0 sources to my PC. Now I had move the sources to another PC. So i thought that copying just '.repo' folder and running repo sync -l to another PC will do the trick.
Now I have .repo folder and when I run repo sync it gives the following error
dkbhadeshiya#CrayJaguar:~/android/cm11$ repo sync -j1
Fetching project CyanogenMod/android_frameworks_webview
Traceback (most recent call last):
File "/home/dkbhadeshiya/android/cm11/.repo/repo/main.py", line 500, in <module>
_Main(sys.argv[1:])
File "/home/dkbhadeshiya/android/cm11/.repo/repo/main.py", line 476, in _Main
result = repo._Run(argv) or 0
File "/home/dkbhadeshiya/android/cm11/.repo/repo/main.py", line 155, in _Run
result = cmd.Execute(copts, cargs)
File "/home/dkbhadeshiya/android/cm11/.repo/repo/subcmds/sync.py", line 635, in Execute
fetched = self._Fetch(to_fetch, opt)
File "/home/dkbhadeshiya/android/cm11/.repo/repo/subcmds/sync.py", line 339, in _Fetch
self._FetchProjectList(**kwargs)
File "/home/dkbhadeshiya/android/cm11/.repo/repo/subcmds/sync.py", line 234, in _FetchProjectList
success = self._FetchHelper(opt, project, *args, **kwargs)
File "/home/dkbhadeshiya/android/cm11/.repo/repo/subcmds/sync.py", line 275, in _FetchHelper
no_tags=opt.no_tags, archive=self.manifest.IsArchive)
File "/home/dkbhadeshiya/android/cm11/.repo/repo/project.py", line 1076, in Sync_NetworkHalf
self._UpdateHooks()
File "/home/dkbhadeshiya/android/cm11/.repo/repo/project.py", line 2098, in _UpdateHooks
self._InitHooks()
File "/home/dkbhadeshiya/android/cm11/.repo/repo/project.py", line 2126, in _InitHooks
os.symlink(os.path.relpath(stock_hook, os.path.dirname(dst)), dst)
OSError: [Errno 20] Not a directory
and when I run Repo Sync -l It gives following error:
dkbhadeshiya#CrayJaguar:~/android/cm11$ repo sync -l
error: in `sync -l`: revision refs/heads/cm-11.0 in CyanogenMod/android_abi_cpp not found
Any Idea how to solve this??
Maybe you can try this command before you sync.
repo forall -vc "git reset --hard"

Failures during Chromium build on Ubuntu

I am trying to build unmodified Chromium following official instructions, but i am getting the following error, I tried reinstalling Ubuntu 8, 12 but no difference:
[10/6591] ACTION Creating jsr_305_javalib jar
FAILED: cd ../../third_party/jsr-305; python ../../build/android/jar.py "--classes-dir=../../out/Release/gen/jsr_305_javalib/classes" "--jar-path=../../out/Release/lib.java/jsr_305_javalib.jar" "--excluded-classes=\"*/R.class\" \"*/R##*.class\"" "--ignore=035ff3d8153c7ebb3e17803d6ec654de -"
Traceback (most recent call last):
File "../../build/android/jar.py", line 53, in <module>
sys.exit(main(sys.argv))
File "../../build/android/jar.py", line 46, in main
DoJar(options)
File "../../build/android/jar.py", line 30, in DoJar
subprocess.check_call(jar_cmd, cwd=jar_cwd)
File "/usr/lib/python2.7/subprocess.py", line 506, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I'd stopped at same error. Finally, I found my stupid mistake that I forgot to add PATH of jar command. The following command is needed in addition to the java set up guide in Chromium official build instructions.
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_xx/bin/jar 50000
You must install the depot_tools package. Try this commands;
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:/path/to/depot_tools

Downloading Android source code

I am new to Android. I wanted take a look at the Andriod source and started the download process. I am having a problem in initialising the repo. I am getting a below error:
$ repo init -u https://android.googlesource.com/platform/manifest
Traceback (most recent call last):
File "/bin/repo", line 685, in <module>
main(sys.argv[1:])
File "/bin/repo", line 652, in main
_Init(args)
File "/bin/repo", line 184, in _Init
_CheckGitVersion()
File "/bin/repo", line 209, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.6/subprocess.py", line 633, in __init__
errread, errwrite)
File "/usr/lib/python2.6/subprocess.py", line 1139, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
You need to install git. The typical command would be :
$ sudo apt-get install git-core

Problem while initializing the repo

While initializing the repo to download Android Source Code using the following command -
repo init -u git://android.git.kernel.org/platform/manifest.git
I'm getting the following error -
Traceback (most recent call last):
File "/home/pritamn/bin/repo", line 603, in <module>
main(sys.argv[1:])
File "/home/pritamn/bin/repo", line 570, in main
_Init(args)
File "/home/pritamn/bin/repo", line 184, in _Init
_CheckGitVersion()
File "/home/pritamn/bin/repo", line 213, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 672, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1201, in _execute_child
raise child_exception
Can anybody please help me in pin-pointing the exact cause of this error?
You must have git installed for that command to work
Do you have git installed? Make sure it's installed by typing "git" on the command line.
Running on Win7 64bit I had to add "C:\Program Files (x86)\Git\bin" to my PATH in order for this to work.
I had this happen to me, you need to apt-get remove git-core and re-install it using apt-get install git-core.

Categories

Resources