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

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

Tip us?
 
sportsstar89
Old
(Last edited by sportsstar89; 4th September 2012 at 05:16 AM.)
#1  
sportsstar89's Avatar
Recognized Developer - OP
Thanks Meter 6354
Posts: 3,101
Join Date: Jun 2010
Location: Philadelphia

 
DONATE TO ME
Thumbs up [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
Devices: Amaze 4g
roms: CyanogenMod 10
Bootloader: Amaze 4G (S-off)
Recovery: 4EXT
I Have ORD
You don't have Dropbox? Sign up here for free
Like my work? Buy Me A Drink(Link above profile pic )
Follow me on Twitter
The Following 9 Users Say Thank You to sportsstar89 For This Useful Post: [ Click to Expand ]
 
sportsstar89
Old
#2  
sportsstar89's Avatar
Recognized Developer - OP
Thanks Meter 6354
Posts: 3,101
Join Date: Jun 2010
Location: Philadelphia

 
DONATE TO ME
Default.xml fixed

Sent from my HTC_Amaze_4G using xda premium
Devices: Amaze 4g
roms: CyanogenMod 10
Bootloader: Amaze 4G (S-off)
Recovery: 4EXT
I Have ORD
You don't have Dropbox? Sign up here for free
Like my work? Buy Me A Drink(Link above profile pic )
Follow me on Twitter
 
00hero00
Old
#3  
00hero00's Avatar
Senior Member
Thanks Meter 13
Posts: 111
Join Date: Sep 2009
Location: Ulm
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?
 
johnride
Old
#4  
johnride's Avatar
Senior Member
Thanks Meter 13
Posts: 114
Join Date: 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
 
sportsstar89
Old
#5  
sportsstar89's Avatar
Recognized Developer - OP
Thanks Meter 6354
Posts: 3,101
Join Date: Jun 2010
Location: Philadelphia

 
DONATE TO ME
Quote:
Originally Posted by 00hero00 View Post
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 View Post
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
Devices: Amaze 4g
roms: CyanogenMod 10
Bootloader: Amaze 4G (S-off)
Recovery: 4EXT
I Have ORD
You don't have Dropbox? Sign up here for free
Like my work? Buy Me A Drink(Link above profile pic )
Follow me on Twitter
 
Nshih422
Old
#6  
Nshih422's Avatar
Senior Member
Thanks Meter 36
Posts: 270
Join Date: Jul 2010
Location: Arizona
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
Current Device: Nexus 4 → Stock ROM → RootedMatr1x Kernel

Retired Device: Samsung Galaxy S3 (White) → Rooted → CWM Touch 6.1.0.2 → CM10

Retired Device: HTC Amaze 4G (Black) → S-OFFSuperCID → Rooted → 4EXT Recovery → Flashing different Roms
 
ziggy46
Old
#7  
ziggy46's Avatar
Recognized Contributor
Thanks Meter 2014
Posts: 2,219
Join Date: Aug 2011
Location: Chambersburg, Pa

 
DONATE TO ME
Quote:
Originally Posted by Nshih422 View Post
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: [ Click to Expand ]
 
Nshih422
Old
(Last edited by Nshih422; 25th June 2012 at 06:33 AM.)
#8  
Nshih422's Avatar
Senior Member
Thanks Meter 36
Posts: 270
Join Date: Jul 2010
Location: Arizona
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.
Current Device: Nexus 4 → Stock ROM → RootedMatr1x Kernel

Retired Device: Samsung Galaxy S3 (White) → Rooted → CWM Touch 6.1.0.2 → CM10

Retired Device: HTC Amaze 4G (Black) → S-OFFSuperCID → Rooted → 4EXT Recovery → Flashing different Roms
 
sportsstar89
Old
#9  
sportsstar89's Avatar
Recognized Developer - OP
Thanks Meter 6354
Posts: 3,101
Join Date: Jun 2010
Location: Philadelphia

 
DONATE TO ME
Quote:
Originally Posted by Nshih422 View Post
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
Devices: Amaze 4g
roms: CyanogenMod 10
Bootloader: Amaze 4G (S-off)
Recovery: 4EXT
I Have ORD
You don't have Dropbox? Sign up here for free
Like my work? Buy Me A Drink(Link above profile pic )
Follow me on Twitter
The Following User Says Thank You to sportsstar89 For This Useful Post: [ Click to Expand ]
 
Nshih422
Old
(Last edited by Nshih422; 25th June 2012 at 03:20 PM.)
#10  
Nshih422's Avatar
Senior Member
Thanks Meter 36
Posts: 270
Join Date: Jul 2010
Location: Arizona
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.
Current Device: Nexus 4 → Stock ROM → RootedMatr1x Kernel

Retired Device: Samsung Galaxy S3 (White) → Rooted → CWM Touch 6.1.0.2 → CM10

Retired Device: HTC Amaze 4G (Black) → S-OFFSuperCID → Rooted → 4EXT Recovery → Flashing different Roms

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes