yashsingh1/xdaforums huggingface dataset:
[XDA-University] Bilgets:
can this be done for a device without official cyanogenmod support? o_O?

i dont understand the part which you say "your device should be on latest cyanogenmod support" or something @_@
[XDA-University] Great_Geek:
Re: COMPILE From Source For Any Phone On Linux Distros

1) Yes, it should be able to compile unofficial builds too

2)I'm not 100% sure, but it means that your phone should be running the latest cyanogenmod, so that it can extract the proprietary

blobs with

$ cd ~/device/<vendor>/<codename>
$ ./extract-files.sh
[XDA-University] Bilgets:
But we don't have a CM firmware for our device just yet
[XDA-University] Great_Geek:
Re: Bilgets

1)Wait, what exactly do you wish to achieve by following this guide?

2)If there's no CM for this device at all, you will probably have to pull blobs manually via adb
[XDA-University] skinzy98:
If I create a Linux virtual box and my computer has 3 GB of ram, how much space should I give virtual box to work on the builds?
[XDA-University] :
A 20 GB of space just for sources is recommended. Then you have actual builds that you want to keep, and the operating system. I would suggest 60 GB or above, depending on your space.
[XDA-University] ktempleton:
I personally would suggest at least 100 GB min I would prefer 150 because trust me once you build one your going to want to build another so I would say as much as you have of you can spare 200 gig then do that. I started out building one now I build 10 and I have 750 GB that's almost out of space yes I tossed Windows along the way:cool::D
[XDA-University] Bilgets:
Like the thread says, compile CM from source :D
[XDA-University] skinzy98:
I Understand I need a lot of space I need to know how much ram to let the virtual box run on
[XDA-University] orbital_71:
Ur pc minimun 8 gb ram if not will be really slow
[XDA-University] just1nsama:
Obviously the more ram the best, i would suggest a minimum of 4gb of ram or some kernel process during the build will kill because of not enough memory.

I use 4gb + 4 core and it takes me about 80-90 minutes to make a build, its not that fast, but its not that slow either.
[XDA-University] skinzy98:
Since my computer only has 3 GB of ram Im gonna let it have around 1.5 GB. I'm gonna let it have ten GB on the hard drive since the website said ten was good for heavy usage
[XDA-University] digixmax:
FWIW, I use an old Dell laptop with Intel Core 2 Duo (T5250 1.83 GHz) CPU and 2GB RAM to compile CM for the Nook Tablet: the very first compilation from scratch took a bit over 4 hours but subsequent compilation only took about 1.5 hours.

Disk space consumption is about 40GB, source code alone is nearly 20GB and took several hours to download.
[XDA-University] Great_Geek:
Re: COMPILE From Source For Any Phone On Linux Distros

Haha :D Yeah, that's what everyone wants :P

But if there's no CM for your device, there's probably no source code to compile..

Unless, you plan on porting CM. In that case, I think it would be better to get someone experienced to help you.

Cause setting up a build environment is probably the easiest part of it that I've seen so far..
[XDA-University] Great_Geek:
It''ll take forever on 2 GB of RAM. Give it all you can..

The source code itself will take more than 10 GB..

I recommend a minimum of 50 GB.

Yes, I said FIFTY Gigabytes of hard drive space.
[XDA-University] skinzy98:
Im looking into a terabyte external hard drive right now. Trying to get my parentd to spring for it
[XDA-University] just1nsama:
I recommend you add internal storage, running a virtual machine on an external hard drive is not recommended and i assume from your rig that you might not even have USB3 or E-SATA, it will be quite slow, if you ask for additionnal storage, add it internally.
[XDA-University] Great_Geek:
Dude.. Do what I did. Buy a plain hard drive and a SATA-USB convertor / HDD housing.. Install Ubuntu on the new drive. Swap your internal drives when needed ;)
[XDA-University] skinzy98:
Problem is my mom also uses that computer to teach my brother and she is not fond of me messing with the internals. Or software for that matter. I was just going to use the external for storing resources for the build as I have quite an old dell. Inspiron 1545
[XDA-University] Great_Geek:
Dell studio 1555 here. And it really isn't hard. If you swap your internal for a 1 TB drive permanently, you could dual boot.

Storing resources on an external isn't recommended, as you'd be severely limited by the USB connection.

