yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Android Development] Blaqhawk:
I'm loving this topic! I am learning so much just by reading all the posts and keeping up with you guys (gender non-specific). Keep it up, thanks!!!
[Nexus 7 Android Development] Noobla_Khan:
I could be wrong here but I think the safest thing to do is to create a new directory in your home folder and do your init command for cm-10.1 in there as you already have a repo initialized in your existing working directory. I personally scraped my working directory and started fresh with the cm-10.1 branch. So in a new clean folder I initialized with this: repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1 and it's currently syncing. I am currently running 10.1 built from the mr1-staging branch so I will just try the extract script on the N7 as is to get the binaries.

If you still wanted to build 4.1.2 I think you would use -b jellybean. If you check out CyanogenMod on github.com you can look at the different branches and change your -b criteria to match the branch you want to build.

I don't know what happens if you have a branch already initialized in a folder and then drop a new init command for a different branch in that same folder but I don't think it would end good.

EDIT: Building now, will update as to how it goes tomorrow morning.

EDIT 2: Build finished normally. Did a full wipe and flashed rom and gapps, everything looks good.
[Nexus 7 Android Development] smo1970:
I'm assuming that since I'm on 4.1.2 I'll need to use these:

https://developers.google.com/android/nexus/drivers#grouperjop40c

instead of using

./extract-files.sh

The downloaded binaries appear to have scripts that put everything in the vendor directory.

I've followed your advice and I've scrapped what I had and started with a fresh repo sync.

Thanks for the very helpful post.
[Nexus 7 Android Development] Noobla_Khan:
You can try that...I don't honestly know if it will work for you as I am not sure if Google's binaries extract to a different location then where CM's extract script dumps them, and how the make file handles them. I am noob...hear me roar.

One thing that would work for you is to flash a 4.2.1 rom and run CMs extract script, a stock 4.2.1 rom would work or someone's CM 10.1 unofficial would do it. On my build from the mr1-staging branch I used CMs extract script on Google stock 4.2.1 and it worked fine. I can link you my build from last night if you would like, it is running great so far and other than being "unofficial" it is straight up, no changes from me.
[Nexus 7 Android Development] fattire:
If you're building 4.2.1 yeah, you need to re-init to cm-10.1, and then use the new blobs. The google binaries should extract to the correct places.
[Nexus 7 Android Development] smo1970:
I appreciate it. I'll try to build it first using the downloaded blobs. They're pretty straightforward to apply. If that doesn't pan out for whatever reason I might try flashing your build.
[Nexus 7 Android Development] Noobla_Khan:
If fattire says the Google binaries will work you should be all set.

Here is a link to my build from last night just the same:

https://dl.dropbox.com/u/8465466/cm-10.1-20121216-UNOFFICIAL-grouper.zip
[Nexus 7 Android Development] smo1970:
It build fine, and seems to work well (Unlike my borked first attempt).

I'm quite pleased with the results.

Oh, and thanks again for helping to get me on the right track.
[Nexus 7 Android Development] Noobla_Khan:
Nice! Glad to hear you got it working.

While we are at it, thanks fattire and others(sparksco and z1gackly) for all the time you spend pointing those who want to learn in the right direction. I have learned a ton from this thread.
[Nexus 7 Android Development] fattire:
Thanks... Posts like this make it worthwhile.... And look forward to more like the walkthrough coming soon.... I've been working on a wiki.... All the livelong day....
[Nexus 7 Android Development] Noobla_Khan:
Can't wait for this!
[Nexus 7 Android Development] smo1970:
I can't wait either. It adds a whole other level of enjoyment to the device.

I do have a question. What is the best way to view what changes have been merged after doing a repo sync?

Also, on my latest 10.1 build, my camera doesn't seem to be working and auto-rotate doesn't work. Is this normal or have I done something wrong? Everything else is fine.

Thanks again.

EDIT: I just tried your build A$$H4t and everything works, so....I'm not sure. Perhaps I should do ./extract-files.sh with your build installed?
[Nexus 7 Android Development] ratcav:
You have to ./extract_files.sh

Rotation and camera blobs are not on Google because of licenses I think.

Install stock 4.2.1 or any custom 4.2.1 roms and extract files
[Nexus 7 Android Development] Noobla_Khan:
That should work.

As far as changes you can look at CMs gerrit review to see what is merged: http://review.cyanogenmod.org/#/q/status:merged,n,z

EDIT: Didn't realize, official 10.1 nightly for N7: http://get.cm/?device=grouper
[Nexus 7 Android Development] smo1970:
This is good to know.

Everything is working now after doing ./extract_files.sh :D
[Nexus 7 Android Development] iDavidStory:
Doing this made my 10.1 build behave better too.

---------- Post added at 11:28 AM ---------- Previous post was at 11:13 AM ----------

cm-10.1 is missing the ability to mount usb thumb drives with my otg usb cable.

My cm-10 mounted just fine.

Does anyone know where to look?

Diffing kernel/asus/grouper/arch/arm/configs/cyanogenmod_grouper_defconfig

I noticed CONFIG_MACH_TEGRA_ENTERPRISE is not set

It was in the cm-10 build, so I tried setting it to =y

but did not get a successful build.
[Nexus 7 Android Development] fattire:
Yep! Enjoy!
[Nexus 7 Android Development] sparksco:
I noticed the patch for keystore.grouper.so never got merged. I would assume we still need it to build cm10.1?
[Nexus 7 Android Development] fattire:
10.1 needs it I believe.

Also, I'm building now with the bfq 5.1r1 patch. Just FYI in case anyone wants to try it too.

One other thing-- I need to update the fingerprint in cm.mk. Can someone with stock let me know what the fingerprint looks like in /system/build.prop for 4.2.1? Thanks.
[Nexus 7 Android Development] sparksco:
Looks like some nice bug fixes. I've just been using Google's default noop but I've been including it in my kernels just for testing purposes and in case anyone wants to use it.
[Nexus 7 Android Development] Blaqhawk:
I would use the # NFC LINE as the splitting point between the two pictures, but it's all in one file as you know. This was the quickest way to show you. This is stock 4.2.1 rooted, unlocked, with Franco's kernel.

I hope that is what you wanted.

Adam
[Nexus 7 Android Development] sparksco:
I updated my fingerprint earlier today after pulling the stock build.prop

https://github.com/pbeeler/android_...mmit/8eef6a3c17b2fe2ca9e224db97dd236cda1975a9

I know it's not for cm so you'd need to make a whole new commit for it. But that is the fingerprint.
[Nexus 7 Android Development] Seferi:
Building for 2 devices

Hi, i'm building for Nexus 4 mako successfully and i was wondering if i could build for nexus 7 in the same time. I tried running 'lunch' and choosing the grouper and the other steps afterwards but build wasn't successful. I appreciate if you could write the commands i have to give for building for nexus 7 and 4. Thank you very much.
[Nexus 7 Android Development] sparksco:
You can build for more than device at one time. Sometimes I build for grouper and tilapia at the same time. The only thing you need is separate output directories. Be warned this will take up more space on your hdd. This is similar to how Google explains it on their webpage but I've written it up a little better. Enter these from the root of your source

export DIRSRC="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";

export OUT_DIR_COMMON_BASE=$DIRSRC/out/grouper

Or if you have a build script simply add these lines in. To make it work for mako just put mako where it says grouper.
[Nexus 7 Android Development] sparksco:
@fattire wanted to point out for device tilapia keystore.grouper is also missing as is for grouper. Not sure if it's that big of a deal or not to have it. I had to add it manually to vendor.
[Nexus 7 Android Development] burnsra:
@sparksco - We removed when it was causing some issues with some Exchange configurations and certificate keystore access. Have you run into a case where it was needed?
[Nexus 7 Android Development] sparksco:
No I haven't run into a case where it was critical to have. I had issues before with email syncing with it in the builds but I was using my own gapps. After flashing cm's gapps it works fine with it in the Roms. Thanks for explaining I'll probably end up removing it I wasn't sure what it was for or did exactly.
[Nexus 7 Android Development] Seferi:
Thanks alot, i gave the commands you wrote, then did lunch and then sh extract-files.sh to download the prop blobs from nexus 7. Then run brunch cm_grouper-userdebug. Its building now but i got this after giving the build command:

external/bluetooth/bluedroid/Android.mk:8: NO BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR, using only generic configuration

is this normal? Its building now, i'll see if it builds succesfully and report back afterwards. Thanks again...

