yashsingh1/xdaforums huggingface dataset:
[Nexus 6P Android Development] davall:
Any chance for a flounder build?

So i succeeded with my first build for angler. Thank you all for your usefull posts, specifically Nathan for his work!

My build environment is a Core i5 Laptop with 8G of ram and win10 as a host. I thought it would be hard to get a build with this environment, but tried nevertheless :) I installed Ubuntu server 16.04 as a client in a vmware player VM and gave the VM 6,4GB of ram an all of my spare disk space - 110GB.

On ubuntu server i had to install python2.7 because python3 is default and it did not work with the repo tool. I also had to apt-get install 'schedtool' and 'bc', cause they were missing as well.

Cause of the small amount of ram of the VM i added a 4GB swapfile and configured after a few unsuccessful builds the jack-server as follows:

jack.server.max-service=1 in config.properties

I set the environment with export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx5g"

Voila my first build gets done!

I also own a Nexus 9 (flounder) device an have PN marshmallow installed. Is there a chance to start building a rom for flounder? Actually there a no conditions and prebuilts in the repo for flounder, so there is no chance to get a build. Maybe the missing files could be added to Github?
[Nexus 6P Android Development] qsec:
When you sync the repo, does it just sync changes if you synced once before?

I just did a re-sync and it seems that the diskspace went down very much like i have two repos.

Something seems not right, my folder containing repo is over 50gb in size.

And when i try to re-sync i got 'Daily bandwith rate limit exceeded for ip xxx.xx.xx.xxx

is there some command to flush the old repo before re-sync?

thanks
[Nexus 6P Android Development] Nekromantik:
As the repo name is changed again, do we need to delete the repo and start again?
[Nexus 6P Android Development] AzraelsKiss:
As long as you're syncing in the same directory, repo sync should only download updated files. If you are really nervous about extra files in your local source, you could try the following from your repo's base directory...

repo sync
repo status
repo forall -vc "git clean -fdx"

If repo status comes back clean (and it should), the repo forall should remove any extra files in the repos.

You shouldn't need to delete your current directories... Just re-initialize the repo with the correct address and resync...

Have a good one!
[Nexus 6P Android Development] fhem:
NINJA ??????

[MENTION=6842057]nathanchance[/MENTION] First and foremost ---- Thanks much for all your XDA and G+ posts --- they have been very helpful in keeping this old retired guy up to date with all the latest aosp dev changes. :good::good:

I have read thru this thread and see many issues w/ ninja.

Now for my questions --

1. Do you see any advantage to using ninja when building N? I think speed was supposed to be the main benefit!!!

2. Do you have a feel for the consensus among devs --- Are they using ninja???

I personally have made a few N builds for my N9 using ninja and all seems ok but can't be sure. LOL

Again thanks for all your contributions to the community.
[Nexus 6P Android Development] qsec:
Seems that i have synced the repo into scripts folder :)
[Nexus 6P Android Development] AzraelsKiss:
That... On the other hand... Could definitely cause the repo to be duplicated... lol

Have a good one!
[Nexus 6P Android Development] dbarrett480:
Those that don't have a lot of ram can change the amount of memory that jack-server uses. I was able to build with only 4gb of ram after doing this. The commands to do this are:

export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4096m"

Change the 4096m part at the end to 1gb less than the amount of ram you have. So I did 3072m since I have 4gb of ram. You will then have to restart jack server:

./prebuilts/sdk/tools/jack-admin kill-server

./prebuilts/sdk/tools/jack-admin start-server

This fixed the issue for me.
[Nexus 6P Android Development] qsec:
Sync repo stopped because of fetch error.

I got this today a few times, when watching the sync progress i can se some 'The requested URL returned error: 404 Not found'

I guess that is not normal?
[Nexus 6P Android Development] boomer8403:
First off, thank you to everyone who has contributed to this thread as it has been a huge help to a Linux noob like myself. I got my first ROM to build last night after switching from 8 to 12GBs of RAM.

My question is though, how the hell do I transfer the ROM to my phone? Ubuntu doesn't seem to see my phone even though Windows does. I'm using Virtual Box if that helps.
[Nexus 6P Android Development] AzraelsKiss:
VirtualBox should have some sort of way to transfer files between the host and client OSes... Look through the settings, or documentation for VB, and you should find something.

Have a good one!
[Nexus 6P Android Development] boomer8403:
Yea I tried that already and no dice. That is why I was asking because I've done all the common sense functions first. Maybe I can access Google Drive from Firefox and upload it there.
[Nexus 6P Android Development] AzraelsKiss:
404s during a repo sync is not uncommon... I would try a 'repo sync --force-sync' to see if you can get a proper sync...

Have a good one!

---------- Post added at 12:05 PM ---------- Previous post was at 12:00 PM ----------

This should work... https://www.virtualbox.org/manual/ch04.html#sharedfolders Otherwise... I'd recommend a thumb-drive or something. Uploading to the cloud and redownloading is time consuming and a waste of bandwidth...

Have a good one!

P.S. Drag and drop could also work... https://www.virtualbox.org/manual/ch04.html#guestadd-dnd
[Nexus 6P Android Development] nathanchance:
I've talked with quite a few devs and many of them have disabled Ninja. It's nice for the progress but it's fidgety and many say that it slowed down their build times. If it works, then you can leave it but I'd try it without and see if the times are better. Glad you enjoyed the posts :)
[Nexus 6P Android Development] silvan g:
Hey guys,

i just did a build, and its ''only'' 273, does that sound correct?
[Nexus 6P Android Development] Nekromantik:
Sounds about right. As long as it bullt and created a zip its all good.

Google apps are not included in ROMs plus this is work in progress so just stock like with few tweaks so far.
[Nexus 6P Android Development] DowntownRDB:
[MENTION=1210677]Silvan[/MENTION] as [MENTION=2470146]Nekromantik[/MENTION] stated the build size will vary each time a little bit, or at least mine has. My build yesterday was 279.3 and the build 2 days before that was 277.6. I'm still a noob at this so I think size change may well have a lot to do with what changes in the github. Just my thoughts. Have a great day.
[Nexus 6P Android Development] davall:
If your host is a Windows system you can use putty, especially the pscp.exe to transfer from the Ubuntu client. Before you have to "sudo apt-get install openssh-server" on the Ubuntu side.
[Nexus 6P Android Development] rlivin:
Edit: nvm, my problem was out of disk space. Does 87gb used just for building pn seem a like alot?
[Nexus 6P Android Development] vishal4989:
when i reached to the last step and enter Mka bacon, it gives me an error saying my java is out of data but I have OPENJDK8. anyone had this issue or anyone knows how to fix this? thanks
[Nexus 6P Android Development] chopt51:
Try adding a # to the start on line 209.
[Nexus 6P Android Development] kantjer:
If you get build errors related to Android Runtime (ART) then that could be memory related, building ART is memory intensive
[Nexus 6P Android Development] jmtjr278:
Haven't gotten that far yet. I have had repo sync fail and abort twice. Fetch errors as Nathan guessed. Do I need to sync everything out can I use -c to just sync the most recent version? Thanks again
[Nexus 6P Android Development] kantjer:
try the following

repo sync -c -f --force-sync
[Nexus 6P Android Development] jmtjr278:
Will do! I really appreciate the help
[Nexus 6P Android Development] Gizmoe:
Good that just verifies what I thought. Got 32 GB RAM in the mail so I can give my Ubuntu VM 16 GB instead of only 8. Keeps failing at 63 due to jack subcommand errors. I assumed it's running out of memory.
[Nexus 6P Android Development] kantjer:
Are you building with the now default ninja compiler?

Than that error isn't memory related, just disable ninja, see line 60/61 of my build script
[Nexus 6P Android Development] AzraelsKiss:
If you haven't repo sync'd within the last day or so, you may not have the necessary proprietary blobs needed for building with ninja... I had to extract my own blobs before, or it would fail out in the mid 60's, but recently, Nate added the blobs to the repo, so it compiles just fine for me now as is. Good luck!

Have a good one!
[Nexus 6P Android Development] Gizmoe:
Yeah I've been using ninja. I'll give that a shot thanks! Been trying to figure it out on my own with no luck. Didn't even think of disabling Ninja. I was under the impression it was required for N. Good to know.

I'll be glad to have the more ram though. My PC gets bogged down when running my VM.

---------- Post added at 08:58 PM ---------- Previous post was at 08:15 PM ----------

