Compiling error ../repo/android.git is HTML? - Android Q&A, Help & Troubleshooting

I just got everything working for the first time finally and I'm not sure how to get around this. Every compiling/building guide says to execute the following with appropriate URL and branch, but it gives me the (second) below.
Code:
repo init –u git://github.com/user/android.git –b cm-10.2
Code:
[email protected]:~/android/omni$ repo init -u git://github.com/mike64221/android.git -b android-4.4
/home/mike/bin/repo: line 1: syntax error near unexpected token `newline'
/home/mike/bin/repo: line 1: `<!DOCTYPE html>'
I just can't figure it out. Could anyone help?
Yes, I am (attempting) to build Omni.
Hopefully there'll be some possible solutions by morning so I can go ahead and let it work during school.
Sent from my MB886 using Tapatalk

You downloaded the repo utility wrongly. I'm guessing from a dead link (the HTML file is your repo file, not android.git). Look for the correct location and download it again.

GermainZ said:
You downloaded the repo utility wrongly. I'm guessing from a dead link (the HTML file is your repo file, not android.git). Look for the correct location and download it again.
Click to expand...
Click to collapse
What repo utility? The repo Linux package? If so, where should I download it from? I got the current version from the default Crunchbang/Debian repositories.
Sent from my MB886 using Tapatalk

penser said:
What repo utility? The repo Linux package? If so, where should I download it from? I got the current version from the default Crunchbang/Debian repositories.
Sent from my MB886 using Tapatalk
Click to expand...
Click to collapse
I doubt a system package installed itself to your home directory.
Code:
/home/mike/bin/repo

