yashsingh1/xdaforums huggingface dataset:
[Thunderbolt Android Development] ProTekk:
This is strictly just a reference guide/tutorial! If you cannot simply follow directions and copy/paste, I'm not going to help you! This is idiot-proof.

Build Environment​

Operating system -- Tested on Ubuntu 10.04 (64bit)

Terminal

Decent hardware (minimum of at least a dual core CPU and 4 GB of RAM)

Optimally have an SSD (standard mechanical drives work as well but slow down the process drastically)

Must have required packages for building installed, I will list them further down

Required Packages​

Simply copy and paste this in a terminal window:

sudo apt-get install curl git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib

Let that install and then proceed.

Getting the Source​

Make required directories

Obtain repo binary

Add repo binary to your path

Give repo binary proper permissions

Initialize empty repo

Sync repo

Grab device tree and vendor tree which are not included in the AOKP manifest

Add Mecha to the vendor setup

Alright, so now we're getting there. I have outlined the basics of what we're about to do and broke them down as I know them. This is all pretty much going to be copy/paste so it'll be fairly difficult to screw this up :)

Copy/paste:

Make directory for repo binary

mkdir ~/bin

Add directory for repo binary to your path

PATH=~/bin:$PATH

Download repo binary and place it in the proper directory

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo

Give the repo binary the proper permissions

chmod a+x ~/bin/repo

Create directory for where the AOKP repo will be stored and synced

mkdir ~/aokp

Move to our new AOKP directory

cd ~/aokp

Initialize the AOKP repo and download the manifest

repo init -u git://github.com/AOKP/platform_manifest.git -b master

Sync AOKP source

repo sync -jX

X == Number of cores your CPU has

Grab the device tree needed for mecha

git clone git://github.com/ProTekk/device_htc_mecha.git -b aokp device/htc/mecha

Grab the vendor tree needed for mecha

git clone git://github.com/ProTekk/vendor_htc_mecha.git -b ics vendor/htc/mecha

Add mecha to the vendor setup

gedit vendor/aokp/vendorsetup.sh

Now here you'll have to do some "manual" work. At the end of the file add:

add_lunch_combo aokp_mecha-userdebug

Save and close the file.

Start the build​

This is probably the EASIEST part of all, simply copy/paste this command and walk away!

. build/envsetup.sh && lunch aokp_mecha-userdebug && make otapackage -jX

Where X == cores per CPU again.

Syncing the repo is dependent upon your Internet connection. It can take anywhere from 30 minutes to several hours to fully sync. Same thing goes for build times. Don't expect this to be short. If you have patience and have no build errors, you'll end up with a flashable zip in ~/aokp/out/target/product/mecha! Happy crack-flashing!
[Thunderbolt Android Development] ssojyeti2:
Sorry I'm a noob so this is probably a really dumb question but r u supposed to have ur phone plugged into the computer while doing the terminal on Ubuntu???
[Thunderbolt Android Development] tadiv:
Error on the first step

I'm interested in working on this (and hopfully learning a lot (because right now I know almost nothing)) - but on the first step, I get an error related to lib32zl-dev as follows:

tadiv@tadiv-desktop:~/Android ROMs/For Mecha/Archive$ sudo apt-get install curl git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib

[sudo] password for tadiv:

Reading package lists... Done

Building dependency tree

Reading state information... Done

gnupg is already the newest version.

zip is already the newest version.

E: Couldn't find package lib32z1-dev

Any suggestions?

Thanks,

Tom
[Thunderbolt Android Development] je2854:
Since we have an official version of ICS now. Does the github have the updated stuffs so we can have a fully working build? I want this as I'm getting tired of sense.
[Thunderbolt Android Development] raphytaffy:
Thanks for posting this ProTekk! I'd like to get this working as well, so maybe some Linux heads can chime in on the errors I'm getting after trying to install the required packages:

