yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Android Development] sparksco:
Oh OK... relax I was just pointing out where the change and github discussion was.
[Nexus 7 Android Development] z1gackly:
I'm not unrelaxed mate. Had a nice weekend with the family ;)
[Nexus 7 Android Development] myepicyear:
No, you relax--now! lol

You both were very helpful. There. Settled. :)
[Nexus 7 Android Development] apascual89:
If I want to build for more than one device, do I just select the new device from the lunch options and to build, just brunch and the device I want to build for?
[Nexus 7 Android Development] z1gackly:
Indeed. And myepicyear don't worry, sparksco and I are pals.
[Nexus 7 Android Development] Phil3759:
I am thinking to update to Ubuntu 12.10 x64, currently on 12.04 x64

I am wired as of loosing all my installed packages. Setting all the packages was a headache on 12.04 x64 as many did not like to correctly download with apt-get install and had to use the gui package installer for many of them and sometimes try many times on many days to get all installed, not sure why

Is 12.10 x64 building fine ? Setting up the build environment for cm10 is smooth with all needed packages available?
[Nexus 7 Android Development] apascual89:
@fattire Thank You for your tutorial. My first build is running smoothly!

---------- Post added at 04:28 PM ---------- Previous post was at 04:24 PM ----------

I just setup 12.10 x64. I don't have anything to compare it too ( first time doing it), but I found it to be fairly easy to set up. My first try built fine. Now on to figuring out github.
[Nexus 7 Android Development] Phil3759:
Thank you,

My actual build environment is broken with repo sync failing to update anything. I am stuck to build with last complete successful sync. Removing the .git and same did not fix it. Hopefully, I only do recoveries and updates are not so frequent.

So, since I have to go into the trouble of deleting all my repo, I will update to 12.10 and setup all build environment again

Thank you (out of my 8 thumbs up)
[Nexus 7 Android Development] fattire:
Congratulations!
[Nexus 7 Android Development] shinjielric:
Thank you for this awesome tutorial. I got my first ROM running great on my N7 and S3. Now the fun of learning how to add my own tweeks and features.
[Nexus 7 Android Development] apascual89:
Ok, where is it that you can see and choose yet un merged changes?
[Nexus 7 Android Development] fattire:
Review.cyanogenmod.com aka "gerrit"

More info here.
[Nexus 7 Android Development] apascual89:
Ok, so i succesfully built cm10 and paranoid android for my nexus 7. I did the setup process for my quincyatt (ATT Galaxy Note).I start building cm10, It starts the build like the others, but it stops after a while. Here's the last part:

target SharedLib: libchromium_net (/root/android/system/out/target/product/quincyatt/obj/SHARED_LIBRARIES/libchromium_net_intermediates/LINKED/libchromium_net.so)

AS .tmp_kallsyms2.o

LD vmlinux

SYSMAP System.map

SYSMAP .tmp_System.map

OBJCOPY arch/arm/boot/Image

Kernel: arch/arm/boot/Image is ready

AS arch/arm/boot/compressed/head.o

LZO arch/arm/boot/compressed/piggy.lzo

/bin/sh: 1: lzop: not found

make[4]: *** [arch/arm/boot/compressed/piggy.lzo] Error 1

make[3]: *** [arch/arm/boot/compressed/vmlinux] Error 2

make[2]: *** [zImage] Error 2

make[1]: *** [sub-make] Error 2