Does it compile for you with ninja? I had completely cleaned out my working folder and re synced yesterday and noticed the blobs were there. I may try the no Ninja option when I get home. I have a feeling that's the trick on my machine.
[Nexus 6P Android Development] chrisexv6:
I was attempting to compile as well and had issues. Will try without ninja, but wasnt sure what version of Ubuntu is required. I setup 16 but would 14 work for building N?
[Nexus 6P Android Development] kantjer:
I'm still using Mint 17.3, that's Ubuntu 14.04 based.

I only needed to install openjava 8 to build N
[Nexus 6P Android Development] denkru:
First of all i want to thank Beans for this awesome rom.

I have been lurking this thread for a long time now, and profited from all your helpful posts.

This is my first post here bc i ran into some problems building the nougat rom to, and maybe now i can be of some help.

I had some problems compiling with less then 16GB, i only had 8GB to spare. Compiling without Ninja is a good idea bc that was my first problem, but i still ran into some problems with Jack.

The only solution i found was adding a startup parameter in jack-admin.

in $PROJECT_HOME/prebuilts/sdk/tools/jack-admin on line 454 the startup command add -Xmx6G or how many GB you can spare.

This is what worked for me, hope it helps some others to.
[Nexus 6P Android Development] Nekromantik:
Yeah I had issues with Ninja compiling as it got to 60% and then failed to find kernel.

Then the repo for the rom was updated with Angler dependencies so tomorrow I will sync and re build with clobber.
[Nexus 6P Android Development] aalupatti:
It compiles without ninja without issues .

Use the code ( was posted earlier in this thread ) after . build/envsetup.sh

export USE_NINJA=false

mka clobber

breakfast angler

mka bacon

openjava8 is needed for nougat. I upgraded to mint 18 for no reason :)

I updated all repo yesterday but still decided not to use ninja.

Next time I try, I will use ninja
[Nexus 6P Android Development] laxattack:
can you show me the exact line you are changing in jack-admin please?
[Nexus 6P Android Development] dbroer91884:
I don't mean to add to any off topic discussion but all this talk about building the ROM encouraged me to explore that myself. I've never done it so I'm just kind of messing around in a VM setting but I'm curious about a couple things.

1) the first time I did try this, I realized that I used the manifest from GitHub.com/pure nexus which was incorrect. So then I stopped the process and reopened a terminal window and started over using the correct website. Will this stop and start over cause issues?

2) How long does repo sync take? I'm just new, like really new at this and don't know.

I'm sure beans will have the official one or before I get this one working. I'm just trying to learn how this process works.
[Nexus 6P Android Development] laxattack:
i don't think it will cause issues, and a repo sync can take literal hours
[Nexus 6P Android Development] AzraelsKiss:
It compiles just fine with Ninja for me... But I have 32 GB of RAM in my build rig, so if it is an out of memory problem that people are having, that could make a difference. lol Good luck!

Have a good one!

---------- Post added at 08:53 PM ---------- Previous post was at 08:42 PM ----------

1... Shouldn't be an issue... If repo sync fails, just follow the advice given in the error...

2... Depends on internet connection and traffic... If you got a slower connection, start the sync before you go to bed... Check on it in the morning... If it's a really slow connection... Check on it again when you get home from work/school... lol I have a 18 Mbps connection and I'll leave an initial sync run overnight.

Good luck! Have a good one!
[Nexus 6P Android Development] nathanchance:
As far as I am concerned, this isn't off topic and people who complain that it is shouldn't be on a developer's site lol.

1. Nope, reinitializing the manifest and resycning won't mess anything up. Repo is smarter than you think haha.

2. Source is about 40-50GB, so depends on your internet connection.
[Nexus 6P Android Development] aalupatti:
I have a core 4 and 100mbps connection .. Took me around 6-8hrs to do the first build without ninja from installing a new Mint 18 system.

Use the manifest from https://github.com/PureNexusProject

The repo that u need is " repo init -u https://github.com/PureNexusProject/manifest.git -b n "

Future builds will be very fast... Usually takes less than 30 min
[Nexus 6P Android Development] sixgunmojo:
Your steps are correct insofar as I do the same thing. The only thing I can suggest is I put all my ringtones in /system/media/audio/ringtones. if you try this, check that permissions are correct (rw-r--r--), delete the copies in /sdcard/ringtones (so you don't get doubles in your ringtone list), and reboot.
[Nexus 6P Android Development] vishal4989:
thank you for reply. one more question. In automatic way, it says in the last command.. bash script name. what is the script name? i am using windows pc and running terminal.
[Nexus 6P Android Development] eregev:
Has anyone tried building but run into an error showing up as

(plus more errors at it traversed back up and failed out)?
[Nexus 6P Android Development] AzraelsKiss:
You may need to update your java alternatives with the following commands...

$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac

Or you may need to uninstall all your java and reinstall per the OP build instructions. Good luck!

Have a good one!
[Nexus 6P Android Development] vishal4989:
i got the java issue all cleared up but i got this new error.. any advice?
[Nexus 6P Android Development] AzraelsKiss:
You'll need to find out the architecture and environment of your could shell provider.

Have a good one!

---------- Post added at 07:59 PM ---------- Previous post was at 07:53 PM ----------

It's claiming missing file, so try repo sync --force-sync again. Good luck!

Have a good one!
[Nexus 6P Android Development] 1112ee:
New homemade builds can be dirty flashed over older homemade builds right?
[Nexus 6P Android Development] mrjaydee82:
Trying this now....thanks
[Nexus 6P Android Development] Ericarthurc:
Hey so quick question used repo init -u https://github.com/PureNexusProject/manifest.git -b n to initialize on my Ubuntu 16.04 system and repo sync; I let the terminal run for about 30 minutes and it was downloading over 35gb of files and still going... Am I doing something wrong? And if thats correct how much space do I need?? I am running through a virtual machine so I just want to know how much space I need; I ran out of the 40gb space I gave it so had to shut it down.
[Nexus 6P Android Development] AzraelsKiss:
Total drive space needed for OS, utilities, syncing and building is around 100 - 150 GB. Good luck!

Have a good one!

P.S. I just checked my build rig... 6.1GB disk used after fresh install of Linux Mint 18... 60GB used after sync but before first build... 107GB used after first build... 71GB after make clobber (ccache is 10.6GB). Hope this helps people realize how much disk space can be involved in a normal build.
[Nexus 6P Android Development] Ericarthurc:
thanks so much!
[Nexus 6P Android Development] 1112ee:
This is also an option if your pc doesn't have enough ram

http://xdaforums.com/chef-central/android/guide-how-to-build-rom-google-cloud-t3360430

[MENTION=6842057]nathanchance[/MENTION] maybe add this to the OP?
[Nexus 6P Android Development] kyle_el:
It actually already is in the OP. I used it and it worked fantastically :highfive:
[Nexus 6P Android Development] fhem:
Thanks for the reply --- I have tested it both ways after building ccache for each method and for me I see faster build times using ninja. I'm not sure which way I am going to go -- I see a lot more warnings using ninja. Oh variety is the spice of life LOL

Thanks again.
[Nexus 6P Android Development] 1112ee:
Ah, didn't see it
[Nexus 6P Android Development] dieselbuddeh:
How many warnings are considered not okay. At one point i had 25 at once. Here is my terminal log.
[Nexus 6P Android Development] nathanchance:
The warning were another big put off haha. I'll have to try Ninja again then.

Warnings don't matter as long as they don't stop the build.
[Nexus 6P Android Development] Gizmoe:
You have to capture the device inside the VM. Only one OS can use it at a time. Inside Virtual Box right click on the USB icon to bottom right and select phone. Any time connection status changed or plugged/unplugged you will need to do this.
[Nexus 6P Android Development] boomer8403:
I can see it in the bottom right and it's checked but where do I go to actually browse the contents of my phone to drag and drop?

---------- Post added at 04:43 PM ---------- Previous post was at 04:42 PM ----------

Nevermind. I had to switch my phone to file transfer. I'm an idiot
[Nexus 6P Android Development] dbroer91884:
I have limited RAM (8gb) but a ton of space. I'm reading that people are using their swap space to alleviate RAM issues. How does this work?
[Nexus 6P Android Development] dbarrett480:
Try this....
[Nexus 6P Android Development] dbroer91884:
Those are lines in terminal? Are they the separate lines? Sorry I'm pretty new at this?
[Nexus 6P Android Development] AzraelsKiss:
http://xdaforums.com/showthread.php?p=68675629#post68675629 has different things to try when memory is low...

Have a good one!
[Nexus 6P Android Development] dbarrett480:
Yep separate lines. so open terminal inside the root of your build folder and type all three of those commands. You will need to change the "4096m" in the first line to the amount of ram you have minus 1gb.
[Nexus 6P Android Development] mrjaydee82:
Okay I got a bit further but getting this memory issue now
[Nexus 6P Android Development] dbroer91884:
One more quick question from the original post. I see the directions say to run a bash script using our Linux distro I am positive I'm running Linux Mint cinnamon but don't know what that is called as far as what I would put in that script. What would I put in for the script?
[Nexus 6P Android Development] mrjaydee82:
Go to your settings then system to see the info of what you're on
[Nexus 6P Android Development] nathanchance:
Did you download Mint 17 or 18?
[Nexus 6P Android Development] dbroer91884:
Says Linux Mint 18 cinnamon 64-bit. My question is how does that translate to the bash script?

---------- Post added at 12:56 AM ---------- Previous post was at 12:54 AM ----------

Mint 18
[Nexus 6P Android Development] nathanchance:
type ls and it gives you a list of the scripts. Copy and paste the name of the script that corresponds to Mint 18.
[Nexus 6P Android Development] dbroer91884:
So maybe I didn't quite understand that correctly. When I typed ls into the terminal all it did was list all of my folders which a quick look online so that that is what it would do. Did I misunderstand what I was supposed to do to figure out the script for mint 18?
[Nexus 6P Android Development] nathanchance:
I mean did you clone the scripts repo I listed there? Are you setting your build environment up again?
[Nexus 6P Android Development] dbroer91884:
Yeah I'm setting it up again. I'm just trying to I guess figure it all out before I get going. Last time I did it the manual way and I ran into problems so I wanted to try the automatic way this time.

---------- Post added at 01:23 AM ---------- Previous post was at 01:17 AM ----------

Sorry everyone I was not very smart I did not do the steps until I tried it just now and realized that that's what the first few steps help you figure out. I'm on my way to figure it out thanks
[Nexus 6P Android Development] AzraelsKiss:
How much memory did you allocate for your heap? Did you try setting fewer jack processes as I listed in http://xdaforums.com/showpost.php?p=68675629&postcount=137 and that's linked in the OP? Good luck!

Have a good one!
[Nexus 6P Android Development] mrjaydee82:
Yes I did...I'm rebuilding again...seems to surpassed that error
[Nexus 6P Android Development] eregev:
"pure_nexus_angler-7.0-20160919-HOMEMADE"

Yee :laugh: :cool: :victory:

Thank you, sir.
[Nexus 6P Android Development] aalupatti:
How long did it take to build?

Sent from my Nexus 6P
[Nexus 6P Android Development] kyle_el:
Way, waaayyyy faster than building it on my own machine. Probably a total of slightly over an hour haha:highfive:
[Nexus 6P Android Development] aalupatti:
That is quite good time to build a fresh rom

Sent from my Nexus 6P
[Nexus 6P Android Development] Gizmoe:
I got identical build times of 51min with and without ninja on a fresh build. I don't think Ninja speeds up a fresh build. Only subsequent builds.
[Nexus 6P Android Development] vishal4989:
finally all done.. but now im confused.. where do i find the file. i used google cloud to do all this. i made a folder on desktop named PN but nothing is in there. any help please
[Nexus 6P Android Development] jarjar124:
For those that built it successfully, is Netflix working properly for you? I'm getting a black screen when playing, but the audio and subtitles appear fine.

edit: Never mind. Turns out that messing with the color settings affects Netflix. Changed the settings back and Netflix plays fine now. That's unfortunate.
[Nexus 6P Android Development] netwokz:
The second to last line will tell you where its at. "/home/vishal4989/pn/out/target/product/angler/pure_nexus_angler-7.0-20160920-HOMEMADE.zip".
[Nexus 6P Android Development] vishal4989:
yea i see that. but i made a folder on desktop names PN. not sure where that is coming from. dont know how to find the destination
[Nexus 6P Android Development] dbroer91884:
Deleted - Figured it out
[Nexus 6P Android Development] netwokz:
I'm a little confused. When building the rom it will always put everything under that "out" folder. Unless you specifically specified a different "out" directory. But using google cloud, I'm not entirely sure how to get it to your phone.

---------- Post added at 07:35 PM ---------- Previous post was at 07:30 PM ----------

Well, you can "put" the files like twrp wherever you want, just need to be in that directory when you push to your phone. In the terminal try running "adb devices", or "fastboot devices" if you are booted into the bootloader, what is the output?