EDIT: After a few hours of building, build failed. This is the output from the end:

aapt: warning: string 'gsm_alphabet_default_charset' has no default translation in frameworks/base/core/res/res; found: ko

device/asus/grouper/overlay/frameworks/base/core/res/res/values/config.xml:85: error: Resource at config_networkLocationProviderPackageName appears in overlay but not in the base package; use <add-resource> to add.

device/asus/grouper/overlay/frameworks/base/core/res/res/values/config.xml:88: error: Resource at config_geocodeProviderPackageName appears in overlay but not in the base package; use <add-resource> to add.

CC [M] fs/cifs/misc.o

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

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

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

CC [M] fs/cifs/netmisc.o

CC [M] fs/cifs/smbencrypt.o

CC [M] fs/cifs/transport.o

CC [M] fs/cifs/asn1.o

CC [M] fs/cifs/cifs_unicode.o

CC [M] fs/cifs/nterr.o

CC [M] fs/cifs/xattr.o

CC [M] fs/cifs/cifsencrypt.o

CC [M] fs/cifs/readdir.o

CC [M] fs/cifs/ioctl.o

CC [M] fs/cifs/sess.o

CC [M] fs/cifs/export.o

LD [M] fs/cifs/cifs.o

Building modules, stage 2.

MODPOST 1 modules

CC fs/cifs/cifs.mod.o

LD [M] fs/cifs/cifs.ko

make[1]: Leaving directory `/home/berker/android/system/kernel/asus/grouper'

make -C kernel/asus/grouper O=/home/berker/android/system/out/grouper/system/target/product/grouper/obj/KERNEL_OBJ INSTALL_MOD_PATH=../../system ARCH=arm CROSS_COMPILE=" /home/berker/android/system/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-" modules_install

make[1]: Entering directory `/home/berker/android/system/kernel/asus/grouper'

INSTALL fs/cifs/cifs.ko

DEPMOD 3.1.10-g830e42f

make[1]: Leaving directory `/home/berker/android/system/kernel/asus/grouper'

mdpath=`find /home/berker/android/system/out/grouper/system/target/product/grouper/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; ko=`find $mpath/kernel -type f -name *.ko`; for i in $ko; do mv $i /home/berker/android/system/out/grouper/system/target/product/grouper/system/lib/modules/; done; fi

mdpath=`find /home/berker/android/system/out/grouper/system/target/product/grouper/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; rm -rf $mpath; fi
[Nexus 7 Android Development] sparksco:
The error you have isn't related to output directory you have a problem in your device overlay.
[Nexus 7 Android Development] Seferi:
Is there anyway i can fix it?
[Nexus 7 Android Development] sparksco:
You've added things to grouper device tree that aren't in frameworks/base. I don't know what you did.
[Nexus 7 Android Development] Seferi:
All i did is lunch and then sh extract-files.sh to download the prop blobs from nexus 7. Then run brunch cm_grouper-userdebug. Did i do wrong?
[Nexus 7 Android Development] fattire:
The problem is with the file:

device/asus/grouper/overlay/frameworks/base/core/res/res/values/config.xml:

It apparently contains some stuff that doesn't match frameworks/base (such as config_geocodeProviderPackageName which is something that you may have modified according to this link. Obviously it doesn't work.)

Github is down right now, or I'd link to the file directly...

Are you using a local_manifest.xml to get an unusual device/asus/grouper?
[Nexus 7 Android Development] azoller1:
Would it be better to build aosp first then build cm10 off that?
[Nexus 7 Android Development] fattire:
I'm not sure what you're asking... if you're building cm10.1 you don't need to change anything in the overlay. You don't build cm10.1 "off" aosp. Though they share a common history, AOSP and CM10 source are loaded from two different repo inits with totally different repositories/remotes... I prefer cm10.1 not only because it's got some nice enhancements but because it supports so many devices so i can use the same codebase for all of them.
[Nexus 7 Android Development] azoller1:
Like first repo sync an aosp build then merge cm10.1 into it using aosp as a base, because aosp seems to be more stable
[Nexus 7 Android Development] apascual89:
Just go with cm 10.1. It's based on aosp and it has all the additions and fixes that cm puts on top of that. I find that cm is the way it should have shipped :D. Just to name a few examples, customizable quick toggles (they're actually toggles on cm). Launcher settings and by the way if you look at their commits, trebuchet is getting a lot of work put in.

But to each their own. Once again thanks fattire for putting this guide together and sparsko for his continued support also.
[Nexus 7 Android Development] sparksco:
I agree there's really no point in merging cm on top of aosp since cm merges in their work on top of aosp as it is :)

Unless you really want to customize the ROM by adding in addition things of your own and maybe just porting over a few cm features. Even that is a real challenge unless you know what your doing with the code.
[Nexus 7 Android Development] Seferi:
Thanks for looking in to it mate. I didn't change anything but somehow its messed up i guess. Can you email me the right xml file so i can swap with mine? Or you can paste the text in xml and i just have to paste it my manifest xml, delete all the folders except .repo and download the source again. Right?
[Nexus 7 Android Development] sparksco:
cd device/asus/grouper && git reset --hard && cd ../../../;

---------- Post added at 02:21 PM ---------- Previous post was at 02:16 PM ----------

Or this is probably better to make sure yours is exactly as cm has it.

cd device/asus/grouper && git fetch https://github.com/CyanogenMod/android_device_asus_grouper.git cm-10.1 && git checkout FETCH_HEAD && cd ../../../;

Also if you run git status in device/asus/grouper nothing should show up in red or green. It should say working directory clean.
[Nexus 7 Android Development] housry23:
Bro I was successfully building both mako and grouper. After you pm'd me, I tried it just to see if it was because of something I told you to do, but it wasn't. I ran lunch, plugged in my nexus 7 and pulled the prop blobs from it and ran brunch. Chose grouper from the list and the laptop churned it out. Also, mako is in the list now. I know you already deleted everything and redownloaded the source once, but that may be what you have to do here. Give me a few hours and I'll build again and give you what's in my local_manifest file, but I don't think that will fix it.
[Nexus 7 Android Development] sparksco:
I've never once had to delete my source... And I've screwed things up on more than one occasion. There's always a better way to fix things. Deleting the whole source is overkill IMHO.
[Nexus 7 Android Development] housry23:
Also, I wanted to ask if anyone knows how to set up the build environment in Mint 14 64 bit? I couldn't install the packages needed and it said something about maybe they haven't been updated for the OS yet and I'm trying to install broken packages and it can't be fixed. If anyone can help please, I would be grateful!
[Nexus 7 Android Development] Seferi:
just did as you said and tried git status. This is the output:

# Not currently on any branch.

nothing to commit (working directory clean)

Not currently on any branch was written in red. Is that ok?

Building now, will report back, thanks...

EDIT: Build successfull. Thanks a bunch. Is it possible to build for two devices in the same time? or only one by one.. ?
[Nexus 7 Android Development] azoller1:
I just saw github is for windows now, that would be awesome if it worked just like on Ubuntu, cause I only get 30gb max on Ubuntu when side loading it on windows
[Nexus 7 Android Development] haledroid:
Installing SDK in linux

I'm quite the linux noob right now thought i would post this if anyone is struggling setting up their environment. The steps in the link below helped getting the android SDK installed in Ubuntu 12.10.

http://www.liberiangeek.net/2012/07...-androidsdk-in-ubuntu-12-04-precise-pangolin/

When downloading the sdk from google just change the 20 in the file name to 21

wget http://dl.google.com/android/android-sdk_r21-linux.tgz
[Nexus 7 Android Development] .torrented:
Does it really require 16Gbs of ram and 30Gb HDD space? I have plenty of both but that just seems overkill...
[Nexus 7 Android Development] fattire:
Well, the more RAM you have, the faster the build. As for HDD space (or SDD), it can vary depending on whether or not you have CCACHE on and how much cache space you've given it...

Also a quick note, I modified the nexus 7 build instructions in the OP to mention that if you want to build CM 10.1 instead of CM10, use -b cm-10.1 in the repo init.
[Nexus 7 Android Development] .torrented:
Any ideas?

ryan@ubuntu:~/android/system/vendor/cm$ ./get-prebuilts
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 223k 100 223k 0 0 219k 0 0:00:01 0:00:01 --:--:-- 255k
Archive: ./proprietary/Term.apk
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of ./proprietary/Term.apk or
./proprietary/Term.apk.zip, and cannot find ./proprietary/Term.apk.ZIP, period.

i hope that what i needed to do worked or I will have a goofed up build.

after my "build" completed i dont have a "cm-update.zip" in the "cd $OUT" directory, it just gave me this

ryan@ubuntu:~/android/system/out/target/product/grouper$ l -a
./ ../ clean_steps.mk obj/ previous_build_config.mk root/ system/

BTW if anyone is wondering im running:

8-Core AMD FX 8120 @ 4.2GHz -- Idle: 20C -- 100% Load: 45C

16GB 1600MHz RAM

x2 XFX 6870's in XFIRE

990-FXA-UD5 Gigabyte Motherboard

850W PSU

H100 Cooler (Watercooled)

64GB OCZ Vertex 4 SSD (Boot)

1 TB WD Black (Storage)

650D Corsair Case
[Nexus 7 Android Development] fattire:
Hmm. Can you try running it again? It looks like maybe the file didn't come through all the way or something.

Yeah that looks like the build didn't finish properly. The lack of a .zip file means something broke. I know github was down for a few hours I think yesterday... re-run get-prebuilts, do a fresh repo sync, and try restarting the build...
[Nexus 7 Android Development] Seferi:
When i sync the repo i get this at the end of the line:

Fetching projects: 100% (355/355), done.

Syncing work tree: 100% (355/355), done.

device/asus/grouper/: discarding 439 commits

is this normal? It builds fine tho...
[Nexus 7 Android Development] sparksco:
No not normal. Your grouper device tree isn't tracking upstream cm. You seriously need to explain more about how your changing the device tree. I know you said you didn't change it but everything else shows you did...
[Nexus 7 Android Development] marty331:
Fattire, well said!
[Nexus 7 Android Development] gigoo25:
Unfortunately the build seems to start but does not finish... I do not have the .zip file in the output folder only a couple of folder (Ex. Ststem/Data) which are not complete... I have just deleted my virtual HDD image and will try to reinstall everything on a fresh copy of ubuntu 12.04 I will post back results when done :)
[Nexus 7 Android Development] fattire:
Can you show me the way the build ends? Like the lines with the error if there is one, and if not, the last few lines (there's always pretty much an error though at the end if it doesn't finish...)
[Nexus 7 Android Development] h00py:
Quick question, should I be doing a make clean between builds/syncs?
[Nexus 7 Android Development] fattire:
Nah. Usually not necessary... sometimes if the BoardConfig.mk file changes you'll want a make clobber, but for a a day to day build just repo sync and then build. If you want to be absolutely sure, you can make clean/clobber-- if I'm building for multiple devices ill usually just rm -rf $OUT/target/product/grouper or whatever to leave the generic and x86 stuff and other device build alone.
[Nexus 7 Android Development] h00py:
Thanks, this will save me lots of time building lol. Next I'll probably look into getting ccache set up.
[Nexus 7 Android Development] leventccc:
Thanks for the guide its very helpful and I want to ask what is your opinion on best ubuntu version for compiling roms?
[Nexus 7 Android Development] fattire:
Ubuntu (and OS X) building...

I am using the latest 12.04 64-bit version.

FWIW, it is also very possible to build with OS X from at least Snow Leopard (I think even earlier), but the instructions vary slightly when setting up your build environment. See the old OS X build guide for Nook Color CM7 as a base. Additionally, I believe there is at least one specific unmerged commit in JB from nemith required for OS X. There are some further OS X notes in the comments that likely apply to N7 here.
[Nexus 7 Android Development] leventccc:
Thanks I was also using ubuntu 12.04.4 64 bit but in source.android says

"You will need a 64-bit version of Ubuntu. Ubuntu 10.04 is recommended. Building using a newer version of Ubuntu is currently only experimentally supported and is not guaranteed to work on branches other than master."
[Nexus 7 Android Development] fattire:
Are you referring to this web page? It is saying that you want to use a 64-bit version, as I suggested. Version 12.04 will definitely work as I have been running my builds for a month or so now.
[Nexus 7 Android Development] leventccc:
Yes and tried building on 12.04 x64. Builded fine. I just asked because it says 12.04 is experimentally supported but after trying and seeing it succeeded doesn't matter what google says :)