Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,772,461 Members 47,412 Now Online
XDA Developers Android and Mobile Development Forum

[DEV] Building CM from scratch (the easy way)! - *nix Shell Script

Tip us?
 
nicandris
Old
#21  
nicandris's Avatar
Recognized Developer - OP
Thanks Meter 198
Posts: 1,102
Join Date: Jan 2009
Location: Nicosia
Quote:
Originally Posted by drigerott View Post
mmmm but the latest merge aren't on rom (like profiles on power down screen etc.)

with this repo we build rc1? or nightly? ^_^

and... build.sh doesn't work properly... i modified like this:

Code:
cd ~/android/system/;
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread;
repo sync;
cd;
wget http://dl.dropbox.com/u/6751304/htc.zip;
unzip htc.zip;
mv ~/htc/ ~/android/system/vendor/htc/;
cd ~/android/system/vendor/cyanogen/;
./get-rommanager;
cd ~/android/system/;
. build/envsetup.sh;
lunch cyanogen_passion-eng;
make -j`grep 'processor' /proc/cpuinfo | wc -l` bacon;
cp ~/android/system/out/target/product/passion/update*.zip ~/Scrivania/update-cm7-N1-$(date +%d_%m-%H.%M.%S).zip
echo -e [=-This is an ALPHA-test version of whatever this is-=];


instead of

Code:
repo sync ;
cp ./vendor/cyanogen/products/cyanogen_passion.mk ./buildspec.mk;
. build/envsetup.sh;
lunch cyanogen_passion-eng;
make -j`grep 'processor' /proc/cpuinfo | wc -l` bacon;
cp ~/android/system/out/target/product/passion/update*.zip ~/Desktop/update-cm7-N1-$(date +%d_%m-%H.%M.%S).zip

is correct? ^^

thanks for you're replay)
the repo is the official cm repo. what the nightlies buildbots compile. so it should have all the changes in there. will compile now and check if something is missing. for the edited code, you pasted 2 different things, first part from androidmake and second from build.sh. what is the problem that needed fixing?
 
drigerott
Old
(Last edited by drigerott; 26th February 2011 at 07:47 PM.)
#22  
Senior Member
Thanks Meter 49
Posts: 291
Join Date: Jan 2010
Location: Torino
build.sh downloaded from first post, don't work...terminal :

Quote:
drigerott@drigerott:~/Scrivania$ sudo ./build.sh
[sudo] password for drigerott:
./build.sh: 1: repo: not found
cp: impossibile eseguire stat di "./vendor/cyanogen/products/cyanogen_passion.mk": File o directory non esistente
.: 3: Can't open build/envsetup.sh

infact i just copy the end of you're androidmake (the cd repo line)
 
nicandris
Old
(Last edited by nicandris; 26th February 2011 at 07:53 PM.)
#23  
nicandris's Avatar
Recognized Developer - OP
Thanks Meter 198
Posts: 1,102
Join Date: Jan 2009
Location: Nicosia
Quote:
Originally Posted by drigerott View Post
build.sh downloaded from first post, don't work...terminal :

Code:
drigerott@drigerott:~/Scrivania$ sudo ./build.sh
[sudo] password for drigerott: 
./build.sh: 1: repo: not found
cp: impossibile eseguire stat di "./vendor/cyanogen/products/cyanogen_passion.mk": File o directory non esistente
.: 3: Can't open build/envsetup.sh

infact i just copy the end of you're androidmake (the cd repo line)
wow thanx for that!! you are right... one moment and i will reupload
edit* uploaded. apparently i forgot
Code:
 cd ~/android/system ;
 
RunTimeWorld
Old
#24  
RunTimeWorld's Avatar
Senior Member
Thanks Meter 28
Posts: 154
Join Date: Nov 2010
Location: Switzerland
would be nice if the script checks and skips stuff that is installed already such as the android sdk
 
nicandris
Old
#25  
nicandris's Avatar
Recognized Developer - OP
Thanks Meter 198
Posts: 1,102
Join Date: Jan 2009
Location: Nicosia
Quote:
Originally Posted by RunTimeWorld View Post
would be nice if the script checks and skips stuff that is installed already such as the android sdk
working on that already. also options to install for other devices, create shortcuts, recognize x64 etc etc
 
