yashsingh1/xdaforums huggingface dataset:
[Nexus 6  General] Xileforce:
ATM I'm giving the VM 3gb. I have 8 installed
[Nexus 6  General] EmptyGODFATHER:
I would up the ram, I had 4 on my vps and had to up it to 8 in order to build properly, the errors I got with 4 gb are almost identical to yours. I think Google recommends 16 gb but I build without issue with 8.
[Nexus 6  General] Scott:
To this I would add that you should also cut back on the number of work threads.

I know that google recomends 2 to 4 per phsysical core but I would try build with "-j4"
[Nexus 6  General] Xileforce:
Oh OK I'll give that a shot. But is there a way to revert the changes I've made to the files in case I screw them up? I figured deleting the changed files and resyncing would fix it but that was a no go
[Nexus 6  General] Scott:
No but you can pick them file by file of git.com. Ive had to do that before.
[Nexus 6  General] garyd9:
Go to the directory you made changes in, and then:

git status

That will show you what you might have changed, AND give you a hint on how to revert the changes.

(git checkout -- filename_to_revert)

For more on this, and many other ways on how to (ab)use git, check this link: http://git-scm.com/book/en/v2/Getting-Started-About-Version-Control

Edit: From the link above, here's the chapter on "undoing things": http://git-scm.com/book/en/v2/Git-Basics-Undoing-Things
[Nexus 6  General] Scott:
But the source was downloading using Repo, would that still be the same function.

AS you can see its blind leading the blind on this, lol
[Nexus 6  General] garyd9:
Almost everything in AOSP is from git. "repo" just wraps it. Just be sure your in the correct directory when running git. (You can try "git status" to see if the files in the cwd are controlled by git.)
[Nexus 6  General] Scott:
Gotcha! That goods info I did not know.

I would end up going to the git repo and download what I knew I broke. Now I got a revert.

Do you know much about using overlays? Do you know of any resources that would assist in teaching how to use them? Thats the only thing I struggle with.
[Nexus 6  General] Scott:
Someone had asked earlier about where the sounds are located...

They are here

"/home/{USER}/AOSP/frameworks/base/data/sounds"

To make the edits to use the sounds of choice you should check out [MENTION=3667193]GROGG88[/MENTION]'s commit list here: http://xdaforums.com/showthread.php?p=56869492#post56869492

Check under commit list and you will be able to see how he added the Google Lolli Sounds.
[Nexus 6  General] GROGG88:
I've edited AllAudio.mk to include the audio files I want. I also edited generate-all-audio.sh so that it will not overwrite AllAudio.mk in case something calls on it.
[Nexus 6  General] Scott:
Thanks dude! Someone asked so I figured I would point them to the work of the Guru!
[Nexus 6  General] Scott:
Has anyone been building with just a minor edit over the last build and all cache still in place then said... Why the hell is this taking so long?

Then realized you are building for the wrong device? :crying:

30 minutes of my life I will never get back!
[Nexus 6  General] garyd9:
Know much? Not really. It's one of those things I figure out as I go along (each time I need to.)

Take care

Gary
[Nexus 6  General] Scott:
Fair enough!

I will get to Google'ing!

Appreciate the help you have given so far!
[Nexus 6  General] nottoosmart:
A few things i noticed with this is that Sprint does not connect for data and I cant get the carrier settings to work. I installed the SprintDM apk from stock and that is supposed to allow me to grab the prl as well as do the device activation. I need the setup to do this and cant figure out how. Also, would like the add the SprintDM to the build process. Any idea how to add this in so that it gets built with it instead of me having to drop the file into the zip afterwards. Also, I would like to remove some of the stock apps like Email, Music, and Search from the build process also. I figure I can work the GAPPS I want into the build same as I need to do to get the SprintDM into it.

Thanks in advance for this great guide. You are the best.
[Nexus 6  General] Xileforce:
It worked! I just had to run make installclean and then make clobber and after that it compiled in 1 hour and 52 mins! Does anyone happen to know where I add the compilation flags to?
[Nexus 6  General] Scott:
For the SprintDM you could hook it into a Vendor folder pretty easy. What I mean by that is that Vendor folders have make files that direct which files go where. For example: in /home/scott/AOSP/vendor/moto/shamu is a file called device-partial.mk. If you look at that file it tells you what Moto propriatary files are being used and where they are placed. You could cheat the system by putting you sprint apk in the proprietary folder then add the entry into the mk file.

Thats the down and dirty way. The recommend way would be to create your own vendor folder and add that into the main make config.

