Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP sportsstar89

23rd June 2012, 12:32 AM   |  #1  
sportsstar89's Avatar
OP Recognized Developer
Thanks Meter: 6,546
 
3,136 posts
Join Date:Joined: Jun 2010
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
Last edited by sportsstar89; 4th September 2012 at 06:16 AM.
The Following 9 Users Say Thank You to sportsstar89 For This Useful Post: [ View ]
23rd June 2012, 08:43 AM   |  #2  
sportsstar89's Avatar
OP Recognized Developer
Thanks Meter: 6,546
 
3,136 posts
Join Date:Joined: Jun 2010
Default.xml fixed

Sent from my HTC_Amaze_4G using xda premium
24th June 2012, 12:53 PM   |  #3  
00hero00's Avatar
Senior Member
Flag Ulm
Thanks Meter: 13
 
112 posts
Join Date:Joined: Sep 2009
More
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?
24th June 2012, 01:35 PM   |  #4  
johnride's Avatar
Senior Member
Thanks Meter: 13
 
114 posts
Join Date:Joined: Feb 2012
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
24th June 2012, 04:59 PM   |  #5  
sportsstar89's Avatar
OP Recognized Developer
Thanks Meter: 6,546
 
3,136 posts
Join Date:Joined: Jun 2010
Quote:
Originally Posted by 00hero00

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?

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

Quote:
Originally Posted by johnride

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

Yea ubuntu changed their name they still download they just give you a bunch of warnings
25th June 2012, 06:24 AM   |  #6  
Nshih422's Avatar
Senior Member
Flag Arizona
Thanks Meter: 36
 
270 posts
Join Date:Joined: Jul 2010
More
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
25th June 2012, 07:02 AM   |  #7  
ziggy46's Avatar
Recognized Contributor
Flag Chambersburg, Pa
Thanks Meter: 2,015
 
2,219 posts
Join Date:Joined: Aug 2011
Donate to Me
More
Quote:
Originally Posted by Nshih422

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

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
The Following User Says Thank You to ziggy46 For This Useful Post: [ View ]
25th June 2012, 07:28 AM   |  #8  
Nshih422's Avatar
Senior Member
Flag Arizona
Thanks Meter: 36
 
270 posts
Join Date:Joined: Jul 2010
More
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.
Last edited by Nshih422; 25th June 2012 at 07:33 AM.
25th June 2012, 07:37 AM   |  #9  
sportsstar89's Avatar
OP Recognized Developer
Thanks Meter: 6,546
 
3,136 posts
Join Date:Joined: Jun 2010
Quote:
Originally Posted by Nshih422

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.

Dis you set JAVA_HOME correctly for the jdk

Sent from my HTC_Amaze_4G using xda premium
The Following User Says Thank You to sportsstar89 For This Useful Post: [ View ]
25th June 2012, 03:25 PM   |  #10  
Nshih422's Avatar
Senior Member
Flag Arizona
Thanks Meter: 36
 
270 posts
Join Date:Joined: Jul 2010
More
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.
Last edited by Nshih422; 25th June 2012 at 04:20 PM.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes