yashsingh1/xdaforums huggingface dataset:
[Nexus 6P Android Development] jmtjr278:
Thanks. I edited my post with another question. Could you have a peek for me please?
[Nexus 6P Android Development] kantjer:
I haven't been running Linux under VM for more then a year now but back then 8 GB memory allocated to VM was needed to build (I know some say 4 GB should do the trick but it never worded fine for me).

Disk space I would suggest at least 100-150 GB, If you have the space allocated 200-250GB, that will give you space for ccache and a custom kernel if you like.
[Nexus 6P Android Development] nathanchance:
Depends on what they are. If they are fetch errors, use this: https://android.googlesource.com/new-password
[Nexus 6P Android Development] jmtjr278:
Thanks [MENTION=3306843]kantjer[/MENTION] I have reallocated the space to 250gb and the memory to 4gb. That's the most I can use and run the VM. I will attempt repo sync again. I appreciate there help! Have been here a while and never attempted this. Wish me luck!
[Nexus 6P Android Development] AzraelsKiss:
Are you sure you have ADB debugging turned on in Developer options? Are you using the proper drivers? Have you configured USB access in Ubuntu as described on this page... https://source.android.com/source/initializing.html

Try rebooting the phone... Try rebooting into TWRP and see if you can ADB from there... Try rebooting into the bootloader to see if fastboot commands will work... Good luck!

Have a good one!
[Nexus 6P Android Development] netwokz:
adb works normally in twrp. fastboot works as well. adb was working just fine on my last ROM.
[Nexus 6P Android Development] AzraelsKiss:
I don't know... I know one time I had to redo my USB access in Ubuntu because it just started giving me unauthorized in adb... I can't remember if it was when I started on 7 or just before... Other than that... I'm not sure what to tell you... adb is still working for me. The commit you linked would not prevent you from accessing adb though.

Have a good one!
[Nexus 6P Android Development] airbat:
as before, with this option i have the following error message

[airbat@airbat-pc Pure_Nexus_GIT]$ make bacon
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.0
NEXUS_VERSION=7.0-20160915-HOMEMADE
TARGET_PRODUCT=nexus_angler
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53.a57
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.7.2-1-MANJARO-x86_64-with-glibc2.3.4
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NRD90U
OUT_DIR=/home/airbat/Pure_Nexus_GIT/out
============================================
File "build/tools/findleaves.py", line 95
print r
^
SyntaxError: Missing parentheses in call to 'print'
Checking build tools versions...
File "build/tools/findleaves.py", line 95
print r
^
SyntaxError: Missing parentheses in call to 'print'
No private recovery resources for TARGET_DEVICE angler
make: *** Aucune règle pour fabriquer la cible «*/home/airbat/Pure_Nexus_GIT/out/host/linux-x86/bin/mkbootimg*», nécessaire pour «*/home/airbat/Pure_Nexus_GIT/out/target/product/angler/boot.img*». Arrêt.
[Nexus 6P Android Development] nathanchance:
When did you build? This was an issue on previous builds, it should have been fixed as of nine hours ago as Nate went back to userdebug builds.
[Nexus 6P Android Development] netwokz:
About 2-3 hours ago.
[Nexus 6P Android Development] qsec:
Is it correct to make a folder called local_manifests under .repo and put the file there?

I have google it and think it is correct, just wan't to double check.

I'm such a noob on linux :)

thanks
[Nexus 6P Android Development] kantjer:
Yes, that's it

Sent from my Nexus 6P
[Nexus 6P Android Development] snak3ater:
Adb won't work if ro.adb.secure is set to 0.

ro.adb.secure was set to 0 for user builds in PN sources. It changed now in latest sources.

Can you check one thing in user debug build

Is adbd working okay?

Check if you can remount & push/pull files to system via adb
[Nexus 6P Android Development] AzraelsKiss:
I guess I was wrong about that commit not affecting adb netwokz... Sorry about that... I thought it was the other way around... lol

Did you repo sync just prior to building?

Have a good one!
[Nexus 6P Android Development] qsec:
Ran out of disk space again.

Will try to re-sync repo with a local_manifest (thanks kantjer)

What can i delete from the 'PN' folder that i created following the guide in the OP?

The biggest folders are out, .repo, prebuilts & external.

thanks

ok, clobber it is.
[Nexus 6P Android Development] senthilrameshjv:
Couple of questions:

