yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Android Development] z1gackly:
Yeah, that's it.

What I'm doing seems to work, and repo sync doesn't seem to break it.

I discovered how to make it work with trial and error, because as I said earlier the documentation is not at all helpful.

I'm not quite sure what rebase does yet. Why would I not want to merge?

Thanks for taking the time to type all that out. I will have a think about what advantages doing it your way confers, but I'm loth to mess up what I have because it's taken me all day to set up and gave me a headache!

Is changing the manifest in the way you describe likely to mean I lose work or mess up existing branches?
[Nexus 7 Android Development] fattire:
Rebasing, to the best of my understanding.

I totally understand..

All "rebase" does is allows you to "catch up" your version to the official version.... So in other words, let's say that here are Cyanogenmod's commits:

A->B->C->D->E->F

and you forked from them at "F" and started adding your own, which I'm gonna put in lowercase and in red to show that they are your changes:

A->B->C->D->E->F->a->b->c->d

So that means you did four changes after the official CM changes.

So time passes, and now you go back and see the official version and say "oh crap, they've done some more stuff!" In fact, now the official repository looks like this:

A->B->C->D->E->F->G->H->I->J

Now if you were to merge, you'd be combining/intermixing your stuff and the official stuff, and this would make it a bit harder to add your stuff back to the official stuff later. It might look something like this (I think):

A->B->C->D->E->F->a->b->c->d->G->H->I->J

There's a possibility that G and H and I and J might not even "fit" like they should because of changes you made in the middle. So you could end up having to change G, H, I, and/or J. Which you probably don't want to do, since they're "official." The merge may even interleave your changes with the official changes, which might mean "changing the changes" to get them to be compatible.

All "rebase" does (at least to my understanding) is finds the common point between your version and the official version, the point where they diverge... then it undoes your commits and continues the official version to the end, THEN it adds ("replays") your commits on "top" of the official version. So the final version looks like this after you've rebased:

A->B->C->D->E->F->G->H->I->J->a->b->c->d

Another way of thinking of it is that you've shoved your changes all the way to the end of the official version. If stuff doesn't apply properly, you have to make changes-- but this time it's to YOUR stuff, not retrofitting the official stuff to match your changes.