make[1]: Leaving directory `/root/android/system/kernel/samsung/msm8660-common'

make: *** [TARGET_KERNEL_BINARIES] Error 2

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

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

Any ideas?
[Nexus 7 Android Development] sparksco:
You don't have lzop installed on your Linux box.
[Nexus 7 Android Development] apascual89:
That seems simple enough. Installed, rebooted and trying again. Thanks

Edit: thank you sparksco! After I installed lzop, the builds finished without issues.
[Nexus 7 Android Development] Rocky$1:
Deleted, since it is not the right thread for asking help... No dev's help provided here..
[Nexus 7 Android Development] joediver:
repo sync error

I haven't compiled in a week or two and now when I do a repo sync I get:

error: Exited sync due to gc errors

This happens after correctly fetching the first five or so projects.

Any help would be appreciated. Thanks.
[Nexus 7 Android Development] z1gackly:
This might help: https://groups.google.com/forum/?fromgroups=#!topic/repo-discuss/tnIWemm8M6k
[Nexus 7 Android Development] joed1ver:
Thanks z1gackly.

That seems to have done the trick.
[Nexus 7 Android Development] wilfredcool007:
how did u solve the followin error .. i dnt seem to find a solution for this problem in the link given above

error: Exited sync due to gc errors

PS : i'm using a build server so i cant install any new packages...
[Nexus 7 Android Development] apascual89:
Look a couple of posts above
[Nexus 7 Android Development] z1gackly:
That's going to make it difficult. I think you have to revert repo to something before the -c flags were added, if you can't update git to support them, but you might not be able to do that either?
[Nexus 7 Android Development] Seferi:
It's out of the subject but have you guys seen this? Ubuntu 12.04 on Nexus 7, native. It works pretty well with LXDE or XFCE...

https://wiki.ubuntu.com/Nexus7/Installation
[Nexus 7 Android Development] Noobla_Khan:
Threw it on last night...just to say I did. Way too small to deal with but hey...it's desktop Linux running on the 7 and that can't be a bad thing.
[Nexus 7 Android Development] sparksco:
Any practical uses for it?
[Nexus 7 Android Development] Nark.GA60:
Without MHL on the N7, there's not really much point.

It's a tech demonstration and a target for Canonical. They want 13.04 to run on the N7 without modification, so this is the first step in making the O/S smaller and less resource hungry.
[Nexus 7 Android Development] Seferi:
Did it write on the recovery partition or you were able to go back to your nandroid through clockwork recovery afterwards? Did you lose any data btw, does it wipe everything?
[Nexus 7 Android Development] NlBO:
Excellent guide added it to pocket for a winter project =) should be fun
[Nexus 7 Android Development] Noobla_Khan:
Recovery is left intact however everything else will be wiped so if you create a backup move it off your N7. To get android back on I fastboot flashed the official N7 image, cwm and then flashed my preferred rom. I didn't want to mess with moving a 1.2GB backup off then back onto my N7 through usb.

Sorry for off topic.
[Nexus 7 Android Development] apascual89:
Ok, I was trying to do my first cherry picks. I guess I did something wrong because now I get this. I already did: make clean and make clobber. When I do repo sync I get the following error:

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

res/values/arrays.xml: needs merge

res/values/strings.xml: needs merge

res/xml/language_settings.xml: needs merge

src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java: needs merge

error: you need to resolve your current index first

frameworks/base/: discarding 1 commits

error: frameworks/base/: ParanoidAndroid/android_frameworks_base checkout e9c093f8758b689a50b9c796e59a79654997574c

Any Ideas?

Edit: I resolved it by: "git reset --merge"

After that it finished the repo sync without errors.
[Nexus 7 Android Development] sparksco:
Just curious why are you asking about building paranoid android on the cm10 thread?
[Nexus 7 Android Development] apascual89:
My question was about cherrypicking in general. Did not mean anything by it. I resolved it myself and posted back what I found in case anyone could use it.

You, the OP and others have been very helpful in guiding me through the setup and building process, thank you. I should've searched more before posting the question.
[Nexus 7 Android Development] gabx:
I do agree it is indeed a very good idea for all of us to EDIT a post when you find the solution and NOT delete your post. It will certainly help other users experiencing same issue.
[Nexus 7 Android Development] sparksco:
Right I understand. Thing is paranoid uses a completely different framework and settings so cherry-picking from cm might not always work.
[Nexus 7 Android Development] apascual89:
OK, I had not noticed that the cherry pick was a two part patch. One of the went in frameworks/base and the other in packages/apps/Settings.

I first attempted to place them both in frameworks/base, that's what caused the errors. After reversing and placing in the correct places it built and applied the cherry pick!
[Nexus 7 Android Development] gabx:
To keep talking about cherry picking, can someone tell me where I can find status bar and Notification drawer in CM10 tree?

I build my own aosp ROM and would like to add these two features, and only these two ones, to my aosp build.

TY.
[Nexus 7 Android Development] sert00:
ok.redid all the build environment yesyerday night on mint,always used ubuntu before and after a bit of research i found many solutions to have it workings.cooked a baked rom for grouper how test and all gone well.now time to try cherrypicking something.never see this guide before,let'see if there's something usefull.
[Nexus 7 Android Development] z1gackly:
Could you explain a bit more about what you are trying to do? The status bar and notification drawer are present in the AOSP code and will be enabled by default for the Nexus 7. Are you building for a larger tablet device?
[Nexus 7 Android Development] apascual89:
Ok for some reason when I repo sync I get the following error:

Traceback (most recent call last):

File "/root/android/system/.repo/repo/main.py", line 408, in <module>

_Main(sys.argv[1:])

File "/root/android/system/.repo/repo/main.py", line 388, in _Main

result = repo._Run(argv) or 0

File "/root/android/system/.repo/repo/main.py", line 138, in _Run

result = cmd.Execute(copts, cargs)

File "/root/android/system/.repo/repo/subcmds/sync.py", line 547, in Execute

if mp.HasChanges:

File "/root/android/system/.repo/repo/project.py", line 2186, in HasChanges

elif self._revlist(not_rev(HEAD), revid):

File "/root/android/system/.repo/repo/project.py", line 1816, in _revlist

return self.work_git.rev_list(*a, **kw)

File "/root/android/system/.repo/repo/project.py", line 1961, in rev_list

p.stderr))

error.GitError: manifests rev-list ('^HEAD', '1e502a9baa0431422f68e9f9bbfe8bf05c84086c', '--'): fatal: bad revision '^HEAD'
[Nexus 7 Android Development] sparksco:
Probably because your repo syncing to paranoid android and not cm.
[Nexus 7 Android Development] apascual89:
Thanks for your input.
[Nexus 7 Android Development] apascual89:
Hi guys, is there any tutorial for building cm10 for a not yet supported device?

Thanks
[Nexus 7 Android Development] fattire:
Nope, but if you're going to do a port, start with a device/manufacturer/model directory patterned after another device that is architecturally similar. Then change the recovery.fstab and .mk files to match your device, along with links to your new device kernel... build the recovery image first (you will likely need to change the recovery ui c file so that it can find your power and volume buttons) and see if you can get it working. One you have a working recovery, now start tweaking the build, turning off nonessential stuff like sound or camera or whatever until you get it to boot... from there its a matter of supporting the various parts, one-by-one.

Its a fun, educational way to learn about android... give it a shot. Once you get started, others with the same device may jump in to help too.
[Nexus 7 Android Development] Brute.Force:
i want to build cm10 for the my ainol novo 7 tornados and elf2 tablet. Can i follow this same process or is it different?

I know this is stupid question but the ainol novo and nexus have different processor, ram, resolution and android version.

Thanks in advance
[Nexus 7 Android Development] gabx:
cherry pick from CM10 github

Hi all,

I build a vanilla AOSP from android source for my Nexus 7.

I would like to add 2 features from CM10 in my build tree : drawable and status bar from Settings. I am a litle lost when cherry picking, and would appreciate some help.

First, I guess I have to go in the CyanogenMod/android_packages_apps_Settings repo. In src / com / android / settings I find the drawable folder. For drawable, is it the only folder I need or do I have to add another ones from /res/ ?

Then, how about correctly fetch the needed folders and include them in my build tree? I guess I have to add these folders in my /packages/ app/ Settings, but how to add them correctly?

Then, do I have to modify some config files to tell make to take into account the new folders when building?

Last, I can not find Status bar in Cyanogenmod github.

Thany you for any hints.

Regards.
[Nexus 7 Android Development] apascual89:
OK so let's say for the note 2, lunch the galaxy s 3 folders and modify those?
[Nexus 7 Android Development] z1gackly:
See my previous reply. The status bar is not a CyanogenMod addition, and it will show up by default on the Nexus 7 when you build from AOSP code. You need to explain more about what you are trying to do, because it's not making sense. I also don't understand what you mean by "drawable".
[Nexus 7 Android Development] gabx:
I am talking about some fatures you find in Cyanogemod Settings. All these features (e.g battery status in %) are under Interface on Cyanogemod Settings. You have a submenu called System > Notification drawer that will let you to customize it.

I do not want ALL the Cyanogemod advanced Interface features, but only a few of them.

That's why I am trying to "pick" the right stuff from their github, and litle lost where to find them and how to fetch then merge with my build tree.

Allt his does make sense now for you? Maybe the term "cherry picking" is not appropiated in what I want to do: add some Cyanogenmod customized features in my build tree.
[Nexus 7 Android Development] z1gackly:
It makes more sense now than your previous posts :)

In some cases you will find single commits for individual features, but in some you will not as they have been added and tweaked over the course of time. In every case though, the settings are going to just be a way of activating code in other areas of the ROM. Settings are just a way for the users to change variables which control features elsewhere.

So to implement that functionality you have to pick through other ares of the code tree to find where and how those variables are used to control functionality and then you need to change your code to depend on them in the same way.

For instance, take a look at these two commits for the expanded desktop functionality:

https://github.com/CyanogenMod/andr...mmit/5a64970027b7f77ed667c22dd190bd656229f36c

https://github.com/CyanogenMod/andr...mmit/d81a494bb6c2461a5bf7d5f87e73c7527eefac44

The first commit is to Settings, and it adds menu items, support functions, and an XML overlay, to manipulate a variable which is used to control the availability of the expanded desktop functionality in the code changes in the second commit, which also adds that functionality.

In that case, you're lucky in that there are two clear commits which fit together neatly, so you can cherry pick them and include them in another ROM. That won't always happen.

However there is another issue in that you have to enable the power menu in the first place to be able to see that feature, and the power menu was enabled in a previous commit a lot earlier.

So it's rarely a trivial thing to do.
[Nexus 7 Android Development] fattire:
Well, when I say architecturally similar, yeah, I'm referring to the underlying platform used for the device. There are a few main "system on a chip" manufacturers-- texas instruments, qualcomm, nvidia, etc. Each have their own platform (Ti's OMAP, Nvidia's Tegra, etc.) So you should probably start with a device that shares the same platform and generation for that platform.

Looks like the Samsung Galaxy Note II is based on the Samsung Exynos 4412 Quad. And when I look at the Galaxy S3, I see that it uses the same thing :)

So yeah, if you can find a similar device, that's a good way to start. Another way is if someone else has created the device/manufacturer/model directory already for an older version (say from the manufacturer or from someone who had it running on an older version of Android), you can sometimes use it as a base and update it for the newer Android.

I don't know if I'm being insane here, but it looks likethere is already a Galaxy Note II forum in XDA, and I think I see CM10 builds already.
[Nexus 7 Android Development] fattire:
It may not be wise to pick random features from Cyanogenmod's tree to apply to stock Android unless you are pretty sure you know what you're doing. Not every commit to CM's github will be modular-- or standalone enough that you can just apply it to AOSP (regular Android) and have it work. Such commits, such as a change to the Settings UI may depend on other commits being made simultaneously in other places, such as a frameworks change to support the new Settings feature... It's also possible that any such commits will depend on some other Cyanogenmod-specific change that had been made previously.

If you know what you're doing, you probably can pick and choose which commits will add a feature you want, but.. why? The CM10 build doesn't really remove any functionality from stock AOSP (that I'm aware of, anyway). So you only get stuff by trying it... even if it's stuff you don't end up using.

On the other hand, if you're building CM10, you might want to try applying some of the experimental/unmerged features in review.cyanogenmod.com . you should be able to cherry-pick stuff from there fairly safely, as submissions are meant to be applied to the HEAD (current version) of the CM10 repositories.
[Nexus 7 Android Development] z1gackly:
You can also sometimes adapt stuff from other CM10 based ROMs, in a similar way to how I did with the Expanded Desktop feature from Paranoid Android, but it depends how far it's fallen from the tree.
[Nexus 7 Android Development] EnemyOfGlaDOS:
This looks extremely interesting and very noob friendly. I'm actually looking forward to sitting down and reading this. I have no c++ or java skills whatsoever lol but.. very interested in android and how it works. Been a flashing addict.. but would love to see if this is something I can pull off!
[Nexus 7 Android Development] apascual89:
No, you're not insane. I've been visiting those threads a lot lately :D. I was asking, because I was trying to build from the device tree that the dev set up for those builds. I have no experience building for a yet unsupported device, so it was a long process.

After a lot of trial and error, I had it building, but not booting. Eventually I got it to work and it booted!

Thanks again for taking the time to write up this guide.
[Nexus 7 Android Development] shinjielric:
When I compile a ROM the date doesent change. It stays at the original compile date.

For example I'll compile the ROM and it will be named cm-10-20121029-UNOFFICIAL-grouper.zip and wont change to the new date.

So if I compile a new rom now it will stay 20121029 and not 20121106.

Do I have to do a fresh compile if I want the date to stay current?
[Nexus 7 Android Development] AndDiSa:
Remove out/target/device/grouper/system/build.prop and compile again, then you should see the correct file name.
[Nexus 7 Android Development] shinjielric:
Thanks for the quick response. I'm compiling now, I'll edit this post when its done.
[Nexus 7 Android Development] z1gackly:
I build for two targets every day, so I put this line in my ~/.bashrc file:

alias cleantarget='rm out/target/product/grouper/system/build.prop ; rm out/target/product/wingray/system/build.prop'

Then before I build a fresh release, I can just type cleantarget and I know it will come out with the right date. Saves a few seconds.

This is another I use:

alias buildenv='cd ~/android/system ; . build/envsetup.sh'
[Nexus 7 Android Development] gee one:
How about make clean or make clobber? Are these too broad and increase the compile time?
[Nexus 7 Android Development] apascual89:
I believe those will erase everything from the out folder, so yes that will increase compile time.
[Nexus 7 Android Development] cdrom1028:
Well Im taking the Leap, thanks to your instructions I have built my first Linux dedicated Build / Lab box and I am in the middle of my first cyanogenmod repro sync! thanks for the guide :)

.
[Nexus 7 Android Development] gabx:
It is recommened to $make clean or $make mrproper. I do not like $ make clobber.

BUT it will not delete your build.prop, and you will still stay with your old building date. It is a known bug. So best is to manually remove it.
[Nexus 7 Android Development] fattire:
A new kernel branch hit the wires...

So yesterday I noticed that a new factory release branch was created for the grouper kernel-- android-tegra3-grouper-3.1-jb-mr1-fr. I have no idea how long they'd been there, but as a test, I decided to merge it into current kernel source (cm source is at mr0 now). It's a bit of a monster and had some clashes, but I think I worked it out.

The result is this megapatch (prettier version here) that unfortunately lost the commit info in the process, so it's not really suitable for merging as of right now, but might be good for a quick test to anyone who feels ballsy.

There's tons of new stuff in here I happened to notice including wireless changes, power changes, ril support, video changes, "user-space I/O driver support for HID subsystem", a new CAP1106 proximity sensor driver, networking changes, dock support (?) and more. You can see the huge list of files that changed at the top. The patch itself is 488K.

I've only just gotten it booting, and I can't say I did everything right. In fact, I probably screwed something up, so as always try this monster at your own risk. You may get an unbootable system or a system that is dangerous somehow. If your battery explodes, you lose data, your screen cracks, or you have any other negative experience, don't blame me.

Let me know if you notice anything though. I can confirm that Angry Birds Star Wars seems to work.
[Nexus 7 Android Development] sparksco:
Thanks good to know. It doesn't sound like it was a straight-up clean merge into the old kernel. I had this same type of issue when I merged busybox from the busybox website master branch into cm's busybox. I was able to resolve all the merge conflicts. Could you tell us how many files had merge conflicts and if it was a easy fix or not? I noticed the kernel source up last week but haven't really wanted to mess with it until we get the rom binaries to match the kernel ones. Thanks agian.
[Nexus 7 Android Development] fattire:
It wasn't a straight-up clean merge, mostly because of stuff previously included in CM. Minor other things. I don't remember how many files.. maybe like 10 or so? And of course, you have to update the defconfig file as well...

I've been using the result for about 3 days and it seems to work awesome-ly.
[Nexus 7 Android Development] sparksco:
Yeah that's why I was saying I'll just wait for the source so I can just pull the config from my tablet after installing the stock ota/rom. I don't trust the defconfigs that come in the source I'd rather just use the one Google provided by the ota's.
[Nexus 7 Android Development] sunny2303:
Guys.. If you follow the guide properly there's nothing that can stop you from building. Read all pages of tgis thread, it helps. Yes be patient, some stages demand time so be prepared. Keep a Google tool bar handy if u get errors ;)

At least that is what worked for me :)

Thanks a lot fattire....

Edit: