[Q] CM repo sync "bad object HEAD "error - Android Q&A, Help & Troubleshooting

Hey I've been trying to download the cyanogenmod source code for about two weeks now.
I've been trying different arguments to repo sync, resyncing multiple times but to no avail.
I've initialized the directory with:
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
and synced with:
repo sync -j 4 -c -f
after hitting 100% I get this:
Fetching projects: 100% (316/316), done.
Traceback (most recent call last):
File "/home/s7hoang/android/system/.repo/repo/main.py", line 506, in <module>
_Main(sys.argv[1:])
File "/home/s7hoang/android/system/.repo/repo/main.py", line 482, in _Main
result = repo._Run(argv) or 0
File "/home/s7hoang/android/system/.repo/repo/main.py", line 161, in _Run
result = cmd.Execute(copts, cargs)
File "/home/s7hoang/android/system/.repo/repo/subcmds/sync.py", line 681, in Execute
project.Sync_LocalHalf(syncbuf)
File "/home/s7hoang/android/system/.repo/repo/project.py", line 1230, in Sync_LocalHalf
lost = self._revlist(not_rev(revid), HEAD)
File "/home/s7hoang/android/system/.repo/repo/project.py", line 2309, in _revlist
return self.work_git.rev_list(*a, **kw)
File "/home/s7hoang/android/system/.repo/repo/project.py", line 2503, in rev_list
p.stderr))
error.GitError: CyanogenMod/android_abi_cpp rev-list ('^eb789ea833d8d800662b67914d9c1785a58c2caa', 'HEAD', '--'): fatal: bad object HEAD
I don't know what it means or what to do about it so I'm looking for help.
My goal is just to experiment with getting clockworkmod onto an unsupported phone.
Thanks in advance.

Hmm.. No real clues here.
Are you using an up to date version of git?
Sent from my AOSPA One m8 using XDA Free mobile app

Tried it again with the latest version of git ( 2.3.5 ) but I'm still getting the same error.

jellybean seams to be a pretty old branch.. Please try again with cm-10.2 branch for the manifest.
Sent from my AOSPA One m8 using XDA Free mobile app

Related

[Q] CM9 repo sync error help!!

well i had been trying to download CM9 source (ICS) to build for my device but when i did repo sync i got stuck
here's the error...
Fetching projects: 95% (231/243) fatal: The remote end hung up unexpectedly
Fetching projects: 99% (241/243) fatal: The remote end hung up unexpectedly
error: Cannot fetch CyanogenMod/android_prebuilt
error: Exited sync due to fetch errors
i did repo sync -j16, repo sync etc... also tries rebooting but nothing helps..
chaitanyakaul said:
well i had been trying to download CM9 source (ICS) to build for my device but when i did repo sync i got stuck
here's the error...
Fetching projects: 95% (231/243) fatal: The remote end hung up unexpectedly
Fetching projects: 99% (241/243) fatal: The remote end hung up unexpectedly
error: Cannot fetch CyanogenMod/android_prebuilt
error: Exited sync due to fetch errors
i did repo sync -j16, repo sync etc... also tries rebooting but nothing helps..
Click to expand...
Click to collapse
Check here
http://forum.cyanogenmod.com/topic/39528-cant-dl-source/
editing repo did it work.
Sent from my Galaxy Nexus using Tapatalk
well no it isn't working for me....
I can't get this to work either. repo sync -j16 fails, repo sync fails. I attempted to edit manifest.xml in .repo but it already has https instead of git, so no ****ing idea what to do here.
Here's my errors:
Code:
Fetching projects: 55% (134/243) error: The requested URL returned error: 504 while accessing https://github.com/CyanogenMod/android_external_tinyxml/info/refs
fatal: HTTP request failed
error: The requested URL returned error: 403 while accessing https://github.com/CyanogenMod/android_external_tinyxml/info/refs
fatal: HTTP request failed
error: Cannot fetch CyanogenMod/android_external_tinyxml
error: Exited sync due to fetch errors
[email protected]:~/android/system$ repo sync
Fetching projects: 27% (66/243) error: The requested URL returned error: 403 while accessing https://github.com/CyanogenMod/android_build/info/refs
fatal: HTTP request failed
error: The requested URL returned error: 403 while accessing https://github.com/CyanogenMod/android_device_samsung_tuna/info/refs
**** you for wasting 2 days of my life, github.
I tried to completely redownload the source, but now instead of that one error I get multiple "fatal: HTTP request failed".
edit .repo/manifest.xml
<remote name="github"
fetch="git://github.com/"
review="review.cyanogenmod.com" />
<remote name="github_https"
fetch="https://github.com/"
review="review.cyanogenmod.com" />
<project path="prebuilt" name="CyanogenMod/android_prebuilt" remote="github_https" />
make sure your router is opening git ports, try DMZ mode,
if on ubuntu oneiric python 2.7.2 causes repo to die slowly
use sync -j1
or download and install pypy and edit repo to call that instead of /usr/bin/python
this is currently working for me
Seems like they modified the manifest.xml to look like kfazz one. Now it works fine.
I have inserted these lines in the beginning of the file but I have got the following errors
File "/home/husam/android/system/.repo/repo/main.py", line 366, in <module>
_Main(sys.argv[1:])
File "/home/husam/android/system/.repo/repo/main.py", line 346, in _Main
result = repo._Run(argv) or 0
File "/home/husam/android/system/.repo/repo/main.py", line 121, in _Run
copts, cargs = cmd.OptionParser.parse_args(argv)
File "/home/husam/android/system/.repo/repo/command.py", line 42, in OptionParser
self._Options(self._optparse)
File "/home/husam/android/system/.repo/repo/subcmds/sync.py", line 120, in _Options
self.jobs = self.manifest.default.sync_j
File "/home/husam/android/system/.repo/repo/manifest_xml.py", line 215, in default
self._Load()
File "/home/husam/android/system/.repo/repo/manifest_xml.py", line 255, in _Load
self._ParseManifest(True)
File "/home/husam/android/system/.repo/repo/manifest_xml.py", line 342, in _ParseManifest
(project.name, self.manifestFile))
error.ManifestParseError: duplicate project CyanogenMod/android_prebuilt in /home/husam/android/system/.repo/manifest.xml
which line should be changed?
---------- Post added at 04:23 AM ---------- Previous post was at 04:03 AM ----------
to avoid this erros I have remove this tag from the ./repo/mainfest.xml
<project path="prebuilt" name="CyanogenMod/android_prebuilt" />
because it coused that errors
kfazz said:
make sure your router is opening git ports, try DMZ mode,
if on ubuntu oneiric python 2.7.2 causes repo to die slowly
use sync -j1
or download and install pypy and edit repo to call that instead of /usr/bin/python
this is currently working for me
Click to expand...
Click to collapse
Thanks. İt is very helpful.
I have received the following error after issuing repo sync -j1
Fetching projects: 100% (221/221), done.
Syncing work tree: 3% (7/221) fatal: This operation must be run in a work tree
Syncing work tree: 4% (9/221) fatal: This operation must be run in a work tree
fatal: This operation must be run in a work tree
Syncing work tree: 6% (14/221) fatal: This operation must be run in a work tree
Traceback (most recent call last):
File "/home/christian/Documents/WORKING_ICS/.repo/repo/main.py", line 366, in <module>
_Main(sys.argv[1:])
File "/home/christian/Documents/WORKING_ICS/.repo/repo/main.py", line 346, in _Main
result = repo._Run(argv) or 0
File "/home/christian/Documents/WORKING_ICS/.repo/repo/main.py", line 137, in _Run
result = cmd.Execute(copts, cargs)
File "/home/christian/Documents/WORKING_ICS/.repo/repo/subcmds/sync.py", line 443, in Execute
project.Sync_LocalHalf(syncbuf)
File "/home/christian/Documents/WORKING_ICS/.repo/repo/project.py", line 975, in Sync_LocalHalf
self._InitWorkTree()
File "/home/christian/Documents/WORKING_ICS/.repo/repo/project.py", line 1758, in _InitWorkTree
raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree
to solve it run the same command without -j1
afilopou said:
Check here
http://forum.cyanogenmod.com/topic/39528-cant-dl-source/
editing repo did it work.
Sent from my Galaxy Nexus using Tapatalk
Click to expand...
Click to collapse
How did you fix the problem can you please tell me ? The link that you provided is not working.

