AOSP repo sync fails on macOS Catalina - android

I keep having the same error while trying to do checkout AOSP source on macOS Catalina 10.15.7. Followed all the instructions on https://source.android.com/setup/build/initializing#setting-up-a-mac-os-x-build-environment, also https://source.android.com/setup/build/downloading and tried different tags. This is what happens after I invoke repo --trace sync -j1.
: git config --file /Volumes/android/aosp/.repo/projects/external/skqp.git/config --includes --null --list 1>| 2>|
: export GIT_DIR=/Volumes/android/aosp/.repo/projects/external/skqp.git
: git rev-parse --verify refs/tags/android-10.0.0_r41^0 1>| 2>|
: cd /Volumes/android/aosp/external/skqp
: git read-tree --reset -u -v HEAD 1>| 2>|
error: RPC failed; HTTP 499 curl 16 Error in the HTTP2 framing layer
fatal: the remote end hung up unexpectedly
error: Cannot checkout platform/external/skqp: GitError: Cannot initialize work tree for platform/external/skqp
: git rev-list refs/tags/android-10.0.0_r41 -1 1>| 2>|
Traceback (most recent call last):
File "/Volumes/android/aosp/.repo/repo/main.py", line 630, in <module>
_Main(sys.argv[1:])
File "/Volumes/android/aosp/.repo/repo/main.py", line 604, in _Main
result = run()
File "/Volumes/android/aosp/.repo/repo/main.py", line 597, in <lambda>
run = lambda: repo._Run(name, gopts, argv) or 0
File "/Volumes/android/aosp/.repo/repo/main.py", line 266, in _Run
result = cmd.Execute(copts, cargs)
File "/Volumes/android/aosp/.repo/repo/subcmds/sync.py", line 983, in Execute
self._Checkout(all_projects, opt, err_event, err_results)
File "/Volumes/android/aosp/.repo/repo/subcmds/sync.py", line 567, in _Checkout
self._CheckoutWorker(**kwargs)
File "/Volumes/android/aosp/.repo/repo/subcmds/sync.py", line 447, in _CheckoutWorker
return self._CheckoutOne(opt, project, *args, **kwargs)
File "/Volumes/android/aosp/.repo/repo/subcmds/sync.py", line 481, in _CheckoutOne
project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
File "/Volumes/android/aosp/.repo/repo/project.py", line 1223, in Sync_LocalHalf
self._InitWorkTree(force_sync=force_sync, submodules=submodules)
File "/Volumes/android/aosp/.repo/repo/project.py", line 2758, in _InitWorkTree
raise GitError('Cannot initialize work tree for ' + self.name)
error.GitError: Cannot initialize work tree for platform/external/skqp

Related

Can't repo init android source code mirror

I'm trying to mirror Android source code but it's not possible.
I had to upgrade python to 3.6 and update repo.
However I can't repo init android source mirror.
jeffrey#devserver:/home1/aosp/mirror$ repo init -u
https://android.googlesource.com/mirror/manifest --mirror Downloading
Repo source from https://gerrit.googlesource.com/git-repo Downloading
manifest from https://android.googlesource.com/mirror/manifest
Traceback (most recent call last): File
"/home1/aosp/mirror/.repo/repo/main.py", line 627, in
_Main(sys.argv[1:]) File "/home1/aosp/mirror/.repo/repo/main.py", line 601, in _Main
result = run() File "/home1/aosp/mirror/.repo/repo/main.py", line 594, in
run = lambda: repo._Run(name, gopts, argv) or 0 File "/home1/aosp/mirror/.repo/repo/main.py", line 260, in _Run
result = cmd.Execute(copts, cargs) File "/home1/aosp/mirror/.repo/repo/subcmds/init.py", line 519, in Execute
self._SyncManifest(opt) File "/home1/aosp/mirror/.repo/repo/subcmds/init.py", line 220, in
_SyncManifest
default_branch = m.ResolveRemoteHead() File "/home1/aosp/mirror/.repo/repo/project.py", line 1914, in
ResolveRemoteHead
output = self.bare_git.ls_remote('-q', '--symref', '--exit-code', name, 'HEAD') File "/home1/aosp/mirror/.repo/repo/project.py", line
3034, in runner
(self._project.name, name, p.stderr)) error.GitError: manifests ls-remote: usage: git ls-remote [--heads] [--tags]
[--upload-pack=]
[-q | --quiet] [--exit-code] [--get-url] [ [...]]
Can anyone help on this?
Thanks,
Your 'git ls-remote' does not have '--symref' parameter, maybe you need to update the git version.

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?

