yashsingh1/xdaforums huggingface dataset:
[HTC Sensation] blahbl4hblah:
Compile AOKP Section

Be sure to follow the steps from the above post and ONLY use this instead of the part called 4c. Setup Necessary Source

FOR AOKP (ICS Version)

cd ~/android/system
repo init -u https://github.com/AOKP/platform_manifest.git -b ics

Temporary fix to build:

install -d prebuilt/android-arm/kernel

Then do:

curl -o prebuilt/android-arm/kernel/LINUX_KERNEL_COPYING -O https://raw.github.com/ezterry/kernel-biff-testing/ezgb-2636/COPYING

FOR AOKP (JELLYBEAN Version)

cd ~/android/system
repo init -u https://github.com/AOKP/platform_manifest.git -b jb

5b. Building AOKP

. build/envsetup.sh; lunch aokp_pyramid-userdebug; mka bacon
[HTC Sensation] blahbl4hblah:
Compiling error solutions

error: The requested URL returned error: 403 while accessing https://android.googlesource.com/pla...blzf/info/refs:

http://xdaforums.com/showpost.php?p=23205163&postcount=423

Correct repo file for ~/bin/repo:

http://xdaforums.com/showpost.php?p=23174017&postcount=413

Overall repo fix:

http://xdaforums.com/showpost.php?p=23147034&postcount=400

http://xdaforums.com/showpost.php?p=23207819&postcount=434
[HTC Sensation] blahbl4hblah:
Reference

This section is to help those who may look for answers

Basic Linux Commands

http://ss64.com/bash/

CyanogenMod Wiki

http://wiki.cyanogenmod.com/wiki/Main_Page

Difference between breakfast, brunch and lunch

http://synrgi.wordpress.com/2011/09/16/breakfast-brunch-and-lunch/

Installing Android SDK

http://developer.android.com/sdk/installing.html
[HTC Sensation] n1kon:
You running a nightly?
[HTC Sensation] matt95:
hi man thank you for this guide, i got a problem

when i try to install the first files for sistem 64 bit i get this error:

Package awk is a virtual package provided by:

original-awk 2011-05-06-1

mawk 1.3.3-15ubuntu2

gawk 1:3.1.8+dfsg-0.1build1

You should explicitly select one to install.

E: Package 'awk' has no installation candidate

E: Unable to locate package 7zip
[HTC Sensation] miniudavid:
You say that it is not recommended to do it in a virtual machine. What if I got 8 gigs of memory? Could I try it?? Thanx
[HTC Sensation] webmasteryoda:
Nope.

A box is a box.

Ubuntu standalone is a very powerfull machine.

Just install 64bit and my advice to you: avoid Ubuntu. Try another version, which is compatible with this guide. I suggest Kubuntu or Xubuntu (64).
[HTC Sensation] Vorbeth:
Ubuntu is fine, just strip out unity & replace with gnome shell :P
[HTC Sensation] blahbl4hblah:
It might not be 7zip but 7za

As for awk try to install original-awk I wasn't sure actually since I had my computer setup for a long time already with everything
[HTC Sensation] blahbl4hblah:
I don't recommend virtual machines at all!

Just dual boot if you have windows that's how I setup my computer.
[HTC Sensation] blahbl4hblah:
In a way yes but no, the work to get sensation cm9 at the moment is done by Vorbeth, elelinux and others.

I compiled my own and it runs pretty good honestly but there are major issues but it'll be fixed later hopefully.
[HTC Sensation] webmasteryoda:
Nope. Gnome shell is a same story. Thats why I suggested kde or xfce.
[HTC Sensation] Sym_Link:
I like Linux Mint. They have done a great job with Gnome 3 in making a more usable interface.
[HTC Sensation] iJohnny:
After this command:

repo init -u git://github.com/CyanogenMod/android.git -b ics

I get this output:

No command 'repo' found, did you mean:
Command 'rep' from package 'rep' (universe)
Command 'repl' from package 'nmh' (universe)
Command 'repl' from package 'mailutils-mh' (universe)
repo: command not found

Any ideas?
[HTC Sensation] webmasteryoda:
I agree. Linux Mint has the best Gnome 3 experiance. But its still Gnome 3. Mutter is still having a major issues with Ati propriatory drivers, while the other intefaces work excellent.

I think that probably the best Ubuntu distro for cooking roms is Xubuntu. Its well optimised and free of all sorts of fancy staff.
[HTC Sensation] mpmilestogo:
Thanks for the detailed HOWTO

[/COLOR]

The repo script is not in your path yet. I created a directory like /home/mperry/b in first and then installed the repo script there. You can prepend the command repo with the place you put the repo script. I copied repo to /usr/bin since this is a personal system and I don't care what I violate. You could also add a path statement to your .bashrc for the user which includes the path to the bin directory you created.
[HTC Sensation] sparksco:
That should be fine but why do vm at all? I mean vm is not really good for development I.m.o.
[HTC Sensation] sparksco:
This is what I did but I installed kde plasma instead.
[HTC Sensation] blahbl4hblah:
Updated the OP to be more clear and added a few things missing
[HTC Sensation] xXkingsromXx:
Yes make CC=gcc-4.4 CXX=g++-4.4 otapackage

paste that whole line and run?
[HTC Sensation] blahbl4hblah:
make CC=gcc-4.4 CXX=g++-4.4 otapackage
[HTC Sensation] xXkingsromXx:
patse whole line than enter correct!

============================================

PLATFORM_VERSION_CODENAME=REL

PLATFORM_VERSION=4.0.3

TARGET_PRODUCT=cm_pyramid

TARGET_BUILD_VARIANT=userdebug

TARGET_BUILD_TYPE=release

TARGET_BUILD_APPS=

TARGET_ARCH=arm

TARGET_ARCH_VARIANT=armv7-a-neon

HOST_ARCH=x86

HOST_OS=linux

HOST_BUILD_TYPE=release

BUILD_ID=MR1

============================================

king@king-Inspiron-One-19T:~/android/system$ paste line here yes?
[HTC Sensation] xXkingsromXx:
after command is pated i get this error

king@king-Inspiron-One-19T:~/android/system$ make CC=gcc-4.4 CXX=g++-4.4 -j# otapackage

make: the `-j' option requires a positive integral argument

Usage: make [options] [target] ...

Options:

-b, -m Ignored for compatibility.

-B, --always-make Unconditionally make all targets.

-C DIRECTORY, --directory=DIRECTORY

Change to DIRECTORY before doing anything.

-d Print lots of debugging information.

--debug[=FLAGS] Print various types of debugging information.

-e, --environment-overrides

Environment variables override makefiles.

-f FILE, --file=FILE, --makefile=FILE

Read FILE as a makefile.

-h, --help Print this message and exit.

-i, --ignore-errors Ignore errors from commands.

-I DIRECTORY, --include-dir=DIRECTORY

Search DIRECTORY for included makefiles.

-j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.

-k, --keep-going Keep going when some targets can't be made.

-l [N], --load-average[=N], --max-load[=N]

Don't start multiple jobs unless load is below N.

-L, --check-symlink-times Use the latest mtime between symlinks and target.

-n, --just-print, --dry-run, --recon

Don't actually run any commands; just print them.

-o FILE, --old-file=FILE, --assume-old=FILE

Consider FILE to be very old and don't remake it.

-p, --print-data-base Print make's internal database.

-q, --question Run no commands; exit status says if up to date.

-r, --no-builtin-rules Disable the built-in implicit rules.

-R, --no-builtin-variables Disable the built-in variable settings.

-s, --silent, --quiet Don't echo commands.

-S, --no-keep-going, --stop

Turns off -k.

-t, --touch Touch targets instead of remaking them.

-v, --version Print the version number of make and exit.

-w, --print-directory Print the current directory.

--no-print-directory Turn off -w, even if it was turned on implicitly.

-W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE

Consider FILE to be infinitely new.

--warn-undefined-variables Warn when an undefined variable is referenced.

This program built for i686-pc-linux-gnu

Report bugs to <bug-make@gnu.org>

king@king-Inspiron-One-19T:~/android/system$
[HTC Sensation] blahbl4hblah:
Dude it's this!

make CC=gcc-4.4 CXX=g++-4.4 -j2 otapackage
[HTC Sensation] xXkingsromXx:
opened bash removed toolpath same error popping #Android PATH export PATH=$PATH:/home/king/android/sdk export PATH=$PATH:/home/king/android/sdk/platform-tools export PATH=$PATH:/home/king/android/sdk/tools export PATH=$PATH:/home/king/bin #Java PATH export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.26 export PATH=$PATH:$JAVA_HOME/bin export PATH=$PATH:/home/king/bin

sorry to post so many so called esy guide stuff but not very easy for me very grateful for you taking yur time to help me corrct the issues!

---------- Post added at 06:53 AM ---------- Previous post was at 06:48 AM ----------

this is my edited toolpath removed look ok?

#Android PATH

export PATH=$PATH:/home/king/android/sdk

export PATH=$PATH:/home/king/android/sdk/platform-tools

export PATH=$PATH:/home/king/android/sdk/tools

export PATH=$PATH:/home/king/bin

#Java PATH

export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.26

export PATH=$PATH:$JAVA_HOME/bin

export PATH=$PATH:/home/king/bin
[HTC Sensation] matt95:
so i have to put that code in my local_manifest? i haven't understood what to do with that code :s...
[HTC Sensation] blahbl4hblah:
No your don't, try to repo sync again

Make sure device/htc/pyramid is there and same for vendor/htc/pyramid

If they are both there, they should compile easily
[HTC Sensation] xXkingsromXx:
thank for yur help,guidance and guide blahblah must beeeded!
[HTC Sensation] matt95:
ok i am doing it...

---------- Post added at 09:07 AM ---------- Previous post was at 09:03 AM ----------

yeah :) something was missing...i have repo synced and now it works ;)
[HTC Sensation] matt95:
Ok now it is downloading the ota
[HTC Sensation] xXkingsromXx:
where do i locate finshed build after compile?
[HTC Sensation] Vorbeth:
~/android/system/out/target/product/pyramid/cm_pyramid-ota-eng.*.zip

---------- Post added at 09:25 AM ---------- Previous post was at 09:06 AM ----------

4f. Fix Issue If There's an Error While Compiling

Can now be removed if using the OpenSensation as the fix is now included inside the device tree.

(Leave fix if you already have it)
[HTC Sensation] sparksco:
Really, why in the device tree? You already have the repo source HERE, couldn't you just add it to that file, then add to local_manifest.xml? Also you could submit it to cm gerrit and possible get it merged into their github as well.
[HTC Sensation] Vorbeth:
Once the qcom display gerrit changes get merged that fix should not be needed.

It also makes it easier to sync with CM's repo's as having the fix outside the device tree requires pulling another repo that might not be in sync with CM or having to apply the change after every repo sync

Not only that the fix has already been submitted and ignored http://review.cyanogenmod.com/#change,11744

That android_hardware_qcom_display source is for testing CAF's qcom display driver not what is currently in CM's repo's, it also requires changes to frameworks/base, hardware/libhardware and the includes in the device tree to compile.

I will move the master over to ics later today changed
[HTC Sensation] xXkingsromXx:
thanks so much!

Thanks blahbl4hblah vorbeth and blahblah for this guide, took me many questions and time but finally compiled my first cm build thanks again for putting up with my questions of distress very grateful and it booted first round woo hooo!:D:D:D:D:D:D:D:D:D:D:D:D:D:D
[HTC Sensation] yozpalang:
noob question: I have i5 and 4gib of ram should i give it a go? the reason I'm asking is because I have tried to compile CM7 on my Intel® Core™2 Duo CPU T5870 @ 2.00GHz × 2 with 4gib ram and my machine got way hot and from what I have heard ICS needs way more power.

Thanks
[HTC Sensation] kmmxracer:
First off, awsome work and this is a very well put together and mindless tutorial. Ive learned alot about compiling by following someone very vague and incomplete guides.

One thing I do wish is if any devs could shed some light on how to create proprietary file lists and, .sh files for devices???
[HTC Sensation] blahbl4hblah:
It doesn't necessarily get too hot. I compiled cm7 before and it was just fine though it took an hour or two to compile

The more cores you have the easier it should be imo

Your computer is ready to go, let me know how it goes. If you need any help let me know

Hope that helps
[HTC Sensation] Vorbeth:
Considering I am using a old laptop with a 2.0Ghz T4200 dual-core, with 2GB Ram you should breeze it.

Yes that's a original dual core, not a core2 duo
[HTC Sensation] blahbl4hblah:
The thing about that is that there's no 'real' cm9 nightly for the time being so a list wouldn't help since all it would do is redo your vendor files again.

But with that being said I believe there is a file for that already called extract-files.sh I might be wrong
[HTC Sensation] sparksco:
Are you using swap at least lol?
[HTC Sensation] sparksco:
LOL.. wut? Couldn't even get passed reading this to your real questions.
[HTC Sensation] kmmxracer:
Thanks for the responce. I know the extract-files.sh file already exists, I want to learn more about what goes into making the file in the firts place. For building CM9 for a device not already in development.
[HTC Sensation] yozpalang:
this is what i get

sudo apt-get update

E: Type 'rramroberto/java/ubuntu' is not known on line 3 in source list /etc/apt/sources.list.d/ferramroberto-java-oneiric.list

E: The list of sources could not be read.

:confused::confused:

also

java -version

bash: /usr/bin/java: No such file or directory
[HTC Sensation] matt95:
**** yeah :D finished all! thank you for this guide man! very useful for beginner! :D
[HTC Sensation] sparksco:
Try this I didn't notice this part in the guide, but it's from my cm7 guide and I think it's needed to install java.

After this install the required packages part again.
[HTC Sensation] yozpalang:
after deleting the open jdk folders i get this, i rebooted still the same

'E:Type 'rramroberto/java/ubuntu' is not known on line 3 in source list /etc/apt/sources.list.d/ferramroberto-java-oneiric.list, E:The list of sources could not be read., E:The package lists or status file could not be parsed or opened.'
[HTC Sensation] blahbl4hblah:
Did you put the path for java?

Since you remove the open jdk folders putting the path helps for it so it won't give you that error hopefully
[HTC Sensation] yozpalang:
how would i do that ?
[HTC Sensation] mpmilestogo:
I believe that you need to add that to the repository listing. The ubuntu page which references dealing and managing apt repositories is here:

https://help.ubuntu.com/community/Repositories/CommandLine

The specific command to add a repo is here:

sudo apt-get install python-software-properties

sudo add-apt-repository ppa:<repository-name>

Here's a help page on adding sun-java6 as well for reference...

http://askubuntu.com/questions/52154/how-do-i-install-the-latest-version-of-sun-java

Hope this helps!
[HTC Sensation] matt95:
ok now that i compiled my rom and i can find it in android/system/out/target/product/pyramid what should i do and modify to increase my cm9 rom power? :D
[HTC Sensation] yozpalang:
I can't do anything i get this everywhere :(
[HTC Sensation] sparksco:
I think the best thing you guys could do with these builds is find and report bugs with logcats so the developers can take a look at them and try to find solutions to merge new changes into the source. When you have a crash of a app or something try to replicate it while your recording a logcat and post it here.
[HTC Sensation] mpmilestogo:
I always gaze at it lovingly in the directory for awhile. I feel all special that I actually got this done. Then I copy it over to my phone, format cache and dalvik-cache. Get the gapps needed on the sdcard too. Let er rip!

The automation script that was posted earlier is pretty cool too. Really does all the steps at one time. make bacon!

Linux is the goodz.

Edit Update: As sparksco pointed out, finding issues, reporting them is primary and will increase your power by geometric values!
[HTC Sensation] sparksco:
Another thing you guys with builds could is get on gerrit and start testing cyanogenmod patches/changes. Review things if they are working or not working. Reference this cm wiki guide it's pretty self explaining so please don't ask me "how do I do this?" Lol.

http://wiki.cyanogenmod.com/wiki/Howto:_Gerrit
[HTC Sensation] blahbl4hblah:
Yeah Linux is better than windows. I said it haha.

I haven't gotten issues actually that I noticed except some rotation being unresponsive but it's sometimes.

If you want to include gapps after the rom is done compiling just drag and drop but be sure to delete provision.apk
[HTC Sensation] matt95:
yeah i saw that and i think i'm doing this one too :)
[HTC Sensation] sparksco:
I'm thinking about getting this when I get my i5 pc :D

http://www.newegg.com/Product/Product.aspx?Item=N82E16835181019#top

This should work great for people concerned about overheating while building.

Need to put my tax return to good use :p
[HTC Sensation] mistryous:
ia32-libs

When obtaining the list of required software, ia32-libs is mentioned as not being available, "Package ia32-libs is not available, but is referred to by another package." I found that I had to install "ia32-libs-multiarch - Multi-arch versions of former ia32-libraries", which may not work yet:

sudo apt-get install ia32-libs-multiarch
[HTC Sensation] matt95:
i got an HP Pavilion dv6-3140sl and it gets very hot during the process :D
[HTC Sensation] sparksco:
Not every pc is going to use the same packages. Just install whatever it suggest. Example: $ sudo apt-get install ia32-libs-multiarch should do the trick.
[HTC Sensation] sparksco:
Yeah be aware and cautious of that. I don't recommend repo syncing and building daily unless your machine is a beast with good cooling. It puts a lot strain on your system.
[HTC Sensation] Vorbeth:
You tell me that NOW!!

lol

Twice daily sync & builds here (at least) if I go a incremental build they only take 30 - 60 mins so can get 8-9 of those a day, lol
[HTC Sensation] sparksco:
You can do whatever you want it's your pc...
[HTC Sensation] spook2:
This package (ia32-libs) needed only for 64-bit systems. If you are on 32-bit OS, just skip it: you do not need it to compile the sources.
[HTC Sensation] blahbl4hblah:
Thanks for clarifying that, I'll make a change to it
[HTC Sensation] mistryous:
OpenSensation not Syncing for Me

I apologize if I have missed something, but the following would not sync, so I searched on github for another "android_device_htc_pyramid" and a "vendor_htc_pyramid" project name. This allowed me to sync after changing it, but I am unsure if I need to fix something to better be in sync with the main build effort.

<?xml version="1.0" encoding="UTF-8"?>
<manifest>

<remote fetch="https://github.com/" name="gh" />

<project name="OpenSensation/android_device_htc_pyramid" path="device/htc/pyramid" remote="gh" revision="master" />
<project name="OpenSensation/vendor_htc_pyramid" path="vendor/htc/pyramid" remote="gh" revision="master" />
</manifest>
[HTC Sensation] blahbl4hblah:
I'm not 100% if Vorbeth changed the branch for those two but just in case, change both 'master' to 'ics'
[HTC Sensation] Vorbeth:
Yes, sorry I did

I've moved most of my dev changes over to ics_dev now, so ics should remain clean and compile without issues
[HTC Sensation] yozpalang:
i get this after sudo gedit /etc/udev/rules.d/51-android.rules

while adding this SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666" to the file

(gedit:21097): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.TXCHAW': No such file or directory

also :

./android

(java:21220): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
[HTC Sensation] blahbl4hblah:
I don't think you did the chmod command.

Remember to take your time in doing the steps so you don't miss anything.

And you don't need to do ./android as long as sdk is in your path you can just do

android
[HTC Sensation] yozpalang:
if by chmod you mean this sudo chmod +x /etc/udev/rules.d/51-android.rules i did unless i have to run this before the sudo gedit /etc/udev/rules.d/51-android.rules ? And I tried android It didn't work here is what i did

cd /home/office/android/sdk/tools

andorid then i got

android: command not found
[HTC Sensation] sparksco:
If it's not found it's because the tools folder is not in your path. You could just run it manually

$ ~/NameOfYourSdkFolder/tools/./android

If you think you entered your path correctly to the tools folder in your .bashrc, try closing terminal and open a new one and try again.
[HTC Sensation] blahbl4hblah:
Oh my mistake I know what it might be

Try this:

cd ~/sdk/tools

./android
[HTC Sensation] yozpalang:
Thank you for your helps but I give up, too many errors :( :mad:

I got excited for a minute because i got this far then boom
[HTC Sensation] Jiggs82:
Chicken:D:D:D
[HTC Sensation] yozpalang:
lmao, :D:D good one

---------- Post added at 11:21 PM ---------- Previous post was at 10:25 PM ----------

so do i change the "master" to "ics" or "ics_dev" ?
[HTC Sensation] blahbl4hblah:
ics but that wouldn't cause the issue with a different device tree

To everyone I'll be busy for the next few days doing projects and studying for exams

So I won't be able to do certain things for at least two days
[HTC Sensation] yozpalang:
So I need to do step 4f if I don't get a error after running repo sync -j16?
[HTC Sensation] yozpalang:
Wish me luck

Ouch
[HTC Sensation] yozpalang:
In your face I did it lol
[HTC Sensation] banesi:
Just did it in VMware Virtual Machine

Host: Windows7 x64

Guest: Ubuntu 11.10 x64

Physical machine:

i5 650 3.2GHz (Quad Core)

RAM 8GB DDR3

Virtual Machine:

CPU 2 Core

RAM 4GB

HDD 35GB

Swap OFF

Time to compile 100min 13sec :)

Using Vorbeth script

Thanks to OP and to all for this wonderful manual.
[HTC Sensation] seadersn:
i don't get it... vorbeth / blah, why are you using

. build/envsetup.sh
lunch
make CC=gcc-4.4 CXX=g++-4.4 -j# otapackage

? why this complicated? if everything is set up correctly, even with this superb guide, a simple

. build/envsetup.sh && brunch pyramid -j<no.of.cores/threads>

should do the trick lol.

what's the benefit of otapackage only? not optimizing apks -> time saving? don't know this, never thought about that. teach me pls :D
[HTC Sensation] rawdealer:
Sure i'm noob.....I have stucked here. How to install and where do I have to type android?

thanks :)

2e. Install Certain Android SDK Tools

Type:

android

Check Android SDK Tools and Android SDK platform-tools

Install them
[HTC Sensation] seadersn:
cd ~/android/sdk/tools

./android

or do a reboot, your path env should be set already and be able to find android.
[HTC Sensation] sparksco:
Glad it worked out for you, I think I remember you from the G1 days lol. Next time if you just do "mka CC=gcc-4.4 CXX=g++-4.4 bacon" it'll tell you how long it took to compile. No need to enter the number or cores with "-j", it will detect the number of cores you have automatically. You could even just make a script called build.sh and put that only in it and it'll work fine.
[HTC Sensation] JDR0iD:
Can we sticky this?
[HTC Sensation] spook2:
How to compile CM9 in only 1gig of RAM and 1 core

Those of you without lots of RAM might find this useful.

What you need:

Install Xubuntu 10.04 LTS in a VirtualBox VM with 1024MB of RAM, 1 core only, 80G virtual hard drive

Follow the guide.

Change:

Link libx11

mkdir /usr/lib/i386-linux-gnu/
sudo ln -s /usr/lib/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so

Step 1a: you do not need sun-java6-plugin

Skip step 1c and proceed directly to 2a

Follow the guide.

Step 5a:

Change "make" command:

make CC=gcc-4.4 CXX=g++-4.4 -j1 otapackage

Leave your machine to compile overnight.

Congratulations!

(this worked for me on a host Windows 7 Home machine with Core2Duo (E7500, no hardware virtualization) with 4Gb of RAM)
[HTC Sensation] sparksco:
You'd have to ask a mod for that.
[HTC Sensation] blahbl4hblah:
I prefer lunch and it seems it shows more errors if there were any to being with. I'll change it to bacon instead otapackage. And like I said ics probably works better with gcc 4.4 instead of 4.6
[HTC Sensation] blahbl4hblah:
I would if I could but that depends on the mods
[HTC Sensation] dneto:
=]

sticky!