Problem when doing repo init

hi devs
im trying to sync some code from github but i keep getting this error and i dont know how to solve it
Code:
[email protected]:~/Transferências/LCICS$ repo init -u git://github.com/IceColdSandwich/android.git -b ics
Traceback (most recent call last):
File "/home/danielgek/Transferências/LCICS/.repo/repo/main.py", line 385, in <module>
_Main(sys.argv[1:])
File "/home/danielgek/Transferências/LCICS/.repo/repo/main.py", line 365, in _Main
result = repo._Run(argv) or 0
File "/home/danielgek/Transferências/LCICS/.repo/repo/main.py", line 137, in _Run
result = cmd.Execute(copts, cargs)
File "/home/danielgek/Transferências/LCICS/.repo/repo/subcmds/init.py", line 290, in Execute
self._SyncManifest(opt)
File "/home/danielgek/Transferências/LCICS/.repo/repo/subcmds/init.py", line 154, in _SyncManifest
if not m.Sync_NetworkHalf(is_new=is_new):
File "/home/danielgek/Transferências/LCICS/.repo/repo/project.py", line 982, in Sync_NetworkHalf
current_branch_only=current_branch_only):
File "/home/danielgek/Transferências/LCICS/.repo/repo/project.py", line 1483, in _RemoteFetch
if GitCommand(self, cmd, bare=True, ssh_proxy=ssh_proxy).Wait() == 0:
File "/home/danielgek/Transferências/LCICS/.repo/repo/git_command.py", line 160, in __init__
_setenv(env, GIT_DIR, gitdir)
File "/home/danielgek/Transferências/LCICS/.repo/repo/git_command.py", line 119, in _setenv
env[name] = value.encode()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 24: ordinal not in range(128)
the problem its with python im on ubuntu 12.04 fresh install
thx

[Q] Setting up a 4.2.1 Build Environment (Need help)

Currently,
I'm trying to set up a build environment for JB 4.2.1 (CM10.1)... I've got the repo synced, and everything looks good, however, I'm still unsure how to add the necessary Nook files, this is really my first time attempting any type of development, although i'm fairly familiar with linux.
I've followed the instructions found here (changing the device and vendor) and where I'm stuck at is creating the local_manifest.xml, doesn't matter what i put in, it tells me that the repo's don't exist, or my public keys don't work.
so i guess, to build CM10.1 for the nook tablet, what do i need to put in this manifest file?
Any help would be appretiated, i'm available on google talk as "[email protected]" (text only) if someone is able to walk me through this.
DarkShr0ud said:
Currently,
I'm trying to set up a build environment for JB 4.2.1 (CM10.1)... I've got the repo synced, and everything looks good, however, I'm still unsure how to add the necessary Nook files, this is really my first time attempting any type of development, although i'm fairly familiar with linux.
I've followed the instructions found here (changing the device and vendor) and where I'm stuck at is creating the local_manifest.xml, doesn't matter what i put in, it tells me that the repo's don't exist, or my public keys don't work.
so i guess, to build CM10.1 for the nook tablet, what do i need to put in this manifest file?
Any help would be appretiated, i'm available on google talk as "[email protected]" (text only) if someone is able to walk me through this.
Click to expand...
Click to collapse
I'm having a similar problem with my repo
i get this, whenever i'm attempting to sync with something in my local_manifest.xml file
Code:
[email protected]:~/android/system$ repo sync
Traceback (most recent call last):
File "/home/hinxman/android/system/.repo/repo/main.py", line 408, in <module>
_Main(sys.argv[1:])
File "/home/hinxman/android/system/.repo/repo/main.py", line 388, in _Main
result = repo._Run(argv) or 0
File "/home/hinxman/android/system/.repo/repo/main.py", line 122, in _Run
copts, cargs = cmd.OptionParser.parse_args(argv)
File "/home/hinxman/android/system/.repo/repo/command.py", line 45, in OptionParser
self._Options(self._optparse)
File "/home/hinxman/android/system/.repo/repo/subcmds/sync.py", line 147, in _Options
self.jobs = self.manifest.default.sync_j
File "/home/hinxman/android/system/.repo/repo/manifest_xml.py", line 256, in default
self._Load()
File "/home/hinxman/android/system/.repo/repo/manifest_xml.py", line 302, in _Load
nodes.append(self._ParseManifestXml(local, self.repodir))
File "/home/hinxman/android/system/.repo/repo/manifest_xml.py", line 313, in _ParseManifestXml
root = xml.dom.minidom.parse(path)
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1920, in parse
return expatbuilder.parse(file)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
result = builder.parseFile(fp)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: mismatched tag: line 13, column 2
[email protected]:~/android/system$
hinxman said:
I'm having a similar problem with my repo
i get this, whenever i'm attempting to sync with something in my local_manifest.xml file
Code:
[email protected]:~/android/system$ repo sync
Traceback (most recent call last):
File "/home/hinxman/android/system/.repo/repo/main.py", line 408, in <module>
_Main(sys.argv[1:])
File "/home/hinxman/android/system/.repo/repo/main.py", line 388, in _Main
result = repo._Run(argv) or 0
File "/home/hinxman/android/system/.repo/repo/main.py", line 122, in _Run
copts, cargs = cmd.OptionParser.parse_args(argv)
File "/home/hinxman/android/system/.repo/repo/command.py", line 45, in OptionParser
self._Options(self._optparse)
File "/home/hinxman/android/system/.repo/repo/subcmds/sync.py", line 147, in _Options
self.jobs = self.manifest.default.sync_j
File "/home/hinxman/android/system/.repo/repo/manifest_xml.py", line 256, in default
self._Load()
File "/home/hinxman/android/system/.repo/repo/manifest_xml.py", line 302, in _Load
nodes.append(self._ParseManifestXml(local, self.repodir))
File "/home/hinxman/android/system/.repo/repo/manifest_xml.py", line 313, in _ParseManifestXml
root = xml.dom.minidom.parse(path)
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1920, in parse
return expatbuilder.parse(file)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
result = builder.parseFile(fp)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: mismatched tag: line 13, column 2
[email protected]:~/android/system$
Click to expand...
Click to collapse
Forgot to add my SSH-keys to Github... and there was an error in my Local_Manifest file.
Double check the one you used, Kuzma30 updated his today, so if you're using that one, that might fix your problem.
hinxman said:
Forgot to add my SSH-keys to Github... and there was an error in my Local_Manifest file.
Double check the one you used, Kuzma30 updated his today, so if you're using that one, that might fix your problem.
Click to expand...
Click to collapse
Thanks, yeah that did help, i'm able to sync my repo now at least, i'll post back if there are any more problems.
What is the minimum hardware CPU/memory requirements for a workable build environment?
I followed this guide http://wiki.cyanogenmod.org/index.php?title=Build_for_acclaim and I got the error below when I did a 'breakfast acclaim'
Code:
including vendor/cm/vendorsetup.sh
build/core/product_config.mk:239: *** _nic.PRODUCTS.[[device/bn/acclaim/cm.mk]]: "frameworks/base/build/tablet-dalvik-heap.mk" does not exist. Stop.
Device acclaim not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Repository for acclaim not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.
build/core/product_config.mk:239: *** _nic.PRODUCTS.[[device/bn/acclaim/cm.mk]]: "frameworks/base/build/tablet-dalvik-heap.mk" does not exist. Stop.
** Don't have a product spec for: 'cm_acclaim'
** Do you have the right repo manifest?
What am I missing?
digixmax said:
I followed this guide http://wiki.cyanogenmod.org/index.php?title=Build_for_acclaim and I got the error below when I did a 'breakfast acclaim'
Code:
...
** Don't have a product spec for: 'cm_acclaim'
** Do you have the right repo manifest?
What am I missing?
Click to expand...
Click to collapse
I found the problem: I didn't have the right local_manifest in the right directory (in .repo instead of .repo/local_manifests as I was led to believe).