GermainZ said:
I doubt a system package installed itself to your home directory.
Code:
/home/mike/bin/repo
Click to expand...
Click to collapse
Must have copied the link wrong. (Using this guide http://www.techlila.com/compile-android-rom-from-source-code/) Now I'm getting
Code:
bash: /home/mike/bin/repo: Permission denied
EDIT: Nevermind, got it. Just had to do some digging at http://source.android.com/source/downloading.html.
EDIT: Now getting
Code:
fatal: manifest 'default.xml' not available
fatal: remote caf not defined in /home/mike/android/omni/.repo/manifests/default.xml
will be checking responses periodically, can't try for around 6-7 hours.
EDIT: Reading it now, I need to add a remote for "caf". Yay, more digging.
Looked through the default.xml in class and found the caf remote with no fetch, so I'll have to fix that sometime, then hopefully it'll be all good.
Got home, fixed it up, got it working and now there are issues with the omni repos (another person got the same error as me). Hopefully either overnight build or during-school build works. Thanks for your help!

Related

[SCRIPT/KITCHEN]How to compile any AOSP derivative for the Amaze 4G

Ok new method you have to be running Ubuntu. I made an All in one script to do everything for you I'm really tired so for now figure it out your self i couldn't have made it any easier to use. It even downloads my tree and cm9/10/aokp
Instructions
1. Open Terminal
2. Copy and paste this
Code:
cd ~/ && git clone git://github.com/Sportsstar89/scripts.git && cd ~/scripts
3. Then run the script
Code:
./cm_script
### Below this is outdated ###
Code:
Ok I am writing this tutorial to encourage people to learn and to help develop CM9 as more people = more ideas
First you need to be running linux i recommend ubuntu
For 32-bit & 64-bit systems:
1.[code]sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc
NOTE: On Ubuntu 11.10, and variants, you need to enable the parter repository to install sun-java6-jdk:
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
2.
Code:
mkdir -p ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
export PATH=~/bin:$PATH
3.
Code:
mkdir -p ~/android
cd android
4.
Code:
repo init -u git://github.com/Sportsstar89/android.git -b ics
repo sync -j4
5.
Code:
. build/envsetup.sh
6.
Code:
brunch ruby -j#
#= How ever man cores you have ex. if you have a quad core it would be "brunch ruby -j4"
7. Wait for the build to complete and it will be in the out/target/product/ruby/
Ok so i think i have everything if you run in to any issues let me know[/CODE]
Default.xml fixed
Sent from my HTC_Amaze_4G using xda premium
Does that tutorial also work for devices like the Incredible s that don't have CM9 by now?
Does Compile from source mean that I can compile CM9 for my device even if it isn't a supoprted device by cyanogenmod?
Really nice idea to write this tutorial!
OHowever you wrote the same dependencies for both architectures I think The 32 bits one definitely seems to be wrong with all these lib32-*
Sent from my HTC Amaze 4G using XDA
00hero00 said:
Does that tutorial also work for devices like the Incredible s that don't have CM9 by now?
Does Compile from source mean that I can compile CM9 for my device even if it isn't a supoprted device by cyanogenmod?
Click to expand...
Click to collapse
You would have to use the incredible's device tree and edit in to the vendor setup.sh in vendor/cm 'add_lunch_combo cm_inc-userdebug' or what ever your device's codename is and then brunch inc
johnride said:
Really nice idea to write this tutorial!
OHowever you wrote the same dependencies for both architectures I think The 32 bits one definitely seems to be wrong with all these lib32-*
Sent from my HTC Amaze 4G using XDA
Click to expand...
Click to collapse
Yea ubuntu changed their name they still download they just give you a bunch of warnings
Thank you so much for this write up.
After the repo sync -j4 command my computer has been running the sync for about 5 hours.
My question is, for future updates I'd need to run this command again, correct? Next time I run it, it shouldn't take nearly as long, right? Just thought I'd ask.
Sent from my HTC_Amaze_4G using Tapatalk 2
Nshih422 said:
Thank you so much for this write up.
After the repo sync -j4 command my computer has been running the sync for about 5 hours.
My question is, for future updates I'd need to run this command again, correct? Next time I run it, it shouldn't take nearly as long, right? Just thought I'd ask.
Sent from my HTC_Amaze_4G using Tapatalk 2
Click to expand...
Click to collapse
No it won't take as long because it will only get the new files and get rid of the new ones. (Usually takes about 30 seconds for me on 50mbps internet)
Sent from my HTC_Amaze_4G using Tapatalk 2
Ok, sorry for the questions but im a noob in linux. Im running ubuntu 12.04 LTS
so the java install gave me this
Code:
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'sun-java6-jdk' has no installation candidate
So I installed java using this tutorial HERE.
Also I got this error:
Code:
Package lib32readline5-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32readline-gplv2-dev
E: Package 'lib32readline5-dev' has no installation candidate
So i installed that package instead.
Im guessing one of these problems is leading me to this error when I brunch ruby -j4
Code:
make: *** [out/host/common/obj/JAVA_LIBRARIES/dumpkey_intermediates/javalib.jar] Error 127
make: *** Waiting for unfinished jobs....
In file included from external/srec/tools/grxmlcompile/sub_grph.h:26:0,
from external/srec/tools/grxmlcompile/sub_supp.cpp:26:
external/srec/tools/grxmlcompile/vocab.h:72:54: warning: ‘typedef’ was ignored in this declaration [enabled by default]
external/srec/tools/grxmlcompile/sub_supp.cpp: In member function ‘void SubGraph::ClearDuplicateArcs()’:
external/srec/tools/grxmlcompile/sub_supp.cpp:366:12: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses]
In the out/target/product/ruby folder I have
Code:
obj (folder)
root (folder)
system (folder)
clean_steps.mk
previous_build_config.mk
Ruby folder is:
Contents: 2,885 items, totalling 24.0 MB
Any help on where to go from here? Thanks in advance.
Nshih422 said:
Ok, sorry for the questions but im a noob in linux. Im running ubuntu 12.04 LTS
so the java install gave me this
Code:
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'sun-java6-jdk' has no installation candidate
So I installed java using this tutorial HERE.
Also I got this error:
Code:
Package lib32readline5-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32readline-gplv2-dev
E: Package 'lib32readline5-dev' has no installation candidate
So i installed that package instead.
Im guessing one of these problems is leading me to this error when I brunch ruby -j4
Code:
make: *** [out/host/common/obj/JAVA_LIBRARIES/dumpkey_intermediates/javalib.jar] Error 127
make: *** Waiting for unfinished jobs....
In file included from external/srec/tools/grxmlcompile/sub_grph.h:26:0,
from external/srec/tools/grxmlcompile/sub_supp.cpp:26:
external/srec/tools/grxmlcompile/vocab.h:72:54: warning: ‘typedef’ was ignored in this declaration [enabled by default]
external/srec/tools/grxmlcompile/sub_supp.cpp: In member function ‘void SubGraph::ClearDuplicateArcs()’:
external/srec/tools/grxmlcompile/sub_supp.cpp:366:12: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses]
In the out/target/product/ruby folder I have
Code:
obj (folder)
root (folder)
system (folder)
clean_steps.mk
previous_build_config.mk
Ruby folder is:
Contents: 2,885 items, totalling 24.0 MB
Any help on where to go from here? Thanks in advance.
Click to expand...
Click to collapse
Dis you set JAVA_HOME correctly for the jdk
Sent from my HTC_Amaze_4G using xda premium
OK! First compile ever thanks to your guide! THANKS Sportsstar89!
Originally I was running it on my SSD and for some reason it wasnt working well. Download took 5 hours and compile was running for 3 hours before I ran out of space. So I swapped hard drives and finished the whole process in a little under 3 hours. I guess my SSD is either going bad or needs to be set up somehow to work properly with linux.
Compile took 1 hour 11 minutes
I recommend anyone who wants to try this out to at least give yourself 30GB for the Ubuntu Install.
So apparently, There are two zips in the ruby folder after its done compiling. I flashed the "cm-9-20120625-UNOFFICIAL-ruby" one first then flashed the "cm_ruby-ota-eng.a.zip" am I doing it right?
I keep getting SystemUI error and it wont stop. Not trying to report issues just want to know if I'm on the right track.
Thanks again for all your hard work. Cant wait till this is done!
EDIT:
I figured out that the one that had ota in the title is what is used to make the unofficial. For some reason though the ota seems to function a little better.
Nshih422 said:
OK! First compile ever thanks to your guide! THANKS Sportsstar89!
Originally I was running it on my SSD and for some reason it wasnt working well. Download took 5 hours and compile was running for 3 hours before I ran out of space. So I swapped hard drives and finished the whole process in a little under 3 hours. I guess my SSD is either going bad or needs to be set up somehow to work properly with linux.
Compile took 1 hour 11 minutes
I recommend anyone who wants to try this out to at least give yourself 30GB for the Ubuntu Install.
So apparently, There are two zips in the ruby folder after its done compiling. I flashed the "cm-9-20120625-UNOFFICIAL-ruby" one first then flashed the "cm_ruby-ota-eng.a.zip" am I doing it right?
I keep getting SystemUI error and it wont stop. Not trying to report issues just want to know if I'm on the right track.
Thanks again for all your hard work. Cant wait till this is done!
EDIT:
I figured out that the one that had ota in the title is what is used to make the unofficial. For some reason though the ota seems to function a little better.
Click to expand...
Click to collapse
The cm_ota is the not zipaligned version that you would get from doing
Code:
. build/envsetup.sh
lunch cm_ruby
make otapackage -j#
but by using the brunch command it zipaligns it for you and produces the cm-date-unofficial.zip
Nshih422 said:
OK! First compile ever thanks to your guide! THANKS Sportsstar89!
Originally I was running it on my SSD and for some reason it wasnt working well. Download took 5 hours and compile was running for 3 hours before I ran out of space. So I swapped hard drives and finished the whole process in a little under 3 hours. I guess my SSD is either going bad or needs to be set up somehow to work properly with linux.
Compile took 1 hour 11 minutes
I recommend anyone who wants to try this out to at least give yourself 30GB for the Ubuntu Install.
So apparently, There are two zips in the ruby folder after its done compiling. I flashed the "cm-9-20120625-UNOFFICIAL-ruby" one first then flashed the "cm_ruby-ota-eng.a.zip" am I doing it right?
I keep getting SystemUI error and it wont stop. Not trying to report issues just want to know if I'm on the right track.
Thanks again for all your hard work. Cant wait till this is done!
EDIT:
I figured out that the one that had ota in the title is what is used to make the unofficial. For some reason though the ota seems to function a little better.
Click to expand...
Click to collapse
I'm getting the SystemUI error too. I haven't tried the cm_ruby-ota-eng.a.zip yet to see if that helps. Anyone else getting this problem? Does anyone know why it's doing that?
Sent from my HTC_Amaze_4G using XDA
derekalan18 said:
I'm getting the SystemUI error too. I haven't tried the cm_ruby-ota-eng.a.zip yet to see if that helps. Anyone else getting this problem? Does anyone know why it's doing that?
Sent from my HTC_Amaze_4G using XDA
Click to expand...
Click to collapse
It's a bug from using the stock kernel it'll be fixed soon
Sent from my HTC_Amaze_4G using xda premium
sportsstar89 said:
It's a bug from using the stock kernel it'll be fixed soon
Sent from my HTC_Amaze_4G using xda premium
Click to expand...
Click to collapse
Oh ok. I thought I did something wrong.
Sent from my HTC_Amaze_4G using XDA
derekalan18 said:
Oh ok. I thought I did something wrong.
Sent from my HTC_Amaze_4G using XDA
Click to expand...
Click to collapse
I thought I did something wrong too. So I deleted my "bin" and "android" folders and started from scratch and now it wont compile. I keep getting error 1, or error 2. Ill update with an exact error when i get a chance.
EDIT: sorry I forgot to update. I think my problem was not making repo, in bin folder executable. Like the suggestion below, when I repeated the process step by step it compiled again.
Nshih422 said:
I thought I did something wrong too. So I deleted my "bin" and "android" folders and started from scratch and now it wont compile. I keep getting error 1, or error 2. Ill update with an exact error when i get a chance.
Click to expand...
Click to collapse
If you deleted bin, you'll have to add repo back in and make it executable. Glad you got it working. I love compiling android.
I am syncing the git right now on my ArchLinux and I have had to modify a little bit the repo and main.py scripts to get them working. The python command on ArchLinux is actually python 3.2 so there are multiple syntax errors popping. To fix it I just installed python2 and changed "python" for "python2" at the begining of those scripts.
Just posting this to help anybody.
By the way this git repo is HUGE! 1.9 GB and still downloading... I wonder why I see so much cm7 stuff in the syncing output? We need all cm7 sources to compile cm9 on the Amaze?
Edit: 11.1GB ? WTF? My 74GB home disk is now almost full. Why is it so big?
johnride said:
I am syncing the git right now on my ArchLinux and I have had to modify a little bit the repo and main.py scripts to get them working. The python command on ArchLinux is actually python 3.2 so there are multiple syntax errors popping. To fix it I just installed python2 and changed "python" for "python2" at the begining of those scripts.
Just posting this to help anybody.
By the way this git repo is HUGE! 1.9 GB and still downloading... I wonder why I see so much cm7 stuff in the syncing output? We need all cm7 sources to compile cm9 on the Amaze?
Edit: 11.1GB ? WTF? My 74GB home disk is now almost full. Why is it so big?
Click to expand...
Click to collapse
That's how big source code for android is a full build will take about 50gb to complete
New!!! Now a script! Easy to use and you no longer have to wait for me to build
Kick-ass. Since I'm running Mint Maya, I'll give this a go and see how it craps out.

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.

[Q] Error with "gralloc" when building CM10.1 through Chad's repo

Hello, I am following the compiling guide from the development forum, but cannot reply to it as I have too few posts.
( http://forum.xda-developers.com/showthread.php?t=1998669&highlight=compile )
I am trying to compile CM10.1. Only difference is I'm using Linux Mint, otherwise I'm following the guide completely. The error I am receiving is:
Code:
build/core/base_rules.mk:130: *** hardware/qcom/display/libgralloc: MODULE.TARGET.SHARED_LIBRARIES.gralloc.msm8660 already defined by device/htc/vigor/display-legacy/libgralloc. Stop.
Well being linux mint it shouldnt make a difference. Mint is a ubuntu spin off and also a deb based system. If those instructions work on ubuntu it should work on mint. Make sure all your packages are installed and didnt error out or anything.
There are duplicates between our device tree and the cm-10.1 qcom media tree. You have to revert the commit that added msm-8660 support in hardware/qcom/media.
Code:
cd hardware/qcom/media/
git revert 333d0e460b
<CTRL+X>
Y
cd ../../..
Shrike1978, after running that revert git says:
Code:
[detached HEAD a1b988b] Revert "media: allow msm8660 into repo"
1 file changed, 1 insertion(+), 1 deletion(-)
But I still get the same error...
shrike1978 said:
There are duplicates between our device tree and the cm-10.1 qcom media tree. You have to revert the commit that added msm-8660 support in hardware/qcom/media.
Code:
cd hardware/qcom/media/
git revert 333d0e460b
<CTRL+X>
Y
cd ../../..
Click to expand...
Click to collapse
I have this same problem as well.
Looks like more conflicting now. I'll look today and see what's up.
Sent from my ADR6425LVW using Tapatalk 2
Check here: http://forum.xda-developers.com/showpost.php?p=37612783&postcount=287
Shrike1978, thank you for the informative instructions, very helpful . Everything appears to be working now.
shrike1978 said:
Check here: http://forum.xda-developers.com/showpost.php?p=37612783&postcount=287
Click to expand...
Click to collapse

Help me Compiling CyanogenMod 13 on Ubuntu 16.04

Hi developers. I am very much newbie to whole android development and trying to learn how android works and compiling a rom for myself. Can somebody make a tutorial about compiling CyanogenMod 13 in Ubuntu 16.04 with open jdk 8 ? There are many written tutorials in internet and different guides have me different command instructions. And the android official porting guide is confusing to me. I have no prior knowledge in Java and not much in Linux commands. I am stucked at Initializing my build environment. I have downloaded the compressed source code of CM 13 from this http://forum.xda-developers.com/android/software/sources-android-sources-highly-t3231109 and extracted to a working directory naming "android"
Now after extraction, this folder contains a .repo folder containing 12GB of source code.
(whats the actual size ?)
Then followed this tutorial https://nathanpfry.com/how-to-setup-ubuntu-16-04-lts-xenial-xerus-to-compile-android-roms/
then at android dir, which is my working directory, typing these commands gave me errors attached below.
proceeded to bashrc steps without any problem, then when I typed repo init -u https://github.com/CyanogenMod/android.git -b cm-13.0 to initialize the repo, got an error message attached below. (5th attachment)
Well. As I already have those source codes in .repo, and extracted inside my working directory 'android' so I run repo sync commands which gives me an output attached below. (2nd attachment)
Then after typed these commands
cd .repo/manifests
git fetch origin
git reset --hard origin/cm-13.0
repo sync
And it started to download few things again and
gives me another result with an error (Attached below 3rd attachment).
Then typed cd vendor/cm/
it gives me a shock by no such file or directory exists. See vendor error.png attachment and I am stucked. (4th attachment)
no commands taking properly after that.. prebuilts commands stated as invalid, no device specific code downloaded (I am using a Micromax Bolt Q370 device), no breakfast command taking.. nothing. I am stucked. Whats wrong I am doing ?
I have downloaded 12 GB of data.
(Mobile Data is so expensive)
P.S. I am also uploading some snapshots of my Ubuntu home and working directory so that you can understand what's wrong with no such file or directory error. I dont want to download the whole source code again, and point me out if I am acting like a noob. Your guides will be appreciated and grateful. Have a good day.
I haven't compiled a Rom before? But none of the guides you linked are from source.android.com. Best to do a "make clean" and follow the offical guide provded by Google and adapt as needed. Also for a functioning Rom you'll probably need the proprietary binary blobs for your phone.
Best thing about the android/Google guide is that they are using ubuntu, and assume that you are to, so the guide is specifically aimed for ubuntu, making your life easier.
https://source.android.com/source/index.html
The android source guide is bit complicated for me as I am new to both git and repository things.
A video for CM 13 with a step to step guide will be appreciated at current time. I think it won't be a problem who already has repository installed and built CM 13 before.
Dont use openjdk 8, use 7 as of now 8 is still experimental.
You can try build without sync it first. Just use whatever comes from extracted tar.xz. add your device, kernel, vendor tree. Do source build/envsetup.sh , add_lunch_combo , lunch and then make otapackage.
Please check CyanogenMod build wiki.
Terminal is not taking build/env command. Well buddy, do you have cm 13 repo ?
Check out my attachments. The directories. Are they missing anything ?
The Wiki and Android Source page guides are confusing to me. Sorry I am a beginner but determined to learn
Sorry, I based my previous comment for non-repo archive. For .repo folder you should try to extract the source first and then proceed with build/envsetup.sh, etc, etc
.repo is aleady extracted to my working directory 'android', contains 13GB of source code.
Now if i give envsetup command, my linux terminal doesn't understand it and responses an invalid command error.
vikoadi said:
Dont use openjdk 8, use 7 as of now 8 is still experimental.
You can try build without sync it first. Just use whatever comes from extracted tar.xz. add your device, kernel, vendor tree. Do source build/envsetup.sh , add_lunch_combo , lunch and then make otapackage.
Please check CyanogenMod build wiki.
Click to expand...
Click to collapse
Somebody said me that openjdk 7 is incompatible for CM 13
I am done with repo sync but there are many questions in my mind and things to learn. I made a separate post of these question here http://forum.xda-developers.com/android/help/questions-compiling-cyanogenmod-13-t3496186/page1

Categories

Resources