yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Android Development] sparksco:
Just a FYI I found a new way to install adb and fastboot that doesn't require downloading the android SDK and putting adb and fastboot in your path to make it available anywhere in terminal. Also if you have permissions issues with adb or fastboot for other devices this should fix that.

To install just do this:

sudo apt-get install android-tools-adb android-tools-fastboot

Typing this from Ubuntu 13.04 and using open jdk 7 (latest version 1.7.0_17) to build. Everything seems to be working fine.
[Nexus 7 Android Development] yogi2010:
Yep, that's definitely convenient. Although in Linux Mint 14 it seemed to give me adb version 1.0.29 when i did that, rather than 1.0.31, which i think is needed for android 4.2.2? And definitely for the adb sideload command.

But, i was using openjdk6,(for cm7), so maybe that's why?
[Nexus 7 Android Development] sparksco:
Nah it works OK for me with android 4.2.2 but maybe cause I'm on Ubuntu..

---------- Post added at 10:52 PM ---------- Previous post was at 10:50 PM ----------

Also the nexus 7 automatically mounts the internal storage on Ubuntu 13.04 which is really nice. I didn't have to add any USB rules or anything. It's all automatic now. It pops up a new window and shows that it's a nexus 7.
[Nexus 7 Android Development] yogi2010:
Ah ok, maybe it gave you adb 1.0.31? That's what I think I've gotten when I've tried Ubuntu and Fedora I believe.
[Nexus 7 Android Development] sparksco:
As far as I know cm added support for java 7 quite awhile back to their github source. It's probably just that this thread hasn't been updated for that yet.

Edit: Yup support is in.

https://github.com/CyanogenMod/android_build/commit/eded3983484229204f84b484409e7c1fec0a3ab2
[Nexus 7 Android Development] shandy1996:
Kernel for tilapia not found????

So I've been trying to build for the past two days, and i keep runnign into erros.

Fixed most of them, but now get this one:

make: *** No rule to make target '/home/jacob/android/system/out/target/product/tilapia/kernel' neede by '/home/jacob/android/system/out/target/product/tilapia/boot.img' Stop.

I tried to find the kernel for tilapia and couldn't find it on the CM GitHub, only found the Grouper one.

What am i missing?

Peace,

shandy1996
[Nexus 7 Android Development] sgt. meow:
I don't mean to sound like a n00b but can't you edit the BoardConfig.mk to cancel the building of the kernel?
[Nexus 7 Android Development] shandy1996:
Um what? :P

What?

Im a noob hahah explain more please.....
[Nexus 7 Android Development] #define:
He's using a prebuilt kernel..

Hey shandy.. Go to device/asus/tilapia, and look for a file called 'kernel'..

If u find it, copy it to out/target/product/tilapia and then continue with the building..

If u dnt find it there, then u cn find it in the aosp source on their website..

Clone the tilapia device tree from aosp source, and then use the prebuilt kernel from there...

ғг๏๓ ҭђє ғเรђ™
[Nexus 7 Android Development] sparksco:
Tilapia uses grouper kernel. The grouper kernel source is already included in cm's manifest. Did I miss something?
[Nexus 7 Android Development] androidfr33k:
I get this same message both on Mac Pro running vmware hosted Ubuntu 12.1 64 bit and on my Dell D820 PC running Ubuntu 12.10 64 bit.

I followed the wiki perfectly and still get this message? It does build but on the vmware machine it never outputed the rom.zip in the out?

Here is the message:

You are attempting to build with an unsupported version of java.

Your version is: java version "1.7.0_15". The correct version is: Java SE 1.6 or 1.7

Thanks
[Nexus 7 Android Development] sparksco:
Edit the file build/core/main.mk

Line 155 change

$(error stop)

To

#$(error stop)

It will build. I was thinking about submitting a patch for this but there's probably a better way. For now this works.
[Nexus 7 Android Development] shandy1996:
Try sudo apt-get install xmllint

Should solve that problem
[Nexus 7 Android Development] sparksco:
Looks like your missing some packages needed to build android. Go back and read, make sure you have all the required packages from both the cm wiki and the android website.
[Nexus 7 Android Development] androidfr33k:
No package xmllint
[Nexus 7 Android Development] yogi2010:
Try libxml2-utils. I found that out last week building in Linux Miint.
[Nexus 7 Android Development] shandy1996:
New error... :(

So here is my new error, anyone help?

sh: 1 : gperf: not found
calling gperf failed: 32512 at ./makeprop.pl line 140.

Peace,

shandy1996
[Nexus 7 Android Development] androidfr33k:
@sparksco,

If I get the adt package which includes eclipse and ADK tools which version should I download 32 or 64 bit?

Should I just download the SDK tools which is one file for 32/64 bit.

Do I still need to run the apt-get install eclipse per wiki?

I am pretty sure I did that but I guess I can start over.

I am on Ubuntu 64 bit. VMware fusion version from a Mac Pro and a PC Dell Laptop running Ubuntu 64 bit as a Native OS. RUns very slow on the Dell. RUns way faster on vmware if I set 4 of the 8 cores and 4gb ram to it.

I may have also installed the wrong vmware fusion of Ubuntu. There is both a AMD64/Mac and just an AMD64 version. I installed the AMD64/MAC version on my Mac Pro vmware fusion host. Could this be part of the problem with libraries not being completely installed because its AMD64/MAC?
[Nexus 7 Android Development] androidfr33k:
@yogi2010,

Thank you very much that was the issue. I knew I installed all the libraries as per wiki both the 32/64 and 64 only libraries. The wiki needs to be updated to add that library to their list "libxml2-utils"

It seems to have cured our builds and I wonder if this could have been an issue for others who could not get it to build but never really posted the errors.

I was trying to find a LOG of the errors? Is there one kept in the build or just in the Linux /var/log?

Thanks Again!!

EDITED:

I basically ran apt-get install and copied the entire string from wiki for the 32/64 bit library then ran apt-get install for the 64 bit only library. I do see libxml2 in the 32/64 bit string but not the libxml2-utils. So wiki most definitely needs an update. I must have re-ran the build 20 times on both my Mac Pro with vmware and a Dell Laptop with a Native Install of Ubuntu 64 bit, with the same results each time until I updated the library that you suggested.

One more thing when an error occurs the build or compile should stop in order for you to see exactly what is wrong. The Build continued for a while even after that error which I am at a loss. If I were compiling a linux kernel and got an error the copile would stop rather immediately!!

EDITED ONE MORE TIME:

How difficult would it be to change some script so the kernel does not end up in the final product cm10.1.zip or does it?

Thanks Again!!
[Nexus 7 Android Development] yogi2010:
androidfr33k:

I'm glad that solved your issue! I was building on Mint, so i thought maybe that package was just missing from that, but if you are on Ubuntu, then it's possible the wiki needs to be updated. But yeah, haven't seen anyone else report that error yet.

I also ran into an issue building for Tilapia, where the extract script was looking to pull a file called tf_daemon, but that file did not exist, even in an Official Tilapia nightly. Then i saw shandy1996 post the same issue. I guess things evolve and change quickly and we have to always adjust things to keep up.
[Nexus 7 Android Development] sparksco:
Your better off getting the blobs from www.github.com/TheMuppets

Instead of using the extraction scripts. You can even make a local_manifest.xml to sync them in.
[Nexus 7 Android Development] androidfr33k:
My nexus 7 is already unlocked and rooted. It also has a cherry picked linaro build CM10.1 nightly installed from one of the ROMs offered in the nexus 7 threads. Will the script grab all the blobbs or not? I can see it fetches them successfully. Would there be any advantage of getting them from the link versus running the script?

Is there a way to keep the kernel out if the build cm package.zip? I mean let it build but not find its way into the cm ROM.zip?
[Nexus 7 Android Development] sparksco:
I'm not a expert but what from I can tell the scripts haven't been maintained as much. I mean you can pull the files out manually with adb if your missing something but I haven't had any issues using the repos, and it seems like more work.

Also I submitted a fix for tilapia/grouper but it was never merged.

https://github.com/TheMuppets/proprietary_vendor_nvidia/pull/8

https://github.com/SaberMod/proprie...mmit/2abfb30f98c23f89c84ded6bb6cc569bf8381e2f

You can also just use my fork which has the fixes :)

Fixes build warnings for the nvidia blobs. Also the warnings might cause build to fail.

Sent from my Nexus 7

--------------------------------------------------------------

Questions sent to me directly in open forum outside of pm will most likely be ignored.
[Nexus 7 Android Development] androidfr33k:
Comparing mine to the repos I see the addition of tf_daemon into the nvidia when in fact mine is not missing and is in the Asus Proprietary. Does that belong in the Asus or Nvidia? Thats the question!!

I am missing the folder Keymaster for nvida though? Is Keymaster needed?

How can I view all the blobs on my device with adb? I want to just see them not pull them from the device.

Not all my blobs are in the repos?

Thanks
[Nexus 7 Android Development] sparksco:
Well if you don't known exactly where or if a file is you can search in terminal or adb shell.

# find /system -name tf_daemon

/system/bin/tf_daemon

#