Reading package lists... Done
Building dependency tree
Reading state information... Done
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

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
E: Package 'lib32readline5-dev' has no installation candidate
E: Unable to locate package gcc-4.3-multilib
E: Couldn't find any package by regex 'gcc-4.3-multilib'
E: Unable to locate package g++-4.3-multilib
E: Couldn't find any package by regex 'g++-4.3-multilib'
[Thunderbolt Android Development] disconnecktie:
You don't have jdk 6 installed or any of the kernel tools you need.
[Thunderbolt Android Development] ViperZ28:
I am following this as well, this seems to be an old document because a lot of the links are dead. What I did for the libs is:

(excluding the others that are required)

sudo apt-get install gcc-4.6-multilib g++-4.6-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev

And I plan to grab the Java SDK from Oracle's website.
[Thunderbolt Android Development] disconnecktie:
That is exactly what you have to do prior to building from source.
[Thunderbolt Android Development] raphytaffy:
Thanks for this tip. I've installed the updated libs that you suggested, then installed the OpenJDK using:

sudo apt-get install openjdk-6-jdk

Is OpenJDK okay to use or is there a specific need for Sun Java JDK? I found the link for the JDK here: https://help.ubuntu.com/community/Java

Now that the updated libs and the JDK were installed properly, I ran the command that ProTekk posted minus the previously installed libs:

sudo apt-get install curl git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool g++-multilib

Everything installed properly. Just wanted to check if I'm now ready to build the source or if there's anything else I need to do beforehand.
[Thunderbolt Android Development] tburns:
http://xdaforums.com/showthread.php?t=1920107

Here is a good guide getting java and all setup right to build from source. Of course don't use the git stuff just the java setup.

I don't think his mecha stuff is on there anymore. Could be wrong.
[Thunderbolt Android Development] raphytaffy:
Getting this error now:

repo init -u git://github.com/AOKP/platform_manifest.git -b master
error: revision master in manifests not found
[Thunderbolt Android Development] je2854:
it's been updated... the new repo init is:

repo init -u https://github.com/AOKP/platform_manifest.git -b jb-mr1
[Thunderbolt Android Development] tburns:
The device tree i don't think is there anymore.

You need that to compile.
[Thunderbolt Android Development] je2854:
this is the updated specifics for the mecha

git clone git://github.com/CoolSilver/device_htc_mecha -b aokp device/htc/mecha

this is the updated vendor for the mecha

git clone git://github.com/ProTekk/vendor_htc_mecha.git -b ics vendor/htc/mecha

after the HARD WORK finding the updates everything else compiles correctly.

It took a LONG time to figure out the new links....
[Thunderbolt Android Development] tburns:
Nice.

Also found these last night

https://github.com/ThePlayground

Some more stuff to play with..
[Thunderbolt Android Development] neutronjeff:
Working?

So, after much digging and coding ... screenshot?

Does it run, do you have phone and data...?
[Thunderbolt Android Development] onedementedsmurf:
including device/asus/grouper/vendorsetup.sh
including device/asus/tilapia/vendorsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/armv7-a/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/htc/mecha/vendorsetup.sh
including device/lge/mako/vendorsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/manta/vendorsetup.sh
including device/samsung/toroplus/vendorsetup.sh
including device/samsung/toro/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including vendor/aokp/vendorsetup.sh
including vendor/htc/mecha/vendorsetup.sh
including sdk/bash_completion/adb.bash
ls: cannot access vendor/aokp/products/mecha.mk: No such file or directory
build/core/product_config.mk:234: *** Can not locate config makefile for product "aokp_mecha". Stop.

** Don't have a product spec for: 'aokp_mecha'
** Do you have the right repo manifest?

This is what I get after attempting the actual build.

Also this is what I get with the following command.

~/aokp$ git clone git://github.com/ProTekk/vendor_htc_mecha.git -b ics vendor/htc/mecha
Cloning into 'vendor/htc/mecha'...
fatal: remote error:
Repository not found.

But I changed ProTekk to CoolSilver and it appeared to work fine. Anyone still attempting this that might be able to help?
[Thunderbolt Android Development] jblack248:
I'm not sure what level of involvement any of you are interested in, but I'm currently working on porting CM9 to the Thunderbolt with sources at https://github.com/jblack248. Of course, it's not incorporated into the AOKP build process although that shouldn't be too difficult since it's probably just an additional makefile (an assumption).

