- A One S.
- A relatively recent computer (Linux, OS X, or Windows) w/a reasonable amount of RAM and about 35 GB of free storage. The less RAM you have, the longer the build will take. Using SSDs results in faster builds than traditional hard drives.
- A micro USB cable.
- A decent Internet connection & reliable electricity
- Some familiarity with basic Android operation and terminology. It would help if you’ve installed custom roms on other devices and are familiar with what a recovery image such as ClockworkMod is, for example. It may also be useful to know some basic command line concepts such as cd for “change directory”, the concept of directory hierarchies, that in Linux they are separated by /, etc.
Installing Build Packages
Open the terminal and type: (for 64-bit&32-bit)
sudo apt-get install bison build-essential curl flex git-core gnupg gperf libesd0-dev libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openjdk-6-jdk openjdk-6-jre pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev
sudo apt-get install g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
In order to start building ROMs you'll need to create some directories
mkdir -p ~/bin mkdir -p ~/yourworkingdirectory
Enter the following to download the "repo" binary:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Make sure that the ~/bin directory you just created is in your path of execution so that you can easily run the repo command even when you're not in ~/bin.
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0 repo init -u git://github.com/LiquidSmooth/android.git -b kitkat repo init -u git://github.com/SlimRoms/platform_manifest.git -b kk4.4-caf
This will download all the source code to your computer.Prepare to wait a long time while the source code downloads.
We will use CM ones. Thanks a lot.
Basically we need to add some projects to the download list. To do this we'll need a local_manifest.
Go in the .repo folder in your working directory(it's an hidden folder press ctrl+h). Create a new folder called "local manifests" then double click on it. Now you'll have to create a roomservice.xml file for the most of the ROMs and a slim_manifest.xml for SlimRoms, it's the same thing just the name it's different.
Open this file and paste this inside:
<?xml version="1.0" encoding="UTF-8"?> <manifest> <remote name="github" fetch="git://github.com/" /> <project name="CyanogenMod/android_device_htc_ville" path="device/htc/ville" remote="github" revision="cm-11.0" /> <project name="CyanogenMod/android_device_htc_s4-common" path="device/htc/s4-common" remote="github" revision="cm-11.0" /> <project name="CyanogenMod/android_device_htc_msm8960-common" path="device/htc/msm8960-common" remote="github" revision="cm-11.0" /> <project name="CyanogenMod/android_kernel_htc_msm8960" path="kernel/htc/msm8960" remote="github" revision="cm-11.0" /> <project name="TheMuppets/proprietary_vendor_htc" path="vendor/htc" remote="github" revision="cm-11.0" /> </manifest>
Do some modifications to the .mk files
Since we are using CM device tree we need to modify them for the choosen ROM.
Go into the device folder(device/htc/ville) and do some modifications. I will explain you what i mean using LiquidSmooth as example.
1) Create a new file called vendorsetup.sh . Open it and inside you'll have to write a script to add it to the lunch list.
2) Now rename cm.mk into liquid.mk(for other ROMs this file should be renamed in a different way. Use an existing device tree to see the correct naming.)
3) Open the .mk file. You'll find something like this:
# Release name PRODUCT_RELEASE_NAME := ville # Boot animation TARGET_SCREEN_HEIGHT := 960 TARGET_SCREEN_WIDTH := 540 # Inherit some common CM stuff. $(call inherit-product, vendor/cm/config/common_full_phone.mk) # Inherit device configuration $(call inherit-product, device/htc/ville/device_ville.mk) # Device naming PRODUCT_DEVICE := ville PRODUCT_NAME := cm_ville PRODUCT_BRAND := htc PRODUCT_MODEL := One S PRODUCT_MANUFACTURER := HTC # Set build fingerprint / ID / Product Name ect. PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=htc_ville BUILD_FINGERPRINT=htc_europe/ville/ville:4.1.1/JRO03C/128506.8:user/release-keys PRIVATE_BUILD
# Inherit some common CM stuff. $(call inherit-product, vendor/cm/config/common_full_phone.mk)
# Inherit some common LiquidSmooth stuff. $(call inherit-product, vendor/liquid/config/common_phone.mk)
PRODUCT_NAME := cm_ville
PRODUCT_NAME := liquid_ville
Start the build
If you have done all in the correct way in your terminal you'll see a page like this:
After lunching you have to start the build using the right command:
time mka liquid
make bacon make brunch devicename
cd device/htc/ville git fetch http://review.cyanogenmod.org/CyanogenMod/android_device_htc_ville refs/changes/47/53647/9 && git cherry-pick FETCH_HEAD
Flashable via normal TWRP add this line SKIP_SET_METADATA := true in device/htc/s4-common/BoardConfigCommon.mk
cd workingdirectory/build git fetch http://review.cyanogenmod.org/CyanogenMod/android_build refs/changes/59/53559/6 && git cherry-pick FETCH_HEAD
and all the experience i got in this 2 months of building.