[GUIDE]Building any ROM from source for HTC One S aka ville!

Search This thread

Audioffensive

Senior Member
Oct 8, 2013
1,089
1,068
Apeldoorn
Compiling from source.

Sent from my One S using XDA Premium 4 mobile app

So the same i'm doing now? Not using toolchain or something like that?

Am facing new errors again now. Still no succesfull build.

Verstuurd van mijn One S

---------- Post added at 09:09 PM ---------- Previous post was at 09:07 PM ----------

use kitchen for cm12 since its early alpha

Which Kitchen? Tried one this afternoon but that looked like it was only for modding rom's

Verstuurd van mijn One S
 

mikronac.ns

Senior Member
Apr 25, 2012
1,169
981
Novi Sad
So the same i'm doing now? Not using toolchain or something like that?

Am facing new errors again now. Still no succesfull build.

Verstuurd van mijn One S

---------- Post added at 09:09 PM ---------- Previous post was at 09:07 PM ----------



Which Kitchen? Tried one this afternoon but that looked like it was only for modding rom's

Verstuurd van mijn One S

Man, I said to you that is early for building CM12. toolchain is set of compiler tools which make binaries from source.

Sent from my One S using XDA Premium 4 mobile app
 

Audioffensive

Senior Member
Oct 8, 2013
1,089
1,068
Apeldoorn
Man, I said to you that is early for building CM12. toolchain is set of compiler tools which make binaries from source.

Sent from my One S using XDA Premium 4 mobile app

I know it's early. Maybe i'll try cm11 to see if the errors i have are cm12 related or that it also on cm11.
My guess its stuck on kernel stuff. It has errors on lines in files. And when i delete those lines it goes on, but it stops at a new error :)

Ah well, i'm killing time ;)

Verstuurd van mijn One S
 

Darknites

Senior Member
Jul 2, 2011
6,266
2,530
I know it's early. Maybe i'll try cm11 to see if the errors i have are cm12 related or that it also on cm11.
My guess its stuck on kernel stuff. It has errors on lines in files. And when i delete those lines it goes on, but it stops at a new error :)

Ah well, i'm killing time ;)

Verstuurd van mijn One S

I would build cm11 first to get the idea but deleting lines don't always work.

Sent from my One M8 using Tapatalk
 

Audioffensive

Senior Member
Oct 8, 2013
1,089
1,068
Apeldoorn
@mmarkvoort
i get this error while building liquidsmooth lollipop for 2.16 hboot and dont know how to solve it... do you have any clue or do you get this error too ???

http://pastebin.com/zG77KJ4g

I'm sorry but i cannot help with solving the error. I am learning a lot myself about building still.
I do have a different error. My build stops at camera stuff. Something that needs to be fixed by CM guys.
AICP is only rom that is building normally atm for me.
Maybe you can try that one. I'm running it now and i like it. :)

Sent from my One S using XDA Free mobile app
 
  • Like
Reactions: Hai96

Hai96

Senior Member
Mar 16, 2013
321
309
OnePlus 6
Iam still trying to build LiquidSmooth for 2.16 hboot and iam now getting an error that I dont know how to fix...
can someone help me fixing this

Code:
packages/services/Telephony/src/com/android/phone/PhoneInterfaceManager.java:87: error: PhoneInterfaceManager is not abstract and does not override abstract method isDataPossibleForSubscription(long,String) in ITelephony
public class PhoneInterfaceManager extends ITelephony.Stub {
       ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
 

Samstag494

Senior Member
Oct 18, 2012
65
7
Cologne
I'm sorry if this has been discussed before but I'm new at building and need some advise. I've managed to build CM12 for hboot 2.15, but I dont get 2.16 to work. I cherrypicked the two lines from the first post:
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

and

cd workingdirectory/build
git fetch http://review.cyanogenmod.org/CyanogenMod/android_build refs/changes/59/53559/6 && git cherry-pick FETCH_HEAD

But everytime I try to edit this:

SKIP_SET_METADATA := true
in device/htc/s4-common/BoardConfigCommon.mk

I got an error for breakfast, lunch, brunch etc. Can someone give me a guide what I have to do exactly to get 2.16 to work? As said, everything is working for 2.15.

Thank you in advance and sorry for my english :)
 

Hai96

Senior Member
Mar 16, 2013
321
309
OnePlus 6
I'm sorry if this has been discussed before but I'm new at building and need some advise. I've managed to build CM12 for hboot 2.15, but I dont get 2.16 to work. I cherrypicked the two lines from the first post:
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

and

cd workingdirectory/build
git fetch http://review.cyanogenmod.org/CyanogenMod/android_build refs/changes/59/53559/6 && git cherry-pick FETCH_HEAD

But everytime I try to edit this:

SKIP_SET_METADATA := true
in device/htc/s4-common/BoardConfigCommon.mk

I got an error for breakfast, lunch, brunch etc. Can someone give me a guide what I have to do exactly to get 2.16 to work? As said, everything is working for 2.15.

Thank you in advance and sorry for my english :)
These commits were needed for cm 11.... If you are building on cm12 for 2.16 hboot you need to apply only the following commit under device/htc/ville

http://review.cyanogenmod.org/#/c/77443/
 
  • Like
Reactions: Samstag494

javelinanddart

Recognized Dev / Inactive Recognized Contributor
Mar 28, 2014
1,485
1,832
Midwest
@phoenixita
Can you change the requirements from reasonable computer to good computer?
I have a Core 2 Duo and 4GB RAM. I ran make bacon 24 hours ago..... I had to cancel it when it got to libart-compiler because it was taking too long
 

Hai96

Senior Member
Mar 16, 2013
321
309
OnePlus 6
@phoenixita
Can you change the requirements from reasonable computer to good computer?
I have a Core 2 Duo and 4GB RAM. I ran make bacon 24 hours ago..... I had to cancel it when it got to libart-compiler because it was taking too long

I have an amd athlon x2 and 4GB RAM too, but the build process is much faster.. First build did take ~3,5 hours and following builds took 2 hours because of using cchache.
Do you had multiple build processes running at the same time?
 

javelinanddart

Recognized Dev / Inactive Recognized Contributor
Mar 28, 2014
1,485
1,832
Midwest
I have an amd athlon x2 and 4GB RAM too, but the build process is much faster.. First build did take ~3,5 hours and following builds took 2 hours because of using cchache.
Do you had multiple build processes running at the same time?

Nope.. Also how do I setup CCache? and that's not fair! My 4th Gen i7 and 8GB RAM took 5.5 hours on first build and yours got it done in less! I use Linux exclusively too. But do you have an SSD? That also helps speed things up. And my HP Laptop (Core 2 Duo and 4GB RAM) the fan is FULL of dust and I can't take it out.
 

Hai96

Senior Member
Mar 16, 2013
321
309
OnePlus 6
Nope.. Also how do I setup CCache? and that's not fair! My 4th Gen i7 and 8GB RAM took 5.5 hours on first build and yours got it done in less! I use Linux exclusively too. But do you have an SSD? That also helps speed things up. And my HP Laptop (Core 2 Duo and 4GB RAM) the fan is FULL of dust and I can't take it out.
Will search later for the commands for cchache. Nope, Iam using no SSD and Ubuntu . Shocking that your I7 with 8 GB RAM is not fast er ?
 

Audioffensive

Senior Member
Oct 8, 2013
1,089
1,068
Apeldoorn
Nope.. Also how do I setup CCache? and that's not fair! My 4th Gen i7 and 8GB RAM took 5.5 hours on first build and yours got it done in less! I use Linux exclusively too. But do you have an SSD? That also helps speed things up. And my HP Laptop (Core 2 Duo and 4GB RAM) the fan is FULL of dust and I can't take it out.

For ccache look in the CM wiki for building rom for Ville. Just google it. It's there :)

Sent from my One S using XDA Free mobile app
 
  • Like
Reactions: javelinanddart

Top Liked Posts

  • There are no posts matching your filters.
  • 25
    Do you know about a ROM that it's not builded for our beloved One S? Do you want to port it for our device? This easy guide will help you.

    Requirements:



    1. A One S.
    2. 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.
    3. A micro USB cable.
    4. A decent Internet connection & reliable electricity :)
    5. 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.

    HERE IS THE GUIDE.

    Installing Build Packages
    Open the terminal and type: (for 64-bit&32-bit)
    Code:
    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
    In addition to the above, for 64-bit systems:
    Code:
    sudo apt-get install g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev

    Creating Directories
    In order to start building ROMs you'll need to create some directories
    Code:
    mkdir -p ~/bin
    mkdir -p ~/yourworkingdirectory

    Installing the REPO command
    Enter the following to download the "repo" binary:
    Code:
    curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    Now lets give this the proper permissions to make it runnable:
    Code:
    chmod a+x ~/bin/repo

    Put the ~/bin directory in your path of execution
    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.
    Code:
    export PATH=${PATH}:~/bin

    Initialize the source repository
    Code:
    cd yourworkingdirectory
    Now you'll need the repo init related to the rom you'd like to build. Here i will insert some of the I used. Anyway to find this you can go the rom's github and search for the manifest (android or platform-manifest).Just choose the right branch.
    Code:
    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

    Download the source code
    This will download all the source code to your computer.Prepare to wait a long time while the source code downloads.
    Code:
    repo sync

    Download device,kernel and vendor tree for Liquid
    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:
    Code:
    <?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>
    Now give another:
    Code:
    repo sync
    and wait.

    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.
    Code:
    add_lunch_combo liquid_ville-userdebug
    You can choose if you want an userdebug version of the rom or an eng one just by writing eng instead of userdebug.
    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:
    Code:
    # 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
    You need to modify some things to make it buildable:
    Code:
    # Inherit some common CM stuff.
    $(call inherit-product, vendor/cm/config/common_full_phone.mk)
    becomes:
    Code:
    # Inherit some common LiquidSmooth stuff.
    $(call inherit-product, vendor/liquid/config/common_phone.mk)
    To understand the changes you'll have to go in the vendor folder searching the rom specific vendor and open the config folder to see what .mk file you need.You need to use your brain to understand what you should write instead of cm every ROM has different naming conventions.
    This:
    Code:
    PRODUCT_NAME := cm_ville
    becomes:
    Code:
    PRODUCT_NAME := liquid_ville
    4) Now rename cm.dependencies in liquid.dependencies(SlimRoms does not require this step for unsupported devices.)

    Start the build
    Code:
    source build/envsetup.sh
    If you created the vendorsetup.sh in the right way you will read the ville folder.
    Code:
    lunch
    Now you have to choose the number near the ville in the list of the supported devices.
    If you have done all in the correct way in your terminal you'll see a page like this:
    View attachment 2470228

    Build
    After lunching you have to start the build using the right command:
    For liquid:
    Code:
    time mka liquid
    For others:
    Code:
    make bacon
    make
    brunch devicename

    Wait some time till the build ends hopefully with no errors.


    Now You could think that i forgot you hboot 2.16 users.But this is not true. This is a cherry-pick that let you build every rom for 2.16 hboot.
    Code:
    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
    Since you have no 4.4 recovery you'll need this other step:
    Code:
    Flashable via  normal TWRP
    add this line
    SKIP_SET_METADATA := true
    in device/htc/s4-common/BoardConfigCommon.mk
    cherry-pick i think.
    Code:
    cd workingdirectory/build
    git fetch http://review.cyanogenmod.org/CyanogenMod/android_build refs/changes/59/53559/6 && git cherry-pick FETCH_HEAD


    Credits: http://wiki.cyanogenmod.org/w/Build_for_ville
    and all the experience i got in this 2 months of building.
    6
    For most ROMS you'll have some overlays errors.
    Just go in the overlay folder linked in the error and open config.xml. Just delete the lines in the error or search in the folder history the commit that you have to revert.
    To revert a commit:
    Code:
    cd intheinteressedfolder
    git revert thenumberofthecommit

    Here is a screenshot of the what the number/name of the commit is:
    View attachment 2470242
    4
    Building CM11 for hboot 2.16

    OK, I got several requests on how to built CM11 or other roms for hboot 2.16. Basically its all in the OP, but you have to use updated cherry picks for the new memory layout and TWRP support

    - follow instructions to setup the CM11 repository and download CM11 sources either from the OP or from
    http://wiki.cyanogenmod.org/w/Build_for_ville

    - before issuing the breakfast ville command apply the two cherry picks from
    - http://review.cyanogenmod.org/#/c/53647/ and from
    - http://review.cyanogenmod.org/#/c/53559/
    always use the latest patch set
    - Change into the directory given in the Project line, e.g.
    system/devices/htc/ville or system/built
    - click cherry-pick in patch set 9 and patch set 6, respectively and copy the git-line into the shell (in the corresponding directory)
    - also check whether the patches have been applied correctly
    - finally insert the line
    SKIP_SET_METADATA := true
    into the file device/htc/s4-common/BoardConfigCommon.mk

    - after that issue the commands
    breakfast ville and
    brunch ville

    Btw. I use an Ubuntu Linux with an Oracle Java 7 installation (from here: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html) which always works. Before each rebuilt, I remove the last build (make clean) and the whole system/device and system/built directories and issue the command "repo sync" to update the sources (the device/built directories are also redownloaded). This makes sure that there are no merge problems or conflicts with updated sources.
    Remember that you have to apply the cherry picks again before the next built ...

    Hope this helps and good luck
    3
    Ok, then I will test your Guide :D

    Added some lines in purple for 2.16 users.
    2
    Please link me those commits for 2.16 I'm going to figure out a way to build 2.15 and 2.16 together but cannot find the commits your talking about..
    thanks

    http://review.cyanogenmod.org/#/c/53647/

    Here you go!