Hope this makes sense / helps!
[Nexus 6  General] Scott:
Good job! Feels good doesnt it!

Im glad I have my PC it takes 40 minutes or so to build :p

What compilation flags are you referring to?
[Nexus 6  General] Scott:
Hey guys, can I get a few people to rate the thread 5 stars. Someone is going around in the Nexus 6 forums rating my threads 1 start. We call them trolls :D

Thanks for your help! :angel:
[Nexus 6  General] Xileforce:
Referring to flags such as -O3 etc. also 5 stars! and it feels great! Attempting to compile it with sabermod toolchain now :D
[Nexus 6  General] Scott:
Gotcha. I'm not that advanced yet. Seems like you have jumped ahead of me :p

Im still a newb at AOSP but made this thread to give info easily for those that want to start.

Thanks for the rating and let me know how the sabermod toolchain works out. I never set anything other than AOSP chain.

Also, why did you choose sabermod if you dont mind sharing?
[Nexus 6  General] Xileforce:
Here is a great tut! Makes it super easy even for a noob such as myself! http://xdaforums.com/showthread.php?t=2770606 I used sabermod over linaro only because I was having issues download the sources he linked in that thread so I used another source which didn't have linaro for GCC 4.8. Not really sure which ones better tbh. Probably similar to Xbox vs PlayStation or android vs iOS. Everyone will have a preference. Everything I've used compiled with sabermod flies though, like liquid smooth. Either compiler is supposedly a huge step up over the stock GCC 4.8.
[Nexus 6  General] Scott:
Wow we got some serious trolls in here. How can you rate a thread 1 star that describes step by step how to build your own ROM?

Ughhh... So many hateful and jealous people on XDA its so sad :crying:
[Nexus 6  General] Xileforce:
No idea. Bunch of losers I guess....idk how you can hate on a tutorial thread with a super helpful Dev with 56k+ thanks lol.
[Nexus 6  General] prdog1:
Nothing new and not surprised. May have to try this for N9 until I get my hands on N6. Good 5* tut my friend. :good::cool:
[Nexus 6  General] garyd9:
Wow. I'm tempted to rate the thread with only 1 star. Not because I think it's a bad thread (obviously based on previous comments), but because I _like_ being described as a hateful person. In fact, if I remember correctly, wasn't that one of the requirements for the RD tag?

Oh - to keep it on topic... There are certain "shortcuts" you can use once you've done your first build to only build specific targets within AOSP. I don't know all of them, but if you want to only build a certain package app within the AOSP, you can often just make that as a target. For example, assuming your in the root of the source tree (./aosp) and have already run envsetup.sh and lunch, you can do:

make -j4 Gallery2 // make only Gallery2.apk and perhaps direct dependencies.

That's a huge time saver when your working on only a specific module.

Take care

Gary
[Nexus 6  General] Scott:
Ahahahaha, Nice!
[Nexus 6  General] prdog1:
Lot easier to make RC or RD than make Scott's list. :rolleyes::p:cool:
[Nexus 6  General] Scott:
Updated up to point to new 5.0.2 Repo.

Only change made :)

Enjoy!
[Nexus 6  General] Xileforce:
OK so I've made some changes already to my 5.0.1 build. To update that to 5.0.2 would I initiate the new branch in the same directory and then sync? Would this wipe out all the changes I've made?
[Nexus 6  General] Scott:
yes, re init the rep and that the files you changed dont get overwrote.

you can also youe the reo diff command before and after to see if the got changed.
[Nexus 6  General] Xileforce:
this is what is says to me

CONFLICT (content): Merge conflict in core/java/android/widget/AbsListView.java

Recorded preimage for 'core/java/android/widget/AbsListView.java'

Failed to merge in the changes.

Patch failed at 0003 Don't unnecessarily set LayoutParams on children

The copy of the patch that failed is found in:

/home/ryan/Onyx/frameworks/base/.git/rebase-apply/patch

When you have resolved this problem, run "git rebase --continue".

If you prefer to skip this patch, run "git rebase --skip" instead.

To check out the original branch and stop rebasing, run "git rebase --abort".

I aborted that but when i try and compile now I get this error

make: *** No rule to make target 'out/target/product/shamu/obj/STATIC_LIBRARIES/libsigchain_intermediates/export_includes', needed by 'out/target/product/shamu/obj/EXECUTABLES/app_process_intermediates/import_includes'. Stop.

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

Notice file: frameworks/base/cmds/am/NOTICE -- out/target/product/shamu/obj/NOTICE_FILES/src//system/bin/am.txt

#### make failed to build some targets (01:44 (mm:ss)) ####
[Nexus 6  General] Scott:
Build it again but at a lower thread worker.

I get similiar errors when build with 32 works. I drop back to 16 and I am fine.
[Nexus 6  General] Xileforce:
Tried that. Even tried going through to each section and doing git reset --hard aosp/master to no avail. Ended up re initiating the 5.0.1 repo in my root folder and resyncing. Worked like a charm. Is 5.0.2 compatible with shamu yet? I thought it was only nexus 7 currently. I've seen people merge in individual changes from it though.
[Nexus 6  General] Scott:
I sync'ed the entire 5.0.2 Repo, and built using the 5.0.1 binaries and it worked well for me.
[Nexus 6  General] nottoosmart:
Tethering

Anyone know the file and edit to disable the check for tethering provisioning?
[Nexus 6  General] Xileforce:
Device/moto/shamu/device.mk add:

# Allow carrier tethering

PRODUCT_PROPERTY_OVERRIDES += \

Net.tethering.noprovisioning=true
[Nexus 6  General] nottoosmart:
Thanks, im building this in now and will see how it works.
[Nexus 6  General] jermaine151:
If you guys have a Mac and want to try this, please look at my guide on how I boot Linux on my Macbook Pro, from an external USB 3.0 enclosure with a 256GB SSD installed: http://xdaforums.com/android/software/guide-dual-boot-mac-os-x-yosemite-t2981166
[Nexus 6  General] Scott:
Hey thats pretty good. Thanks for sharing!
[Nexus 6  General] jermaine151:
You're welcome and thank you!
[Nexus 6  General] nottoosmart:
OK, I just had a chance to test this and it did not seem to work. I still cannot enable tethering. The "Tethering & portable hotspot" option is still grayed out. Any ideas?

Edit:

Ok this worked. Just as in standard Linux, case sensitive.......

had to change to : net.tethering.noprovisioning=true
[Nexus 6  General] Xileforce:
:P I cherry picked that from somewhere. Thanks for the heads up! Imma have to fix that Now xD
[Nexus 6  General] Scott:
Happy Holidays!
[Nexus 6  General] abnormalreply:
find: `src': No such file or directory

Thanks for the guide! I just started building, but when the build starts I notice this message: "find: `src': No such file or directory" (see screenshot.) The build continues seemingly without issue though. Is this something I should be concerned about?
[Nexus 6  General] Scott:
No, it will complete. You could always take a look at that make file and see what is missing. I never thought of doing that. Its probably missing all the fixes for the browser and SMS app, lol
[Nexus 6  General] akellar:
Perfectly normal. Been doing that since at least kk and maybe ics.
[Nexus 6  General] janjan:
I downloaded stock ROM for nexus 6, extracted the .img and successfully odexed ( system > app> framework and private-app). But now I need to flash it. Therefore I need to make a system.new.dat, system.patch.dat and system.transfer.list. In other words just want to make a flashable zip. Is there a way to make a flashable file or system.new.dat, system.patch.dat and syatem.transfer.list..Thanks.
[Nexus 6  General] adrman:
[MENTION=426561]scrosler[/MENTION] Thanks for posting this. Yesterday I built successfully for the first time. I've started to work my way through the changes you made in post #2 and have a couple of questions though. Everything was clear in project build/, but I'm having difficulties locating the file to be edited for project frameworks/base/. Also, for project/system/core/, should the line " seclabel u:r:install_recovery:s0" just be commented out, totally deleted or does it matter? Thanks for helping out this noob.
[Nexus 6  General] Scott:
As far as the first part, just keep lookin' you will find it. Its in multiple recursive directories of the same name.

As far as the install recovery commenting it out should be enough. You could delete it to be safe.
[Nexus 6  General] janjan:
Thanks for posting this quide scrosler. I also build successfully. But now having difficulties to find the right file to edit. After flashing my build it overwrite the twrp recovery with stock one. I have looked your quide, about editing the build to make it useable. But not succeed to locating the file to be edited. Thanks for helping out.

---------- Post added at 03:06 PM ---------- Previous post was at 03:03 PM ----------

Did you find a solution for not overwriting the twrp recovery after flashing? Thanks
[Nexus 6  General] Scott:
The name of the file is in the second post to edit.

Its int eh build folder 2 or 3 sublevels deep called "ota_from_target_files"

Follow the difference in post #2 and you will be good!
[Nexus 6  General] janjan:
Thanks ..:thumbup:
[Nexus 6  General] Scott:
Just in case... I threw you a bone...

I have attached a copy of the "ota_from_target_files" as it is modified in this guide in post #2 :D
[Nexus 6  General] janjan:
Thanks. It seems YouTube and some times audio is not working proper in aosp 5.02. No fix yet. Thanks
[Nexus 6  General] nottoosmart:
Just wondering if anyone has figured out how to change the icons. I love the default icons included with google's version for the phone and such. Just need to figure out how to replace them with the ones from the default apk or should I just build and replace the apk in the zip instead?
[Nexus 6  General] Milly7:
You first need to get the images from the apks that you want the icons from. Then in your buold directory navigate to packages/apps and find the apps you want to change the images in.
[Nexus 6  General] Scott:
Oh snapp, I missed this. Thanks Milly7!
[Nexus 6  General] nottoosmart:
Thanks ill start looking at it.
[Nexus 6  General] nottoosmart:
Just started diving more into this and had to reset my build folder. GROGG88's AOSP Commit List is no longer shows his edits. does anyone know how i can merge his commits into my build folder so when i build it has his changes?
[Nexus 6  General] Scott:
Yep, follow his build instuctions in his post. You will actually sink his repo of commits over top of stock AOSP.

It creates a real nice ROM. I was thinking about updating my AOSP ROM with all of the compiled commits.
[Nexus 6  General] nottoosmart:
It doesn't list Shamu as a device in the build section.
[Nexus 6  General] Scott:
Right, thats only because he has the kernel auto compile instead of using the prebuilt on the other nexus devices.

There fore you dont need to worry about his make scripts.

After you git clone his repo then sync you would do the normal build processes outlined in this guide.
[Nexus 6  General] nottoosmart:
So i still need to make the Shamu device specific edits here?
[Nexus 6  General] Scott:
The only thing that did not work for my is Screen Recorder. Others having working on Shamu. Follow the last couple posts of that entire thread.
[Nexus 6  General] bass0324:
Hi scrosler,

I just used this tutorial to start building my own ROM but I am having issues with YouTube playback, have you ever had this issue before?
[Nexus 6  General] Scott:
Yes it deals with DRM.

If you diff the AOSP ROM you built and look at the stock google ROM you should be able to see the missing files.

[MENTION=3667193]GROGG88[/MENTION] may be able to tell you off the top of his head...
[Nexus 6  General] allenjthomsen:
[MENTION=426561]scrosler[/MENTION] would you be willing to help me setup aosp for note 4 im stuck on repo syncing and it gives me alot of errors if you can would be greatly apprecuated hangouts me please ajthomsen28@gmail.com
[Nexus 6  General] bass0324:
I think I got it. I did more research and it seems it has to do with the vendor folder and I think you said that in your pure aosp thread. If I use githib.com/TheMuppets/proprietary_vendor_motorola/shamu/proprietary/vendor as my vendor folder in my manifest, that should pull in all necessary files I need I believe, let me know if that seems right
[Nexus 6  General] GROGG88:
I don't own the device, but I did make a vendor package with ALL missing files included. My tester said it didn't work with play movies. I would have to defer questioning to [MENTION=4854133]bajasur[/MENTION] as to whether or not he figured it out.
[Nexus 6  General] Scott:
That may work, I have not tried it.
[Nexus 6  General] Scott:
Guide Updated​

1/17/2015

Added ccache instructions

Listed changes for AOSP Browser to not F/C on settings
[Nexus 6  General] Scott:
Guide Updated​

1/19/2015

1/19/15 - Build 5 - Fixed Youtube, Net flix DRM play back issue. Thanks to [MENTION=1050103]sykopompos[/MENTION] for pointing me to [MENTION=4238916]ayysir[/MENTION] git hub for the fix by [MENTION=4395895]BeansTown106[/MENTION]
[Nexus 6  General] Milly7:
Did this fix the issues without the additional vendor files? The reason I ask is because I do not have these commits, but have incorporated the missing vendor blobs and I haven't had any issues with Netflix or YouTube at all.
[Nexus 6  General] Swanseatom:
Hey all been following the guide in the OP and not sure if I've gone wrong. I've included a screen shot of the folder after the build finished running. Should it look like this? Do I now make a flashable zip?
[Nexus 6  General] Milly7:
What command did you use to build? If you use make otapackage -j8 (where the number after j is the number of threads you have) you should get a flashable zip in your out folder. The zip should say ota in the name of it.
[Nexus 6  General] Swanseatom:
I'm sure i did use make otapackage -j8, I think the problem is something crashed.

I'm now stuck trying to put the fix for youtube and netflix in.

I assume I have to cherry pick the commit that is linked? I am just a bit unsure what to do with it.

