yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Android Development] EnemyOfGlaDOS:
I'm not on a virtual machine.. I thought I would just install it straight on to my laptop instead of the external HD I had it on. For some reason I musta goofed when I installed it in the first place because when I rebooted back into windows where I could "see" how much space was on there and it was only 1/3 full so there was definitely space but beats me how I got the full error :-/ So.. I'm looking now but there doesn't seem to be a way to replace the OS (win7). What I would like to do is wipe my computer completely and install Ubuntu... that way I don't have to worry about running out of space. So it looks like my only options are to install on USB stick or DVD. I got a 4GB stick I found and I just finished getting Ubuntu 12.10 64 bit, on there. So now I guess I can boot into Ubuntu from the USB stick, but I'd really like to make it my permanent OS. I have a nice desktop PC so I'm not trying to dual boot this laptop. I just want to make sure I have the space.

*EDIT* Hmm.. If I install Ubuntu (from the flash drive) *instead* of my current OS (as in not run Ubuntu along side of Windows) will it start me off from scratch? Or will I have to figure out how to wipe the computer with all my old windows files/programs and stuff?
[Nexus 7 Android Development] .torrented:
Ok once you get it booted from the flash drive its going to as you if you want to use trial or install it, then it gives you a few options.

Install along side windows

Wipe HDD and just install Ubuntu

Something else (Thats what the option is called)

If you pick something else you can set up your partitions and what not (its what I use when I set it up, you dont have to)

so if you want to set up your own partitions you can you will need to set up something along the lines of:

ext4 "/" partition for about 10~20Gbs ... Primary

Swap partition = amount of RAM in PC 4GBs ram = 4GBs swap space ... Logical

Optional: ext4 "/home" partition remaining HDD space ... Primary

or you can just select the second option to just have it do it all for you if you just want it done the easy way

Now if you select the second option it will wipe ALL of the HDD so if you have a recovery partition it will be wiped so make sure you have all of the windows drivers if you ever decide to go back to windows backed up somewhere not on the HDD lol, you said you have a desktop so I guess you really wont have to worry about that too much, having a desktop is really convenient

On a different note: I have a 1 SSD (windows boot drive) and 2 HDDs (1: windows storage, 2: Linux Mint Setup) Its nice to have multiple HDD's in the desktop cause I dont worry about messing up Windows/Linux Stuff cause they are on separate drives
[Nexus 7 Android Development] EnemyOfGlaDOS:
Word yeah. I think I'm just gonna install it and wipe it. I got Windows 8 on my desktop PC so I'm all in for making this laptop my Linux machine. The swapping and partitioning is a little confusing to me :-/ plus I want as much space as I can get :)
[Nexus 7 Android Development] sparksco:
I noticed cm deleted their frameworks/base repo and re-uploaded it. I use to have a fork of it on github and now it says I have a fork of someone else's repo... Can anyone shed some light on this and if this is the first of many repos this is to happen to?
[Nexus 7 Android Development] eug89:
I dont' think this will cause problems for your git repository, it's just github that thinks you forked from someone else since the original repo you've forked from no longer exist. I don't know how you've setup your remote repos, but if you do

git pull upstream cm-10.1 (or whatever you called CyanogenMod's repo)

you should still be merging with cyangenmod's repo and not with the one github thinks you forked from.

Probably I haven't explained this very clearly, but the point is that if they delete a repo and upload a new one this would not affect you as long as the git address stays the same, like in this case (https://github.com/CyanogenMod/android_frameworks_base.git).
[Nexus 7 Android Development] kirdroid:
Yes I see...not sure what the problem was i closed the terminal and restarted the Ubuntu VM and now I have made some progress.

But now it's just stuck at sending recovery and nothing happens. I waited 5 mts but still nothg. Any inputs?

ubuntu:~/android/system/out/target/product/grouper$ fastboot flash recovery recovery.img

sending 'recovery' (6488 KB)...

Ok i was using my usual USB cable from amazon, switched to the one which came with the device and now flashing is working fine. Just have to flash the rom now :)
[Nexus 7 Android Development] kumite2010:
fattire

I did as you suggested and this time it compiled without any issues:

I am so pumped.

Thank you for your support!

*after looking at my screenshot I realize I need to change the time!
[Nexus 7 Android Development] fattire:
Woo! Congrats to you as well!
[Nexus 7 Android Development] kirdroid:
Woo hoo ... flashed and I'm typing this from my own build. This feels awesome and this thing flies. Thank you :)
[Nexus 7 Android Development] fattire:
Congrats!

Who's next?!
[Nexus 7 Android Development] leventccc:
I want to ask about how can I merge status:open commits? For example if I want to merge this should I choose latest patch set and click cherry-pick and run the command writed below? And can I revert merging and change files to old states?
[Nexus 7 Android Development] fattire:
So do something like this:

croot
repo sync -j16
cd frameworks/base
git fetch http://review.cyanogenmod.com/CyanogenMod/android_frameworks_base refs/changes/05/21005/11 && git checkout FETCH_HEAD

And then build. It's that easy!

Your change (the addition of this commit) will automatically be undone the next time you repo sync (unless that experimental commit is merged into the frameworks/base project.) If it works (or if you find a bug), be sure to let everyone know.
[Nexus 7 Android Development] leventccc:
I have only 1 more question left thanks for answering all my questions quickly should i delete out folder everytime when I want to make a new build or can I just compile without cleaning old files?
[Nexus 7 Android Development] fattire:
make clobber, make clean, and make

If you want to do a start-everything-new build, first type

make clobber

and then this will remove all of $OUT so that a rebuild while re-create the whole thing from scratch. You might want to do this if changes are made to the BoardConfig.mk file in device/asus/grouper, for example. It's also not a bad idea to do a make clobber build every few weeks just to be absolutely sure everything is being built anew.

Most of the time, for incremental changes and whatnot, you just need to do a repo sync and then build again. The build system should notice which source files have changed and need rebuilding, and should only build the new stuff.

However, as i said above though, some Makefiles such as BoardConfig.mk may contain flags in it that actually affect the build system-wide, and the Makefile system doesn't really check the actual source code to see if a variable change in one place may affect the build in the code somewhere else. So a totally fresh make clobber build, which takes significantly longer than an incremental build, is the best way to be 100% sure you've got everything that's changed in the source code across every part of the system. For this reason, all nightlies posted by official CyanogenMod sources are "make clobber" builds.

There is also make clean, which is a less dramatic/complete way to clean your build. It doesn't kill all your output files, just intermediary files used by the build. Here is an explanation of the difference between make clean and make clobber. It recommends doing a make clean between all builds, although I haven't found that to be necessary for minor day-to-day builds. Although, in fairness, I generally make clobber about once a week anyway.

Hope this sufficiently answers your question.
[Nexus 7 Android Development] kumite2010:
fattire,

this may be a bit off topic but I'm curious about the specs of your computer. Like I mentioned previously the computer I used for this project is an older system that's just barely better than the min specs and it took about 5 hours to compile. What's the average compile time of your system?

I'm really thinking of building a new system since my primary/gaming computer is actually getting long in the tooth itself, so this could be a good excuse to upgrade. At least that's what I'm going to tell the wifey :)
[Nexus 7 Android Development] fattire:
My specs

Heh. My thoughts exactly. So I used to build on an older Macbook Pro from like 5 or more years ago with 4GB. Even building gingerbread, it took 2.5+ hours. A little more than a year ago, it was time to update, so on the recommendation of a bunch of knowledgeable types on IRC, I got a Lenovo ThinkPad. It's not beautiful or skinny or anything, but it's a tank (you can spill water on it and it keeps running), and pretty powerful. They give you a full "hardware maintenance" manual too. And it's not anywhere near as expensive as a Mac, but I get the same use from it as I did my Mac pretty much without all the evil. I'm running Ubuntu on it (wiped windows without ever booting into it).

Here are the specs:

Lenovo w520 Thinkpad

Intel(R) Core(TM) i7-2820QM CPU @ 2.30GHz

12GB Ram

500 GB internal HD (ST9500420AS)

256 GB SSD (ADATA SX300 mSATA card, so basically at a SATA II speed)

Ubuntu 12.04

3.5.0-12-generic (#12~precise1-Ubuntu SMP Sat Aug 25 15:01:01 UTC 2012) kernel

A make clobber build for JB takes about 45 minutes or so with CCACHE on. Often though I kinda "fake" a make clobber build by only removing $OUT/target/product/grouper (since I also have a $OUT/target/product/encore and any other devices I'm building for), which means that I don't have to rebuild some of the build tools that are unlikely to change from build to build. I think if I remember right though that a "true" make clobber is 45 minutes-ish.

There are some people with truly tricked out systems, running with lots of cores and way more ram and using ramdisks and stuff who can do it much faster. I think there was one guy on IRC building ICS from nothing in like 12 minutes or less. Some people have dedicated high power "build boxes" somewhere online for all their building needs. Then they just download the resulting .zip when it's done.

5 hours isn't unreasonable for an older computer. More RAM seems to make a big difference as it doesn't need to use the swap, which slows everything down significantly. But of course, YMMV.
[Nexus 7 Android Development] kirdroid:
On my Ubuntu VM using 4 CPU's and 2GB ram, it took around hour. I have retina mbp with 16 gigs ram. I will probably increase the ram on my VM to 4 gigs and see if any improvements in build time.

---------- Post added at 06:39 PM ---------- Previous post was at 06:18 PM ----------

@fattire - How do I start looking at the CM source? I want to look at some code and try to understand. Is there some kind of tutorial on where to start for looking at the CM source?
[Nexus 7 Android Development] kumite2010:
Now that's my problem. I just remembered a while back, like over a year ago, I was having issues with one RAM slot and so I had to yank out a stick so this system only has 4g instead of 8g which I previously thought. No wonder it was taking so long to compile

Well just saw Kirdroid's response so I should add: low RAM + old system is why it was taking so long
[Nexus 7 Android Development] Vrekk:
Alright I've tired to build his a few times on my touchpad and my nook color (following your guides) and always failed and given up. This time a got a few errors on my own I was able to fix but now i'm lost. I keep getting this error after about an hour or so of build time (I think its almost done when it fails) Any help would be greatly appreciated, I'd like to not give up this time and actually build cyanogenmod from source.

host C++: libicuuc <= external/icu4c/common/normalizer2impl.cpp
LD [M] fs/cifs/cifs.ko
host C++: libicuuc <= external/icu4c/common/normalizer2.cpp
make[1]: Leaving directory `/home/brett/External-Storage/ANDROID-CODE/kernel/asus/grouper'
make -C kernel/asus/grouper O=/home/brett/External-Storage/ANDROID-CODE/out/target/product/grouper/obj/KERNEL_OBJ INSTALL_MOD_PATH=../../system ARCH=arm CROSS_COMPILE="/home/brett/External-Storage/ANDROID-CODE/prebuilts/misc/linux-x86/ccache/ccache /home/brett/External-Storage/ANDROID-CODE/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-" modules_install
make[1]: Entering directory `/home/brett/External-Storage/ANDROID-CODE/kernel/asus/grouper'
host C++: libicuuc <= external/icu4c/common/filterednormalizer2.cpp
INSTALL fs/cifs/cifs.ko
host C++: libicuuc <= external/icu4c/common/ucol_swp.cpp
DEPMOD 3.1.10-ge664b9b
Warning: you may need to install module-init-tools
See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt
host C++: libicuuc <= external/icu4c/common/uprops.cpp
host C++: libicuuc <= external/icu4c/common/utrie2.cpp
ERROR: could not open directory /home/brett/External-Storage/ANDROID-CODE/out/target/product/grouper/obj/KERNEL_OBJ/../../system/usr/lib/modules/99.98.3.1.10-ge664b9b: No such file or directory
FATAL: could not search modules: No such file or directory
make[2]: *** [_modinst_post] Error 1
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/brett/External-Storage/ANDROID-CODE/kernel/asus/grouper'
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
[brett@Quad ANDROID-CODE]$

I'm running Archlinux x86_64 fully up to date.
[Nexus 7 Android Development] kirdroid:
@fattire - Thanks for that detailed info..you are awesome :)
[Nexus 7 Android Development] fattire:
When at first you don't succeed...

First off, congrats on trying, trying again :) Did you install module-init-tools? I don't know much about archlinux,but I guess it uses pacman and not apt.... Apparently module-init-tools is called kmod now or something..?

Also, let's see... this bit looks odd too:

ERROR: could not open directory /home/brett/External-Storage/ANDROID-CODE/out/target/product/grouper/obj/KERNEL_OBJ/../../system/usr/lib/modules/99.98.3.1.10-ge664b9b: No such file or directory

FATAL: could not search modules: No such file or directory

I have no idea what that 99.98.3.1.10-ge664b9b thing is. In fact, there's no system/usr/lib at all in $OUT and googling for 99.98.3.1.10-ge664b9b turns up nothing. I wonder what that DEPMOD 99.98.3.1.10 line is all about too. I wonder if it's getting thrown by some pre-existing environment variable or something that's clashing.

I'd start with installing module-init-tools and see if that fixes anything. Before you re-build, you might want to

rm -rf out/target/product/grouper/obj/KERNEL_OBJ

just to clear out the partially-built kernel object code and start it over.
[Nexus 7 Android Development] fattire:
New Animation?

Someone wanna test this for me?

croot
repo sync -j16
cd device/asus/grouper
git fetch http://review.cyanogenmod.com/CyanogenMod/android_device_asus_grouper refs/changes/17/22317/1 && git cherry-pick FETCH_HEAD

Then rebuild...

+1 it if it works. Works for me, but always good to get some double-checking.
[Nexus 7 Android Development] h00py:
Works fine here too.+1'd :)
[Nexus 7 Android Development] mynamesriz:
Built my first CM10 Rom last night

Hi All,

I felt like celebrating and thanking Fattire for the tutorial.

I tried this on various machines, Ubuntu 12.04 VM on my Macbook pro (failed), then tried directly from my Mac running OS X 10.8 and that kept failing too, I then tried on my desktop with Ubuntu 12.04 again ( trying to setup a dual boot on this machine with Windows 7 was a complete mess because Ubuntu didn't like my RAID 0 setup and wouldn't load GRUB...I had to wipe my RAID and have 4 separate disks,

After another failed build attempt with 12.04 I decided to have a go at installing 10.10 instead, setup the the build environment tried running the build but still got an error, I noticed that it was stopping because it couldn't find a proprietary file in the vendors/asus/grouper folder so I change the rom on my tablet and extract the files again and Vuola! the build started, created my Zips and installed on the device with no problem at all...Now I'm wondering if this was the problem the whole time, I'm going to try on my mac again and see if it works now.

This took up most of my weekend and there were points where I really wanted to pull my hair out or just give up but I'm really glad I stuck at it, the sense of achievement at the end of it all was well worth the stress.

Also on another note I was quite impressed with the time it took to build after reading how long it's taken other people...30 minutes...not bad I think.

This is the rig I'm running (originally built for gaming, not really used for it anymore):

6 core AMD phenom 2 1100T OCed @ 3.6Ghz ( still idling at 28 degrees C)

8gb DDR3 Corsair Vengeance @ 1865mhz

ATI 6870 graphics card

asus Sabretooth 990fx MB

1.2tb storage

I hope my experience with this and the troubles I had will help someone here.

I kept thinking the issue was when it first starts building after checking for dependencies I would see a line along the lines of

find: 'src': File or directory not found

but I guess this is normal as this happened during the successful build too. I did a lot of Google searching for this and found nothing.

Right! Essay over! Thanks again Fattire for putting this together, Much appreciated! :D
[Nexus 7 Android Development] hallowed.mh:
Ok, I know this post isn't strictly about compiling CM, which makes it sorta off topic, but it is about compiling AOSP from source. I'd just like to post a link to my question since this is a more active thread than the AOSP one.... it hadn't seen activity in a long while before I posted my question.

http://xdaforums.com/showthread.php?p=36641131
[Nexus 7 Android Development] EnemyOfGlaDOS:
morning! So I started over.. reinstalled Ubuntu, and started from scratch. Yesterday I was able to get through these last few steps no problem, but I'm getting an error today :\

I've done my repo sync and continued to Get Prebuilt Apps, and Prepare Device specific code.. this is where I'm getting stuck. After running the command "breakfast {{{grouper}}}" I get: Device {{{grouper}}} not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).

I'm pretty sure I downloaded the correct files and ran my commands correctly :-\ but apparently not :(

*edit* I got passed this by using the command lunch to select grouper manually. Got the same error: Device grouper not found but then it did a bunch if stuff and finished. I kept going but after I started the build I noticed at the bottom it said im attempting to build with an unsupported java. Honestly don't know how I screwed this up. Torrented helped me out a lot yesterday :(
[Nexus 7 Android Development] eug89:
I get the same error about java but then it compiles fine. The first time you lunch a device it's normal that it has to townload the specific repository from github, it wasn't an error.
[Nexus 7 Android Development] EnemyOfGlaDOS:
That makes me feel better thanks :) .. I'm just sitting here watching it build thinking... "man I hope I didn't miss something or screw something up''... hours later the build finishes and fails because I didn't have the right java :p lol ..

Cool, thank you.

*update * man wtf.. I'm just having a string of bad luck trying to do this. First I run out of space, so I go way out of my way to make sure that wont happen again, re-do EVERYTHING, and now my laptop overheats and shuts off about an hour into the build.

Ugh... so, where do I start from? croot, brunch grouper? :confused:
[Nexus 7 Android Development] eug89:
Also, I don't know if this happens to you too, since I installed the gcc 4.7 on ubuntu

sudo apt-get install gcc-4.7 g++-4.7

When I use the lunch command I get these errors

cc: error: unrecognized command line option ‘-mfloat-abi=softfp’
cc: error: unrecognized command line option ‘-mfpu=neon’
cc: error: unrecognized command line option ‘-mthumb-interwork’
Looking for dependencies

cc: error: unrecognized command line option ‘-mfloat-abi=softfp’
cc: error: unrecognized command line option ‘-mfpu=neon’
cc: error: unrecognized command line option ‘-mthumb-interwork’
cc: error: unrecognized command line option ‘-mfloat-abi=softfp’
cc: error: unrecognized command line option ‘-mfpu=neon’
cc: error: unrecognized command line option ‘-mthumb-interwork’
cc: error: unrecognized command line option ‘-mfloat-abi=softfp’
cc: error: unrecognized command line option ‘-mfpu=neon’
cc: error: unrecognized command line option ‘-mthumb-interwork’

If I run the lunch command a second time I get no errors. Tried going back to gcc 4.6.3 and I don't get those errors.
[Nexus 7 Android Development] sparksco:
I know, I was just wondering why they were doing that in the first place...
[Nexus 7 Android Development] .torrented:
cd android/system/

. build/envsetup.sh <---"croot only works if you run this script"

make clobber <---"clears out the '~/android/system/out/' directory so nothing gets mixed together with the fresh build"

brunch grouper

dont worry about wrong version of java as long as its 1.6.x_xx you are ok

also your other post w/ the picture looks correct. so nothing is going wrong other than your laptop shutting down

edit* Maybe I should make a video tutorial on how to do this from a noobs perspective so absolute beginners can follow along lol
[Nexus 7 Android Development] EnemyOfGlaDOS:
Thanks dude.. :) ..building and hopefully won't overheat this time haha.. Got my laptop propped up and it feels fine!

<sent from my Nexus 4>
[Nexus 7 Android Development] sparksco:
After the first time you mentioned java 1.7 was working fine I decided to try it again an I haven't looked back since. It's not java you have to worry about as much as javac. For javac you still have to use javac 1.6. I went ahead and updated my java guide on how to do it. Have you read the update on my thread yet?
[Nexus 7 Android Development] EnemyOfGlaDOS:
sweet.. build finished successfully but I don't see the zip anywhere. Wiki says to back out to $OUT directory on my computer.. I'm not used to linux so I don't really know how to get there. I did open my "Home" and looked in android/system/out and every other folder I could think of to try and find the zip file. No dice.

After the build finish I typed cd $OUT as I read in the wiki instructions. I'm soo close!!

oh wait.. nvm. I found em!
[Nexus 7 Android Development] sparksco:
out/target/product/grouper/*.zip
[Nexus 7 Android Development] EnemyOfGlaDOS:
Sorry.. last stupid question- I've plugged my tab into the computer but don't see it anywhere? How do I find my tablet?

<sent from my quad-core S3>
[Nexus 7 Android Development] sparksco:
Mounting isn't very easy or safe. You can use adb push but it's a pain and file transfers are slow. I use USB otg and twrp to flash my ROM builds since twrp supports that feature of flashing. The zips never get loaded onto my device. You can also use the airdroid app from playstore, transfers are very fast.
[Nexus 7 Android Development] EnemyOfGlaDOS:
but the device doesn't have any problem being seen by adb or fastboot. I'm not using TWRP so I guess airdroid app it is :-\