crachel
Old
#26  
crachel's Avatar
Senior Moderator
Thanks Meter 2542
Posts: 3,476
Join Date: Jul 2008
Location: North Texas
Thanks for this

I'm gonna add this to a cron job so I can have builds in between the nightlies, while we wait for a stable release

moto x: 4.4 | flo: 4.4

other: Chromecast | Chromebook | System76 | MacBook Air

former: hammerhead | m7 | mako | Kindle Fire | CR-48 | Revue | grouper | maguro | crespo | passion | GT-I9100 | vision | rhodium | kaiser

 
nocomp
Old
#27  
Senior Member
Thanks Meter 49
Posts: 655
Join Date: Feb 2007
Location: argonay
Default repo not found but git-core installed

HI,
first of all thxx for this great tool )))
i have try my first rom, but face a bug, when ppl call, the screen of mùy nexus one is all white for 5 sec :'(
i am trying the build.sh script, but i am having this error :

HTML Code:
[CODE]herve@android-factory:~/androdev$ sh build.sh
build.sh: 2: repo: not found
build/envsetup.sh: 1: Syntax error: "(" unexpected
herve@android-factory:~/androdev$ [/CODE]
but what is weird, git-core is installed

Code:
herve@android-factory:~/androdev$ sudo apt-get install git-core
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
git-core est déjà la plus récente version disponible.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 246 non mis à jour.
did i missed something????


thxx for your help

herve
nokia 3210 Qtek 9090 htc magic -- nexus one -- galaxy beam --Galaxy Beam -- galaxy s -- arc - arc s -- htc lg optimus 2x -- htc evo 3d -- Xperia S -- HTC one X - HTC One - Xperia Z2
Subscribe to my youtube Channel
 
nocomp
Old
#28  
Senior Member
Thanks Meter 49
Posts: 655
Join Date: Feb 2007
Location: argonay
i ve fixed it.
if you have this same prob, get repo here
curl http://android.git.kernel.org/repo >~/bin/repo

chmod +x repo

++
nokia 3210 Qtek 9090 htc magic -- nexus one -- galaxy beam --Galaxy Beam -- galaxy s -- arc - arc s -- htc lg optimus 2x -- htc evo 3d -- Xperia S -- HTC one X - HTC One - Xperia Z2
Subscribe to my youtube Channel
 
nocomp
Old
#29  
Senior Member
Thanks Meter 49
Posts: 655
Join Date: Feb 2007
Location: argonay
well in fact, now i have another prob :'(
any idea?

Code:
herve@android-factory:~/androdev$ sh build.sh
Fetching projects:   2% (5/225)  remote: Counting objects: 38, done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 24 (delta 17), reused 1 (delta 0)
Unpacking objects: 100% (24/24), done.
From git://github.com/CyanogenMod/android_bootable_recovery
   0b7bbf2..3d6a211  froyo      -> github/froyo
   d9fbe2f..a1f43bf  gingerbread -> github/gingerbread
