[T-Mobile myTouch 4G Slide] Emmanuel U:
How to build ICS from source using Windows 64bit or Linux 64bit​

This guide has only been confirmed for linux or Ubuntu v11.10

If step has a ** then that means skip if on Linux

If step has a ~~ then that means skip if on Windows

If no key then perform on all operating systems

I reccomend to copy and paste commands as some are very long.

Required Packages:

** You may download Ubuntu 11.10 (a MUST if using windows) here or use the torrent. (You can Dual boot with an installer app or run in a Virtual machine)

Lets download Java 6:

start a terminal and type the following in

sudo add-apt-repository ppa:ferramroberto/java

sudo apt-get update

sudo apt-get install sun-java6-jdk

Once everything is installed and setup, exit and re-open terminal give your self root permisions:

sudo -i

Now lets download some other required packages (in terminal):

apt-get install python git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline-gplv2-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils

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

Setting up basic features:

Lets setup USB to work with our phones (ADB and such):

gksudo gedit /etc/udev/rules.d/51-android.rules

then enter the following into the top of the text box:

#Acer
SUBSYSTEM==usb, SYSFS{idVendor}==0502, MODE=0666

#ASUS
SUBSYSTEM==usb, SYSFS{idVendor}==0b05, MODE=0666

#Dell
SUBSYSTEM==usb, SYSFS{idVendor}==413c, MODE=0666

#Foxconn
SUBSYSTEM==usb, SYSFS{idVendor}==0489, MODE=0666

#Garmin-Asus
SUBSYSTEM==usb, SYSFS{idVendor}==091E, MODE=0666

#Google
SUBSYSTEM==usb, SYSFS{idVendor}==18d1, MODE=0666

#HTC
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE=0666

#Huawei
SUBSYSTEM==usb, SYSFS{idVendor}==12d1, MODE=0666

#K-Touch
SUBSYSTEM==usb, SYSFS{idVendor}==24e3, MODE=0666

#KT Tech
SUBSYSTEM==usb, SYSFS{idVendor}==2116, MODE=0666

#Kyocera
SUBSYSTEM==usb, SYSFS{idVendor}==0482, MODE=0666

#Lenevo
SUBSYSTEM==usb, SYSFS{idVendor}==17EF, MODE=0666

#LG
SUBSYSTEM==usb, SYSFS{idVendor}==1004, MODE=0666

#Motorola
SUBSYSTEM==usb, SYSFS{idVendor}==22b8, MODE=0666

#NEC
SUBSYSTEM==usb, SYSFS{idVendor}==0409, MODE=0666

#Nook
SUBSYSTEM==usb, SYSFS{idVendor}==2080, MODE=0666

#Nvidia
SUBSYSTEM==usb, SYSFS{idVendor}==0955, MODE=0666

#OTGV
SUBSYSTEM==usb, SYSFS{idVendor}==2257, MODE=0666

#Pantech
SUBSYSTEM==usb, SYSFS{idVendor}==10A9, MODE=0666

#Philips
SUBSYSTEM==usb, SYSFS{idVendor}==0471, MODE=0666

#PMC-Sierra
SUBSYSTEM==usb, SYSFS{idVendor}==04da, MODE=0666

#Qualcomm
SUBSYSTEM==usb, SYSFS{idVendor}==05c6, MODE=0666

#SK Telesys
SUBSYSTEM==usb, SYSFS{idVendor}==1f53, MODE=0666

#Samsung
SUBSYSTEM==usb, SYSFS{idVendor}==04e8, MODE=0666

#Sharp
SUBSYSTEM==usb, SYSFS{idVendor}==04dd, MODE=0666

#Sony Ericsson
SUBSYSTEM==usb, SYSFS{idVendor}==0fce, MODE=0666

#Toshiba
SUBSYSTEM==usb, SYSFS{idVendor}==0930, MODE=0666

#ZTE
SUBSYSTEM==usb, SYSFS{idVendor}==19D2, MODE=0666

save it and set permissions to it:

chmod a+r /etc/udev/rules.d/51-android.rules

Now reboot your ubuntu or linux machine just to be safe

Start a new terminal

Now lets setup a bin folder:

mkdir ~/bin

gedit ~/.bashrc

In the text box type then save:

#Will use anything in the bin folder in any dir
PATH=~/bin:$PATH

Initializing the repo:

Now lets download the repo binary and put it in the bin:

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

chmod a+x ~/bin/repo

Now exit and restart the terminal

Alright lets download the source:

mkdir Android_Source

cd Android_Source

Do this step if building CM9:

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

Do this step if building AOKP:

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

Do this step if building plain ICS:

repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.4_r1

Download the source:

Sync the repo (-j stands for how many jobs to do at once replace the ? with a number, I use 6 because i have a quad-core so I can go faster):

This can take anywhere from 30 minutes to 5 hours based on your internet speed

repo sync -j?

Configuring the repo for the Doubleshot:

Now lets set the repo up for our device:

cd device

mkdir htc (skip if exist)

cd htc

If building CM9:

git clone git://github.con/CyanogenMod/android_device_htc_doubleshot.git -b ics doubleshot

cd doubleshot

curl http://dl.dropbox.com/u/40873980/vendorsetup.sh >>vendorsetup.sh

cd ..

git clone git://github.com/CyanogenMod/android_device_htc_msm8660-common.git -b ics msm8660-common

cd ../..

cd vendor

mkdir htc (skip if exist)

cd htc

git clone git://github.com/TeamDS/vendor_htc_doubleshot.git -b stable doubleshot

cd ../..

If building AOKP:

git clone git://github.com/WildchildIcE/device_htc_doubleshot.git -b aokp doubleshot

cd ../..

cd vendor

mkdir htc (skip if exist)

cd htc

git clone git://github.com/WildchildIcE/vendor_htc_doubleshot.git -b ics doubleshot

cd ../..

If building ICS: coming soon

Building from source:

Finally lets build!:

. build/envsetup.sh

lunch 4

Build a flashable rom zip:

(-j stands for how many jobs to do at once replace the ? with a number, I use 6 because i have a quad-core so I can go faster)

This can take anywhere from 30 minutes to 5 hours based on your CPU speed

make -j? otapackage

Build a boot.img:

make -j? bootimage

Build a recovery image:

make -j? recoveryimage

That should make you a working build of CM9, AOKP, or ICS.

Note: From personal experience, building AOKP with our device may require some simple environment hacking.

1. Using a file explorer, navigate to (your source folder)/build/target/product.

2. Edit core.mk and take out "PRODUCT_NAME := core" and "PRODUCT_BRAND := generic" then save

3. Go back to the root of the source folder

4. goto vendor/aokp/products

5. delete picasso.mk and then edit androidproducts.mk

6. take out the line "$(LOCAL_DIR)/picasso.mk \" then save

7. then delete the following two directories, "/device/acer" and "vendor/acer/"

Then experiment!