I am just starting with ROM build and synced Uber couple of days back as it had some features already available and wanted to see if it *builds* without any changes. Although, I want to start more from scratch rather than having features I dont want. Since Pure is almost with no features now, I think I can take it/aosp as base going forward.

1. Now, if I keep Pure as base now but later only cherry pick the changes that I want out of this ROM, i dont have to do repo sync every time right? I can just cherrypick that particular commit and keep buiding on my own?

2. Can I do the same thing if I start with AOSP now and cherrypick changes that Beans add?

3. Also how do u guys test if ur changes are working ..I can't flash it without testing right?
[Nexus 6P Android Development] netwokz:
I manually reverted that commit, and rebuilt, still no adb. But maybe my changes didn't stick. I'll try again when I get home from work.

Yes I did sync before I built.
[Nexus 6P Android Development] dbroer91884:
so here is another question. I'm trying to figure out the lightest way to do this. Not because my computer can't do more (1.5 TB - 8gb RAM, although that is a bit low), I'm just trying to explore options. Is there a version of linux, that would still follow OP directions that is essentially terminal only? As in, no desktop UI. I found this link I was going to look at: https://ubuntuforums.org/showthread.php?t=1047318

Thanks!
[Nexus 6P Android Development] nathanchance:
Arch Linux but the setup commands will be slightly different as it uses pacman instead of apt. There is a setup script on [MENTION=5854483]akhilnarang[/MENTION]'s Github to help with that though

Another option is to pick a flavor of Ubuntu like Xubuntu or Ubuntu MATE that is more lightweight in terms of UI (both of those work flawlessly in a 1GB VM I set up to mess around with Linux in a GUI).
[Nexus 6P Android Development] AzraelsKiss:
Have you looked into Ubuntu Server? I believe it runs in a CLI environment and it's still Ubuntu... Never tried it myself though, so I could be wrong...

Have a good one!

P.S. Or just have Ubuntu boot into console... http://linux.m2osw.com/boot-command-line-console-ubuntu-1604 I think you could even uninstall Xorg, Unity and any other packages that require the GUI.
[Nexus 6P Android Development] pvtjoker42:
Thanks so much for putting these instructions together! I'm now running my own compiled build, and so far so good!

This should satiate my need to flash updates more often.. :silly:
[Nexus 6P Android Development] theesotericone:
If your building with Arch it uses Python 3. That's the .py error you're getting. You either need to symlink python 2.7 or build inside a python 2.7 virtual env. There's plenty of documentation in the Arch wiki for either method.
[Nexus 6P Android Development] waleed.wa03:
Built my very first ROM on a DO droplet in 2 hours! Thank you for this information!!
[Nexus 6P Android Development] dbroer91884:
Good work.

I'm in the process of trying to get my computer up and running. I was going to dual boot mint and the windows ten, but there are too many partitions on it. I had upgraded from windows seven so it was a mess. Now I'm transferring files to the cloud to save and will try doing a clean windows install then a mint install
[Nexus 6P Android Development] nathanchance:
Do take note that due to the Pure rebranding, you will need to re-init and force sync by typing the following commands:

repo init -u https://github.com/PureAndroidProject/manifest.git -b n
repo sync --force-sync
[Nexus 6P Android Development] kipue:
Guys, I've got a nagging question in the corner of my mind, probqbly easy.

I understand the point of "mka clobber", to clean previous built outputs, right?

So, how does it work with using ccache ? Does it not get against the point of it?

Thanks :)
[Nexus 6P Android Development] nathanchance:
mka clobber removes your entire out folder, which includes all of the compiled binaries and such. ccache is smart, it will only use the cached files if they match what would be compiled. As a result, even with ccache, mka clobber generates a still completely clean build.
[Nexus 6P Android Development] kipue:
Oh, I see, thanks ^^ Makes sense in that case.

I can already see that my second build is indeed going faster.
[Nexus 6P Android Development] AzraelsKiss:
[MENTION=6842057]nathanchance[/MENTION] is right, but some small updates in the source can be handled without doing a make clobber (but it's sorta like dirty flashing... It might work, but it also might really screw ya and don't complain unless you still have problems with a build after you make clobber)... And ccache is smarter, but it can mess up sometimes, so may occasionally need to be trashed to get things back on track. If you're overly paranoid, and don't mind a bit longer build times, you could always go without ccache and build everything fresh each time...

