yashsingh1/xdaforums huggingface dataset:
[G3 Android Development] BoRoU:
Right now I'm going to run repo sync, so I leave tonight creating.

Tomorrow I'll tell you, thanks.
[G3 Android Development] manups4e:
ok :) i'll wait for your feedback :)
[G3 Android Development] TheMorpheus:
It worked!!

Thanks [MENTION=2849215]manups4e[/MENTION] !!
[G3 Android Development] manups4e:
my pleasure :)
[G3 Android Development] angelus0w:
Perfect

Excellent, the unflashable zip fix you mention has solved the issues I was having when using this kernel (as mentioned in pm) .

Thank you. Buidling and flashing perfectly now.
[G3 Android Development] bb12489:
So I'm trying to follow this guide to setup a build for the vs985. I know that this tutorial isn't geared towards that, but rather the D855, but I figured I could adapt it to work with the repo's available for the vs985. I'm just kinda stuck at step 3 at the moment. I've sync CM12 repo and am at the point of creating the local_manifest folder and xml file. I just am not sure how to proceed at this point. Any help would be greatly appreciated! As I said, I know this thread is for the D855, but if anyone could point me in the right direction, I would be very grateful :)

EDIT: I guess I just needed to step away from my desk for a bit! I got the manifest figured out and did a repo sync. Everything is fine, except now I get the following error when I try to run brunch.
[G3 Android Development] manups4e:
because the folder is not qcom/common but qcom_common
[G3 Android Development] manups4e:
cyanogenmod have added all the sepolicy files ^^ it give error to me too ^^ i'm looking into it right now
[G3 Android Development] sooti:
https://github.com/sooti/android_de...mmit/4c91c131749f1e4ab5a195d20ea27a067a18ef27

repo sync should fix your issues
[G3 Android Development] manups4e:
yup ^^ i had changed those files before the commit ^^ thank you sooti ^^
[G3 Android Development] BoRoU:
Yeeeees finally worked. Good thing I have done on my server , then create a script to update every night.

Thank you very much for the teacher helps manups4e
[G3 Android Development] TheMorpheus:
After a repo syng I get error compiling...Now I'm trying with a clean build
[G3 Android Development] rodrigofd:
[MENTION=622212]BoRoU[/MENTION], if it's ok with you, could you share such script? :) I'd also like to automate my process to have private builds.

[MENTION=2849215]manups4e[/MENTION] great contribution! Thanks!
[G3 Android Development] BoRoU:
When I get home I do, and as I share verify that it works .
[G3 Android Development] manups4e:
it's better if you post the errors ^^ so if another person have the same problem it has been already fixed ^^
[G3 Android Development] rodrigofd:
[MENTION=2849215]manups4e[/MENTION]

I've started my first build, and at the beginning I get several lines 'find: src ..... not found [...]' etc.

but the process seems to be moving on... (synced 10 mins. ago).

Are those logs expected?
[G3 Android Development] manups4e:
yes they are :)
[G3 Android Development] TheMorpheus:
Yes I know... Sorry about that... I'm away from the pc. I'll report if clean build fix it
[G3 Android Development] manups4e:
Yup :)
[G3 Android Development] TheMorpheus:
Clean build worked!
[G3 Android Development] pureexe:
Do i need to sign boot.img with bump?

---------- Post added at 08:41 PM ---------- Previous post was at 08:35 PM ----------

i follow your tutorial and I have problem while building

make: *** No rule to make target `vendor/cm/proprietary/Term.apk', needed by `/home/pakkapon/android/rom/cm12/out/target/product/d855/system/app/Term/Term.apk'.

So that can fix by

$ cd vendor/cm and $ . get-prebuilts

Thank to http://xdaforums.com/nexus-4/general/guide-cm11-how-to-build-cyanogenmod-11-t2515305
[G3 Android Development] angelus0w:
Out of interest, are you using only the cm12 repo with the sooti ones in manifest or are you adding other commits or cherry picking anything so to speak?

Thanks.
[G3 Android Development] bb12489:
So this is what my manifest looks like right now. I know I have everything else correct, but I'd like to make sure that the last line "qcom_common" is correct. I know this is the repo that is messing me up. I just want to make sure I have the directory structure correct here.
[G3 Android Development] angelus0w:
I have mine like this and it compiles correctly:

<project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-12.0" />
[G3 Android Development] manups4e:
well mine is qcom_common and it builds fine ^^ no i don't use any cherrypicking only pure cyanogenmod with sooti repos
[G3 Android Development] rodrigofd:
Hey man, I failed to get a succesful build after many attempts. But since the output window is so long, is there any way I can trace where the build is failing at?

I cannot catch any 'error' message, but clearly something has to be failing, since no ZIP file , ends in the OUTPUT folder... :S
[G3 Android Development] manups4e:
you should check for the error you must copy the lines before and after the "******" signes ^^
[G3 Android Development] rodrigofd:
I'm having the same issue... So, if we do the get-prebuilts.. how will this play on the commits progression? I mean, will that take into account new commits being pushed to the repository, day by day ?
[G3 Android Development] BoRoU:
Hi rodrigofd this is my script. Work fine for me, you only need change the absolut route of the source.

#!/bin/sh
#variable de la fecha
fecha=$(date +"%Y%m%d")
export PATH=${PATH}:~/bin

#entra en el direcctorio de las fuentes
cd /home/Source

#limpia el directorio out para iniciar nueva compilacion
make clobber

#actualiza las fuentes
repo sync

#inicia le proceso de compilar
. build/envsetup.sh
breakfast d855
brunch d855

#limpia el directorio zip para empaquetar la ROM
rm ./zip/*
rm -R ./zip/system

#copia la carpeta system al directorio zip y extrae
#el archivo file_contexts del zip creado en la compilacion
cp -R -p ./out/target/product/d855/system /home/Source/zip/
unzip -j ./out/target/product/d855/cm-12-$fecha-UNOFFICIAL-d855.zip file_contexts -d ./zip/

#entra en la carpeta zip y crea flasheable
cd zip
zip -r -y -q cm-12-$fecha-UNOFFICIAL-d855.zip META-INF system boot.img file_contexts

You need create one folder into your source folder (I have named zip) and copy the META-INF folder which has given @manups4e in the first thread.

If you have questions feel free to ask
[G3 Android Development] bb12489:
I'll give this line a try and report back. I have this feeling that I'm going to run into some type of build error anyway though lol.
[G3 Android Development] angelus0w:
I also notice you are using invisiblek instead of sooti for the rest. I never tried from this fork.
[G3 Android Development] bb12489:
Yea, I'm trying to build for the vs985 (Verizon). I've honestly gotten farther with compiling this then I have for anything else in the past. If anything, this is at least a learning experience. I'd just like to be able to successfully compile a ROM one time :P
[G3 Android Development] angelus0w:
After altering manifests and after a failed built I'd recommend running "make clean" from android/system/ folder. It will clean the remnants of failed build. This caused an issue for me when getting running.
[G3 Android Development] bb12489:
I did run make clean before I started my next build. So far I haven't run into issues yet. Still compiling as we speak.
[G3 Android Development] pureexe:
.

don't worry it will prebuilt only file not have source on repository.

some cm app have source in repo such as filemanager,camera,dialer etc. is only build when source have update. if source not update it will use file from previous build.

sorry for my bad english.
[G3 Android Development] TheMorpheus:
I've just sync repo and now I get this:

including device/lge/d855/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash
including vendor/cm/bash_completion/git.bash
including vendor/cm/bash_completion/repo.bash
including vendor/cm/vendorsetup.sh
build/core/product_config.mk:239: *** _nic.PRODUCTS.[[device/lge/d855/cm.mk]]: "vendor/nameless/config/nfc_enhanced.mk" does not exist. Stop.
Device d855 not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Repository for d855 not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.
build/core/product_config.mk:239: *** _nic.PRODUCTS.[[device/lge/d855/cm.mk]]: "vendor/nameless/config/nfc_enhanced.mk" does not exist. Stop.

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

I've seen a lot of commit about our device, what changed?

---------- Post added at 12:20 PM ---------- Previous post was at 11:38 AM ----------

You forget to move boot.img to zip folder!

Here is mine

# Delete build.prop
rm -rf ~/android/system/out/target/product/d855/system/build.prop

echo ''
echo '### build.prop Deleted ###'
echo ''

# Turn off break on error to allow build process to run
set +e

# Build
cd ~/android/system

. build/envsetup.sh && breakfast d855 && brunch d855

echo ''
echo '### Build Done! ###'
echo ''

#Set variable
date=$(date +%d%m%Y@%H%M)

#Move rom to temp folder
mv ~/android/system/out/target/product/d855/cm-12*.zip ~/Roms/cm/d855/temp

#Copy System folder & boot.img to zip folder
cp -R -p ~/android/system/out/target/product/d855/system ~/Roms/cm/d855/zip/
cp -R -p ~/android/system/out/target/product/d855/boot.img ~/Roms/cm/d855/zip/

#Extract file_contexts to zip folder
cd ~/Roms/cm/d855/temp
unzip -j cm-12*.zip file_contexts -d ~/Roms/cm/d855/zip/

#Make zip
cd ~/Roms/cm/d855/zip/
zip -r -y -q cm-12-d855-UNOFFICIAL-$(date +%d%m%Y@%H%M).zip META-INF system boot.img file_contexts

#Make folder
mkdir ~/Roms/cm/"d855"/$date &&

#Move zip to its folder
mv ~/Roms/cm/d855/zip/cm-12*.zip ~/Roms/cm/"d855"/$date/

#Make md5 file
cd ~/Roms/cm/"d855"/$date
md5sum cm-12*.zip > cm-12-d855-UNOFFICIAL-$(date +%d%m%Y@%H%M).zip.md5

#Remove obsolet files
rm -R ~/Roms/cm/d855/zip/system
rm -R ~/Roms/cm/d855/zip/boot.img
rm -R ~/Roms/cm/d855/zip/file_contexts
rm -R ~/Roms/cm/d855/temp/cm-12*.zip

echo ''
echo '### Zip file updated ###'
echo ''
[G3 Android Development] Neurom707:
Running BuilduntuVM in VM ofc Currently syncing the Cm12 Repo as i type will let you know how it goes, Fingers Crossed

Here is link to BuilduntuVM thread http://xdaforums.com/showthread.php?t=2585828

Incase you have no Ubuntu Set up and dont have the time. Super Easy Thanks OP for the Thread too!
[G3 Android Development] TheMorpheus:
I re-did repo sync and now it builds fine!
[G3 Android Development] BoRoU:
Yes i forget the kernel... :silly:

Thanks
[G3 Android Development] manups4e:
don't worry guys all building error are solved :) just run repo sync and remember to always do make clobber before a new build :D
[G3 Android Development] Neurom707:
Building right now, will let everyone know how it goes
[G3 Android Development] matrixzone:
Thank you for the guide!!
[G3 Android Development] SwissAndroidX:
Thanks for this turtorial. I will try to build my own cyanogenmod. A the moment i'm using your cm12 builds and they run very well. Do you add your own changes to those cm builds or are original from the cm repo?
[G3 Android Development] manups4e:
full cm repos
[G3 Android Development] tschmid:
Thanks for this tutorial. Do i need bump the boot.img after?

Gesendet von meinem LG-D855 mit Tapatalk
[G3 Android Development] Sideness:
Hi ! Thanks for the guide !

It seems that my build failed.

target Export Resources: framework-res (/home/sideness/android/system/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk)

/home/sideness/android/system/out/host/linux-x86/bin/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

make: *** [/home/sideness/android/system/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk] Error 127

make: *** Deleting file `/home/sideness/android/system/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk'

Those are the last lines I had.

In out/target/product I have a d855 folder containing all the file of a successful .zip build. Maybe the build didn't compress the folder in a zip file ? What do you think ?

Thanks.
[G3 Android Development] SwissAndroidX:
Guys i need your help.

I did the full setup but if i try to do my first build i get the following statement:

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

I added the local_manifest.xml file in /android/system/local_manifests
[G3 Android Development] TheMorpheus:
You have to add local_manifest.xml to android/system/repo/localmanifest
[G3 Android Development] SwissAndroidX:
Thanks for your answer, but stillt the same statement.
[G3 Android Development] Neurom707:
Have you copied the text into the local manifest xml and then placed the xml into the local_manifests folder under .repo???
[G3 Android Development] SwissAndroidX:
****@****-h8-1320ez:~/android/system$ breakfast d855

including vendor/cm/vendorsetup.sh

build/core/envsetup.mk:94: *** Unable to determine HOST_ARCH from uname -sm: Linux i686!. Schluss.

Device d855 not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).

Traceback (most recent call last):

File "build/tools/roomservice.py", line 76, in <module>

result = json.loads(urllib.request.urlopen(githubreq).read().decode())

File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen

return _opener.open(url, data, timeout)

File "/usr/lib/python2.7/urllib2.py", line 410, in open

response = meth(req, response)

File "/usr/lib/python2.7/urllib2.py", line 523, in http_response

'http', request, response, code, msg, hdrs)

File "/usr/lib/python2.7/urllib2.py", line 448, in error

return self._call_chain(*args)

File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain

result = func(*args)

File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default

raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

urllib2.HTTPError: HTTP Error 403: Forbidden

build/core/envsetup.mk:94: *** Unable to determine HOST_ARCH from uname -sm: Linux i686!. Schluss.

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

** Do you have the right repo manifest?

I was able so sync the specific repos but if i try to do the breakfast d855, i get these lines.

The file is in the following folder:

***@***-h8-1320ez:~/android/system/.repo/local_manifests$ ls

local_manifest.xml
[G3 Android Development] angelus0w:
I had this issue a few days back. I renamed the local_manifest.XML to d855.xml then repo synced. It worked after this.
[G3 Android Development] SwissAndroidX:
This takes no effect for me :(
[G3 Android Development] angelus0w:
What java version are you using? I also noticed issues similar whilst using Oracle as appose to openjdk-7.

Also try recursively removing lge from devices and resync.
[G3 Android Development] SwissAndroidX:
I'm using openjdk-7. How can i remove lge from the devices?
[G3 Android Development] angelus0w:
CD into the devices folder.. Usually cd ~/android/system/devices

Then rm -r lge

Then cd ~/android/system and repo sync
[G3 Android Development] SwissAndroidX:
Haha.. Did that but still the same!
[G3 Android Development] angelus0w:
Re reading the error what Linux distro are you using?
[G3 Android Development] SwissAndroidX:
I'm using ubuntu 14.10 32 bit.
[G3 Android Development] angelus0w:
Okay, possibly there is an invalid char in the XML causing it not to load. Could you rename old one using

mv d855.xml d855.xml.bak

Then

Nano d855.xml

Retype or paste manifest text (paste can sometimes cause bad formatting) I'd recommend typing. Then try sync. Although now I'm just pulling straws as the above fixed issues my end. Not sure what further to recommend.
[G3 Android Development] SwissAndroidX:
Thanks man. I will try it tomorrow.
[G3 Android Development] Helloworld294:
Can I use KaliLinux instead of Ubuntu?
[G3 Android Development] chevycam94:
I tried building for vs985 today, using CM12, and I dont get individual files anymore. I get 3 main files. A ROM, a patch, and a data file a couple hundred bytes in size. I cant get it to actually flash the 231MB zip. It takes about 5 seconds, and says completed, but without any complaints other than it "cant mount /system".

Im SO close....just not sure where to go from here
[G3 Android Development] TheMorpheus:
You need 64 bit system http://source.android.com/source/initializing.html#setting-up-a-linux-build-environment
[G3 Android Development] manups4e:
you can unmount system because you have wrong partition size for your device ^^ but i can't help you because i don't have your device ^^
[G3 Android Development] Helloworld294:
i keep getting an error that the manifest is missing... what am i doing wrong here?:p
[G3 Android Development] angelus0w:
cd ~/android/system

rm -r .repo

Then try init again
[G3 Android Development] manups4e:
you write git://github.com/CyanogenMod/ instead of https://github.com/CyanogenMod/ i mean you writed git instead of HTTPS
[G3 Android Development] angelus0w:
In his image it shows he tried with both HTTPS and git..
[G3 Android Development] Helloworld294:
That didn't work, relinking directories worked.
[G3 Android Development] angelus0w:
Ah apologies, It was something I remember reading on stack overflow for init issues when was compiling Ubuntu touch. For my own future reference...the fix, would that have been git-relink with master or another method of linking directories?

Thanks.
[G3 Android Development] Helloworld294:
Using the synopsis of

git-relink [--safe] <dir> <dir> [<dir>]

Where [<Dir>] is a subdir and always use --safe to make sure you don't break anything since it scans for same hash files but different sizes and prompts a warning.
[G3 Android Development] kat0072:
Hey buddy i am able to make my own CM12 for Htc M7.

Thanks alot for the guide.

Cheers
[G3 Android Development] SwissAndroidX:
I was finally able to build. Where can i find the zip file?
[G3 Android Development] manups4e:
out/target/product/d855
[G3 Android Development] matrixzone:
I am getting this error while building:

make: *** [/home/matrixzone/android/system/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk] Error 127

make: *** Deleting file '/home/matrixzone/android/system/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk'

Log below:

http://pastebin.com/ZxYZHU2z

Please help
[G3 Android Development] manups4e:
did you try this?

- make clobber

- repo sync

- brunch d855
[G3 Android Development] SwissAndroidX:
I'm getting the same error.
[G3 Android Development] PJF16:
delete me.
[G3 Android Development] PJF16:
When I do breakfast or brunch, then I get "trying dependencies only a non-existing device tree?". Then it's going on. Is this normal?
[G3 Android Development] manups4e:
yes it is :) that's because the D855 is not officially supported yet
[G3 Android Development] PJF16:
Perfect! Thanks.
[G3 Android Development] SwissAndroidX:
If i try to build i get the following ouput in terminal:

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.

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

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.

Tips?
[G3 Android Development] toby913:
how can i get my own bashrc???
[G3 Android Development] angelus0w:
Is ".bashrc" not located in home directory..?

Make your edits with favorite editor, save then source .bashrc from home directory.
[G3 Android Development] matrixzone:
This was not working. I ended up setting the machine again. Building now to see if this time it works
[G3 Android Development] manups4e:
this is normal while compiling apps
[G3 Android Development] manups4e:
this is from a chinise site

Error :
target Export Resources: framework-res (out/target/common/obj/APPS/framework-res_intermediates/package-export.apk)
/bin/bash: jar: command not found
make: *** [out/target/common/obj/APPS/framework-res_intermediates/package-export.apk] Error 127

solution:
$ sudo update-alternatives --install "/usr/bin/jar" "jar" "/usr/local/java/jdk1.7.0_60/bin/jar" 1;
$ sudo update-alternatives --set jar /usr/local/java/jdk1.7.0_60/bin/jar;
[G3 Android Development] SwissAndroidX:
OK, but it stopped to build. I tried to build many times but never with success.
[G3 Android Development] manups4e:
the error is not there is up above ^^ try searching for lines with many " ***** "
[G3 Android Development] tobitege:
:silly: developers (incl. myself) - after decades of work - still prefer a bunch of asterisks to highlight errors :laugh:
[G3 Android Development] manups4e:
ahahahah the easiest ways sometimes are the best
[G3 Android Development] Lowxorx:
Thanks a lot manups4e for your usefull job. You're the best ;)
[G3 Android Development] toby913:
just checked and even restarted, nothing. shouldn't it appear automatically or do i have do write it myself?
[G3 Android Development] angelus0w:
It is a hidden file by nature, from terminal type

cd ~

nano .bashrc

Make your changes then save with Ctrl-x then y, return
[G3 Android Development] ticiano_arraes:
How many gigabytes is the repo? Just to know..
[G3 Android Development] manups4e:
more or less between 15 and 20 GB
[G3 Android Development] ayeros:
D852

Hello :) I was just wondering if i can use your tutorial to do it with a LG G3 D852 (Canadian version) And if yes does i need to do a lot of change to be able to compile it ?
[G3 Android Development] Neurom707:
You'll need the device specific files for the Canadian model and not the ones for D855 but other than that yes
[G3 Android Development] angelus0w:
You can use the instructions as a base but you need different device specifics in local_manifest.xml

"

<project path="device/lge/g3-common" name="sooti/android_device_lge_g3-common" remote="github" revision="cm-12.0" />

<project path="device/lge/d855" name="sooti/android_device_lge_d855" remote="github" revision="cm-12.0" />

<project path="kernel/lge/g3" name="sooti/android_kernel_lge_g3" remote="github" revision="cm-12.0" />

<project path="vendor/lge" name="sooti/proprietary_vendor_lge" remote="github" revision="cm-12.0" />

"

Those lines would have to be altered to the d852 files. you could try the ones on "https://github.com/invisiblek/" example would be:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/lge/g3-common" name="invisiblek/android_device_lge_g3-common" remote="github" revision="cm-12.0" />
<project path="device/lge/d852" name="invisiblek/android_device_lge_d852" remote="github" revision="cm-12.0" />
<project path="kernel/lge/g3" name="invisiblek/android_kernel_lge_g3" remote="github" revision="cm-12.0" />
<project path="vendor/lge" name="invisiblek/proprietary_vendor_lge" remote="github" revision="cm-12.0" />
<project path="device/qcom_common" name="cyanogenmod/android_device_qcom_common" remote="github" revision="cm-12.0" />
</manifest>

But please this may not work, its just an example.