I experimented with a SSD hooked upto an eSATA USB port. Speeds were ~20mb/s . Put the SSD inside the laptop and viola! 140mb/s :D
[XDA-University] skinzy98:
Yet, all the specs I've looked at says that it only supports 400 GB. Am I missing something?
[XDA-University] Great_Geek:
My laptop is crazy. That is all. :P

But you should max out the internal storage, if possible..
[XDA-University] ddikodroid:
How to compile CM for Ace 2? Since this device is not officially supported by CM team
[XDA-University] Great_Geek:
Is there unofficial CM for your device? If so, the

repo init

will change to the repository of the developers, not official cm repos.
[XDA-University] speed_bot:
you need a device config ..without that nothing can be done.

---------- Post added at 03:10 PM ---------- Previous post was at 03:07 PM ----------

well not excatly ..you would just need to use local manifests or just git clone the config.
[XDA-University] Great_Geek:
Git clone the config from where ?

I feel that most people here want CyanogenMod to just build, without them getting their hands into coding and such. That kind of puts local manifests a bit out of reach..
[XDA-University] speed_bot:
git clone the repo of your device config..and you cant just be a cm dev without knowing coding(this in general not directed towards anyone)
[XDA-University] Great_Geek:
Yet, most people hope they can be one (not me, though.. I know C , C++ and Python.. Still learning java) :p

Yeah. That device is not supported officially. So he'd have to use unofficial sources. And in my experience(s) it's often better to repo init with the unofficial dev's repo..
[XDA-University] speed_bot:
not every dev working on a unofficial build uses manifests..
[XDA-University] mithun46:
True DAT!
[XDA-University] ddikodroid:
there is no unofficial build for ace 2. But the there is unofficial build for s advance (same hardware).

What is device config? I have a kernel source
[XDA-University] speed_bot:
configuration to compile a rom.. ad nove ut is a dead platform past 4.2.
[XDA-University] biagio7xD:
when i type " repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1 " i received " Permission denieded " how to solve this problem guys ?

EDIT : problem solved
[XDA-University] speed_bot:
you might be on a ntfs based fs or somewhere outside home..

do this

sudo gnom-terminal

hit enter

password

hit enter

do your stuff in the new terminal that pops up
[XDA-University] Great_Geek:
Don't you mean GNOME? Not gnom

sudo gnome-terminal

Or.

sudo su

then repo init

One cries because one is sad. For example, I cry because others are stupid, and that makes me sad.
[XDA-University] trentreed:
Can anyone tell me what to do from here

*** [/home/trent/Source/out/host/common/obj/JAVA_LIBRARIES/android-mock-generatorlib_intermediates/javalib.jar] Error 41

make: *** Waiting for unfinished jobs....

prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ar: /home/trent/Source/out/target/product/grouper/obj/STATIC_LIBRARIES/libwebcore_intermediates/libwebcore.a: Error reading /home/trent/Source/out/target/product/grouper/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebKit/android/content/address_detector.o: Input/output error

make: *** [/home/trent/Source/out/target/product/grouper/obj/STATIC_LIBRARIES/libwebcore_intermediates/libwebcore.a] Error 1