WebRTC Android - gclient sync error in Windows

I'm trying to work out the instructions defined in http://www.webrtc.org/native-code/android. After the command "gclient sync" is executed and after hours of downloading, at the end the process failed:
fatal: early EOF
The remote end hung up unexpectedly
fatal: index-pack failed
error: RPC failed; result=56, HTTP code = 200
Traceback (most recent call last):
File "C:\depot_tools\depot_tools\gclient_scm.py", line 924, in _Clone
self._Run(clone_cmd, options, cwd=self._root_dir, retry=True)
File "C:\depot_tools\depot_tools\gclient_scm.py", line 1201, in _Run
gclient_utils.CheckCallAndFilterAndHeader(cmd, env=env, **kwargs)
File "C:\depot_tools\depot_tools\gclient_utils.py", line 293, in CheckCallAndF
ilterAndHeader
return CheckCallAndFilter(args, **kwargs)
File "C:\depot_tools\depot_tools\gclient_utils.py", line 538, in CheckCallAndF
ilter
rv, args, kwargs.get('cwd', None), None, None)
CalledProcessError: Command 'git -c core.deltaBaseCacheLimit=512m clone --no-che
ckout --progress --verbose https://chromium.googlesource.com/chromium/src.git C:
\\webrtc_android\\src\\chromium\\_gclient_src_x3yrqm' returned non-zero exit sta
tus 128 in C:\webrtc_android\src\chromium
----------------------------------------
Traceback (most recent call last):
File "C:\depot_tools\depot_tools\gclient.py", line 2325, in <module>
sys.exit(main(sys.argv[1:]))
File "C:\depot_tools\depot_tools\gclient.py", line 2311, in main
return dispatcher.execute(OptionParser(), argv)
File "C:\depot_tools\depot_tools\subcommand.py", line 252, in execute
return command(parser, args[1:])
File "C:\depot_tools\depot_tools\gclient.py", line 2066, in CMDsync
ret = client.RunOnDeps('update', args)
File "C:\depot_tools\depot_tools\gclient.py", line 1523, in RunOnDeps
work_queue.flush(revision_overrides, command, args, options=self._options)
File "C:\depot_tools\depot_tools\gclient_utils.py", line 1024, in run
self.item.run(*self.args, **self.kwargs)
File "C:\depot_tools\depot_tools\gclient.py", line 834, in run
file_list)
File "C:\depot_tools\depot_tools\gclient_scm.py", line 166, in RunCommand
return getattr(self, command)(options, args, file_list)
File "C:\depot_tools\depot_tools\gclient_scm.py", line 418, in update
self._Clone(revision, url, options)
File "C:\depot_tools\depot_tools\gclient_scm.py", line 932, in _Clone
if os.listdir(tmp_dir):
WindowsError: [Error 3] The system cannot find the path specified: 'C:\\webrtc_a
ndroid\\src\\chromium\\_gclient_src_x3yrqm/*.*'
Error: Command 'C:\\depot_tools\\depot_tools\\python276_bin\\python.exe -u src/s
ync_chromium.py --target-revision 47ce5feb1d13ce889da15f76f063a7978a0b5c37' retu
rned non-zero exit status 1 in C:\webrtc_android
Hook ''C:\depot_tools\depot_tools\python276_bin\python.exe' -u src/sync_chromium
.py --target-revision 47ce5feb1d13ce889da15f76f063a7978a0b5c37' took 77717.11 se
cs
Does this has to do with the fact that I'am trying to execute it on Windows?
Independently of your error, you will not be able to fetch and compile code for android under windows. You need to be on the right linux distribution.

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"

Android Source: Repo not displaying any initialization message

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

Categories

Resources