Have a good one!
[Nexus 6P Android Development] airbat:
Ok, i'll give a try when i come back to home this afternoon.
[Nexus 6P Android Development] kipue:
By the way, thanks again to all of you!

My first ever working build is up and running on my phone. So Screenshot, just because.
[Nexus 6P Android Development] Fralund:
I basically never do a make clobber, and that works fine as well. One of the points in use a make system is to avoid building everything all the time. But of course, if the dependencies are wrong you might get the wrong result.
[Nexus 6P Android Development] kantjer:
Congratulations, be aware you're now very close to becoming addicted to building ROM's

Sent from my Nexus 6P
[Nexus 6P Android Development] qsec:
Ok, building third time, they say third is a charm. Installed mint and after repo sync I got around 52gb free space, would it be enough?

This time I'm not using ccache to save space.

This local_manifest thing, I didn't got that to work. When I typed repo init -m local_manifest.xml it says that it does not exists.

Of corse I have done something wrong.

Tapatalked.
[Nexus 6P Android Development] kantjer:
For the local manifest to work you don't have to anything special. Just add it and repo sync like normal. The local manifest will be recognised. At the end of the sync you will see the repo's specified in the manifest being removed.

Sent from my Nexus 6P
[Nexus 6P Android Development] qsec:
ok, failed again.

This time i was not out of disk

I was compiling without Ninja and got this error below, has it something to do with 'Jack issues' in AzraelsKiss post on possible error soulutions?

thanks.

Generating TOC: /home/henrik/PN/out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/classes.jar.toc

Out of memory error (version 1.2-rc4 'Carnac' (298900 f95d7bdecfceb327f9d201a1348397ed8a843843 by android-jack-team@google.com)).

GC overhead limit exceeded.

Try increasing heap size with java option '-Xmx<size>'.

Warning: This may have produced partial or corrupted output.

make: *** [/home/henrik/PN/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex] Error 41

make: *** Inväntar oavslutade jobb...

Reading 'compiling with Jack' it says that

Jack troubleshooting

'If your computer becomes unresponsive during compilation or if you experience Jack compilations failing on “Out of memory error”

You can improve the situation by reducing the number of Jack simultaneous compilations by editing your $HOME/.jack and changing SERVER_NB_COMPILE to a lower value.'

But i can't se my .jack file? (i have ctrl H on)

Is it there only when jack is running?
[Nexus 6P Android Development] kipue:
Hi, I'm familiar with the jack error, it actually happened to me no matter what on different distros and other combinaisons.

The only thing that worked for me was having more RAM for the building machine (a VM in my case). the lowest that worked was 10 Gb of memory dedicated to that.

Lower than that and no matter what it would fail.

Maybe that's not all there is to it, somebody else has smarter input to give for sure.

How much RAM do you have dedicated to the building?

EDIT : you can try to edit the jack server thing value too, Nathan has a link to a solution for that in OP.
[Nexus 6P Android Development] Gizmoe:
Same here. Once I dedicated 16gb to VM it not only solved any jack errors/warnings. My build from scratch only took 49 min down from 2hours 40 mins. My VM was definitely choking lol.
[Nexus 6P Android Development] kantjer:
It looks Android is no different from Windows in that respect. Every new major release require more resources. last Android version I build using VM was LP, back them 8GB ram was enough.

I now have a dual boot machine with 32GB ram.

Sent from my Nexus 6P
[Nexus 6P Android Development] qsec:
Ok, i have only 8gb of ram on a laptop with i7 processor running Mint.

I will try to edit this jack thing, but i can't find the .jack file?

---------- Post added at 06:00 PM ---------- Previous post was at 05:59 PM ----------

did you ever try to edit the .jack file before ram upgrade?

If so how did you edit it? i can't even find it :)
[Nexus 6P Android Development] AzraelsKiss:
Transitioning from server 1.1 (e.g. Marshmallow) to server 1.3 (e.g. N)

SERVER_NB_COMPILE=N

Replace with jack.server.max-service=N in $HOME/.jack-server/config.properties

Have a good one!
[Nexus 6P Android Development] qsec:
you have to excuse me for being such a noob.

but when i open the file it contains this lines, do you mean to remove 'by-mem=1\=2147483648\:2\=3221225472\:3\=4294967296. and add =N like this:

jack.server.max-service.by-mem=N

and if so do i need to restart something?

thank you very much.

#

#Fri Sep 16 12:33:47 CEST 2016

jack.server.max-jars-size=104857600

jack.server.max-service=4

jack.server.service.port=8076

jack.server.max-service.by-mem=1\=2147483648\:2\=3221225472\:3\=4294967296

jack.server.admin.port=8077

jack.server.config.version=2

jack.server.time-out=7200
[Nexus 6P Android Development] AzraelsKiss:
No... I mean... Do the same thing with jack.server.max-service as you would've done with SERVER_NB_COMPILE... Change N (the number next to the =) to a lower number... In your file, it says... jack.server.max-service=4 Change it to 3, 2, or 1. Then you need to restart the server as explained earlier.

Have a good one!
[Nexus 6P Android Development] Nekromantik:
building mine now.

building AOSIP took 4 hours so I expect this to be done in 4 hours also
[Nexus 6P Android Development] qsec:
aaa, i didn't read closely enough :)

Thanks, i will try with 2

Iguess the server restarts if i restart the computer?, i didn't get the stop and start command to function
[Nexus 6P Android Development] pvtjoker42:
so still new to this, is it still easier to follow changes/updates for this on g+ or is there somewhere else i should keep my eye on for these?

2nd build this morning only took 40min.. :cool:
[Nexus 6P Android Development] kantjer:
Haven't needed it myself but this was reported to be working by one of our fellow builders.

create a text file in rom directory name it killjack

open text file and paste this

https://gist.github.com/kantjer/e05786defcc2bbe21e06ec2bc6778a8d

then open terminal and do

chmod 755 killjack

then run ./killjack prior to all builds
[Nexus 6P Android Development] 1112ee:
Any chance this will work in bash on windows? Could someone tell me the md5 for a properly done build so I can verify?
[Nexus 6P Android Development] nathanchance:
If you are self building, definitely start watching Github.

I don't think so but it's worth a shot lol. The MD5 will change every build as stuff changes. If you get a make completed and the zip is around 260 MB, you are pretty much in the clear.
[Nexus 6P Android Development] kantjer:
In addition to this, if you choose to not do a clean build from scratch by clearing out the large “out” directory using "make clobber" or "make clean", I would advise doing a "make installclean", this will remove the compiled files from previous builds.

To give you an example what this means for build times on my system.

First clean build,ccache not filed ~ 50-55 minutes

make clobber build with ccache filed ~ 15-20 minutes

make installclean build with ccache filed ~ 3-8 minutes
[Nexus 6P Android Development] pvtjoker42:
I guess i was looking for some kind of change log or update list on that github page, or just going by the last updated time/date?
[Nexus 6P Android Development] nathanchance:
Yeah it is just looking through the various repositories' commit list and seeing what has been added. For example, if you go into the frameworks_base repo, click on the commits tab, you'll see the last commit happened last night, and it was "enable color control, and navbar tuner".

I'd definitely get familiar with Github as Beans don't usually post about upcoming features, so that's the only way you'll stay ahead of the curve :cool:
[Nexus 6P Android Development] 1112ee:
So far I have this

How long does this usually take?
[Nexus 6P Android Development] Nekromantik:
how often do you guys build? every day?
[Nexus 6P Android Development] pvtjoker42:
I've been tempted to start doing it daily, but i imagine there aren't changes that make a difference daily.. so i'll probably start watching github for updates to the various pieces before i kick off another build..
[Nexus 6P Android Development] nathanchance:
I used to build nearly every day on M (at least whenever there was stuff worth building for). On N, I will probably keep it to a couple times a week since N now optimizes apps in the background rather than during boot. This will cause poorer battery life during that time. Not sure how long the process is but I feel like it can take up to a day or so.
[Nexus 6P Android Development] Nekromantik:
Really?

Whats the reason for that? Would be better to wait a bit on boot then use up battery during the day!
[Nexus 6P Android Development] kantjer:
Wait until you start changing the code and you need to test.

Then not having to wait 20 minutes after every ROM flash is a blessing
[Nexus 6P Android Development] nathanchance:
I think it is due to changes they made in ART but I am not sure. I like the phone booting up right away though and I don't have that many apps to optimize so it's okay by me :p
[Nexus 6P Android Development] kantjer:
Hopefully Google made it that clever it will only optimize when being charged.
[Nexus 6P Android Development] 1112ee:
Getting ready to build but I have a question

Should I use the build instructions in the guide

Then, tell it which device you want to make and let it roll:
$ breakfast <device>
$ mka bacon

Or in the manifiest repo

1.) . build/envsetup.sh
2.) brunch xxxx yyyy

xxxx= device name aka shamu
yyyy= build type (user,userdebug,eng)*

*if no build type is specified "user" is default
[Nexus 6P Android Development] nathanchance:
brunch <device> = breakfast <device> && mka bacon

I prefer to split them up for the sake of my scripts but you can just use brunch.
[Nexus 6P Android Development] kantjer:
Pure added userdebug it could be you need to use

mka bacon-userdebug
[Nexus 6P Android Development] 1112ee:
So you're telling me I have to specify userdebug, I cant just do brunch angler?

Also this sync is taking forever, how many gigs is it?
[Nexus 6P Android Development] kantjer:
according to the manifest if nothing is specified the default is user, you would want to build userdebug.

I'm not building from pure source so I'm not 100% sure what the default is.
[Nexus 6P Android Development] 1112ee:
Just to verify, [MENTION=6842057]nathanchance[/MENTION]

Do i need to build userdebug

also how many gigs this repo/sync I'm over 20 now found its 40-50
[Nexus 6P Android Development] AzraelsKiss:
The default build type is userdebug.

Have a good one!
[Nexus 6P Android Development] kantjer:
Thanks, so the readme in the manifest needs updating.

Sent from my Nexus 6P
[Nexus 6P Android Development] AzraelsKiss:
I'm sure it does, but it's more up-to-date than most I've seen... lol
[Nexus 6P Android Development] 1112ee:
Is trying to dirty flash worth a shot? stock rooted nougat
[Nexus 6P Android Development] AzraelsKiss:
If ya don't mind the problems it'll likely cause... Go ahead... Good luck!

Have a good one!
[Nexus 6P Android Development] Nekromantik:
no substratum

built a bit too early ha ha
[Nexus 6P Android Development] aalupatti:
Totally forgot about this.. No wonder my phone booted up so fast after every boot. This was one feature I was looking forward in n.. Love it.. Great for flashaholics..

What kind of hardware build do u have? Sounds like a good one.

Made a build today and mka bacon worked for me.
[Nexus 6P Android Development] 1112ee:
quick question, how many GB is your the out folder supposed to be when the build is completed?
[Nexus 6P Android Development] nathanchance:
I think it will be about 15-20 GB
[Nexus 6P Android Development] dbroer91884:
I went to sync my repo as per OP and it says repo want available. I'm on mint 18. I just did sudo apt-get install repo, then it worked. Should this have happened?
[Nexus 6P Android Development] dieselbuddeh:
Nate changed the name. It is now the pureandroidproject on github. You just have to use

"repo init -u https://github.com/PureAndroidProject/manifest.git -b n" without the quotes.

You might wanna change the OP to include the change; as to not confuse people.
[Nexus 6P Android Development] AzraelsKiss:
You didn't install repo before, or you didn't configure the PATH. Don't know how well the one in the apt repo works. Good luck!

Have a good one!
[Nexus 6P Android Development] nathanchance:
It already is changed lol and I made a post about it on the previous page.
[Nexus 6P Android Development] dieselbuddeh:
Whoops must've skipped that page while catching up.
[Nexus 6P Android Development] dbroer91884:
Yeah my issue was with the missing repo. Like I said, I just did a sudo apt-get install repo. Then it worked and is not off and running. Hopefully that will be okay
[Nexus 6P Android Development] 1112ee:
Found out that you can build in the trial of google cloud platform

I'll report back with the build time if I can do it right

Update: Build time doesn't seem that great even thought its on an ssd.
[Nexus 6P Android Development] pvtjoker42:
that'd be pretty sweet to not have to sweat the cpu and memory costs to our systems/vm's and still get the same output.. :good:
[Nexus 6P Android Development] mohammed510:
I get the same error even after adding export USE_NINJA=false at the end of my .bashrc file
[Nexus 6P Android Development] airbat:
Ok, i made a mistake. I was thinking just alias python to python2 was ok but ... not :(

I have compiled fine with a virtualenv of python2.

#### make completed successfully (03:46:15 (hh:mm:ss)) ####

I was thinking that it will take less time to compile ...
[Nexus 6P Android Development] AzraelsKiss:
You shouldn't be getting any ninja errors if ninja is disabled... Did you log out and back in after adding the line to .bashrc or at least reload .bashrc with the following:

. ~/.bashrc

Have a good one!