Error while downloading CM10.1 source

Hey,
I can't download CM10.1 source due to this stupid error: (I run repo --trace sync -j4 to find it)
Code:
: export GIT_DIR=/home/lozohcum/CM/.repo/projects/vendor/tmobile/providers/ThemeManager.git
: git gc --auto 1>| 2>|
: load refs /home/lozohcum/CM/.repo/repo/.git
: load refs /home/lozohcum/CM/.repo/projects/abi/cpp.git
: git config --file /home/lozohcum/CM/.repo/projects/abi/cpp.git/config --null --list 1>| 2>|
: export GIT_DIR=/home/lozohcum/CM/.repo/projects/abi/cpp.git
: git rev-parse --verify refs/remotes/github/cm-10.1^0 1>| 2>|
: cd /home/lozohcum/CM/abi/cpp
: git read-tree --reset -u -v HEAD
fatal: This operation must be run in a work tree
Traceback (most recent call last):
File "/home/lozohcum/CM/.repo/repo/main.py", line 418, in <module>
_Main(sys.argv[1:])
File "/home/lozohcum/CM/.repo/repo/main.py", line 394, in _Main
result = repo._Run(argv) or 0
File "/home/lozohcum/CM/.repo/repo/main.py", line 142, in _Run
result = cmd.Execute(copts, cargs)
File "/home/lozohcum/CM/.repo/repo/subcmds/sync.py", line 657, in Execute
project.Sync_LocalHalf(syncbuf)
File "/home/lozohcum/CM/.repo/repo/project.py", line 1080, in Sync_LocalHalf
self._InitWorkTree()
File "/home/lozohcum/CM/.repo/repo/project.py", line 2059, in _InitWorkTree
raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree
can anyone help me?

hyphenation error