make: *** Deleting file `/home/trent/Source/out/target/product/grouper/obj/STATIC_LIBRARIES/libwebcore_intermediates/libwebcore.a'

trent@trent-ThinkPad-T60p:~/Source$

[[/B]
[XDA-University] speed_bot:
io error make clean should fix it.

---------- Post added at 09:50 PM ---------- Previous post was at 09:45 PM ----------

yeah was a typo sorry.
[XDA-University] trentreed:
Ah crap... Will do its goons take awhile but I'll let you know if it works.

Thank you!!
[XDA-University] speed_bot:
Well it's got to be ext4, no other file system.... Well download the iso from their website its free burn it to a cd or if your bios supports it then you could always use a pendrive...

A word of caution

You won't find drives listed as c d, etc when booted from gparted it will be something like /dev/sda3 but you can see the space used and space free in each partition so that will help you determine your empty drive... Gparted too is free..

Edit

The method I'm saying is for normal dual boot not wubi,.If you plan to build for multiple devices pick a partition with atleast 100 gigs..

sent from cyanmobile powered Beni
[XDA-University] charkey:
great article! is the process similar on an osx machine?
[XDA-University] Dovidhalevi:
Manifest for LG P500? There is a github for lgics.

Thanks in advance.
[XDA-University] speed_bot:
Ya for more instructions go to

Source.Android.com

Hey dude manifest isn't the only way around... As I said download your device tree for lgics from their github as a zip file extract that to source/device/lg/here

sent from cyanmobile powered Beni
[XDA-University] kaliberx:
Manifests for the I9300 (Correct me if i'm wrong) :

CM10.1

<?xml version="1.0" encoding="UTF-8"?>

<manifest>

<project name="teamhacksung/buildscripts" path="buildscripts" remote="github" revision="cm-10.1">
<copyfile dest="build.sh" src="build.sh" />
</project>

<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_i9300" path="device/samsung/i9300" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_kernel_samsung_smdk4210" path="kernel/samsung/smdk4210" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-10.1" />

</manifest>

CM 10

<?xml version="1.0" encoding="UTF-8"?>

<manifest>

<project name="teamhacksung/buildscripts" path="buildscripts" remote="github" revision="jb">
<copyfile dest="build.sh" src="build.sh" />
</project>

<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="jb" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="jb" />
<project name="CyanogenMod/android_device_samsung_i9300" path="device/samsung/i9300" remote="github" revision="jb" />
<project name="CyanogenMod/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="jb" />
<project name="CyanogenMod/android_kernel_samsung_smdk4210" path="kernel/samsung/smdk4210" remote="github" revision="jb" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="jb" />

</manifest>
[XDA-University] housry23:
Nice guide. I appreciate it. You took time out of your day and wrote this up for all to use and it's very nice to have. I think this would be even better if you left the local_manifest out and made a link to a Google doc or other cloud document service that allows people to add manifests to it. Have it nice and organized by device, ROM, Android version and whatever other information people would need. This way it is a more general guide for every device and you wouldn't be getting any new people asking what's their manifest supposed to be and/or they tried building and it failed, or would flash to their device.

Also, I would love to see some spin offs to this. Like how to cherry pick and/or add features to a ROM.
[XDA-University] kaliberx:
The Package "libwxgtk2.6-dev" got updated to "libwxgtk2.8-dev" on U 12.10 ...you have to find a Backport, if the build needs 2.6 installed.

I still use Mint 13, which has 2.6 installed.
[XDA-University] :
new one hahaha

build/core/base_rules.mk:79: *** Module name: tiwlan.ini

build/core/base_rules.mk:80: *** Makefile location: hardware/ti/wlan/wl1271/config

build/core/base_rules.mk:81: *

build/core/base_rules.mk:82: * Each module must use a LOCAL_MODULE_TAGS in its

build/core/base_rules.mk:83: * Android.mk. Possible tags declared by a module:

build/core/base_rules.mk:84: *

build/core/base_rules.mk:85: * optional, debug, eng, tests, samples

build/core/base_rules.mk:86: *

build/core/base_rules.mk:87: * If the module is expected to be in all builds

build/core/base_rules.mk:88: * of a product, then it should use the

build/core/base_rules.mk:89: * "optional" tag:

build/core/base_rules.mk:90: *

build/core/base_rules.mk:91: * Add "LOCAL_MODULE_TAGS := optional" in the

build/core/base_rules.mk:92: * Android.mk for the affected module, and add

build/core/base_rules.mk:93: * the LOCAL_MODULE value for that component

build/core/base_rules.mk:94: * into the PRODUCT_PACKAGES section of product

build/core/base_rules.mk:95: * makefile(s) where it's necessary, if

build/core/base_rules.mk:96: * appropriate.

build/core/base_rules.mk:97: *

build/core/base_rules.mk:98: * If the component should be in EVERY build of ALL

build/core/base_rules.mk:99: * products, then add its LOCAL_MODULE value to the

build/core/base_rules.mk:100: * PRODUCT_PACKAGES section of

build/core/base_rules.mk:101: * build/target/product/core.mk

build/core/base_rules.mk:102: *

build/core/base_rules.mk:103: *** user tag detected on new module - user tags are only supported on legacy modules. Stop.

anyone know what to do?
[XDA-University] tommyjt24:
shell scripting

one could make a script to do the majority of the work assuming you want to clean every build. You maybe able to split it up but the envsetup.sh has to be run in the current bash shell, so YMMV as multiple scripts.

The following was also pretty useful for me:

http://source.android.com/source/building.html

all.sh

#!/bin/bash
source ./build/envsetup.sh
make clobber
CM_EXTRAVERSION=-<your name here> && CM_SNAPSHOT=1 && brunch <your device here>-userdebug
[XDA-University] jmomo:
If anyone knows of process changes needed to do this work on Debian, such information would be appreciated. I will be trying it out for myself here this weekend and will see what I can do.
[XDA-University] speed_bot:
well just find the required packages for debian rest of tutorial holds good...afaik yum is the default package manager in debian.. so a bit of googling will help a lot
[XDA-University] jmomo:
Unfortunately thus proving that you don't know much and can't google. =/

I don't mean to be offensive. It's just that you are wrong.
[XDA-University] speed_bot:
OK I'm wrong you are right happy??

sent from cyanmobile powered Beni
[XDA-University] mithun46:
Sorry guys for no reply . i got injured

have to rest
[XDA-University] sevenup30:
Yum is default for Fedora, debian use apt-get or aptitude also, just like ubuntu.

Since Ubuntu is a debian based system, just follow the tutorial, when aptitude told you which package does not exist, remove from list and try to find the debian similar package over the web.

and for those who want to know how to dual boot or find ubuntu, you have enough great tutortial on ubuntu forum which is made for this ;)

btw, thank for your help thread speed_bot, i was not aware about it, i could post on it soon for help :)
[XDA-University] :
hey , i want to build cm10.1 rom for my xperia x8 device but it not supported by the CM team , so i want to know if it can be done ?
[XDA-University] sevenup30:
you need to find your device_tree, search with freeXperia on github if they done it
[XDA-University] ore616:
Hope you are feeling better bro.

Thanks for the guide :)
[XDA-University] Stealth111:
Thank you for putting this awesome guide out!

Sent using Tapatalk
[XDA-University] tommyjt24:
JAVA_HOME

Just wanted to post a FYI:

I got my build working! However I had to play with the JAVA_HOME variable in Ubuntu 12.10, for some reason it was set to /usr/lib/jvm/java-6-sun instead of /usr/lib/jvm/java-6-oracle, now to figure out who sets this variable for my machine :)

Great tutorial by the way!

Tom
[XDA-University] trentreed:
Any Idea what to do here?

[

/home/trent/Source/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMMCParser_intermediates/libLLVMMCParser.a(ELFAsmParser.o): In function `ParseDirectiveType':

/home/trent/Source/external/llvm/lib/MC/MCParser/ELFAsmParser.cpp:457: undefined reference to `llvm::MCContext::GetOrCreateSymbol(llvm::StringRef)'

/home/trent/Source/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMMCParser_intermediates/libLLVMMCParser.a(ELFAsmParser.o): In function `ParseDirectiveSection':

/home/trent/Source/external/llvm/lib/MC/MCParser/ELFAsmParser.cpp:436: undefined reference to `llvm::MCContext::getELFSection(llvm::StringRef, unsigned int, unsigned int, llvm::SectionKind, unsigned int, llvm::StringRef)'

collect2: ld returned 1 exit status

make: *** [/home/trent/Source/out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/llvm-rs-cc] Error 1

make: *** Waiting for unfinished jobs....
[XDA-University] mithun46:
I had the same problem. nuke build directory and start fromm scratch
[XDA-University] trentreed:
any ideas?

ocessing_component.cc

target arm C++: libwebrtc_apm <= external/webrtc/src/modules/audio_processing/voice_detection_impl.cc

target arm C++: libwebrtc_apm <= /home/trent/Source/out/target/product/grouper/obj/STATIC_LIBRARIES/libwebrtc_apm_intermediates/proto/external/webrtc/src/modules/audio_processing/debug.pb.cc

target arm C++: libwebrtc_apm <= /home/trent/Source/out/target/product/grouper/obj/STATIC_LIBRARIES/libwebrtc_apm_intermediates/proto/external/webrtc/src/modules/audio_processing/test/unittest.pb.cc

Copy xml: /home/trent/Source/out/target/product/grouper/system/etc/permissions/android.software.sip.voip.xml

/bin/bash: xmllint: command not found

make: *** [/home/trent/Source/out/target/product/grouper/system/etc/permissions/android.software.sip.voip.xml] Error 127

make: *** Waiting for unfinished jobs....
[XDA-University] biagio7xD:
which command i use for compile only the kernelfor i9100G ??

i use

. /build evensetup.sh

lunch ( and then select my phone i9100g )

make bootimage

it's correct ?
[XDA-University] mithun46:
start all over and use local manifests for adding repos
[XDA-University] davepmer:
could not find jdk tools.jar

Hi I need help. I know this has been ask thousands of times but so far I can not get past this point.

I am running Linux Mint 13, I have tried linux mint 14 and ubuntu 10.4 up to 13. I have jdk1.6.0_43 and which java and java - version confirms that.

I have tried following the guide here http://xdaforums.com/showthread.php?t=1386615 and a few others as well. But every time I get stuck with

could not find jdk tools.jar. I have tried running the find-jdk-tools-jar.sh and that does point me to the correct location and tools.jar is really there.

However I have tried to run java -jar-tools.jar and I get Failed to load Main-Class manifest attribute from tools.jar. But I seem to get that error all the time too.

Any ideas? I am lost.

Fixed, for anyone else lost with unable to find tools.jar.

in etc/alternatives there are several links to java binaries. But the links do not go to a default location. In my case some went to the sun java folder and some went

to an open jdk folder and some went to an open jre folder. I set all of them to link to the binary in a deafult-java/bin folder and then linked default-java to my sun java folder. for good messure I also edited .bashrc and added ANDROID_JAVA_HOME and pointed it to my default-java link and added JAVA_HOME and set it to my default-java link.

This way if I need to update or change my java I just change where default-java links to
[XDA-University] trentreed:
Error messages.....

It seems there are some missing packages needed to build (for me anyway) here is a complete list of what I used on Linux Mint 14.1

which was successful without any issues.

I tested this twice with a fresh install and seems to work perfectly. So if your having strange error messages like I was you might wanna try these

For 32-bit and 64-bit System

Code:

sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl

libncurses5-dev zlib1g-dev openjdk-6-jre openjdk-6-jdk pngcrush schedtool python rar original-awk gawk p7zip-full gperf libwxgtk2.6-dev xsltproc

For 64-bit System

Code:

sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-4.7-multilib g++-4.5-multilib ia32-libs gcc-multilib g++-multilib

Other Required Software:

Code:

sudo apt-get install libc6-dev x11proto-core-dev libx11-dev libgl1-mesa-dev mingw32 tofrodos python-markdown libxml2-utils

*NOTE Im not sure if this does anything but i also ran

Code:

sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so

Thanks to the op for the great tutorial.
[XDA-University] Red Devil:
Hi [MENTION=4922752]mithun46[/MENTION] and all others..

First of all great thread and good work.. thanks a lot for this thread and providing support for Developers while building ROMs..

I am building AOKP JB - MR1 for my device the HTC Explorer A310e.. I have used my device's CyanogenMod10.1's tree to build it..

I am getting the following error :

system/core/libion/ion.c: In function 'ion_alloc':
system/core/libion/ion.c:65:3: error: unknown field 'heap_mask' specified in initializer
system/core/libion/ion.c:67:17: warning: initialized field overwritten [-Woverride-init]
system/core/libion/ion.c:67:17: warning: (near initialization for 'data.flags') [-Woverride-init]
system/core/libion/ion.c: In function 'ion_sync_fd':
system/core/libion/ion.c:160:26: error: 'ION_IOC_SYNC' undeclared (first use in this function)
system/core/libion/ion.c:160:26: note: each undeclared identifier is reported only once for each function it appears in
make: *** [/media/akshat/9738b8a5-b796-4e3c-92d7-b24ae9274ea8/android/aokp/out/target/product/pico/obj/EXECUTABLES/iontest_intermediates/ion.o] Error 1
make: *** Waiting for unfinished jobs....

Would appreciate any sort of help w.r.t solving this error.

Better pastie

PS : Googled my query and searched about it a lot to no avail.

Some developers suggested it might be a header fault. But I dont know which header.. and how to fix it ..

Thanks !
[XDA-University] mithun46:
Dude AOKP needs edits to make cm device tree to work with AOKP

i am currently busy in galaxy S4 right now

but once i am free which will be in july and august

i will make a thread in xda on how to make a AOKP device tree ;D
[XDA-University] Red Devil:
Hi

I made edits in the CM device tree to make it buildable.

That is how it is building.. :\

Any who.. cheers.. thanks for the answer.