yashsingh1/xdaforums huggingface dataset:
[Android] mad_fitter:
Wow. [MENTION=4153704]Haze028[/MENTION], this is one of the best build guides I have seen yet! Very in depth and simplified for people new to the building and/or *nix arena. I have been out of the game for a couple years now, and this is a great guide and refresher for me, including many of the steps that have been changed and added. I will be using this as my "build bible" very soon. Thanks so much for this writeup/tutorial!!

Sent from the depths of a twisted mind.
[Android] Haze028:
The error is saying just what it looks like. Its saying two places are trying to add a repo to the same directory device/htc/holiday

Check the path on your repos in your local manifest. And also check the manifest.xml that it states in your error for any repo trying to set device/htc/holiday as its path. Make sure you delete any of the folders that you had git cloned.

Delete the kernel, device/htc, vendor/htc folders and try a repo sync from the root of you working directory. Ie. HomeFolder/ROM

Worst case scenario... Now that you know how to set it all up nicely you could delete the entire working directory, redo the repo init and setting up your local manifest. Then repo sync

Will download all the source again and get your repos as well. Hopefully it doesn't have to come to that as it does take a long time to download the full source code.
[Android] calikevin:
I tried everything else before this but I don't mind starting from scratch, that's how I learn best anyways. Do I repo init with the slimkat repo, and then edit the local_manifest.xml (not slim_manifest.xml) with the repo sources for the holiday that I had earlier?
[Android] Haze028:
That's correct. Make sure local manifest is in the local manifest folder. Repo combines the default(slimkat) manifest with the local one and gets all repos.

Then run repo sync and let it go, it will get your holiday repos along with the slimkat repos. Then re-add your device to the slimkat vendor as you did before and get building!
[Android] calikevin:
All steps taken and holiday shows up in the lunch menu, but when I try to run lunch I get this error now-

Which would you like? [aosp_arm-eng] 68
build/core/product_config.mk:250: *** No matches for product "slim_holiday". Stop.
Device holiday not found. Attempting to retrieve device repository from SlimRoms Github (http://github.com/SlimRoms).
Repository for holiday not found in the SlimRoms Github repository list. If this is in error, you may need to manually add it to .repo/local_manifests/slim_manifest.xml
build/core/product_config.mk:250: *** No matches for product "slim_holiday". Stop.

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

I ran nano on slim_manifest and it's empty, should I add any or all of the repo sources to it?
[Android] Haze028:
Sorry... I didn't realize slim used slim_manifest instead of local manifest. Again... I've never built slimrom before.....

If you look in you device folder are your repos there? Did they all get downloaded with the repo sync?
[Android] koolkunz:
i have same error can u please tell how you fixed it???
[Android] calikevin:
Correct, all repos downloaded in the proper locations using the local manifest I modified earlier.

Don't worry about not knowing how to configure slim either, I saw that it wasn't one of the examples in the OP and figured it would be a lot of trial and error.
[Android] Mustafa Mubashir:
its been two months i had installed Ubuntu 12.04 and yes i remember that i had tried installing pakages about one month ago but they failed with same error...

EDIT:got these..

Type dpkg --help for help about installing and deinstalling packages [*];
Use `dselect' or `aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

After using one of them i get this,

now what should i do?:confused:

dpkg --force-help
dpkg forcing options - control behaviour when problems found:
warn but continue: --force-<thing>,<thing>,...
stop with error: --refuse-<thing>,<thing>,... | --no-force-<thing>,...
Forcing things:
[!] all Set all force options
[*] downgrade Replace a package with a lower version
configure-any Configure any package which may help this one
hold Process incidental packages even when on hold
not-root Try to (de)install things even when not root
bad-path PATH is missing important programs, problems likely
bad-verify Install a package even if it fails authenticity check
bad-version Process even packages with wrong versions
overwrite Overwrite a file from one package with another
overwrite-diverted Overwrite a diverted file with an undiverted version
[!] overwrite-dir Overwrite one package's directory with another's file
[!] unsafe-io Do not perform safe I/O operations when unpacking
[!] confnew Always use the new config files, don't prompt
[!] confold Always use the old config files, don't prompt
[!] confdef Use the default option for new config files if one
is available, don't prompt. If no default can be found,
you will be prompted unless one of the confold or
confnew options is also given
[!] confmiss Always install missing config files
[!] confask Offer to replace config files with no new versions
[!] architecture Process even packages with wrong or no architecture
[!] breaks Install even if it would break another package
[!] conflicts Allow installation of conflicting packages
[!] depends Turn all dependency problems into warnings
[!] depends-version Turn dependency version problems into warnings
[!] remove-reinstreq Remove packages which require installation
[!] remove-essential Remove an essential package

WARNING - use of options marked [!] can seriously damage your installation.
Forcing options marked [*] are enabled by default.
[Android] DAXY97:
Im having problem, what to do? I get this when i try first command(s) after installing Java.

Reading package lists... Done

Building dependency tree

Reading state information... Done

libc6-dev is already the newest version.

zip is already the newest version.

Some packages could not be installed. This may mean that you have

requested an impossible situation or if you are using the unstable

distribution that some required packages have not yet been created

or been moved out of Incoming.

The following information may help to resolve the situation:

The following packages have unmet dependencies:

build-essential : Depends: gcc (>= 4:4.4.3) but it is not going to be installed

Depends: g++ (>= 4:4.4.3) but it is not going to be installed

g++-multilib : Depends: cpp (>= 4:4.8.1-2ubuntu3) but it is not going to be installed

Depends: gcc-multilib (>= 4:4.8.1-2ubuntu3) but it is not going to be installed

Depends: g++ (>= 4:4.8.1-2ubuntu3) but it is not going to be installed

Depends: g++-4.8-multilib (>= 4.8.1-4~) but it is not going to be installed

E: Unable to correct problems, you have held broken packages.
[Android] lozohcum:
Hey guys. After last repo sync of CM11 and OmniRom I'm getting this error (same error for CM11 and Omni):

Target buildinfo: /home/lozohcum/CM11/out/target/product/jlo/system/build.prop
Target buildinfo from: device/sony/jlo/system.prop
/bin/bash: -c: line 0: unexpected EOF while looking for proper `"'
/bin/bash: -c: line 1: syntax error: unexpected end of file
make: *** [/home/lozohcum/CM11/out/target/product/jlo/system/build.prop] Error 1
make: *** Deleting file `/home/lozohcum/CM11/out/target/product/jlo/system/build.prop'
lozohcum@lozohcum-ubuntu:~/CM11$

Can anyone help me? Due to this error I can't work on CM11 for my device, whole development is stopped.
[Android] Haze028:
Thanks for the kind words and no problem. I'm just glad people are finding it useful, still plan to update/add to it soon.
[Android] MauroG:
Hi. Thanks to this guide I started to build for my hammerhead but I got these error and couldn't find anything from google

Is it related to "external/chromium" or "hydrogen" or so?. I'm new to this, but i've followed this guide to build an aosp rom
[Android] Haze028:
are you trying to build aosp still? what toolchain are you using?

Try just doing a make clobber and building again. or try changing toolchains(steps in the guide)
[Android] MauroG:
Well, kinda. Remaking partitions right now but backed up ".repo" folder cause I ain't downloading 20+ GB again with a 2mb ?. Downloaded the linaro 4.8. But I'm gonna start from 0 later. Aosp with linaro 4.8 just to test if it works, then add the features. So you have any idea of the error?

Enviado desde mi Nexus 5 mediante Tapatalk
[Android] Haze028:
Havn't seen the error before, nor finding anything to usefull other than it's an issue with the compiler. I have had many issues with linaro 4.8, try using 4.7.2 see if the error still occurs.

I'll look again when i get a chance, hopefully starting from scratch will sort you out.
[Android] MauroG:
Thought just the same. That's why I did the repartition. Thanks any way. Will let you know of it works

At first I assumed that it was something I dis because thus is the first time I'm building, so I downloaded lots of things. Is best to do nothing

Enviado desde mi Nexus 5 mediante Tapatalk
[Android] Haze028:
One thing you could do to save from downloading all the source again in the future is after the initial repo sync copy you whole working directory. Then if something ever get to messed upsomehow you can just delete the broken working directory and paste a frah copy, sync and start again. Saves some time when your starting out.
[Android] MauroG:
I was going to do that but I rather start from cero with the .repo backed up. I've installed many things cause it was my first build. I have not started yet. Still having a problem running something in w8.1 dunno why it doesn't run something :/

Enviado desde mi Nexus 5 mediante Tapatalk
[Android] MauroG:
Well, Now I get this error

Which would you like? [aosp_arm-eng] 6

build/core/config.mk:156: *** Multiple board config files for TARGET_DEVICE hammerhead: device/lge/hammerhead/BoardConfig.mk vendor/lge/hammerhead/BoardConfig.mk. Alto.

** Don't have a product spec for: 'aokp_hammerhead'

** Do you have the right repo manifest?

downloaded aokp and aokp device data. Thats weird, any suggestion?
[Android] mqno:
nice guide thanks
[Android] Haze028:
The one in vendor folder should be boardconfigvendor.mk

Check in you boardconfig.mk in your device folder. It may need to be changed there too.
[Android] rc420head:
where do i change things like

build name ie cyanogenmod to myromname?

build version # ie cm11 to mrn1.0.0?

and updater script ui_print stuff?
[Android] TheRookieLearner:
Getting errors while building

Hi all, I am trying to build android from source (Cyanogenmod) for my phone Sony Xpreia Pro (iyokan). I am following the instructions at wiki{DOT}cyanogenmod{DOT}org/w/Build_for_iyokan (I haven't posted a lot so I can't post URLs :( ). During my build I need to do one additional step. I need to pull the proprietary files from my device. This is where the problem comes in.

I found that there are 4 files which the extract-files.sh script cannot extract. This causes problem in the build process and the build process stops without completion. The files which the script cannot find are:

/system/bin/calibrator

/system/etc/firmware/wl1271-fw-multirole-roc.bin

/system/lib/libc2d2_z180.so

/system/lib/egl/libGLESv2S3D_adreno200.so

I found wl1271-fw-multirole-roc.bin at "/system/etc/firmware/ti-connectivity/" instead of "/system/etc/firmware/". Is it fine to modify the "proprietary-files.txt" to have this path instead of the "/system/etc/firmware/"? I am not sure if the functionality of both the files is same.

Also I found a file called "wlan_calibrator" instead of "calibrator" in the same location. I also found a file called libGLESv2_adreno200.so instead of libGLESv2S3D_adreno200.so

Would it be fine if I change the name in "proprietary-files.txt"? Again, I am not sure if the functionality of the other files is same. I couldn't find the file called "libc2d2_z180.so"

I really don't know what to do and would really appreciate if anyone could help me on what I should be doing.
[Android] MauroG:
Well, i've oppened the Boardconfig.mk at vendor/lge/hammerhead (im trying to build for nexus 5)... But I am a newbie, don't really know what to do. I'm reading the file but not sure what to look for.

Edit: Well, both boardconfig.mk are just the same in vendor and device folder. the boardconfigvendor.mk in vendor folder gives me this:

# Copyright (C) 2012 The CyanogenMod Project

#

# Licensed under the Apache License, Version 2.0 (the "License");

# you may not use this file except in compliance with the License.

# You may obtain a copy of the License at

#

# http://www.apache.org/licenses/LICENSE-2.0

#

# Unless required by applicable law or agreed to in writing, software

# distributed under the License is distributed on an "AS IS" BASIS,

# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

# See the License for the specific language governing permissions and

# limitations under the License.

# This file is generated by device/lge/hammerhead/setup-makefiles.sh

USE_CAMERA_STUB := false

im sensing something wrong... when trying to build, after the lunch comand, it says "Which would you like? [aosp_arm-eng]"

and, as you can see, in the boardconfigvendor.mk it says for CM, and as far as I know, CM is based on aosp, isn't it? So, I guess that and the "aosp_arm-eng" are related. But like I said, im just a newbie. Don't know what I am saying at all xD
[Android] Haze028:
OK try using this repo: https://github.com/DanWin/proprietary_vendor_semc

It is cm-10.1. I'm not sure what version your going for but it should work. If you would rather extract like Cyan's wiki says, at least this repo should show you the correct folder structure.

I personally would use that repo or search for another, less trouble using a vendor repo known to work.
[Android] Haze028:
The system/build.prop on your phone is when it gets that. You can change it there after you build.

Those settings are set during the build in various make files. For cm I think they're set in vendor/cm/configs/common.mk

Adding this to your device.mk might change it(not sure if the cm vendor will overwrite or not). Obviously change bold text to be the property you want to change. Check your current build.prop for the different properties.

PRODUCT_PROPERTY_OVERRIDES += \

ro.sf.lcd_density=320

As for the updater script, I don't know how to add to that from source. You can always manually edit it after the build. Just open META-INF\com\google\android in you finished zip and make the desired edits.
[Android] Haze028:
All android ROMs are based off aosp in the grand scheme. Don't worry about that... When you run lunch one of the options in the list is cm-hammerhead I assume?

There should not be a boardconfig.mk in your vendor repo at all. Use TheMuppets vendor repo, https://github.com/TheMuppets/proprietary_vendor_lge/tree/cm-11.0

I think somehow your vendor repo is not correct. The one above should vet you going
[Android] jinh87522:
Help me!

external/bluetooth/bluedroid/main/../btif/src/btif_sock_sdp.c:327:26: note: 'p_bta_maps_cfg' was declared here
external/bluetooth/bluedroid/main/../btif/src/btif_hl.c: At top level:
cc1: error: unrecognized command line option "-Wno-multicha" [-Werror]
cc1: all warnings being treated as errors
make: *** [/root/android/system/out/target/product/c8812/obj/SHARED_LIBRARIES/bluetooth.default_intermediates/../btif/src/btif_hl.o] 错误 1
make: *** 正在等待未完成的任务....
external/bluetooth/bluedroid/main/../btif/src/btif_sock_sdp.c: At top level:
cc1: error: unrecognized command line option "-Wno-multicha" [-Werror]
cc1: all warnings being treated as errors

:(
[Android] Haze028:
It should be multichar I believe. Check your boardconfig.mk in your device tree. Might just be a typo in there.

In the end you need to find where it is setting that(I'd guess in boardconfig.mk) and add the r to make it multichar.

Push comes to shove and you can find it grep your build folder for multicha. It will show you where the misspelled option is.(Google will tell you how to grep if you don't know how)
[Android] jinh87522:
:good: it's my mistake.THX
[Android] MauroG:
The vendor repo is the one after the normal repo sync, isn't it? Well, I made it from aokp. And it says it's not needed 'cause its already added. I actually downloaded aokp and aokp only. But that's what it says when I run the lunch command. The options are aokp-HH and another I think its aosp-HH... None of them. And tries with lunch, brunch, breakfast command.

Will try that repo later. Thaaaaanks a lot :D

Enviado desde mi Nexus 5 mediante Tapatalk
[Android] Haze028:
The device vendor repo is still needed. It contains all proprietary files associated with your device. If you have a hammerhead folder in vendor already than you'll be good, if not, you will need to add it.

When a device is listed in lunch, it only means that, its listed. You may still not have all required repos. You will always need vendor/device/kernel repos to build for a device.
[Android] MauroG:
I might try later night downloading what you told me, although I've already downloaded the device repo from aokp, and it says its already downloaded. Besides, in vendor and devices there's a hammerhead folder, in both.

Enviado desde mi Nexus 5 mediante Tapatalk
[Android] dmroeder:
I hope it's appropriate for me to seek a little advice here...

I've been attempting to build OmniROM on my Motorola Atrix 2. I have it to the point that it will go through most of the build process but it errors when it comes to MKBOOTIMG:

MKBOOTIMG= \
device/motorola/omap4-common/releasetools/common_ota_from_target_files -v \
-p /media/mythstorage/android/omni/out/host/linux-x86 \
-k build/target/product/security/testkey \
--backup=true \
--override_device=auto \
--override_prop=false \
--mount_by_label=false \
/media/mythstorage/android/omni/out/target/product/edison/obj/PACKAGING/target_files_intermediates/omni_edison-target_files-eng.dmroeder.zip /media/mythstorage/android/omni/out/target/product/edison/omni_edison-ota-eng.dmroeder.zip

The issue it points to has to do with --mount_by_label:

** option --mount_by_label not recognized **
make: *** [/media/mythstorage/android/omni/out/target/product/edison/omni_edison-ota-eng.dmroeder.zip] Error 2

I imagine that somewhere there are a list of arguments that I need to modify which contains the arguments above, but I'm not sure where they are coming from. Any thoughts or suggestions?
[Android] Haze028:
I've not seen that before, you're right on what you need to do. Use grep to locate the file specifying the option.

grep -rl "string" /path This will search the specified path and all subdirectories for files containing the string specified

So...

grep -rl "mount_by_label" /working_dir
[Android] dmroeder:
Great, thanks for the suggestion Haze. I'm on it! I've seen grep used but didn't know what it was doing.

edit: This is what it returned:

build/tools/releasetools/ota_from_target_files
build/tools/releasetools/edify_generator.py
build/core/Makefile

I'm not sure I'm supposed to be tinkering with these files. I edited the makefile but it made matters worse. I have some more digging to do, but thanks for the suggestion. I learned something new, and it's seems to be a powerful troubleshooting tool. I'll update if/when I sove this problem....
[Android] Haze028:
build/tools/releasetools/ota_from_target_files is where the original error occurred. I'd try commenting out the line from that file...
[Android] dmroeder:
I looked into that file at one point around the time that I posted here but it's a pretty big python file that has references to that command about a dozen times. I was a little reluctant to start goofing with it.

The makefile has a section in it that looks a lot like the print out in my error. I'm doing a lot of trial and error which takes a lot of time! I'm a little worried that I might get it to build without that command but find out later that it was important to installing/running this ROM. I suppose I'll cross that bridge when I get there!
[Android] Haze028:
Ok, where did you get the device repos you are using? Cm?

Are you using the matching branch to the android version you're building?
[Android] dmroeder:
I got the repos from similar ROM's in the forum for my phone. They are CM repos and they are of the correct version (CM11). I think most of my problem is that I don't completely understand what I'm doing so I'm not always sure how to even ask the question. I'm definately learning though, so hopefully after I've been through it a few times it will all make more sense.

I have been chatting (possibly bothering) with one of the dev's that builds from source for my phone about other issues. I wasnt sure if this was a device specific issue or just some issue with bulding in general, I was trying to give him a break.

I removed the line from /build/core/makefile that had that command, it completed the build. Now I guess I'll see if I can install it...
[Android] dmroeder:
What is the purpose of the file /.repo/local_manifests/roomservice.xml? Whenever I build it is automatically created and it ends up with the following lines in it:

<project name="android_device_motorola_omap4-common" path="device/motorola/omap4-common" remote="omnirom" revision="android-4.4" />
<project name="android_kernel_motorola_omap4-common" path="kernel/motorola/omap4-common" remote="omnirom" revision="android-4.4" />

The problem is that these lines duplicate some sources that I'm using in my local_manifest.xml to get my kernel and device sources:

<project name="MO4/android_device_motorola_omap4-common" path="device/motorola/omap4-common" remote="github" revision="cm-11.0" />
<project name="MO4/android_kernel_motorola_omap4-common" path="kernel/motorola/omap4-common" remote="github" revision="cm-11.0" />

...

Sometimes it complaines of duplicate sources. I typically have to delete the file to repo sync. Then when I build for the first time after deleting it, it will create the file and complain about duplicate sources. I build again and it builds without an issue. I guess I just wanted to konw why this file exists and if I should worry about it.
[Android] Recon Freak:
The roomservice is created by omni dependencies. Unless your local manifest repos are modified to suit your needs, I would delete those lines.

---------- Post added at 10:11 PM ---------- Previous post was at 10:00 PM ----------

Roomservice calls the necessary repos directly from omni source.

Sent from an EOSed LG-D800.
[Android] dmroeder:
Ooooohhhh, thanks for the tip! My local manifest does have the appropriate repos in it so I'll remove them from the dependency file.
[Android] Recon Freak:
I'd do it the other way around. Every time you sync repo they'll be back!

Sent from an EOSed LG-D800.
[Android] dmroeder:
Alright cool, I'll give it a shot
[Android] bariz143:
Awesome guide hazel.

Anyone want to point me in the right direction on how to include superuser on my aosp build?