So, i get this error every single time i try to compile any Android ROM, even AOSP.
I'm sure i'm missing a package, but i can't figure out which it is, so i'm asking here for any help on identifying the problem.
Code:
FAILED: /bin/bash -c "frameworks/minikin/tools/mk_hyb_file.py external/hyphenation-patterns/da//hyph-da.pat.txt /home/gee/omni/out/target/product/shieldtablet/obj/ETC/hyph-da_intermediates/hyph-da.hyb"
602 unique nodes, 1676 total
Traceback (most recent call last):
File "frameworks/minikin/tools/mk_hyb_file.py", line 567, in <module>
main()
File "frameworks/minikin/tools/mk_hyb_file.py", line 564, in main
verify_hyb_file(out_fn, pat_fn, chr_fn, hyp_fn)
File "frameworks/minikin/tools/mk_hyb_file.py", line 529, in verify_hyb_file
ch_map, reconstructed_chr = map_to_chr(alphabet_map)
File "frameworks/minikin/tools/mk_hyb_file.py", line 440, in map_to_chr
assert len(lowercase) == 1, 'expected 1 lowercase character'
AssertionError: expected 1 lowercase character
[ 0% 17/2717] Ensure Jack server is installed and started
Jack server already installed in "/home/gee/.jack-server"
Server is already running
[ 0% 17/2717] Build hyb /home/gee/omni/out/target/pr... <- external/hyphenation-patterns/cy//hyph-cy.pat.txt
FAILED: /bin/bash -c "frameworks/minikin/tools/mk_hyb_file.py external/hyphenation-patterns/cy//hyph-cy.pat.txt /home/gee/omni/out/target/product/shieldtablet/obj/ETC/hyph-cy_intermediates/hyph-cy.hyb"
3290 unique nodes, 10601 total
Traceback (most recent call last):
File "frameworks/minikin/tools/mk_hyb_file.py", line 567, in <module>
main()
File "frameworks/minikin/tools/mk_hyb_file.py", line 564, in main
verify_hyb_file(out_fn, pat_fn, chr_fn, hyp_fn)
File "frameworks/minikin/tools/mk_hyb_file.py", line 529, in verify_hyb_file
ch_map, reconstructed_chr = map_to_chr(alphabet_map)
File "frameworks/minikin/tools/mk_hyb_file.py", line 440, in map_to_chr
assert len(lowercase) == 1, 'expected 1 lowercase character'
AssertionError: expected 1 lowercase character
[ 0% 17/2717] build /home/gee/omni/out/target/product/shieldtablet/obj/KERNEL_OBJ/usr
make: Entering directory '/home/gee/omni/kernel/nvidia/shield'
GEN /home/gee/omni/out/target/product/shieldtablet/obj/KERNEL_OBJ/Makefile
drivers/cpufreq/Kconfig:53:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:61:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:70:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:79:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:91:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:103:warning: choice value used outside its choice group
drivers/cpuquiet/Kconfig:60:warning: choice value used outside its choice group
drivers/cpuquiet/Kconfig:66:warning: choice value used outside its choice group
drivers/cpuquiet/Kconfig:73:warning: choice value used outside its choice group
#
# configuration written to .config
#
make: Leaving directory '/home/gee/omni/kernel/nvidia/shield'
make: Entering directory '/home/gee/omni/kernel/nvidia/shield'
CHK include/generated/uapi/linux/version.h
make: Leaving directory '/home/gee/omni/kernel/nvidia/shield'
[ 0% 17/2717] Build hyb /home/gee/omni/out/target/pr...xternal/hyphenation-patterns/de//hyph-de-1901.pat.txt
FAILED: /bin/bash -c "frameworks/minikin/tools/mk_hyb_file.py external/hyphenation-patterns/de//hyph-de-1901.pat.txt /home/gee/omni/out/target/product/shieldtablet/obj/ETC/hyph-de-1901_intermediates/hyph-de-1901.hyb"
8858 unique nodes, 29816 total
Traceback (most recent call last):
File "frameworks/minikin/tools/mk_hyb_file.py", line 567, in <module>
main()
File "frameworks/minikin/tools/mk_hyb_file.py", line 564, in main
verify_hyb_file(out_fn, pat_fn, chr_fn, hyp_fn)
File "frameworks/minikin/tools/mk_hyb_file.py", line 529, in verify_hyb_file
ch_map, reconstructed_chr = map_to_chr(alphabet_map)
File "frameworks/minikin/tools/mk_hyb_file.py", line 440, in map_to_chr
assert len(lowercase) == 1, 'expected 1 lowercase character'
AssertionError: expected 1 lowercase character
ninja: build stopped: subcommand failed.
make: *** [build/core/ninja.mk:158: ninja_wrapper] Error 1
The distribution is Void Linux, and yes i'd like to use my distro of choice to compile a ROm instead of having to switch to Ubuntu or Arch, where it obviously works.
I did install hyphen and about 20 other packages i thought could be the missing ones.
Thanks in advance.
Found a fix by using python 3 instead of 2 for hyphenation.
For future reference: https://github.com/CM-Huawei-P8-Development/local_manifests_gra_l09/issues/1
oh wow, same error here building for htc 10, and only started since moving from arch to void... perhaps this is void related. will mention to them.

Categories

Resources