Currently the RIL is being difficult with mobile data, but calling and SMS work using CM's HTC RIL. It's not ready for a release just yet, but I thought I'd give a shout to all of you since I see you're trying to build from source. Hopefully I can help in some way; the Thunderbolt forum could use some positive excitement.
[Thunderbolt Android Development] tburns:
The gitt link a few posts above is for the jellybean branch hence the -b jb for the AOKP git clone. Try -b ics

Ill take a look at the cm9 stuff tomorrow. Need to partition more HD space to Linux.
[Thunderbolt Android Development] SleepyS40:
I have been trying to figure this out as well. Any help would be appreciated.
[Thunderbolt Android Development] disconnecktie:
The first error is saying there isn't a mecha make file and the second is saying the repository isn't there. My guess is the make file didn't download or is being skipped and the second must have an incorrect directorym
[Thunderbolt Android Development] jacobmacek:
Only if you are pulling proprietary files from the device, otherwise, no
[Thunderbolt Android Development] Gandalf:
I'm getting a repository doesn't exist error when trying to clone the ProTekk git. any help?
[Thunderbolt Android Development] SleepyS40:
Thats the issue that everyone is having i am pretty sure to be honest.
[Thunderbolt Android Development] Gandalf:
well it seems all we need to do is sync with the CM or AOKP ICS branch, since they still have SOME files for the tbolt, BUT we just need proprietary files, from what im gathering in the 15 minutes i've spent looking at this so far. I'm trying to compile a build for a friend, since Sense ROMs seem so laggy and frustratingly slow on his device. I got him rooted and whatnot, and told him to deal with a rooted stock for a few days while I built a ROM for him, not realizing half the necessary files have been taken down since the phone went out of style like, over a year ago :rolleyes:
[Thunderbolt Android Development] SleepyS40:
could you not just pull the files from the actual device?
[Thunderbolt Android Development] Gandalf:
Well I don't have his phone and this is the first I've legitimately looked into it. I read in another thread that pulling the prop files with the script doesn't pull all of them, apparently on the stock ICS ROMs there are some files it wont pull because they are named differently or not there or something.

I'm looking around now and about to sync up the ICS AOKP repo, we shall see.

Im guessing any jb - based CM is out of the question for this device?
[Thunderbolt Android Development] SleepyS40:
I have a device in my possession, I was trying to build a rom for my friend also. I usually build cm10.1 for my evo lte. I have synced to the aokp repo for thunderbolt and I haven't looked in to cm. No one works on this phone anymore.....
[Thunderbolt Android Development] Gandalf:
Yea that's the problem. Well I've got the AOKP ICS repo syncing now. Once its done I'm going to add in CoolSilver's files for the device, or ThePlayground ones, looking into it now. We'll see what happens I guess.
[Thunderbolt Android Development] SleepyS40:
cool, well let me know if you get it to build if you don't mind.
[Thunderbolt Android Development] onedementedsmurf:
If you could specify what files are needed I'll gladly strip them from my phone, I'm actually getting a replacement today since for some reason the bottom 1/2" or so of my screen stopped functioning. And as much as it might be nice to upgrade (albeit not a single decent HTC phone with Verizon atm) I refuse to sign a new contract and lose my unlimited data, shiesty ba$tards lol

P.S. I realize HTC is not the only decent manufacturer of Android phones but I've never had even the slightest bit of luck with ANY Moto product, LG seems to be all "budget" phones and I'm not sure if I want to jump ship to Samsung. Plus every phone I've had for the past 10+ years has been an HTC :D I guess you could call me a fanboy haha
[Thunderbolt Android Development] je2854:
I apologize.. it is suppose to say

git clone git://github.com/CoolSilver/vendor_htc_mecha.git -b ics vendor/htc/mecha

---------- Post added at 07:31 PM ---------- Previous post was at 07:29 PM ----------

I have a spare bolt i'm not afraid to brick.... PM or let me know something!

I will test anything. (I have a friend that is a store manager at Verizon)
[Thunderbolt Android Development] Gandalf:
when syncing the AOKP repo, i put ICS rather than master, because I get errors of non-existing repository when using master, and there is no jellybean for mecha. i've tried syncing twice now, and it keeps hanging at jb -> gh/jb , not sure whats up. i'm going to try a cyanogenmod one instead with the device files posted here and see
[Thunderbolt Android Development] tburns:
If you get issues doing a repo sync its not because of the device files, its a git issue with pulling aokp source.

Anyone get this to build? I've been sick as a dog and haven't tried.
[Thunderbolt Android Development] Gandalf:
well yea, that's why i was going to try a CM build rather than AOKP because the repo is being weird. I'm going to add trter10's and CoolSilver's files for the device into my local_manifest and sync up that way
[Thunderbolt Android Development] je2854:
I didn't have problems syncing... although it just took all night and half of the next day... (almost 3GB of data was pulled)
[Thunderbolt Android Development] tburns:
Yea its a big data pull. The jb is huge to sync. Does it build?
[Thunderbolt Android Development] Gandalf:
well it's not building for anyone because there is not a mecha.mk file in vendor/aokp/products
[Thunderbolt Android Development] disconnecktie:
You have to assemble the vendor tree and the mk file yourself. Also I doubt data will work for you when you finish the build either. This was made long before data was working for the ics roms.
[Thunderbolt Android Development] tburns:
Do this

git clone git ://github.com/ThePlayground/android_device_htc_msm7x30-common.git -b ics

git clone git ://github.com/CoolSilver/device_htc_mecha.git -b aokp

git clone git ://github.com/CoolSilver/vendor_htc_mecha.git -b jb

It seems the cool silver repos were being made to work building aokp, and yea not sure if there will be data. I only looked at the make files and stuffs.

There is a mecha make file in the vendor files.

Maybe this will work :S

Also what commands do you guys use to build and what errors are given?
[Thunderbolt Android Development] Gandalf:
I've been syncing the AOKP jb-mr1 repo, since they don't have a master. I may have synced the ICS branch not sure right now.

I then add mecha to the vendorsetup per the OP, then do . build/envsetup.sh

It shows mecha on the output.

I then do lunch and select 46 for mecha.

I then get an error stating that there is no mecha.mk file in vendor/AOKP/products/
[Thunderbolt Android Development] je2854:
I don't care about any data or anything.....

ALL I want working is a full boot and SD Card working as this is a toy for me for my second Bolt....

wanting to use this as a iDroid for work.
[Thunderbolt Android Development] tburns:
The aokp repo sync needs to be a -b ICS from the aokp git . The ones i listed are the device tree and HTC common device tree for the tbolt. The other is the vendor files.

There is just a mismatch in the .mk files. A name is wrong in the device tree. It should be calling for full_mecha.mk.

The cool silver git branches it looked like he was trying to get the files setup to build but didn't work. That's why he has a jb, ICS, and aokp branches.

---------- Post added at 09:31 PM ---------- Previous post was at 09:30 PM ----------

In trying to help ;)
[Thunderbolt Android Development] jacobmacek:
So, has anybody gotten this to compile??
[TouchPad Development] ProTekk:
This is strictly just a reference guide/tutorial! If you cannot simply follow directions and copy/paste, I'm not going to help you! This is idiot-proof.

Build Environment​

Operating system -- Tested on Ubuntu 10.04 (64bit)

Terminal

Decent hardware (minimum of at least a dual core CPU and 4 GB of RAM)

Optimally have an SSD (standard mechanical drives work as well but slow down the process drastically)

Must have required packages for building installed, I will list them further down

Required Packages​

Simply copy and paste this in a terminal window:

sudo apt-get install curl git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib

Let that install and then proceed.

Getting the Source​

Make required directories

Obtain repo binary

Add repo binary to your path

Give repo binary proper permissions

Initialize empty repo

Sync repo

Grab device tree and vendor tree which are not included in the AOKP manifest

Add Mecha to the vendor setup

Alright, so now we're getting there. I have outlined the basics of what we're about to do and broke them down as I know them. This is all pretty much going to be copy/paste so it'll be fairly difficult to screw this up :)

Copy/paste:

Make directory for repo binary

mkdir ~/bin

Add directory for repo binary to your path

PATH=~/bin:$PATH

Download repo binary and place it in the proper directory

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo

Give the repo binary the proper permissions

chmod a+x ~/bin/repo

Create directory for where the AOKP repo will be stored and synced

mkdir ~/aokp

Move to our new AOKP directory

cd ~/aokp

Initialize the AOKP repo and download the manifest

repo init -u git://github.com/AOKP/platform_manifest.git -b master

Sync AOKP source

repo sync -jX

X == Number of cores your CPU has

Start the build​

This is probably the EASIEST part of all, simply copy/paste this command and walk away!

. build/envsetup.sh && lunch aokp_tenderloin-userdebug && make otapackage -jX

Where X == cores per CPU again.

Syncing the repo is dependent upon your Internet connection. It can take anywhere from 30 minutes to several hours to fully sync. Same thing goes for build times. Don't expect this to be short. If you have patience and have no build errors, you'll end up with a flashable zip in ~/aokp/out/target/product/tenderloin! Happy crack-flashing!
[TouchPad Development] evanbigfan:
Thats nice, too bad i sold my i5 laptop recently, and the Internet speed is awful herr :(, but thanks dude
[TouchPad Development] nomadman:
Will it compile on a 32bit vm? Not worried about the time.
[TouchPad Development] Jedipottsy:
ICS requires a 64bit linux install afaik

http://groups.google.com/group/android-building/browse_thread/thread/168d757c41cdaf3d?pli=1
[TouchPad Development] f_padia:
I don't think that's true, I've compiled an ICS ROM on a 32-bit machine. I think it should work.
[TouchPad Development] Harsh:
What's advantage of using AOKP if they forked from CyanogenMod? It would be same for HP Touchpad, maybe it would be even behind in update until AKOP merge new commits from CyanogenMod git.
[TouchPad Development] dpaul007:
Dude, don't start this crap again. If you got beef, take it up via PM or somewhere else that isn't in the thread.
[TouchPad Development] TMartin:
There are lots of advantages in using AOKP. Rom Control has so many tweaks. It's really a great build. Only certain things are forked (which you will find in every AOSP variant)
[TouchPad Development] TMartin:
I would love to know how...I tried and had zero success. Switched to 64-bit and I'm good to go.
[TouchPad Development] luckylui:
Id try if I knew how lol. Don't have patience sometimes, haha. Maybe I'll try it since I got a 32-bit myself.

Sent from my Galaxy Nexus
[TouchPad Development] worm9110:
I get the following:

user@ubuntu:~$ sudo apt-get install curl git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib

[sudo] password for user:

Reading package lists... Done

Building dependency tree

Reading state information... Done

gnupg is already the newest version.

zip is already the newest version.

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

user@ubuntu:~$
[TouchPad Development] calash:
It is in the partner repo so you need to make sure it is enabled.

If you open Synaptic and go to Tools/Repositories, then Other Software you should be able to check off Canonical Partners and Canonical Partners (Source Code). Reload, close Synaptic, and try again.
[TouchPad Development] tripacer99:
To anyone on the Ubuntu 12.04 nightlies, don't even bother trying to compile this, let alone install the dependencies. Build errors up the arse, repo sync errors, and a myriad of other hassles that just aren't worth it. A fresh install of 11.10 fixed everything for me, even following the same exact steps I was doing on 12.04.
[TouchPad Development] maxawesome:
Rather than do this in a VM, I'd like to create a second partition on my desktop and just run Ubuntu native.

Any recommendations for partition size? Whenever I create an Ubuntu VM, VirtualBox recommends 8GB, which I generally increase to 24GB (4GB for swap, 4GB for /home, and 16GB for / mounts) but as I've never tried to build from source, I have no idea what the space requirements are.

Please advise.