If no results pop up then the file isn't there. Keymaster is build from source files now in the repos. Not sure exactly where the source came from.

Sent from my Nexus 7

--------------------------------------------------------------

Questions sent to me directly in open forum outside of pm will most likely be ignored.
[Nexus 7 Android Development] shandy1996:
Finally got it built!!! :D

Ok, so I solved all my errors and it built.

Flashed it this morning.

IT WORKS :D

SO happy :P

And I had an idea, what do you guys think?

I reckon we should make a thread that has all the common problems, with their fixes in the thread.

Sound like a good idea?

Like a universal "CM 10.1 Build Errors Thread"

Peace,

shandy1996
[Nexus 7 Android Development] disconnecktie:
I like that idea. Could help new builders a lot.
[Nexus 7 Android Development] androidfr33k:
I am guessing the next step is to try and get the Linaro Toolchain Builds into the tree and compile. I see a lot of custom CM 10.1 roms titled with Linaro Toolchains v4.7, Cherry Picked.

I thought cm 10.1 already had some of the linaro toolchains but v4.6?

Anyhow I found a couple of links on how to build it but not a straight forward step by step guide as the cm 10.1 wiki guide.
[Nexus 7 Android Development] sparksco:
That's like asking if someone wants to give up their secret ROM soup lol. Yes cm is good but the linaro optimizations help a lot. BTW there's hardly any optimization that comes from the toolchain itself. Linaro does other optimizations outside of the toolchain. I find it somewhat humorous when I see a lot of these kanged ROMs are just labled "linaro toolchain", because your not going to get any noticeable performance increase out of it. It's all open source on linaro's gitweb. Not sure if other cm kanged ROMs that use linaro are open source or not. Most of the ones I've seen are not, and there's really no good reason to if their just using a toolchain.
[Nexus 7 Android Development] DJLamontagneIII:
@androidfr33k Yea you definitely need the linaro patches to actually see a difference you can get them here http://review.cyanogenmod.org/#/q/owner:"Evan+McClain"+status:open,n,zand here http://android.git.linaro.org/gitweb

Sent from my Nexus7
[Nexus 7 Android Development] sparksco:
I don't really consider -O3 to be stable. It increases code size and memory usage. You can view the GCC flags on gnu website.

http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

Sent from my SaberModded beast
[Nexus 7 Android Development] androidfr33k:
Maybe its just me but I see and feel a difference between the unofficial CM 10.1 nightlies and DJLamontagneIII builds. I have run benchmarks with each build I install and I always see several more fps with DJLamontagneIII build using AnTuTu Benchmark.

In either build I see about the same memory occupying the ram space. I just use Memory Booster Pro and usually have around 600mg free.
[Nexus 7 Android Development] sparksco:
You can read on Linaro's documentation that -O3 has stability issues... It enables flags that increase code size and memory usage.

http://www.linaro.org/linaro-blog/2...aro-android-2011-10-and-future-optimizations/

"-O3 enables further optimizations not yet enabled at -O2, including -finline-functions, -funswitch-loops, -fpredictive-commoning, -fgcse-after-reload, -ftree-vectorize and -fipa-cp-clone.

While some of them are probably not ideal (e.g. -finline-functions tends to increase code size, thereby also increasing memory usage and, in a bad case, reducing cache efficiency), overall -O3 has shown to increase performance."

So yes performance is increased but at what cost? You'll probably notice more battery drain with -O3 as a result as well.

You can hand pick in the flags from -O3 that you want to use while leaving out the unstable ones. That's what I do. From the gnu site I linked in my last post.

---------- Post added at 07:48 PM ---------- Previous post was at 07:20 PM ----------

I will submit a new patch later on to cm for flag optimizations. I've been meaning to anyways. BTW -O3 also breaks Bluetooth on grouper and potentially breaks things on other devices too.

Sent from my SaberModded beast
[Nexus 7 Android Development] DJLamontagneIII:
I haven't really seen battery drain but it definitely increases the file size.... You would have to turn the flags down on Bluetooth for it to work properly if you were to leave the flags at -03
[Nexus 7 Android Development] sparksco:
Here's a couple patches to try out, if they work well feel free to leave feedback on gerrit

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

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

You'll also need to do a clean build or the flags won't get used in the compilation process.
[Nexus 7 Android Development] DJLamontagneIII:
Thanks sparksco I'll have to test these out

Sent from my Nexus7
[Nexus 7 Android Development] TheDarkDefender:
A question. What do i do if i want to build cm with another theme, meaning I want to replace the Default Cm theme apk with another one i have(from xda/playstore), and build from it, with it set as default? Anyone please?

Sent from my Nexus 7
[Nexus 7 Android Development] sparksco:
For those interested in linaro and other optimizations I have some working 4.8 toolchains on my github for building ROMs.. Also you'll probably need a couple patches to get it to build. But overall it really makes the ROMs fly :)

I'd say around a 50-75% increase in performance. I don't even think linaro has working 4.8 toolchains yet.
[Nexus 7 Android Development] fattire:
Curious- do you have benchmarks to compare performance?
[Nexus 7 Android Development] sparksco:
AFAIK benchmarks are only for hardware not software.

Can you tell me how benchmarks are used in the case of software?

The toolchains are built using Google GCC 4.8 source..

https://android.googlesource.com/toolchain/gcc/

BTW I have a couple kernel patches on gerrit that need reviewed. However not sure who's in charge of the kernel source for grouper..
[Nexus 7 Android Development] azoller1:
@ sparksco, those toolchains look awesome, could i use them to build for a different device than grouper, im assuming i can?
[Nexus 7 Android Development] sparksco:
Anyone can use them. If you get build errors let me know I'll try to help fix them. Cheers.
[Nexus 7 Android Development] azoller1:
Awesome, now how to add it to the local manifest....
[Nexus 7 Android Development] sparksco:
Something like this should work

http://www.androidenea.com/2010/06/using-localmanifestxml-file-in-repo-to.html

For the path use prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8

Don't use the arm-eabi one if your using inline kernel building cause most kernels can't build with gcc-4.8

And arm-eabi is only used for kernels anyways.

Grouper kernel can though with the right patch work.
[Nexus 7 Android Development] androidfr33k:
[MENTION=2394329]sparksco[/MENTION]

Would you have a short tutorial on how to build this after cm 10.1 has been built?
[Nexus 7 Android Development] sparksco:
A guide? Naw, I'm too lazy for that. There's already guides out there to use custom toolchains. Just use one of those but apply in the same manner with other toolchains.
[Nexus 7 Android Development] androidfr33k:
I see your point on that. All of them are scattered as in scattered brain lol. I am piecing it together very slowly and only have a grasp on the Ubuntu prep and cm 10.1 from the cm wiki so far. The cm wiki for grouper needs updated so found some tutorial that gets me through that for example the correct libraries but most importantly removing the openJDK and installing the Oracle build.

I respect your response. Your rom is based off the original JB 4.2.2 google source? Your base is not cm 10 then? The use of terms is vague sometimes. Kangs/AOSP/AOKP/CM 10.1 w/ linaro toolchains AOKP, Fusion etc etc etc.

Thanks
[Nexus 7 Android Development] Leechoonhwee:
I have a question regarding devices that are not running any CM nor having any device tree yet. How do I determine what are the proprietary files to extract from the current stock ROM?

Any question I would like to ask is that if the stock kernel source code is 4.1.2, I can only build on CM10 and not CM10.1 right?

Thanks!

Vincent
[Nexus 7 Android Development] sparksco:
Confused yet intrigued by your questions. Just come out and say what device it is. What is the latest stock ROM that the phone runs? If you say gingerbread I'll probably say good luck.

How can kernel source code be 4.1.2? In kernels there's only Linux kernel versions e.g. grouper uses 3.1.10 while some other grouper kernels use 3.2+

On github there's branches that people can associate versions of android with.

Kernels won't really have much change on how things run on the ROM side of things.
[Nexus 7 Android Development] sparksco:
There's also hardware specific sources in both cm and AOSP that might not be compatible with the device your trying to build for. And cm is based on AOSP sources besides some enhancements for QCOM chipsets.
[Nexus 7 Android Development] Leechoonhwee:
I'm actually trying to compile for Pantech Vega n6. The stock rom is running 4.1.2 jellybean. So you're saying that I can use the manufacturer kernel source code and build for CM10.1?

I have found that Oppo find 5 and Xperia Z is very similar to my device in terms of processor and screen resolution so I was thinking of forking their device tree + common files and combine with my stock kernel source and try to build.
[Nexus 7 Android Development] sparksco:
No I'm not saying use manufacture kernel. Just use whatever AOSP kernel will work on cm even if it's a older version of cm should work fine. Just make sure it's a AOSP kernel. If there is none AOSP kernels you'll probably need to make one.
[Nexus 7 Android Development] Leechoonhwee:
Arggh. That means I needed to fork it from Oppo and work from there. Thanks!
[Nexus 7 Android Development] bradman117:
Linux Mint Debian 201303 Cinnamon 64-bit

Never mind! i got it!

i fixed adb from here -- http://rootzwiki.com/topic/20770-gu...-adb-and-fastboot-in-linux-ubuntu-and-mint12/

and fixed java SE 7 here -- http://www.wikihow.com/Install-Oracle-Java-JDK-on-Ubuntu-Linux

My n7 now is pulling the right files down!! :D no errors
[Nexus 7 Android Development] sparksco:
Glad you got it sorted out. Please use Pastebin next time :beer:
[Nexus 7 Android Development] bradman117:
anyone know why i get this error?

target thumb C: libvideoeditor_jni <= frameworks/base/media/jni/mediaeditor/VideoBrowserMain.c
Generating CSSPropertyNames.h <= CSSPropertyNames.in
Generating CSSValueKeywords.h <= CSSValueKeywords.in
sh: 1: gperf: not found
calling gperf failed: 32512 at ./makeprop.pl line 140.
make: *** [/home/bradman117/android/system/out/target/product/grouper/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/css/CSSPropertyNames.h] Error 25
make: *** Deleting file `/home/bradman117/android/system/out/target/product/grouper/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/css/CSSPropertyNames.h'
make: *** Waiting for unfinished jobs....
sh: 1: gperf: not found
calling gperf failed: 32512 at makevalues.pl line 137.
make: *** [/home/bradman117/android/system/out/target/product/grouper/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/css/CSSValueKeywords.h] Error 25
make: *** Deleting file `/home/bradman117/android/system/out/target/product/grouper/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/css/CSSValueKeywords.h'

how do i fix this? i have not eddied any files yet
[Nexus 7 Android Development] DJLamontagneIII:
Do you have the package gperf installed from setting up your build environment

Sent from my Nexus7
[Nexus 7 Android Development] sparksco:
http://jimmysintension.com/wp-content/uploads/2013/02/homer-doh.jpg
[Nexus 7 Android Development] ghao:
thanks it took me 2 hours compiling frm source:)
[Nexus 7 Android Development] bradman117:
host C++: libcts_audio_quality <= cts/suite/audio_quality/lib/src/Semaphore.cpp
In file included from /usr/include/semaphore.h:22:0,
from cts/suite/audio_quality/lib/include/Semaphore.h:21,
from cts/suite/audio_quality/lib/src/Semaphore.cpp:17:
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
make: *** [/home/bradman117/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/libcts_audio_quality_intermediates/src/Semaphore.o] Error 1
make: *** Waiting for unfinished jobs....
warning: [options] bootstrap class path not set in conjunction with -source 1.5
1 warning

error: bits/predefs.h?? any ideas? >.<
[Nexus 7 Android Development] sparksco:
[MENTION=3527846]bradman117[/MENTION] from the looks of all the errors you've been having may I suggest something?
[Nexus 7 Android Development] TheDarkDefender:
[MENTION=2394329]sparksco[/MENTION]

ANy thoughts?
[Nexus 7 Android Development] sparksco:
Only one, build for grouper aka nexus 7
[Nexus 7 Android Development] TheDarkDefender:
Lol. Sorry. A bit off topic. Just the device though.
[Nexus 7 Android Development] sparksco:
Looks like your missing superuser

Please excuse redundant post
[Nexus 7 Android Development] TheDarkDefender:
Fixed. Thank you.

My manifest was pointing to packages-apps-superuser instead of external-koush-superuser
[Nexus 7 Android Development] sparksco:
If your building based on cm cm has their own forked repo of koush's repos. You'll probably want to use theirs, and also include the variable to embed superuser into setting in vendor/cm if you don't already have that..

Please excuse redundant post
[Nexus 7 Android Development] TheDarkDefender:
Yep. Using theirs.
[Nexus 7 Android Development] slebit:
I just made a rebuild of my cm10.1 rom, and it worked fine. I have just one question, kernel information in about phone is the same as my first build. How should I do to make it to update to the new information?
[Nexus 7 Android Development] #define:
Do a "make clean" or "make clobber"

That should do it..

ғг๏๓ ҭђє ғเรђ! ™
[Nexus 7 Android Development] slebit:
Yes, I know that. But i was trying to avoid that. :)
[Nexus 7 Android Development] #define:
Hmmm.. Ok.. Go to the kernel folder of the device, and do a "make mrproper" there.. That'll clean only the kernel source, and keep the rest of the rom compiled as it is.. Also, delete the boot.img, kernel, and modules from the out folder...

ғг๏๓ ҭђє ғเรђ! ™
[Nexus 7 Android Development] slebit:
Thanks! Will try that.
[Nexus 7 Android Development] sparksco:
Did you try make install clean? It's either that or make clean install, can't remember which one...

Sent from "The Mile High State"
[Nexus 7 Android Development] slebit:
What do you mean? Is it different from" make clean"?