Fetching projects:   4% (9/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_bn_encore
   170c703..5202166  gingerbread -> github/gingerbread
remote: Counting objects: 13, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 8 (delta 5), reused 0 (delta 0)
Unpacking objects: 100% (8/8), done.
From git://github.com/CyanogenMod/android_device_commtiva_z71
   379ab1b..df40873  gingerbread -> github/gingerbread
Fetching projects:  16% (36/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_samsung_fascinate
   706d15f..c5abaec  gingerbread -> github/gingerbread
Fetching projects:  17% (39/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_samsung_vzwtab
   ac23a39..1ec1fa4  gingerbread -> github/gingerbread
Fetching projects:  61% (138/225)  remote: Counting objects: 15, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 8 (delta 4), reused 0 (delta 0)
Unpacking objects: 100% (8/8), done.
From git://github.com/CyanogenMod/android_frameworks_base
   bf17157..f1df5d9  gingerbread -> github/gingerbread
Fetching projects: 100% (225/225), done.  
Syncing work tree: 100% (225/225), done.  

build/envsetup.sh: 1: Syntax error: "(" unexpected
herve@android-factory:~/androdev$
nokia 3210 Qtek 9090 htc magic -- nexus one -- galaxy beam --Galaxy Beam -- galaxy s -- arc - arc s -- htc lg optimus 2x -- htc evo 3d -- Xperia S -- HTC one X - HTC One - Xperia Z2
Subscribe to my youtube Channel
 
nocomp
Old
#30  
Senior Member
Thanks Meter 49
Posts: 655
Join Date: Feb 2007
Location: argonay
well in fact, now i have another prob :'(
any idea?

Code:
herve@android-factory:~/androdev$ sh build.sh
Fetching projects:   2% (5/225)  remote: Counting objects: 38, done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 24 (delta 17), reused 1 (delta 0)
Unpacking objects: 100% (24/24), done.
From git://github.com/CyanogenMod/android_bootable_recovery
   0b7bbf2..3d6a211  froyo      -> github/froyo
   d9fbe2f..a1f43bf  gingerbread -> github/gingerbread
Fetching projects:   4% (9/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_bn_encore
   170c703..5202166  gingerbread -> github/gingerbread
remote: Counting objects: 13, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 8 (delta 5), reused 0 (delta 0)
Unpacking objects: 100% (8/8), done.
From git://github.com/CyanogenMod/android_device_commtiva_z71
   379ab1b..df40873  gingerbread -> github/gingerbread
Fetching projects:  16% (36/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_samsung_fascinate
   706d15f..c5abaec  gingerbread -> github/gingerbread
Fetching projects:  17% (39/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_samsung_vzwtab
   ac23a39..1ec1fa4  gingerbread -> github/gingerbread
Fetching projects:  61% (138/225)  remote: Counting objects: 15, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 8 (delta 4), reused 0 (delta 0)
Unpacking objects: 100% (8/8), done.
From git://github.com/CyanogenMod/android_frameworks_base
   bf17157..f1df5d9  gingerbread -> github/gingerbread
Fetching projects: 100% (225/225), done.  
Syncing work tree: 100% (225/225), done.  

build/envsetup.sh: 1: Syntax error: "(" unexpected
herve@android-factory:~/androdev$
here is the beguining of the script envsetup.sh

Code:
herve@android-factory:~/androdev$ sh build.sh
Fetching projects:   2% (5/225)  remote: Counting objects: 38, done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 24 (delta 17), reused 1 (delta 0)
Unpacking objects: 100% (24/24), done.
From git://github.com/CyanogenMod/android_bootable_recovery
   0b7bbf2..3d6a211  froyo      -> github/froyo
   d9fbe2f..a1f43bf  gingerbread -> github/gingerbread
Fetching projects:   4% (9/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_bn_encore
   170c703..5202166  gingerbread -> github/gingerbread
remote: Counting objects: 13, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 8 (delta 5), reused 0 (delta 0)
Unpacking objects: 100% (8/8), done.
From git://github.com/CyanogenMod/android_device_commtiva_z71
   379ab1b..df40873  gingerbread -> github/gingerbread
Fetching projects:  16% (36/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_samsung_fascinate
   706d15f..c5abaec  gingerbread -> github/gingerbread
Fetching projects:  17% (39/225)  remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git://github.com/CyanogenMod/android_device_samsung_vzwtab
   ac23a39..1ec1fa4  gingerbread -> github/gingerbread
Fetching projects:  61% (138/225)  remote: Counting objects: 15, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 8 (delta 4), reused 0 (delta 0)
Unpacking objects: 100% (8/8), done.
From git://github.com/CyanogenMod/android_frameworks_base
   bf17157..f1df5d9  gingerbread -> github/gingerbread
Fetching projects: 100% (225/225), done.  
Syncing work tree: 100% (225/225), done.  

build/envsetup.sh: 1: Syntax error: "(" unexpected
herve@android-factory:~/androdev$
nokia 3210 Qtek 9090 htc magic -- nexus one -- galaxy beam --Galaxy Beam -- galaxy s -- arc - arc s -- htc lg optimus 2x -- htc evo 3d -- Xperia S -- HTC one X - HTC One - Xperia Z2
Subscribe to my youtube Channel

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes