[Q] Building cm9 from source - HTC Desire S

Ok, guys i'm stuck and need help pls.
My current state, the init and sync worked flawless.
Extracting the properitary files with vendor/cm/get-prebuilts worked either (i'm running cm9 also at my phone atm).
So but when i tried
Code:
breakfast saga
i first got this:
Code:
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/saga/cm.mk]]: "device/htc/msm7x30-common/msm7x30.mk" does not exist. Schluss.
Device saga not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Found repository: android_device_htc_saga
Duplicate device 'CyanogenMod/android_device_htc_saga' found in local_manifest.xml.
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/saga/cm.mk]]: "device/htc/msm7x30-common/msm7x30.mk" does not exist. Schluss.
** Don't have a product spec for: 'cm_saga'
** Do you have the right repo manifest?
I thought ok, then i include it at the local_manifest.xml like this:
Code:
<manifest><project name="CyanogenMod/android_device_htc_saga" path="device/htc/saga" remote="github" /><project name="CyanogenMod/android_device_htc_msm7x30-common" path="device/htc/msm7x30-common" remote="github" /></manifest>
nothing changed.
Afterwards i tried to clone msm7x30-common myself into the device/htc/msm7x30-common folder, it helped a bit but not much, now it runs for a short period (about one second) and prints this
Code:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.3
TARGET_PRODUCT=cm_saga
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=IML74K
============================================
afterwards it exits, no error nothing, pls can someone tell me what i did wrong!!

I noticed something at the output, why is the host architecture x86, I'm running Linux mint 12 x64, weird.
Gesendet von meinem Desire S mit Tapatalk

You're pretty close. This is what I did to build CM9:
Code:
cd ~/android/ics
repo init -u git://github.com/CyanogenMod/android.git -b ics
make a local_manifest.xml (.repo/local_manifest.xml) and add the following code:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/htc/saga" name="CyanogenMod/android_device_htc_saga" />
<project path="device/htc/msm7x30-common" name="CyanogenMod/android_device_htc_msm7x30-common" />
<project path="vendor/htc" name="koush/proprietary_vendor_htc" />
</manifest>
Instead of Koush' Github you can take Nexx' too. Then do the following:
Code:
repo sync -j16
~/android/ics/vendor/cm/get-prebuilts
. build/envsetup.sh && brunch saga
And then wait a while. Your build is being compiled, hopefully without errors this time.
To make a new compile do the following:
Code:
repo sync
make installclean (' make clobber' to really start from scratch)
. build/envsetup.sh && brunch saga
Be aware that the build you're making this way isn't as good as Nexx' builds as he uses preliminary code for the camera and other things that aren't committed yet to the ICS branch.
Have fun compiling your own CM9 builds

Thx, after including nexx/proprietary_vendor_htc at local_manifest.xml all works (most of the time, sometimes it fails to fetch).
About the cam fix, maybe you want to add this ^^
Code:
<project name="nexx/android_packages__apps_FFCFix" remote="github" path="packages/apps/FFCFix">

It won't do much, it's a fix for a still unmerged commit from Twisted

Related

[Solved] Building CM9

With there being a bit of an hiatus on CM9 development (waiting for HTC kernel source, working on JB), I thought I'd learn more about building ROMs.
I'm running Ubuntu 10.04 (and 12.04) under VMware Player on Windows 7 Home.
I downloaded the JB AOSP repository and built it successfully for the emulator.
Next, I wanted to build a working ROM, so I chose to do CM9 (ICS).
I've followed [TUTORIAL]Setting up and compiling CM9 from source
and some info regarding building JB:
nk111 said:
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
repo sync
./build/envsetup.sh
brunch saga
Click to expand...
Click to collapse
Here's what I did:
repo init -u git://github.com/CyanogenMod/android.git -b ics
Added a "remote" to get the proprietary files for HTC devices by creating WorkingDir/.repo/local_manifest.xml
Note: An alternative to using nexx/proprietary_vendor_htc is to run ./extract-files.sh from WorkingDir/device/htc/saga with your PC connected to your phone (it used adb to pull down the proprietary files)
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="https://github.com/" name="nexx" revision="ics" />
<project name="nexx/proprietary_vendor_htc" path="vendor/htc" remote="nexx" revision="ics" />
<!-- the following lines were added automatically by "brunch saga" command -->
<project name="CyanogenMod/android_device_htc_saga" path="device/htc/saga" remote="github" revision="ics" />
<project name="CyanogenMod/android_device_htc_msm7x30-common" path="device/htc/msm7x30-common" remote="github" revision="ics" />
<project name="CyanogenMod/htc-kernel-msm7x30" path="kernel/htc/msm7x30" remote="github" revision="android-msm-2.6.35-ics" />
</manifest>
repo sync
Note: the next bit adds the ROM Manager and Term packages which are required by CM
cd vendor/cm
./get-prebuilts
cd ../..
. build/envsetup.sh
brunch saga (I also tried breakfast saga; lunch;mka)
The build failed with these errors:
target SharedLib: audio.primary.msm7x30 (out/target/product/saga/obj/SHARED_LIBRARIES/audio.primary.msm7x30_intermediates/LINKED/audio.primary.msm7x30.so)
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/saga/obj/SHARED_LIBRARIES/audio.primary.msm7x30_intermediates/AudioHardware.o: in function android_audio_legacy::AudioHardware::setMicMute_nosync(bool):hardware/qcom/media/audio/msm7x30/AudioHardware.cpp:932: error: undefined reference to 'msm_device_mute'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/saga/obj/SHARED_LIBRARIES/audio.primary.msm7x30_intermediates/AudioHardware.o: in function android_audio_legacy::AudioHardware::AudioHardware():hardware/qcom/media/audio/msm7x30/AudioHardware.cpp:566: error: undefined reference to 'msm_reset_all_device'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/saga/obj/SHARED_LIBRARIES/audio.primary.msm7x30_intermediates/AudioHardware.o: in function android_audio_legacy::updateDeviceInfo(int, int, unsigned int, unsigned int):hardware/qcom/media/audio/msm7x30/AudioHardware.cpp:449: error: undefined reference to 'msm_device_mute'
collect2: ld returned 1 exit status
Note this error occurs both in Ubuntu 10.04 and 12.04
What am I missing and what do I need to do to get the error fixed?
Thanks
Edit:
Solution
The version of Ubuntu has nothing to do with the problem.
The errors point to some missing functions called by hardware/qcom/media/audio/msm7x30/AudioHardware.cpp
The modules in nexx/proprietary_vendor_htc are missing the required functions so copy them from a working CM9 ROM.
tuttifrutas said:
i mean you should run the file extract-files.sh, this will copy the files from your phone to the folder vendor/htc/saga/proprietary, just notice that your phone should have at least one of the latest cm9 nk111 roms.
or you can extract the nk111 cm9 rom to a folder, goto that folder and under sytem/lib, copy the needed .so files to the vendor/htc/saga/proprietary replacing the files on this folder
or you can add repository that is not nexx for example https://github.com/AOKPDS/proprietary_vendor_htc
you can check if the files contain that function by using this command in the folder vendor/htc/saga/proprietary
Code:
grep -R msm_device_mute .
My output
Code:
~/cm9/vendor/htc/saga/proprietary$ grep -R msm_device_mute
.Binary file ./libaudioalsa.so matches
Click to expand...
Click to collapse
Thanks Bill for the start and the steps, please keep updating the OP as you proceed on your journey.
I would also like to Build CM9 myself atleast once
Hi maybe you are missing some projects
try this on you local_manifest.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_htc_saga" path="device/htc/saga" remote="github" revision="ics" />
<project name="CyanogenMod/android_device_htc_msm7x30-common" path="device/htc/msm7x30-common" remote="github" revision="ics" />
<project name="nexx/proprietary_vendor_htc" path="vendor/htc" remote="github" revision="ics" />
</manifest>
i think you need to go to vendor/cm/ and excute get-prebuilds or something like that if you get some rommanager error
This is what my local_manifest.xml looks like:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="https://github.com/" name="nexx" revision="ics" />
<project name="nexx/proprietary_vendor_htc" path="vendor/htc" remote="nexx" revision="ics" />
<project name="CyanogenMod/android_device_htc_saga" path="device/htc/saga" remote="github" revision="ics" />
<project name="CyanogenMod/android_device_htc_msm7x30-common" path="device/htc/msm7x30-common" remote="github" revision="ics" />
<project name="CyanogenMod/htc-kernel-msm7x30" path="kernel/htc/msm7x30" remote="github" revision="android-msm-2.6.35-ics" />
</manifest>
The brunch saga command added these additional entries automatically.
I know this seems like a long shot and it may not fix the problem but it could be Ubuntu 12.04 causing problems. 10.04 is the best version. Also you don't need to add the kernel to the local manifest unless you're creating a custom one. It's already in the device tree
Sent from my Desire S using Tapatalk 2
Is your repository properly synchronized? If not it is probably your build machine
Sent from my Desire S using xda app-developers app
Thanks, guys. I'll try using Ubuntu 10 instead of 12.
Sent from my HTC Desire S
I did a complete reinstall on Ubuntu 10.04. But I still get the same errors. Note, I've updated the OP with more details on my environment and the steps I went through.
i got the same error when i tried to compile it on a Virtual machine. I'm not an expert but it seems to me that the file vendor/htc/saga/proprietary/libaudioalsa.so should have that function but it doesn't !? correct me if i'm wrong
try extracting the files from one of cm9 alpha builds using the script extract-files.sh under the folder device/htc/saga/
or just open the cm9 alpha zip file goto system/lib copy and replace the file libaudioalsa.so in the dir vendor/htc/saga/proprietary/
EDIT:
the proprietary repository, that is added using brunch saga, is the culprit it breaks the build
I managed to get a working build!
The errors point to some missing functions called by hardware/qcom/media/audio/msm7x30/AudioHardware.cpp
So I had a look at the code and found that there were two conditions that invoked the problem code:
#ifdef WITH_QCOM_RESETALL
and
#ifdef WITH_QCOM_VOIPMUTE
So I commented out these sections and, voila, it compiled!
Now, I have no idea what is the broader impact of what I've done, but the build work and runs on the phone.
So I'm changing this thread for [Q] to [Partial solution]
tuttifrutas said:
EDIT:
the proprietary repository, that is added using brunch saga, is the culprit it breaks the build
Click to expand...
Click to collapse
Can you please be a bit more specific? The CyanogenMod/android_device_htc_saga project adds the proprietary files only if you connect your phone and run ./extract-files.sh.
Are you saying:
Don't run extract-files.sh, or
Remove the CyanogenMod/android_device_htc_saga project, which doesn't make sense to me because it includes a lot more than just the proprietary files, or
????
BillGoss said:
Can you please be a bit more specific? The CyanogenMod/android_device_htc_saga project adds the proprietary files only if you connect your phone and run ./extract-files.sh.
Are you saying:
Don't run extract-files.sh, or
Remove the CyanogenMod/android_device_htc_saga project, which doesn't make sense to me because it includes a lot more than just the proprietary files, or
????
Click to expand...
Click to collapse
i mean you should run the file extract-files.sh, this will copy the files from your phone to the folder vendor/htc/saga/proprietary, just notice that your phone should have at least one of the latest cm9 nk111 roms.
or you can extract the nk111 cm9 rom to a folder, goto that folder and under sytem/lib, copy the needed .so files to the vendor/htc/saga/proprietary replacing the files on this folder
or you can add repository that is not nexx for example https://github.com/AOKPDS/proprietary_vendor_htc
you can check if the files contain that function by using this command in the folder vendor/htc/saga/proprietary
Code:
grep -R msm_device_mute .
My output
Code:
~/cm9/vendor/htc/saga/proprietary$ grep -R msm_device_mute
.Binary file ./libaudioalsa.so matches

Need help from dev ! Maybe I will be one of you ?

Hello, all.
First, I know that thread shoud be in "N5 Q&A, Help & Troubleshooting" but I affraid that no one reply...
I'm learning how to "port from source" a ROM for my device (LG G2).
I post there because the Nexus 5 is very similar.
My choose is the PSX ROM from the Nexus 4 and soon for the Nexus 5.
I have the authorization from the owner @ctfrommn, thank you to him, but I'm starting to bother him a lot with my questions...
So I hope that someone can have a lot and try to help me to learn.
This what I have done since now but I have a error that I don't know how to solve.
ANY idea, information, teaching is really welcome !
Thank you.
*repo sync :
repo init -u https://github.com/PSX-PureSpeed/android_manifest.git -b kk-4.4
*I have added that to the manifest for my LG G2 :
<project path="device/lge/g2-common" name="CyanogenMod/android_device_lge_g2-common" remote="cm" revision="cm-10.2" />
<project path="device/lge/d802" name="CyanogenMod/android_device_lge_d802" remote="cm" revision="cm-10.2" />
<project path="hardware/qcom/display-mdss" name="CyanogenMod/android_hardware_qcom_display-mdss" remote="cm" revision="cm-10.2" />
<project path="hardware/qcom/media-v4l2" name="CyanogenMod/android_hardware_qcom_media-v4l2" remote="cm" revision="cm-10.2" />
<project path="kernel/lge/msm8974" name="CyanogenMod/android_kernel_lge_msm8974" remote="cm" revision="cm-10.2" />
*So there, I have all stuffs to work.
*Under "psx/vendor/psx" I have edit the "vendorsetup.sh"
Add : add_lunch_combo d802-user
* Under "psx/vendor/psx/products" I have create a "d802.mk" file with that :
# Inherit AOSP device configuration for hammerhead.
$(call inherit-product, device/lge/d802/d802.mk)
# Inherit common product files.
$(call inherit-product, vendor/psx/products/common.mk)
# Setup device specific product configuration.
PRODUCT_NAME := d802
PRODUCT_BRAND := LGE
PRODUCT_DEVICE := d802
PRODUCT_MODEL := LG G2
PRODUCT_MANUFACTURER := LGE
PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=hammerhead BUILD_FINGERPRINT="google/hammerhead/hammerhead:4.4/KRT16M/893803:user/release-keys" PRIVATE_BUILD_DESC="hammerhead-user 4.4 KRT16M 893803 release-keys"
*I have create a folder "d802" under psx/vendor/lge and add that :
https://github.com/rohanmathur/vendor_lge_d802
*I have edit the file "AndroidProducts.mk" under "psx/vendor/psx" to get that :
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/psx_emulator.mk \
$(LOCAL_DIR)/psx_mako.mk \
$(LOCAL_DIR)/psx_hammerhead.mk \
$(LOCAL_DIR)/d802.mk \
$(LOCAL_DIR)/psx_flo.mk
*I have edit the file "d802.mk" under "psx/device/lge/d802" and rename :
PRODUCT_NAME := full_d802
to
PRODUCT_NAME := d802
*in a terminal under "psx/" I do :
. build/envsetup.sh
lunch
*And choose "13" that is my "d802-user"
*This is the terminal return :
build/core/product_config.mk:227: *** _nic.PRODUCTS.[[vendor/psx/products/d802.mk]]: "frameworks/native/build/phone-xxhdpi-2048-dalvik-heap.mk" does not exist. Stop.
** Don't have a product spec for: 'd802'
** Do you have the right repo manifest?
*So I have add " phone-xxhdpi-2048-dalvik-heap.mk" in " frameworks/native/build/"
*in a terminal under "psx/" I do :
. build/envsetup.sh
lunch
*And choose "13" that is my "d802-user"
*This is the terminal return :
build/core/product_config.mk:227: *** _nic.PRODUCTS.[[vendor/psx/products/d802.mk]]: "frameworks/native/build/phone-xxhdpi-2048-hwui-memory.mk" does not exist. Stop.
** Don't have a product spec for: 'd802'
** Do you have the right repo manifest?
*So I have add " phone-xxhdpi-2048-hwui-memory.mk" in " frameworks/native/build/"
*in a terminal under "psx/" I do :
. build/envsetup.sh
lunch
*And choose "13" that is my "d802-user"
*There is no more error !"
make otapackage -j8
*And the terminal return :
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4
TARGET_PRODUCT=d802
TARGET_BUILD_VARIANT=user
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.11.0-13-generic-x86_64-with-Ubuntu-13.10-saucy
HOST_BUILD_TYPE=release
BUILD_ID=KRT16M
OUT_DIR=out
============================================
Checking build tools versions...
build/core/binary.mk:427: target `out/target/product/d802/obj/EXECUTABLES/skia_test_intermediates/MatrixTest.o' given more than once in the same rule.
find: `src': No such file or directory
frameworks/uiautomator/Android.mk:82: warning: overriding commands for target `out/target/common/obj/PACKAGING/uiautomator-checkapi-last-timestamp'
frameworks/testing/uiautomator/library/Android.mk:82: warning: ignoring old commands for target `out/target/common/obj/PACKAGING/uiautomator-checkapi-last-timestamp'
frameworks/uiautomator/Android.mk:99: warning: overriding commands for target `out/target/common/obj/PACKAGING/uiautomator-checkapi-current-timestamp'
frameworks/testing/uiautomator/library/Android.mk:99: warning: ignoring old commands for target `out/target/common/obj/PACKAGING/uiautomator-checkapi-current-timestamp'
frameworks/uiautomator/Android.mk:111: warning: overriding commands for target `update-uiautomator-api'
frameworks/testing/uiautomator/library/Android.mk:111: warning: ignoring old commands for target `update-uiautomator-api'
make: *** hardware/qcom/: Is a directory. Stop.
*I have no idea on how to solve it...
You said yourself that this thread should go into Q&A, so let's move it there
Also, you file "MatrixTest.o" seems to be builded twice (or more), grep for it, see where it's "defined"/called. if it's more than once, remove one (the false one ofc) and try to re-compile

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

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:
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.
​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.
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
it might be a stupid question: so i dont need any programing skills?
Hai96 said:
it might be a stupid question: so i dont need any programing skills?
Click to expand...
Click to collapse
For building from source nope
phoenixita said:
For building from source nope
Click to expand...
Click to collapse
Ok, then I will test your Guide
Hai96 said:
Ok, then I will test your Guide
Click to expand...
Click to collapse
Added some lines in purple for 2.16 users.
@phoenixita Iam stucking at the point of doing modifications to the mk. files, i dont have a ville folder in my device folder...
View attachment 2471072
Hai96 said:
@phoenixita Iam stucking at the point of doing modifications to the mk. files, i dont have a ville folder in my device folder...
View attachment 2471072
Click to expand...
Click to collapse
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.
@phoenixita I had followed your guide and now I have the 3.0 liquid smooth build and it boots.
But the build process was very slow, my computer needed 4 hours to build this. Does it need only at the first building process so long or it's my computer ?
If I want to build paranoid android, what do I need to change?
Hai96 said:
@phoenixita I had followed your guide and now I have the 3.0 liquid smooth build and it boots.
But the build process was very slow, my computer needed 4 hours to build this. Does it need only at the first building process so long or it's my computer ?
If I want to build paranoid android, what do I need to change?
Click to expand...
Click to collapse
Paranoid android it's a different thing anyway rmbq has written a guide for porting PA.
4 hours it's okay...
i have another question
When I want to build AOKP,Slim Rom,... I need to create for every Rom a new working directory and download Repositorys,or?
Hai96 said:
i have another question
When I want to build AOKP,Slim Rom,... I need to create for every Rom a new working directory and download Repositorys,or?
Click to expand...
Click to collapse
Yes you need to download each source for each ROM you want to build in its own directory
---------- Post added at 09:02 PM ---------- Previous post was at 08:48 PM ----------
Hai96 said:
@phoenixita I had followed your guide and now I have the 3.0 liquid smooth build and it boots.
But the build process was very slow, my computer needed 4 hours to build this. Does it need only at the first building process so long or it's my computer ?
If I want to build paranoid android, what do I need to change?
Click to expand...
Click to collapse
Google how to set up ccache. It will reduce the time of the builds after you first initial build using it
phoenixita said:
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.
Click to expand...
Click to collapse
Can you incorporate the above instructions in the OP? You did lose me a bit.
Thanks for the guide perhaps a sticky?
ttaidapos said:
Can you incorporate the above instructions in the OP? You did lose me a bit.
Thanks for the guide perhaps a sticky?
Click to expand...
Click to collapse
they are in the OP...I've copied them........................................................
I want to build omni Rom for the One S but i get big Error after the lunch command...
Do you know what iam doing wrong?
View attachment 2474393
Hai96 said:
I want to build omni Rom for the One S but i get big Error after the lunch command...
Do you know what iam doing wrong?
View attachment 2474393
Click to expand...
Click to collapse
Have you renamed cm.mk in omni.Mk? And have you done the right chsnges?
phoenixita said:
Have you renamed cm.mk in omni.Mk? And have you done the right chsnges?
Click to expand...
Click to collapse
Yes I have renamed the .Mk files....
What do you mean with changes?
I have changed all the things from liquid to Omni
Gesendet von meinem HTC One S
Hai96 said:
Yes I have renamed the .Mk files....
What do you mean with changes?
I have changed all the things from liquid to Omni
Gesendet von meinem HTC One S
Click to expand...
Click to collapse
If you are just starting to build. Pick a different ROM than omni. It has a few more changes that needs made than the ones in this guide. And it will error with invalid integers which will be difficult for a new builder to fix.
WhiTeRhiNo said:
If you are just starting to build. Pick a different ROM than omni. It has a few more changes that needs made than the ones in this guide. And it will error with invalid integers which will be difficult for a new builder to fix.
Click to expand...
Click to collapse
I will give omni a try!
WhiTeRhiNo said:
If you are just starting to build. Pick a different ROM than omni. It has a few more changes that needs made than the ones in this guide. And it will error with invalid integers which will be difficult for a new builder to fix.
Click to expand...
Click to collapse
Can you name one Rom that can be build with this guide?

Bulding any rom from source for your android device.

I'm using HTC One S and LiquidSmooth as examples. It should work for all devices. Nexus should be a little different story.
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:
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.
​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
repo init -u git://github.com/ChameleonOS/android.git -b kitkat-staging
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.
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.​
Credits: http://wiki.cyanogenmod.org/w/Build_for_ville
and all the experience i got in this 2 months of building.
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
Enjoy.
Edited the title. And added a repo init!

[GUIDE] Build any Custom ROM from Source [Noobfriendly]

I know there are many of these guides on XDA, but when I wanted to learn how to compile ROMs, all those guides didn't help me out cause all those guides are for more advanced users. I will try to explain every step clearly.
Step 1: Prepare your PC for building Android
Here's a good guide how to do that. http://forum.xda-developers.com/showthread.php?t=2639611
Follow this guide up to step 9, then return to this thread.
Step 2: Downloading the sources
First, in terminal type "mkdir <android>" and then "cd <android>". Replace <android> with the ROM name that you want to build. For example if you want to build omni, type "mkdir omni" and "cd omni". Now you created a directory called "omni" and switched to it. Now, pick a ROM that you want to build and go to its github page. Then search for a repository that has the word "manifest" in it (sometimes it's also just called "android"). Click on it. On the top, select the branch. Most times every branch is for a different android version. Select the latest android version (For this guide it's Android 5.1.1, so the branch most times is LP-5.1). Then scroll down to the readme, copy the command starting with "repo init" and paste it in your terminal. Now just type "repo sync" and it will download the sources. This will take time, since it's about 15gb that will be downloaded.
Step 3: Download the Device specific sources
Next, you have to download the device tree, the kernel and the vendor files. If you're lucky, someone already put together a roomservice.xml for your device where all the needed stuff is declared. Search for "<devicename> roomservice" and hopefully you'll find a github page with this file. If you do, download it and push it to <android>/.repo/local_manifests/. Then go back to the terminal and type "repo sync" again. This time it won't take that long. If there's no roomservice.xml for your device, You have to create it. The device tree and kernel most times can be found by going to github.com/CyanogenMod and searching for your brand. For example, if you have a Motorola Moto G 2nd Generation (codename titan), search for motorola and open android_device_motorola_titan (sources for titan), android_device_motorola_msm8226-common (sources for titan's chipset) and android_kernel_motorola_msm8226 (sources for the kernel of the chipset) in a new tab. Also you need the vendor files which can be found at github.com/TheMuppets. For motorola devices, open proprietary_vendor_motorola. Create a new file on your desktop called "roomservice.xml" and open it. Paste this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="" path="" remote="github" revision="cm-12.1" />
<project name="" path="" remote="github" revision="cm-12.1" />
<project name="" path="" remote="github" revision="cm-12.1" />
<project name="" path="" remote="github" revision="cm-12.1" />
</manifest>
Then go back to the github pages, copy the names of the repositorys and paste <project-name-on-github>/<name-of-the-repository> in the quotes after "name=". For titan, it would look like this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_motorola_titan" path="" remote="github" revision="cm-12.1" />
<project name="CyanogenMod/android_device_motorola_msm8226-common" path="" remote="github" revision="cm-12.1" />
<project name="CyanogenMod/android_kernel_motorola_msm8226" path="" remote="github" revision="cm-12.1" />
<project name="TheMuppets/proprietary_vendor_motorola" path="" remote="github" revision="cm-12.1" />
</manifest>
Now for the path, just copy the name of the repository, remove "android_" or "proprietary_" and replace each "_" with a "/"
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="android_device_motorola_titan" path="device/motorola/titan" remote="github" revision="cm-12.1" />
<project name="android_device_motorola_msm8226-common" path="device/motorola/msm8226-common" remote="github" revision="cm-12.1" />
<project name="android_kernel_motorola_msm8226" path="kernel/motorola/msm8226" remote="github" revision="cm-12.1" />
<project name="proprietary_vendor_motorola" path="vendor/motorola" remote="github" revision="cm-12.1" />
</manifest>
Sometimes you need some more repositorys, for example for titan you also need android_hardware_qcom_fm and android_device_qcom_common. Add them the same way as you added all the other sources. You can find out which repositorys you need by opening cm.dependencies in your decive- and chipset sources.
Now save the file and push it to "<android>/.repo/local_manifests/". Now return to your terminal and type "repo sync" again.
Step 4: Edit the device tree
You have to edit the device tree so that it fits to the ROM that you want to build. Go to <android>/vendor. In there you will find a folder with the abbreviation for the ROM. For example for CarbonROM the abbreviation is carbon, for EuhoriaOS it's eos, for AOKP it's aokp and for CyanogenMod it's cm. Remember this abbreviation. Back in terminal, type "cd device/<brand-you-are-building-for>/<phone-you-are-building-for>/" and then "mv cm.mk <remembered-abbreviation>.mk" and "mv cm.dependencies <remembered-abbreviation>.dependencies". After that, type "nano <remembered-abbreviation>.mk" and replace "cm" with "<remembered-abbreviation>" where ever you see it. To save the file, hit Ctrl+O, then Enter and then Ctrl+X. Now type "cd .." and then "cd <chipset-you-are-building-for>. Now, type "mv cm.dependencies <remembered-abbreviation>.dependencies" again.
Step 5: Building
We finally arrived there! To build our ROM, in terminal type ". build/envsetup.sh" and then "brunch <codename-for-your-device>".
This process takes time, depending on your PC specs. On my PC (2 cores, 3gb RAM), building takes about 8h. On my friends Server (12 cores, 128gb RAM), building takes about 20 mins.
Happy building!
Credits:
@Sarath280 for teaching me how to build ROMs
My dad for teaching me everything else aboout technology
@sylentprofet for the guide how to prepare linux to build Android
@notiflux
Het Max, Amol here. Thank You So Much. Love ya.
Sent from my Moto G 2014 using Tapatalk
Thanks! For this great tutorial! I am testing it right now I had problems making the roomservice.xml but with this tutorial it was very easy .
I am using a china device so not so many ROMs avalible so I am building one myself
Hello @notiflux,
Thanks for the guide,
I have a little issue though,
The thing is that the device that i want to build the rom for(SM-T211) DO NOT have a device tree already built. So I need to make that first. Can you help me with that?
sscsps said:
Hello @notiflux,
Thanks for the guide,
I have a little issue though,
The thing is that the device that i want to build the rom for(SM-T211) DO NOT have a device tree already built. So I need to make that first. Can you help me with that?
Click to expand...
Click to collapse
I'm not really into that kinda stuff since I never worked on such a device, but I know that there are guides here on xda on how to create your own device tree. But I think your device needs to be rooted for that
http://forum.xda-developers.com/showthread.php?t=2010281 you can try this guide. Good luck!
help in source tree
Sir, i downloaded ,android aosp open source tree ,,in desktop directory ,,linux 16:10 ,next i downloaded open source ,,kernal and android files from lg website ,,as i am using lg ,,,in open source lg ,,i got 2 tar files,,1 android ,2nd is kernal tar,,and ine readme.txt i opened it ,,it showing that untar android. tar and merge ,in download.android source tree ,,but where i am not getting ,,please tell me where ,,please sir
I see this thread is from 2015, does the guide work for nougat also?
Any solution for this error?
Code:
Starting build with ninja
ninja: Entering directory `.'
ninja: error: '/home/harshone/android/lineage/out/target/product/m8/obj/KERNEL_OBJ/usr', needed by '/home/harshone/android/lineage/out/target/product/m8/obj/STATIC_LIBRARIES/libsdcard_intermediates/sdcard.o', missing and no known rule to make it
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/harshone/android/lineage'
#### make failed to build some targets (02:30 (mm:ss)) ####
Hi, how do I apply security updates to the source?
HarshOne said:
Any solution for this error?
Code:
Starting build with ninja
ninja: Entering directory `.'
ninja: error: '/home/harshone/android/lineage/out/target/product/m8/obj/KERNEL_OBJ/usr', needed by '/home/harshone/android/lineage/out/target/product/m8/obj/STATIC_LIBRARIES/libsdcard_intermediates/sdcard.o', missing and no known rule to make it
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/harshone/android/lineage'
#### make failed to build some targets (02:30 (mm:ss)) ####
Click to expand...
Click to collapse
It seams you don't have libsdcard folder/file in your device tree.
So try to search and download that file from github.
then copy and paste that file to your device tree
Hello respected developers,
I'm very enthusiastic and inspired by viper os to develop it for my other devices too. But first I tried to build the rom for my redmi 4a because i wanted to test the success of my building. I would like to inform you that i have gone through every process of establishing environment to reposync all learnig from aosp document and manifests on the viper os github and even downloaded device tree,vendor and kernel as from git hub . and i made neccessary edits to androidproducts.mk , lineage_rolex.mk to naming viper_rolex.mk and setting device path.
And finally i proceeded by :
Code:
./build/envsetup.sh
lunch viper_rolex-userdebug
mka poison
The build process then followed for about 5 hrs and i was hopefully waiting close success but alas! I came up with a error given this way:
Warning: Stripped invalid locals information from 2 methods.
In /home/shrawan/Desktop/workon_viper/out/soong/.intermediates/frameworks/base/packages/EasterEgg/EasterEgg/android_common/combined/EasterEgg.jar:kotlin/collections/SlidingWindowKt$windowedIterator$1.class:
Methods with invalid locals information:
java.lang.Object kotlin.collections.SlidingWindowKt$windowedIterator$1.doResume(java.lang.Object, java.lang.Throwable)
In /home/shrawan/Desktop/workon_viper/out/soong/.intermediates/frameworks/base/packages/EasterEgg/EasterEgg/android_common/combined/EasterEgg.jar:kotlin/sequences/SequencesKt___SequencesKt$zipWithNext$2.class:
Methods with invalid locals information:
java.lang.Object kotlin.sequences.SequencesKt___SequencesKt$zipWithNext$2.doResume(java.lang.Object, java.lang.Throwable)
Some warnings are typically a sign of using an outdated Java toolchain. To fix, recompile the source with an updated toolchain.
[ 82% 60970/74331] build /home/shrawan...icy_tests_intermediates/sepolicy_tests
FAILED: /home/shrawan/Desktop/workon_viper/out/target/product/rolex/obj/ETC/sepolicy_tests_intermediates/sepolicy_tests
/bin/bash -c "(/home/shrawan/Desktop/workon_viper/out/host/linux-x86/bin/sepolicy_tests -l /home/shrawan/Desktop/workon_viper/out/host/linux-x86/lib64/libsepolwrap.so -f /home/shrawan/Desktop/workon_viper/out/target/product/rolex/obj/ETC/plat_file_contexts_intermediates/plat_file_contexts -f /home/shrawan/Desktop/workon_viper/out/target/product/rolex/obj/ETC/vendor_file_contexts_intermediates/vendor_file_contexts -p /home/shrawan/Desktop/workon_viper/out/target/product/rolex/obj/ETC/sepolicy_intermediates/sepolicy ) && (touch /home/shrawan/Desktop/workon_viper/out/target/product/rolex/obj/ETC/sepolicy_tests_intermediates/sepolicy_tests )"
The following types on /data/ must be associated with the "core_data_file_type" attribute: netmgrd_data_file
[ 82% 60975/74331] //bionic/libc:commo...ioner preprocess include [linux_glibc]
warning: attempted to generate guard with empty availability: obsoleted = 23
warning: attempted to generate guard with empty availability: obsoleted = 21
ninja: build stopped: subcommand failed.
11:58:35 ninja failed with: exit status 1
#### failed to build some targets (04:38:04 (hh:mm:ss)) ####
I did a enough of the search in and out of the forum but i couldn't able to know what problem is this and i dont have any idea how to solve this. Please give me some light on what problem is this and guide me where should i be looking to solve. I have a great enthusiasm of learning but this problem solution isn't available or discussed properly in any place or maybe i didn't find the place where to look. Please help me on this
[[/COLOR]I was able to fix it by modifying the file at device/qcom/sepolicy/vendor/common/file.te and specifying
Code:
type netmgrd_data_file, file_type, data_file_type, core_data_file_type;
I don't know why / how this file is ending up here though
HarshOne said:
Any solution for this error?
Code:
Starting build with ninja
ninja: Entering directory `.'
ninja: error: '/home/harshone/android/lineage/out/target/product/m8/obj/KERNEL_OBJ/usr', needed by '/home/harshone/android/lineage/out/target/product/m8/obj/STATIC_LIBRARIES/libsdcard_intermediates/sdcard.o', missing and no known rule to make it
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/harshone/android/lineage'
#### make failed to build some targets (02:30 (mm:ss)) ####
Click to expand...
Click to collapse
mine have same error, seem like kernel have wrong config (i dont know how to fix ) )

Categories

Resources