[Q&A] [DEV] Docker template for building CyanogenMod - Android Q&A, Help & Troubleshooting

Q&A for [DEV] Docker template for building CyanogenMod
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [DEV] Docker template for building CyanogenMod. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!

Docker issues?
I'm running Windows 10 and I've installed Docker on my device. Everything works until I use the "./run.sh" command. It keeps returning:
Code:
invalid value "c:\\Users\\booge_000\\docker-cyanogenmod\\android;C:\\Program Files (x86)\\Git\\home\\cmbuild\\android" for flag -v: \Users\booge_000\docker-cyanogenmod\android;C:\Program Files (x86)\Git\home\cmbuild\android is not an absolute path
See 'c:\Program Files\Boot2Docker for Windows\docker.exe run --help'.
Is there any way I can fix this?

spenceboy98 said:
I'm running Windows 10 and I've installed Docker on my device. Everything works until I use the "./run.sh" command. It keeps returning:
Code:
invalid value "c:\\Users\\booge_000\\docker-cyanogenmod\\android;C:\\Program Files (x86)\\Git\\home\\cmbuild\\android" for flag -v: \Users\booge_000\docker-cyanogenmod\android;C:\Program Files (x86)\Git\home\cmbuild\android is not an absolute path
See 'c:\Program Files\Boot2Docker for Windows\docker.exe run --help'.
Is there any way I can fix this?
Click to expand...
Click to collapse
Hmm, I haven't tried this out with Windows (10 and older). I'm surprised that you can even run run.sh because that is a Unix shell script.
However if this really works then it's probably just a problem of setting the right paths for the shared volumes. I suggest that you remove the two "-v ..." parameters from run.sh and see if that helps.
Most likely I don't think that your problem is specific to my Docker project, it's rather a general issue with Docker on Windows. So you might ask on the Docker forum: https://forums.docker.com/
You can also install Ubuntu 14.04 (e.g. inside a VirtualBox machine) and install it there. This will work for sure!

Now I'm using VirtualBox with Ubuntu 14.04. I'm syncing the source files and now it's giving me:
Code:
Fetching projects: 99% (552/557) fatal: Not a git repository: '/home/cmbuild/android/.repo/projects/system/netd.git'
error: Cannot fetch CyanogenMod/android_system_netd
error: Exited sync due to fetch errors

spenceboy98 said:
Now I'm using VirtualBox with Ubuntu 14.04. I'm syncing the source files and now it's giving me:
Code:
Fetching projects: 99% (552/557) fatal: Not a git repository: '/home/cmbuild/android/.repo/projects/system/netd.git'
error: Cannot fetch CyanogenMod/android_system_netd
error: Exited sync due to fetch errors
Click to expand...
Click to collapse
Delete the netd.git folder and sync again.

michael_ch said:
Delete the netd.git folder and sync again.
Click to expand...
Click to collapse
It keeps recreating the folder and giving me the same error.

spenceboy98 said:
It keeps recreating the folder and giving me the same error.
Click to expand...
Click to collapse
Hmm really can't reproduce. Some things to try:
"repo selfupdate" - make sure that repo is up to date
"repo sync -j 1" - sync with only 1 concurrent connection
"repo sync --force-sync" - overwrite an existing git directory if it needs to point to a different object directory