Regards,
[Nexus 6  General] Scott:
Wow, that is wierd. I had to make that commit and I am using the posted blobs from the Nexus page.

Can you share your commits for your vendor blob? I would like to look at it.

I put make -j8 otapackage... But I dont think that is the issue. It could be... But I dont think so...

Yes, if something crashed then that would be a problem, depending on your system you may want to cut back on worker threads.

As far as the commit for the DRM just follow the steps in the link in the OP.

You will create 2 files and edit 2 other files. its very easy but looks more complicated than what it is...

You could grab the files right from the commit like i did and inserted it the original source. I know that is the "proper" way but it works for me ;)
[Nexus 6  General] Milly7:
What I did was unpack the blobs from the Nexus page like you did. I do this just to make sure the vendor directory gets set up.

Next I find a good source for all of the blobs. In this case I used rascarlo's git hub https://github.com/rascarlo/android_vendor_moto. I created a new directory and did a git clone to sync all of the blobs from his shamu vendor directory. I then go to my original vendor directory, vendor/moto and delete the shamu folder. I then copy all of the contents I cloned from rascarlo to that directory. After that, I go to build/core/tasks and delete the vendor_module_check.mk file, or you will get build errors (there is another way around that, but I am not to familiar with it).

Doing this ensures I have all of the blobs, even the ones extracted from the factory image. I have not had any issues with netflix and youtube since I have been building for Nexus 6.

The only fix I would like to find is what addresses the green screen for screen cast. Does the commit you mentioned address this?

Oh, and don't forget to make clobber if doing anything that updates or changes the vendor directory.
[Nexus 6  General] Scott:
I was told that fix was also to fix screen cast. I dont have anything to cast to so I cannot verify with certainty.
[Nexus 6  General] prdog1:
Chrome cast was on sale for $29. :rolleyes::cool:
[Nexus 6  General] johnnywayne28:
I have a net gear p2tv if you want a tester.

BTW I dig the 160th creast I was in the 2/327 inf. 101st and 3/504th p.i.r. 82nd
[Nexus 6  General] Scott:
Roger that airborne! And its not just a crest, its a way of life :good:
[Nexus 6  General] johnnywayne28:
I will flash it tomorrow at work and test it as soon as I get back to my hotel.

Its always good to see some fellow veterans on XDA
[Nexus 6  General] sykopompos:
There is actually a much easier way to do this. Gotta teach you guys how to make a vendor folder and static overlays
[Nexus 6  General] fhem:
We are all waiting...................................please?????? :D:confused:
[Nexus 6  General] sykopompos:
I didn't mean tonight. I'll explain it to scholser and show him how it works so he can add it to the guide and maybe retool around it
[Nexus 6  General] fhem:
Sorta like this.......................................https://github.com/BitSyko/framework-res-overlay-sample
[Nexus 6  General] sykopompos:
Those are runtime resource overlays, they are actually based upon the same method but executed differently. Static overlays get built in with aosp at compile time while runtime ones are executed at boot and temporarily overlay the system till they are removed.

Those samples there are for my other project where we actually make them useful for theming and adding new resources altogether to add features in and make them feel like they are part of the ROM itself
[Nexus 6  General] fhem:
OK thanks much - Im just getting started on GitHub and looking for all the theming tools I can find!! I'll wait for Scott's static overlay explanation :D:angel:
[Nexus 6  General] sykopompos:
We can work on adding support for my project down the line (it is extremely easy) but here it is if you wanna check it out https://plus.google.com/118195502410326243266/posts/JPdEBJdrKdF
[Nexus 6  General] ikirt:
Has anyone noticed audio decrease while playing music through speakers ?
[Nexus 6  General] sykopompos:
Vs stock?
[Nexus 6  General] ikirt:
Excuse my ignorance, but what do you mean by "Vs"?
[Nexus 6  General] Scott:
http://dictionary.reference.com/browse/versus

He is asking are you the volume difference compared to stock (vs stock). If so I can already tell you the answer is yes do to the missing binaries that Moto choose to not include.

Eventually, when I have time I will get them incorporated into the guide or you can look back a few posts as someone has already explained how to do it.
[Nexus 6  General] Xileforce:
Hey guys, I decided to make a YouTube video that sort of walks people through this guide. It also briefly shows you how to switch toolchains, a small explanation of the layout of the root directory and tries to explain how to cherry pick with github. Though I'm not even very good at that. Anyways here it is. Maybe it will help someone. Its long sorry :( . http://youtu.be/2wZpnKNP8GU
[Nexus 6  General] nhpctech:
Delete....