Here's another explanation that I guess isn't that different... And here's another. hopefully I'm not too far off in my explanation, and if I am maybe someone could correct me (and I'll post the correction above).

There's some rules about using this-- because it's undoing history (undoing your commits, adding official commits, then replaying your commits) you probably don't want to rebase when some of the stuff you've done has already been pushed somewhere else... if that makes sense.

Anyway, someone please correct any errors above. It's probably way oversimplified, but it's how I think about rebase so I could definitely learn here as well.

Cheers!
[Nexus 7 Android Development] z1gackly:
Thanks for that, I get it now. That's probably how I will go.

Do you think changing my local manifest in the way you suggest is going to knacker what I've already done? I don't think it should. Guess I can always stash a copy of my build tree and try it. Maybe a project for tomorrow.

Another question I have is that I added some conditional code in common.mk to exclude some live wallpapers and stuff if the build target is wingray, because of a limited system partition on that device, but it is still pulling that stuff in.

Where else could it be getting it? I did a make clean, and I can't find other references to it in any makefiles.

Here's the code I used:

ifeq ($(CM_BUILD),wingray)
# Bring in limited audio files for wingray
include frameworks/base/data/sounds/MinimalAudio.mk
# Include minimal CM audio files
include vendor/cm/config/cm_minimal_audio.mk
# Optional CM packages
PRODUCT_PACKAGES += \
LiveWallpapers \
LiveWallpapersPicker \
PhaseBeam
else
# Bring in all audio files
include frameworks/base/data/sounds/NewAudio.mk
# Bring in extra Ringtones
include frameworks/base/data/sounds/AudioPackageNewWave.mk
# Bring in all video files
$(call inherit-product, frameworks/base/data/videos/VideoPackage2.mk)
# Include CM audio files
include vendor/cm/config/cm_audio.mk
# Optional CM packages
PRODUCT_PACKAGES += \
HoloSpiralWallpaper \
MagicSmokeWallpapers \
NoiseField \
Galaxy4 \
LiveWallpapers \
LiveWallpapersPicker \
VisualizationWallpapers \
PhaseBeam
endif

It's still including those wallpapers and things in the build, but if I put an error stop in the else branch it doesn't stop, and if I put it in the wingray branch it does,so it seems to be going down the right branch but including the stuff from the wrong one.
[Nexus 7 Android Development] raptastics:
Just finished my first build thanks to the guide! Posting from the device now. Installed and running great! Thanks for all your work.
[Nexus 7 Android Development] iDavidStory:
I did a build on Mtn Lion and had to modify the build/core/Makefile.

This sed line was causing an error:

sed -i 's/ro.build.date.utc=.*/ro.build.date.utc=0/g' <filename>

Just added an extension for the -i to fix it:

sed -i .bak 's/ro.build.date.utc=.*/ro.build.date.utc=0/g' <filename>

The intention of the -i without an extension was to overwrite the file, no backup.

It just so happens the sed on Mtn Lion is expecting an extension, even though

the man page states it is optional.
[Nexus 7 Android Development] fattire:
Heads up, y'all-- 4.1.2 code is rolling out today so things may get a little bumpy I'd think as changes are pulled to cm's repos.
[Nexus 7 Android Development] sparksco:
Nice, guess everyone might want to hold off on repo syncing for awhile. Does this mean a new kernel as well?
[Nexus 7 Android Development] z1gackly:
Good to hear. Will there be some kind of indication given when it's all in?
[Nexus 7 Android Development] starskyrob:
So i'm building via SSH on a remote box.

Does anyone know how to pull proprietary blobs remotely? Or is there some way I can pull them locally and then upload them to the server?
[Nexus 7 Android Development] fattire:
Why not ssh to the remote box, then via the shell download the files from google to the remote box... then run the scripts.. same as if you'd do it on your own computer?

The files are here.
[Nexus 7 Android Development] starskyrob:
ah! now to figure out where they all go.

i can probably curl them into the proper folders. time to take a look at the extract-files.sh to see where they all go, eh?
[Nexus 7 Android Development] fattire:
There is a script that will put them all in vendor/* off the main repo...
[Nexus 7 Android Development] starskyrob:
Thanks, I'll look into that!
[Nexus 7 Android Development] fattire:
Updating the grouper device folder...

In case anyone cares, I took Google's device changes to 4.1.2_r1 and customized a series of six patches for cm10's device to catch up.

I have not yet pushed these upstream to the CM10 repository as Google has not provided the accompanying kernel source yet, and without them... trouble. See below.

.

You'd use git am to apply each of them (in their own file) to device/asus/grouper

NOTE THAT UNTIL WE GET THE KERNEL CHANGES FROM GOOGLE, THE 4.1.2 ADDITION OF "discard" TO fstab.grouper WILL BREAK boot.img AND YOU WILL NOT BE ABLE TO BOOT. IF THIS HAPPENS, REFLASH A KNOWN GOOD .ZIP FROM RECOVERY (OR USE GOOGLE'S PREBUILT KERNEL).

Additionally I will update the fingerprint in cm.mk but I didn't include that in the above changes.

Try at your own risk, please. If you find an issue, please post here.
[Nexus 7 Android Development] fattire:
Another update--

1/2 hour ago, JBQ posted new binary blobs. I don't know what, if anything, is different.

We're still waiting for kernel source, but apparently that's coming too.
[Nexus 7 Android Development] sparksco:
Kernel source is out, merge away fattire :)

https://android.googlesource.com/kernel/tegra/+/android-tegra3-grouper-3.1-jb-mr0
[Nexus 7 Android Development] fattire:
Thx.. looks like this is the culprit for what was needed to startup... but I'll know for sure shortly.
[Nexus 7 Android Development] sparksco:
Just a fyi I did a pull/merge of the kernel and it built just fine. Everything is running smooth with the new kernel. I also merged in the device tree changes. Looks like they moved most of the things in BoardConfig.mk to BoardConfigCommon.mk and device.mk to device-common.mk. I also updated my fingerprint in cm.mk file. So far so good everything builds.
[Nexus 7 Android Development] fattire:
Indeedy.

Yup... did all the above and it's all good. Just working on getting it all upstream. Some technical issues with gerrit and my ability to push AOSP stuff. Will wait till tomorrow I guess.

Works with new props great as well.. The device stuff is minor, really. Looks like the major stuff is the kernel work, which merges in perfectly. The device stuff I posted above needed some finessing given the cm changes.
[Nexus 7 Android Development] Fallon9111:
Updating...

When I build (and have done several syncs) the output zip is still called cm-10-20120920-UNOFFICIAL-grouper.zip even though that date was ages ago.

When I push to device, it installs android 4.1.1 not 4.1.2

Why is this? What code do I do to update my build to the latest CM source

doing repo sync -j(X) does not help this problem. Neither does lunch or brunch :L

also, how do I go about including mods like "Circle battery mod" and "Centre Clock status bar"

I know that it involves using git, could someone help get me started by posting the code of what they do, something like

git commit http://git.cm.grouper.mod/circle battery

I know ^^^ isn't correct, so what is??

Thanks in advance :)
[Nexus 7 Android Development] Fallon9111:
Possible fix i have found now :L

I did

java version && javac version

they had reverted to java 8??

I have reinstalled java 1.6

I think reboot causes java to revert. Any ideas on this??

For now, I've just written a script and put it into bash_aliases (lazy I know) that updates the java.

Any ideas for permanent java version

Also on Git commits + stuff as per previous post :D

edit: XD it worked (downdating java)
[Nexus 7 Android Development] sparksco:
For some reason out/target/product/grouper/system/build.prop doesn't get updated on re-builds. Since the .zip is named by reading the build.prop you'll need to manually delete it or use a build script that will automatically delete it every time you build. I think this was discussed some pages back if you do a thread search.

As far as cherry-picks go you just cd to the repo that your cherry-pick'ing to. Some mods require two parts and most of the time the author will label them as (1/2) and (2/2). One that goes in frameworks/base repo and one that goes in packages/apps/Settings.

$ cd frameworks/base

or

$ cd packages/apps/Settings

Then select the "cherry-pick" option on the gerrit change and paste the code into terminal
[Nexus 7 Android Development] sparksco:
I was just thinking about the fstab.grouper. Since it's a new one do we need new recoveries now to flash the new roms once the changes get merged into cm?
[Nexus 7 Android Development] fattire:
Not 100% sure, but I don't think so for current devices. There is a separate recovery.fstab in device that hasn't changed, and I would think the existing recoveries should work.

That said, if you have the newer hardware you'll probably want to use a recovery that has the newer kernel. Which is why I'm working to get those kernel changes in.

Update: Kernel changes pushed. Device commits I posted from 3 days back after lunch.
[Nexus 7 Android Development] Fallon9111:
Damn, messed up my repository

i have been adding mods and (I think a binary fix to help wifi) has messed up my wifi so that the on/off setting is greyed out and wifi doesn't work. So I clean installed M2 and then re(clean)installed my CM but its still broken :L

How can I clean my repository so that it replaces the system folder (preferably just replace system folder)

Should I just nuke it? Seems like a waste of time tho :L
[Nexus 7 Android Development] z1gackly:
Ok, I am hitting a brick wall here.

I downloaded and unpacked these to replace my existing vendor files (removed the existing ones first):

Then I did a repo sync to include this:

I can see your changes in my code base, and on all my master branches everything seems to be up to date with CM github.

My ROM builds, and everything else seems to work, but wifi will not start.

Any ideas?

EDIT: basically similar problem to the poster above. At least it's not just me ;)
[Nexus 7 Android Development] fattire:
Any errors from logcat? (pastebin or gist.github.com please). The device changes are in now too.
[Nexus 7 Android Development] z1gackly:
Yeah, I think there is some stuff in here:

http://pastebin.com/zj8SjcLJ

Particularly on and after line 1167.
[Nexus 7 Android Development] sparksco:
No issues with wifi here :confused:
[Nexus 7 Android Development] z1gackly:
After I posted that pastebin, I did a repo sync and a make clean, then ran a new build which just finished, and mine now works!

I don't know if it was the repo sync or the clean build that fixed it. Just glad to be up and running again.
[Nexus 7 Android Development] Seferi:
I'm keep getting these errors when i try to sync:

fatal: Not a git repository: '/home/user/.repo/projects/external/mdnsresponder.git'

fatal: Not a git repository: '/home/user/.repo/projects/external/mesa3d.git'

fatal: Not a git repository: '/home/user/.repo/projects/external/markdown.git'

I tried with -j3 or just repo sync.. No luck.. Does anybody have an idea what's wrong?
[Nexus 7 Android Development] sparksco:
As far as I know those are not real CyanogenMod repo projects. Are you sure you have the right repo manifests?
[Nexus 7 Android Development] Seferi:
Yes, i followed the guide step by step. The first sync was interrupted by a system freeze.. Now I'm getting these errors whenever i try to sync. I tried going few steps back and did them again but no luck...
[Nexus 7 Android Development] z1gackly:
Those look like AOSP repositories, or possibly Team EOS, but they aren't used in CM AFAIK. Did you have an existing source tree before you started with CM?
[Nexus 7 Android Development] Fallon9111:
Code

What command do I do to make clean. This sounds easier than nuking the folder and setting up repos again. ATM I can't use my builds as WIFI is very important to me (and most people witha nexus 7 lol)

Also, can someone give me a few starting places for finding mods. Ive searched the net a bit and can't find how to include CM add-ons. In particular I'm looking for Circle battery mod, centre clock (in status bar) and changing the nav bar colour (which changes the button colour, like in aokp)

:laugh:
[Nexus 7 Android Development] z1gackly:
Just move to the root of your source tree (usually ~/android/system) and enter "make clean". It will remove the entire out directory and next time you build it will start from the beginning again.
[Nexus 7 Android Development] sparksco:
Just clean the .repo and repo init again

cd ~/android/system

rm -rf .repo/projects/external/mdnsresponder.git .repo/projects/external/mesa3d.git .repo/projects/external/markdown.git .repo/manifests .repo/manifests.git .repo/manifest.xml .repo/repo

repo init -u ect ect ect

repo sync

This will not delete your sources it will just remove the bad manifest and bad repos.
[Nexus 7 Android Development] Seferi:
Thanks mate, i'm trying it now, will report back when the sync completed.

EDIT: removing the bad manifests and repos solved the problem.

Thanks a bunch..
[Nexus 7 Android Development] fattire:
No one may care but..

Another binary showed up for n7.
[Nexus 7 Android Development] sparksco:
So what one has changed nxp? That's the one that would have the NFC change in it and according to JBQ that's the only thing that has changed. Just don't want to waste time extracting every single one again thanks.
[Nexus 7 Android Development] fattire:
Yeah. I did a diff and it's the same binary as from before. Just will require a change to the setup-makefiles.sh script to make sure it gets pulled to the right now-standard place. But shouldn't affect the build process or result in any way that matters...
[Nexus 7 Android Development] z1gackly:
When I build from the latest source (repo synced within the last hour), the accelerometer does not function, so there is no auto-rotation.

Checking the 20121012 nightly, it works fine.

So I'm trying to work out what's different between the nightly and my build.

I am guessing the accelerometer is with the invensense binaries? They are definitely getting installed in system/lib in my ROM, so I'm a bit stuck.
[Nexus 7 Android Development] sparksco:
Having the same prob here, did you ever get it figured out?
[Nexus 7 Android Development] z1gackly:
No, I took a bit of a screen break, and now I'm testing something else, but my next idea was to look in the 20121012 nightly and see if there's anything different about where the binaries are landing. I should hopefully get started on that soon if my test works.
[Nexus 7 Android Development] sparksco:
Sounds good. I'm testing some experimental stuff right now as well then I'll check into it, too much stuff to do lol!
[Nexus 7 Android Development] z1gackly:
I now know what the problem is, but not how to fix it in the build.

The file sensors.grouper.so was missing from system/lib/hw ... manually adding it fixes the auto-rotation. No idea what's missing to build it in though.

I'll do some more digging later.
[Nexus 7 Android Development] sparksco:
I think I have a quick fix for this but it won't fix it in the extract-files.sh

open up the file vendor/asus/grouper/device-partial.mk

Change

PRODUCT_PACKAGES := \
btmacreader \
camera.tegra3 \
glgps \
libsensors.lightsensor \
libdrmwvmplugin \
libwvm

To

PRODUCT_PACKAGES := \
btmacreader \
camera.tegra3 \
glgps \
libsensors.lightsensor \
libdrmwvmplugin \
libwvm \
sensors.grouper

So all your doing is adding sensors.grouper at the end
[Nexus 7 Android Development] z1gackly:
There was also some other stuff missing that I added the first time, and when I went back and just added that single file, the auto-rotate isn't back on. I'll post a list shortly.
[Nexus 7 Android Development] sparksco:
Yeah sorry I had to edit my post. I checked the other vendors and asus/device-partitial.mk was the only thing that was missing any of the binaries from getting targeted.

If it's still not working might have to change asus/proprietary/Android.mk in the senors.grouper.so part from

$(TARGET_OUT_SHARED_LIBRARIES)/hw

To

$(TARGET_OUT)lib/hw

That should fix it from not getting installed to the rom in the right place.
[Nexus 7 Android Development] z1gackly:
We also need to add:

system/lib/sensors.lightsensor.so

system/lib/hw/camera.tegra3.so

system/lib/hw/keystore.grouper.so

As well as the first file I mentioned.

Just going to test the ROM with those manually added, then I will test your build changes.
[Nexus 7 Android Development] sparksco:
No camera.tegra3.so and sensors.lightsensor.so are already there: https://github.com/CyanogenMod/andr...1d6eb320e8fa01f0109f3436b2/setup-makefiles.sh

camera.tegra line 118 and sensors.lightsensor.so line 121

keystore.grouper.so was removed by google because it's not really needed for anything.

Sync your device tree with cm's and run the extract-files.sh and those other two will be there.
[Nexus 7 Android Development] z1gackly:
Yeah, that's changed since I did my last repo sync about 20 hours ago.

Anyway adding all of them to my ROM fixes the auto-rotation. I'll resync now, add your suggested changes and do a clean build, and see what comes out by the time I wake up tomorrow.
[Nexus 7 Android Development] sparksco:
I did the first fix only and sensors.grouper.so is there now. I don't have my vendors set up exactly like cm does since mine are from Google's extraction scripts but it is similar.
[Nexus 7 Android Development] z1gackly:
I can see your setup is different ... I don't even have this file ;)

I'll try to work out what changes to make for myself. Cheers.
[Nexus 7 Android Development] sparksco:
Why don't you have device-partial.mk?

https://github.com/CyanogenMod/andr...1d6eb320e8fa01f0109f3436b2/setup-makefiles.sh

Line 46 it's clearly there...

After syncing as I said you need to run the extract-files.sh again...
[Nexus 7 Android Development] z1gackly:
I never ran extract-files.sh in the first place, because I got the binaries from google. I also missed where you said that. This may be what's gone wrong in my build.

I just ran setup-makefiles.sh though, and it's created device-partial.mk now, so I should be good to go. Cheers for your help.
[Nexus 7 Android Development] Noobla_Khan:
Scrubbed my cm repo ealier today and started fresh, the extract script is not pulling keystore.grouper.so which it thinks it needs, everything else seems ok. Manually added it to proprietary and everything seems to be going well for the moment.
[Nexus 7 Android Development] sparksco:
What is keystore needed for? I have rotation working I just flashed a fresh build and I don't have it installed.
[Nexus 7 Android Development] Seferi:
Hi, my repos are synced without a problem, i'm trying to build but it takes only 15 min. It doesn't give me any errors, but i know its supposed to take much longer to build and i also can't find the zip file in the out directory... Here are a few lines from the end of the terminal output i get:

external/bluetooth/bluez/audio/android_audio_hw.c: In function 'adev_open_output_stream':

external/bluetooth/bluez/audio/android_audio_hw.c:644:35: warning: assignment from incompatible pointer type [enabled by default]

external/bluetooth/bluez/audio/liba2dp.c: In function 'a2dp_write':

external/bluetooth/bluez/audio/liba2dp.c:1210:6: warning: passing argument 6 of 'sbc_encode' from incompatible pointer type [enabled by default]

external/bluetooth/bluez/audio/../sbc/sbc.h:94:9: note: expected 'ssize_t *' but argument is of type 'unsigned int *'

target thumb C: audio.a2dp.default <= external/bluetooth/bluez/audio/ipc.c

target thumb C: audio.a2dp.default <= external/bluetooth/bluez/audio/../sbc/sbc_primitives.c

target thumb C: audio.a2dp.default <= external/bluetooth/bluez/audio/../sbc/sbc_primitives_neon.c

target thumb C: audio.a2dp.default <= external/bluetooth/bluez/audio/../sbc/sbc_primitives_armv6.c

target thumb C: audio.primary.grouper <= device/asus/grouper/audio/audio_hw.c

target thumb C: audio.primary.grouper <= device/asus/grouper/audio/audio_route.c

target thumb C++: audio_policy.default <= hardware/libhardware_legacy/audio/AudioPolicyManagerDefault.cpp

target StaticLib: libaudiopolicy_legacy (/home/berker/android/system/out/target/product/grouper/obj/STATIC_LIBRARIES/libaudiopolicy_legacy_intermediates/libaudiopolicy_legacy.a)

make: *** No rule to make target `vendor/asus/grouper/proprietary/keystore.grouper.so', needed by `/home/berker/android/system/out/target/product/grouper/obj/lib/keystore.grouper.so'. Stop.

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

target thumb C++: keystore.default <= system/security/softkeymaster/keymaster_openssl.cpp
[Nexus 7 Android Development] Noobla_Khan:
Don't know...my build process stops without it.

---------- Post added at 03:28 PM ---------- Previous post was at 03:26 PM ----------

Had the same...had to add keystore.grouper.so to vendor/asus/grouper/proprietary/ manually to get it to build.
[Nexus 7 Android Development] Seferi:
How can i add that? should i just create an empty file in vendor/asus/grouper/proprietary/ and name itkeystore.grouper.so ?