michael_ch said:
Hmm really can't reproduce. Some things to try:
"repo selfupdate" - make sure that repo is up to date
"repo sync -j 1" - sync with only 1 concurrent connection
"repo sync --force-sync" - overwrite an existing git directory if it needs to point to a different object directory
Click to expand...
Click to collapse
Okay, I've tried that and it gives me the same error. I've tried deleting the netg file while syncing and then it just gives me this:
Code:
Fetching projects: 72% (394/546) Fetching project CyanogenMod/android_system_netd
fatal: Not a git repository: '/home/cmbuild/android/.repo/projects/system/netd.git'
fatal: Not a git repository: '/home/cmbuild/android/.repo/projects/system/netd.git'
error: Cannot fetch CyanogenMod/android_system_netd (GitError: CyanogenMod/android_system_netd pack-refs: fatal: Not a git repository: '/home/cmbuild/android/.repo/projects/system/netd.git'
)
Traceback (most recent call last):
File "/home/cmbuild/android/.repo/repo/main.py", line 513, in <module>
_Main(sys.argv[1:])
File "/home/cmbuild/android/.repo/repo/main.py", line 489, in _Main
result = repo._Run(argv) or 0
File "/home/cmbuild/android/.repo/repo/main.py", line 162, in _Run
result = cmd.Execute(copts, cargs)
File "/home/cmbuild/android/.repo/repo/subcmds/sync.py", line 672, in Execute
fetched = self._Fetch(to_fetch, opt)
File "/home/cmbuild/android/.repo/repo/subcmds/sync.py", line 363, in _Fetch
self._FetchProjectList(**kwargs)
File "/home/cmbuild/android/.repo/repo/subcmds/sync.py", line 254, in _FetchProjectList
success = self._FetchHelper(opt, project, *args, **kwargs)
File "/home/cmbuild/android/.repo/repo/subcmds/sync.py", line 297, in _FetchHelper
optimized_fetch=opt.optimized_fetch)
File "/home/cmbuild/android/.repo/repo/project.py", line 1181, in Sync_NetworkHalf
no_tags=no_tags)):
File "/home/cmbuild/android/.repo/repo/project.py", line 1960, in _RemoteFetch
self.bare_git.pack_refs('--all', '--prune')
File "/home/cmbuild/android/.repo/repo/project.py", line 2668, in runner
p.stderr))
error.GitError: CyanogenMod/android_system_netd pack-refs: fatal: Not a git repository: '/home/cmbuild/android/.repo/projects/system/netd.git'
I'm going to try to start again from scratch while booting from a disc and see if that makes a difference.

spenceboy98 said:
Okay, I've tried that and it gives me the same error.
Click to expand...
Click to collapse
Hmm, I wonder if one of your local manifest files includes a wrong repository?
What is the output of this:
Code:
grep -ri "netd" .repo/*manifest*
spenceboy98 said:
I'm going to try to start again from scratch while booting from a disc and see if that makes a difference.
Click to expand...
Click to collapse
Ok, let me know! In any case, your problem is clearly not Docker related...

michael_ch said:
Hmm, I wonder if one of your local manifest files includes a wrong repository?
What is the output of this:
Code:
grep -ri "netd" .repo/*manifest*
Ok, let me know! In any case, your problem is clearly not Docker related...
Click to expand...
Click to collapse
I encountered the same error "fatal: Not a git repository: 'xxxxxx/.repo/projects/external/blktrace.git'" and google brought me here.
I tried to delete the blktrace.git, but after I resync it with "repo sync -j1", it created the blktrace.git again and threw the same error out. Then I tried to update the repo, but failed. And the result of "grep -ri "netd" .repo/*manifest*" is like this in the picture.

BobbyCurry said:
I encountered the same error "fatal: Not a git repository: 'xxxxxx/.repo/projects/external/blktrace.git'" and google brought me here.
I tried to delete the blktrace.git, but after I resync it with "repo sync -j1", it created the blktrace.git again and threw the same error out. Then I tried to update the repo, but failed. And the result of "grep -ri "netd" .repo/*manifest*" is like this in the picture.
Click to expand...
Click to collapse
No matter what, it has nothing to do with the Docker image. Besides this, it's really hard for me to help with this because I'm not able to reproduce the issue.
I suggest that you're trying to debug the problem on your own. Run "git fetch" in the corresponding directories and see if that helps, etc.
Good luck!

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.

Guide on how I build my own CM9 test builts

A follow up on this - http://forum.xda-developers.com/showpost.php?p=28177937&postcount=1768 - in the CM9 FXP thread, have I promised to make a little guide.
Guide how I build CM9 for my Mango.
For the first time you try to build CM9.
Create ~/bin and download repo to that directory. Afterwards set executable bit to make it possible to ”execute”.
Code:
mkdir -p ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Now reboot the computer.
Create ~/android/system amd initialize the repository.
Code:
mkdir -p ~/android/system
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync
Setup the environmental settings and initialize the Mango build.
Code:
. build/envsetup.sh
brunch mango
Setup the environmental settings and initialize the Mango build.
Code:
git clone git://github.com/TheMuppets/proprietary_vendor_semc.git -b ics ~/android/system/vendor/semc
cd ~/android/system/device/semc/mango/
./setup-makefiles.sh
Download the prebuilts
Code:
~/android/system/vendor/cm/get-prebuilts
Check for new changes
Code:
cd ~/android/system/
repo sync
Setup the environment again and build the ROM (takes long time)
Code:
. build/envsetup.sh
brunch mango
You will now find the build here (change DATE into the date).
~/android/system/out/target/product/mango/cm-9-DATE-UNOFFICIAL-mango.zip
The next times you try to build it, you only need to do the following.
Delete build.prop, if not will build.prop not get generated.
Code:
rm -f ~/android/system/out/target/product/mango/system/build.prop
Syncronise the git repositories.
Code:
cd ~/android/system/
repo sync
Setup the environmental settings.
Code:
. build/envsetup.sh
Configure/build.
Code:
brunch mango
You will now find the build here (change DATE into the date).
~/android/system/out/target/product/mango/cm-9-DATE-UNOFFICIAL-mango.zip
If you are trying to build it on a 32bit system, you should change line 374 in ~/android/system/device/semc/msm7x30-common/releasetools/common.py
from:
Code:
cmd = ["java", "-Xmx2048m", "-jar",
to:
Code:
cmd = ["java", "-Xmx1024m", "-jar",
If you get into any trouble, please let me know, I may have missed something.
EDIT (July 2. 2012): I have made a patch to msm7x30-common, so you do not need to edit the file (with this patch does it automatically check if you run on a 64bit or a 32bit system):
http://code.google.com/p/freexperia/issues/detail?id=527
EDIT (July 6. 2012): If there has been an update on git://github.com/koush/proprietary_vendor_semc.git (like there has been today), shall you do the following (pull the updates):
Code:
cd ~/android/system/vendor/semc
git pull
EDIT (July 8. 2012): Adding the following, just before "</manifest>" in ".repo/local_manifest.xml" and the proprietary files will also get updated, when you make a normal "repo sync". Got this idea after talking to Andreas (so thank you Andreas).
Code:
<project name="TheMuppets/proprietary_vendor_semc" path="vendor/semc" remote="github" revision="ics" />
EDIT (July 11. 2012): Changed the proprietary repository from git://github.com/koush/proprietary_vendor_semc.git to git://github.com/TheMuppets/proprietary_vendor_semc.git
allright, i have already synched the cm9 repo. about 5.8 gbs
can you tell me what folders does it include?
edit:took me a few days to download, just don't want to download again
gandhar said:
allright, i have already synched the cm9 repo. about 5.8 gbs
can you tell me what folders does it include?
Click to expand...
Click to collapse
Are you thinking of the "clean" repo?
My ~/android/system/ consists of the following (remember the hidden directories):
abi
android
bionic
bootable
build
dalvik
development
device
external
frameworks
hardware
kernel
libcore
ndk
out
packages
prebuilt
sdk
system
vendor
.repo
.repoconfig
Makefile
You should be able to move your current directory and "just" sync it, to get it up to date.
hnl_dk said:
Are you thinking of the "clean" repo?
My ~/android/system/ consists of the following (remember the hidden directories):
abi
android
bionic
bootable
build
dalvik
development
device
external
frameworks
hardware
kernel
libcore
ndk
out
packages
prebuilt
sdk
system
vendor
.repo
.repoconfig
Makefile
Click to expand...
Click to collapse
allright, out of these except for kernel, out and .repoconfig i have all the others synced.
will using
Code:
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync
work?
i am missing kernel, out and .repoconfig
gandhar said:
allright, out of these except for kernel, out and .repoconfig i have all the others synced.
will using
Code:
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync
work?
i am missing kernel, out and .repoconfig
Click to expand...
Click to collapse
They are possibly first created when running brunch the first time. So it should be fine.
successfully building, but getting loads of warnings..
is that normal for the first build?
will report if it boots after compile is over.
gandhar said:
successfully building, but getting loads of warnings..
is that normal for the first build?
will report if it boots after compile is over.
Click to expand...
Click to collapse
There are lots of warnings.
Personally I usually remove all that warnings (using the -Werror option, so warnings get treated as errors) in the projects I am working on. But I understand why it can be a big problem with CM9, that is based on many different projects.
Looking forward to hear if you get a successful built.
hnl_dk said:
There are lots of warnings.
Personally I usually remove all that warnings (using the -Werror option, so warnings get treated as errors) in the projects I am working on. But I understand why it can be a big problem with CM9, that is based on many different projects.
Looking forward to hear if you get a successful built.
Click to expand...
Click to collapse
building will take some time...
well, most warnings are 'some variable has been set but not used', is that much significant?
gandhar said:
building will take some time...
well, most warnings are 'some variable has been set but not used', is that much significant?
Click to expand...
Click to collapse
Yes, first build takes a lot of time... the next times it will be a lot faster.
No that is not very significant, but things like that should still get fixed, to to make it easier to find the significant things.
The less warnings the more easy it is to spot what is important. This also goes for things that should get changed when upgrading to a new major version of the toolchain.
succesfull build!
phone:coconut-wt19i
time: 56 mins for the complete build.
cpu: 2.9 ghz - 4 cores
os:ubuntu 12.04 64 bit
backed up the phone.
boots into recovery
errorless install.
gandhar said:
phone:coconut-wt19i
time: 56 mins for the complete build.
cpu: 2.9 ghz - 4 cores
os:ubuntu 12.04 64 bit
backed up the phone.
boots into recovery
errorless install.
Click to expand...
Click to collapse
Super, looking forward to hear if everything is going to run as as should
hnl_dk said:
Super, looking forward to hear if everything is going to run as as should
Click to expand...
Click to collapse
running fine.
but i see some dependencies missing from the libs needed from
http://wiki.cyanogenmod.com/wiki/Template:Build_from_source_(CM9)
downloading them, will build again later..
is that the reason for the warnings?
gandhar said:
running fine.
but i see some dependencies missing from the libs needed from
http://wiki.cyanogenmod.com/wiki/Template:Build_from_source_(CM9)
downloading them, will build again later..
is that the reason for the warnings?
Click to expand...
Click to collapse
looks like a nice guide that is working with most devices, will save that link
No, the warnings are simply that you rarely find "clean" code, where most warnings have been fixed.
You also need to think of all the code from external projects.
You also only get many of the warnings, if you do not compile the code for some specific platforms.
hnl_dk said:
looks like a nice guide that is working with most devices, will save that link
No, the warnings are simply that you rarely find "clean" code, where most warnings have been fixed.
You also need to think of all the code from external projects.
You also only get many of the warnings, if you do not compile the code for some specific platforms.
Click to expand...
Click to collapse
saw that guide after i started checking for dependencies.
1.hey i see two zips in the output,
one cm-9-20120702-UNOFFICIAL-coconut and other cm_coconut-ota-eng.gandhar
the second is bigger.
i used the first one. why is the second one built i wonder?
2.i think of compiling aosp from source too, but the out folder is 11.3 gbs, what about that?
i do not want to end up falling short on space.
3.this is a system related question, how much will it hinder performance if i move the source to a different internal hd from the main one and build from there?
gandhar said:
saw that guide after i started checking for dependencies.
1.hey i see two zips in the output,
one cm-9-20120702-UNOFFICIAL-coconut and other cm_coconut-ota-eng.gandhar
the second is bigger.
i used the first one. why is the second one built i wonder?
Click to expand...
Click to collapse
Try to read the name ;-)
OTA - Over The Air... I guess that it can mbe used tfor OTA updates, like the mobile companies makes.
gandhar said:
2.i think of compiling aosp from source too, but the out folder is 11.3 gbs, what about that?
i do not want to end up falling short on space.
Click to expand...
Click to collapse
You could do a "make clear", but if you have enough space, would I keep it, so you do not need to wait for the already up to date files.
gandhar said:
3.this is a system related question, how much will it hinder performance if i move the source to a different internal hd from the main one and build from there?
Click to expand...
Click to collapse
There will be no problem with performance, as long as you move it to a HDD that is not too slow.
EDIT (July 2. 2012): I have made a patch to msm7x30-common, so you do not need to edit the file (with this patch does it automatically check if you run on a 64bit or a 32bit system):
http://code.google.com/p/freexperia/issues/detail?id=527
i do a repo sync again, at end of it i get errors on changed files. i think its not replacing the old files.
it's red text
error: bootable/recovery/: CyanogenMod/android_bootable_recovery checkout f8fc12e741d566af215407f35cfc52e5c1cc0023
error: build/: CyanogenMod/android_build checkout df7d6893a59e62c15dd20e306d8280b16969097c
error: external/openssl/: CyanogenMod/android_external_openssl checkout d4004ae717232b83ea445f74c881d9ddc24f589d
error: frameworks/base/: CyanogenMod/android_frameworks_base checkout e0a8c35c1572f0f0dbbda4d871d0a919a79cbe3f
error: hardware/samsung/: CyanogenMod/android_hardware_samsung checkout 23280fc439163a1971956167217283c4ae70bce3
error: packages/apps/Camera/: CyanogenMod/android_packages_apps_Camera checkout 644384a979ec9bd6b237e9031d5afbf592d3056b
error: packages/apps/Settings/: CyanogenMod/android_packages_apps_Settings checkout a946d9a905d460fa9d6c153e031285b566f8d223
error: system/core/: CyanogenMod/android_system_core checkout 389a2fa1d7e4bb8b6be411f272de2e8c92817964
gandhar said:
i do a repo sync again, at end of it i get errors on changed files. i think its not replacing the old files.
it's red text
error: bootable/recovery/: CyanogenMod/android_bootable_recovery checkout f8fc12e741d566af215407f35cfc52e5c1cc0023
error: build/: CyanogenMod/android_build checkout df7d6893a59e62c15dd20e306d8280b16969097c
error: external/openssl/: CyanogenMod/android_external_openssl checkout d4004ae717232b83ea445f74c881d9ddc24f589d
error: frameworks/base/: CyanogenMod/android_frameworks_base checkout e0a8c35c1572f0f0dbbda4d871d0a919a79cbe3f
error: hardware/samsung/: CyanogenMod/android_hardware_samsung checkout 23280fc439163a1971956167217283c4ae70bce3
error: packages/apps/Camera/: CyanogenMod/android_packages_apps_Camera checkout 644384a979ec9bd6b237e9031d5afbf592d3056b
error: packages/apps/Settings/: CyanogenMod/android_packages_apps_Settings checkout a946d9a905d460fa9d6c153e031285b566f8d223
error: system/core/: CyanogenMod/android_system_core checkout 389a2fa1d7e4bb8b6be411f272de2e8c92817964
Click to expand...
Click to collapse
Have not tried that.
You can try to do a "repo forall -c git reset --hard" this "resets" all the repositories (removes all changes, also if something has been corrupted).
hnl_dk said:
Have not tried that.
You can try to do a "repo forall -c git reset --hard" this "resets" all the repositories.
Click to expand...
Click to collapse
will it redownload?

Guide on how I build my own CM10 test builts

This is a follow up on my "old" "Guide on how I build my own CM9 test builts" thread.
Guide how I build CM10 for my Mango.
For the first time you try to build CM10.
Create ~/bin and download repo to that directory. Afterwards set executable bit to make it possible to ”execute”.
Code:
mkdir -p ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Now reboot the computer.
Create ~/android/system and initialize the repository.
Code:
mkdir -p ~/android/system
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
Unpack the attached local_manifest.xml.bz2 and place local_manifest.xml into ~/android/system/.repo
Synchronise towards the current git repositories.
Code:
repo sync
Setup the environmental settings and initialize the Mango build.
Code:
. build/envsetup.sh
breakfast mango
Initialize the Mango build.
Code:
cd ~/android/system/device/semc/mango/
./setup-makefiles.sh
Download the prebuilts
Code:
~/android/system/vendor/cm/get-prebuilts
Check for new changes
Code:
cd ~/android/system/
repo sync
Setup the environment again and build the ROM (takes long time)
Code:
. build/envsetup.sh
brunch mango
You will now find the build here (change DATE into the date).
~/android/system/out/target/product/mango/cm-10-DATE-UNOFFICIAL-mango.zip
The next times you try to build it, you only need to do the following.
Delete build.prop, if not will build.prop not get generated.
Code:
rm -f ~/android/system/out/target/product/mango/system/build.prop
Syncronise the git repositories.
Code:
cd ~/android/system/
repo sync
Setup the environmental settings.
Code:
. build/envsetup.sh
Configure/build.
Code:
brunch mango
You will now find the build here (change DATE into the date).
~/android/system/out/target/product/mango/cm-10-DATE-UNOFFICIAL-mango.zip
EDIT (August 14. 2012): If the boot.img is not booting, is it most likely due to the bootloader bug.
To make it "work", do the following (replace mango with your own device)
Code:
cd out/target/product/mango/
rm -f ./boot.img ./combinedroot.cpio ./combinedroot.fs ./ramdisk.img
cp ./root/logo.rle ./root/waste_of_space1
cp ./root/logo.rle ./root/waste_of_space2
cp ./combinedroot/logo.rle ./combinedroot/waste_of_space1
cp ./combinedroot/logo.rle ./combinedroot/waste_of_space2
cd ../../../..
brunch mango
just a technical: is it really necessary to reboot the computer after downloading the repo binary? and if so, why is that??
bokrug said:
just a technical: is it really necessary to reboot the computer after downloading the repo binary? and if so, why is that??
Click to expand...
Click to collapse
It is only necessary on some Linux distributions, where you will not be able to execute anything from that directory, before a reboot. You can try to see if you can do it without. If it is working, do you not need it.
hnl_dk said:
It is only necessary on some Linux distributions, where you will not be able to execute anything from that directory, before a reboot. You can try to see if you can do it without. If it is working, do you not need it.
Click to expand...
Click to collapse
There's no really need to reboot - edit .bashrc in your home directory and add
Code:
export PATH=~/bin/:$PATH
Save, then run:
Code:
source ~/.bashrc
It have to work on all distros
pikpok said:
There's no really need to reboot - edit .bashrc in your home directory and add
Code:
export PATH=~/bin/:$PATH
Save, then run:
Code:
source ~/.bashrc
It have to work on all distros
Click to expand...
Click to collapse
I just want to show the "universal" way.
Not everyone is using bash
hnl_dk said:
I just want to show the "universal" way.
Not everyone is using bash
Click to expand...
Click to collapse
If someone use another shell, e.g. zsh, then he'll know what files he have to edit IMO rebooting is wasting time.
pikpok said:
If someone use another shell, e.g. zsh, then he'll know what files he have to edit IMO rebooting is wasting time.
Click to expand...
Click to collapse
no it is not, as you do not need to edit any files. It will work automatically.
It is as much a waste of time to edit the resource-definition scripts.
hnl_dk said:
no it is not, as you do not need to edit any files. It will work automatically.
It is as much a waste of time to edit the resource-definition scripts.
Click to expand...
Click to collapse
Reboot - about 1 min
Edit one file and paste single command in terminal - for me it's 10secs
But it comes to offtop discussion, so it would be better to end it now
@edit - now when I think about it... bin in home folder won't be added to PATH automatically, at least in Arch Linux. Maybe Ubuntu is more "intelligent" :laugh:
pikpok said:
Reboot - about 1 min
Edit one file and paste single command in terminal - for me it's 10secs
But it comes to offtop discussion, so it would be better to end it now
@edit - now when I think about it... bin in home folder won't be added to PATH automatically, at least in Arch Linux. Maybe Ubuntu is more "intelligent" :laugh:
Click to expand...
Click to collapse
It does not take that long for me to make a reboot
No matter what, is it always good to have more methods to make something work.
It did the last time I tried Arch Linux... and no I am not using Ubuntu (too flashy for me )
Assuming that there is an entry in your ~/.profile that adds ~/bin to PATH, a reboot won't do anything that logout/login wouldn't. Furthermore, logout/login (in this case) won't do anything that sourcing ~/.profile wouldn't. So, simply issuing "source ~/.profile" is sufficient on most distributions. If you are using a distribution or a shell that doesn't do this by default, then you probably already know what you need to do.
I do, however, commend hnl_dk's efforts to make things simpler for newcomers to Android and Linux, even if it's not the the "fastest" or the "best" way. Whenever you start getting into one of those "what if?" arguments, things tend to spiral out of control. Sometimes it's better to just make a few assumptions and go with what is most likely to work.
A reboot might be a bit of an overkill, though. :laugh:
Can't run 64-bit prebuilts on my 32-bit Linux
I have a 32-bit Linux box so get the errors:
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: cannot execute binary file
Had a quick look around, but are there gcc etc. prebuilts for 32-bit Linux boxes?
TIA,
AK-A
ak-a said:
I have a 32-bit Linux box so get the errors:
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: cannot execute binary file
Had a quick look around, but are there gcc etc. prebuilts for 32-bit Linux boxes?
TIA,
AK-A
Click to expand...
Click to collapse
Did you try to build it as described?
It is working fine on my 32bit debian machine.
If not, please describe hos you try it build it.
hnl_dk said:
Did you try to build it as described?
It is working fine on my 32bit debian machine.
If not, please describe hos you try it build it.
Click to expand...
Click to collapse
Yeah, followed the instructions as per the first post. Will re-try and see if I missed/messed something and report back.
Hey !!! Do you think I should post my AOSP errors in this thread...so that its easier for us to keep track..?? :highfive:
As this is a Tutorial Thread for "how to build cm10 on your own" I don't think it makes sense posting errormessages of errm. "android open source project"? As I am writing this I recognize that I do not really understand what you mean.
CosmoDroid said:
Hey !!! Do you think I should post my AOSP errors in this thread...so that its easier for us to keep track..?? :highfive:
Click to expand...
Click to collapse
Like Snoopo is saying, should that be in this thread. Compiling AOSP is not as "user friendly" as CM, as our devices are officially supported by CM and not AOSP.
If you want, can you make a new thread about compiling "AOSP - Jelly bean".
i always stop at "repo sync"
i always stop at "repo sync"
and it always tell me
"Fetching projects: 21% (66/313) fatal: unable to connect to github.com:
github.com[0: 207.97.227.239]: errno=??????"
can you help me
thanks
shufuking said:
i always stop at "repo sync"
and it always tell me
"Fetching projects: 21% (66/313) fatal: unable to connect to github.com:
github.com[0: 207.97.227.239]: errno=??????"
can you help me
thanks
Click to expand...
Click to collapse
Same also happens for me, then I try again and again and again and then it is working.
Lots of people are accessing github, and there is only a limited "whole" for the data to get through.
hnl_dk said:
Same also happens for me, then I try again and again and again and then it is working.
Lots of people are accessing github, and there is only a limited "whole" for the data to get through.
Click to expand...
Click to collapse
thanks for your suggestion
finally i make it.
another question.
when i perform " brunch smultron"
i got lots of "cannot execute binary file"
and final "make: *** [out/target/product/smultron/obj/lib/crtbegin_static.o] Error 126"
do you know what it means?
shufuking said:
thanks for your suggestion
finally i make it.
another question.
when i perform " brunch smultron"
i got lots of "cannot execute binary file"
and final "make: *** [out/target/product/smultron/obj/lib/crtbegin_static.o] Error 126"
do you know what it means?
Click to expand...
Click to collapse
without more details, my best guess is that you may be building it on a FAT32 or NTFS partition?
then there is a good chance that linux is not able to read the executable bits.

Resync CM sources for build error

Hey,
While there were no nightlies for SGS2 I thought I would give building myself a go. I managed to churn out my first build on the same day as CM started their nightlies, but I quite like the idea of making my own. No changes to it, it is just nice to have done it myself.
After the first build, I tried to resync the git repo. Following this guide, http://teamhacksung.org/wiki/index.php/CyanogenMod10:How_to_build, I did
Code:
cd ~/android/system && repo sync -j16
all set to ./build.sh i9100,
But the repo sync keeps failing. I get this error:
Code:
repo sync -j16
Fetching projects: 100% (309/309), done.
error: Cannot remove project "device/samsung/i9100": uncommitted changes are present
commit changes, then run sync again
[email protected]:~/android/system$ sudo repo sync -j16
sudo: repo: command not found
Before I had that error, I got a similar error, but with the device/galaxys2-common directory instead. In true "i'm not really sure what I'm doing" fashion I deleted that directory in the hope that would fix it. It did not.
Could someone let me know what im doing wrong/where I'm going wrong. On Ubunutu 12.04.
Thanks

Stuck on building CM10 for jlo - need tip

hey, I followed the tutorial about "Compiling JB on Ubuntu" and I stuck on this error:
Code:
build/core/product_config.mk:253: *** No matches for product "cm_jlo". Stop.
Device jlo not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Traceback (most recent call last):
File "build/tools/roomservice.py", line 59, in <module>
result = json.loads(urllib2.urlopen(githubreq).read())
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 400, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 513, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 438, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 372, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 521, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: Forbidden
build/core/product_config.mk:253: *** No matches for product "cm_jlo". Stop.
** Don't have a product spec for: 'cm_jlo'
** Do you have the right repo manifest?
I have device tree and proprietary files and admint that I have read whole tutorial 10x times but tip at the and didn't help.
I tried making many changes in files but no result.
I spend hours on doing all those things and like always nothing work, please show me the way I should follow.
lozohcum said:
I have device tree and proprietary files and admint that I have read whole tutorial 10x times but tip at the and didn't help.
I tried making many changes in files but no result.
I spend hours on doing all those things and like always nothing work, please show me the way I should follow.
Click to expand...
Click to collapse
From what I can tell it seems you have an error related to python make sure you have the correct version of python installed for building (Version 2.6.x-2.7.x). If that doesn't work I would suggest reinstalling python and see if they fixes the error. You can also ask about your build error here http://forum.xda-developers.com/showthread.php?t=2059939.
Sent from my SCH-I535 using xda premium
Odp: Stuck on building CM10 for jlo - need tip
Okay I'll reinstall python and write here if it works
now this error:
Code:
build/core/product_config.mk:253: *** No matches for product "cm_jlo". Stop.
Device jlo not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Found repository: android_device_sony_jlo
Default revision: cm-10.1
Checking branch info
Default revision cm-10.1 not found in android_device_sony_jlo. Bailing.
Branches found:
jellybean
Use the ROOMSERVICE_BRANCHES environment variable to specify a list of fallback branches.
build/core/product_config.mk:253: *** No matches for product "cm_jlo". Stop.
** Don't have a product spec for: 'cm_jlo'
** Do you have the right repo manifest?
Use jellybean as your branch.
Sent from my SCH-R950 using Tapatalk 2
How to do this? can you explain? I don't know what you mean exacly.
can you give me proper command?
lozohcum said:
How to do this? can you explain? I don't know what you mean exacly.
can you give me proper command?
Click to expand...
Click to collapse
for cm10 repo init -u git://github.com/CyanogenMod/android.git -b jellybean
you had cm10.1 in the error which is still a work in progress
ah I understand, I have downloaded CM10.1 against CM10, so if I download CM10 will it work?
lozohcum said:
ah I understand, I have downloaded CM10.1 against CM10, so if I download CM10 will it work?
Click to expand...
Click to collapse
Yes this should solve your compile error allowing the build to compile successfully unless it runs into another unexpected build error.

Categories

Resources