[Build Guide][Flo/Deb] - Pure AOSP 6.0.0_r1

Scott

Retired Recognized Developer
Feb 20, 2007
29,238
66,257
268
Fargo
www.scottcrosler.com
This is a PURE AOSP ROM build guide. I have opted not to post an actual AOSP ROM based on 6.0.0 due to the fact I just dont care for it much. The instructions are up to date as of 10/21/2015



Deprecated-> This thread is about learning to build your own ROM following the instructions in post #2. The ROM posted in this thread is for example output. Feel free to download and use the ROMS @GROGG88 and I build! Feel free to try and build your own. We will try to help!

Quick Change Log
  • 10/21 - Updated guide to reflect Android version 6.0.0_r1. No ROM for download (at this time).
  • 1/17 - Updated build with official 5.0.2 Binaries. Fixed Browser "Settings" crash.
  • 12/19 - Updated my Flo builds to Android 5.0.2_r1
  • 12/9 - Updated my Flo build. Will not be doing a Deb Build any more.
  • 12/2 @GROGG88 has updated his builds. I have not! I will update tomorrow. I did however get thefactory stock rooted ROM up HERE!
  • 11/18 - @GROGG88 and I have joined forces to create two ROMS! I will be creating PURE AOSP ROMS and he will be creating Modified ROMS with many useful features! Each ROM can als be user built because all commits are shared in post #2!!!
  • 11/15 - B8 - Updated the 5.0.0_r6. Deb is only using preview binaries due to lack of final binary files.
  • 11/14 - B7 - Updated the 5.0.0_r5. Deb is only using preview binaries due to lack of final binary files.
  • 11/10 - B6 - File system install instead of block install, Added Google Location Services to framework, Fixed a root issue that couple DEB users were having
  • 11/9 - B5 - Changed wallpaper again. Fixed stock recovery at source level (Thanks to @Gnome and @GROGG88)
  • 11/8 - B4 - Changed wallpaper to android 5 Wallpaper, fixed reverting to stock recovery (No need for save-recovery.zip), pre-rooted boot.img (No need for extra boot.img!)
  • 11/7 - B3 - Removed it. Bad files. Reverted back to Build 2.
  • 11/5 - B2 -- Fixed MTP bug that google has left in every version of AOSP, made ROM recovery flashable and added 2 zips to the OP
  • 11/4 - B1 - Update to 5.0.0_r2. PC install via fastboot


Additional Downloads
  • Root by @Chainfire HERE!
  • Gapps for Lollipop HERE! There may be others so shop around!
  • Stericson's Busybox in flashable zip format is attached! Thanks to @Stericson for the binaries!




@GROGG88's Special Builds are HERE!


MOD EDIT: Link removed as domain has expired. Thread closed until new links can be installed



Please hit Thanks! It just as easy as hitting Download!
 

Attachments

Last edited by a moderator:

Scott

Retired Recognized Developer
Feb 20, 2007
29,238
66,257
268
Fargo
www.scottcrosler.com
Ubuntu 14.04 Set up and Build Guide

Updated 11/05/2014

Feel free to ask any questions about the build process. Do not ask questions about Ubuntu!

This guide assumes the following
  1. Have Ubuntu 14.04 setup, fully operation, and up to date. Hard Machine or Virtual, makes no difference. Must meet the minimum specs for compiling. Info from Google HERE
  2. Understand terminal command line entry as this is all command line processors.
  3. You are not here to ask for help with Linux, only the Android build process!


Add Java
Code:
sudo apt-get install openjdk-7-jdk

Add Build tools (Adds the required packages at the time of this posting)
Code:
sudo apt-get install git gnupg flex bison gperf build-essential \
  zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
  libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
  libgl1-mesa-dev g++-multilib mingw32 tofrodos \
  python-markdown libxml2-utils xsltproc zlib1g-dev:i386

Add Repo command (Syncs Google Repository with your local machine)
Code:
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo

Add bin folder to path for repo command (After you do this close Terminal and re-open to institute changes (easy way))
Code:
sudo gedit .bashrc
export PATH=~/bin:$PATH <-(add to end of bashrc)
Identify Yourself to the Repo (One day you may make commits so think about that when choosing your info!)
Code:
git config --global user.email "[email protected]"
git config --global user.name "yourpreferredusername"
Synch Repo (Download source... Sit back and grab a pop and a sandwich...)
Code:
mkdir ~/AOSP
cd ~/AOSP
repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.0_r1
repo sync
Note: I use AOSP as my directory name. You can use what you want. You could use "aosp" or "Source" or "android" or "whateveryoulike"


Install proprietary binaries (Needed for things like GPS and Bluetooth, they are not Open Source like android) (Install proprietary binaries from here in the root of AOSP folder (or whatever you called yours))
Code:
[url]https://developers.google.com/android/nexus/drivers[/url]


Run envsetup.sh
Code:
source build/envsetup.sh
Choose Device
Code:
lunch
Build it!
Code:
make -j8 otapackage

See Build Notes and ramblings from me in post #3!
 
Last edited:

Scott

Retired Recognized Developer
Feb 20, 2007
29,238
66,257
268
Fargo
www.scottcrosler.com
Notes
  • The ROM build will be a PURE AOSP ROM with no Gapps at all. See links in post #1 to PA Gapps for a good set of Google Apps!
  • The ROM will also have terminal level SU. So becareful! In other words its fully rooted and could be open to vulnerabilities. Flash your favorite Superuser Package if you need it. I dont. I recommend SuperSU by @Chainfire HERE. Download the flashable zip and flash after you flash ROM.
  • make -j8 is the number of worker threads that the make command will use to build. To me 8 is a safe number for an i7 processors. For an i5 Processor I would use -j4. I have experimented with a multitude of different values and it seems to me that the number of logical cores is also the best number to use with the make command.
  • Google recommends between -j24 and -j32 (to me that is excessive and causes my machine to error out every once in a while). Keep in mind the higher you push the more load the CPU will undertake. If your O/C'ing real hard you better have some nice cooling! I had to cut back OC on my 4770k from 4.65 to 4.4 with a Corsair H60 cooler just so it wouldn't over heat. When in doubt start low.
  • My i7 machine clocked at 4.4 and 16 gigs of RAM on a Samsung 840 Pro 256 Gig SSD take about 38 minutes to build the entire ROM.
  • With a 50 Meg download link it took maybe 30 to 45 minutes to sync the repo.

Changes from Source
 
Last edited:

mpmilestogo

Senior Member
Aug 9, 2009
348
66
0
Union City California
Right on Scott! Can't wait to give it a spin.

---------- Post added at 07:37 PM ---------- Previous post was at 07:15 PM ----------

Security settings crashes says"unfortunately settings has stopped" .
I think its the same error some other folks are facing. Rascarlo and a few others would release their AOSP builds but it appears this blocks them from releasing. Read this over on a few pages on a few ROMs in this neighborhood.
 
  • Like
Reactions: manxexile

Scott

Retired Recognized Developer
Feb 20, 2007
29,238
66,257
268
Fargo
www.scottcrosler.com
Nice to see you venturing into new projects. Most people start with CM since its not to hard to compile, but you did it the opposite way which will make all the difference in the end :)

Sent from my LG-D800 using XDA Premium 4 mobile app
IMHO: If you dont start with the basics you will end in a mess :p
 

rocksyjj

Senior Member
Sep 30, 2013
176
42
0
got to try this as your clean rom works well iam sure this one will be great also
keep up the great work to you and who helps you.

Where would i start to try baking my own cake .. i use archlinux what programs needed to do a build
 
  • Like
Reactions: Scott

Scott

Retired Recognized Developer
Feb 20, 2007
29,238
66,257
268
Fargo
www.scottcrosler.com
got to try this as your clean rom works well iam sure this one will be great also
keep up the great work to you and who helps you.

Where would i start to try baking my own cake .. i use archlinux what programs needed to do a build
Never used archlinux but I used Ubunutu 13.04

Here is where I started: http://forum.xda-developers.com/showthread.php?t=2224142

(I hate nano so used gedit of course. )

But at the last two shell commands i didint use the AOKP tree I used the AOSP base so you want to look here for that: http://source.android.com/source/downloading.html


Then follow the instructions from that page on forward until you have yourself a ROM :highfive:


Also pay attention to the blurb about proprietary binaries

Obtaining proprietary binaries

The Android Open-Source Project can't be used from pure source code only, and requires additional hardware-related proprietary libraries to run, specifically for hardware graphics acceleration.
Official binaries for the supported devices can be downloaded from Google's Nexus driver page, which add access to additional hardware capabilities with non-Open-Source code.
When building the master branch for a device, the binaries for the most recent numbered release or with the most recent date are the ones that should be used.
There is a link for the Nexus binaries in that blurb. Make sure you install them before building and you are good.
 
Last edited:

Scott

Retired Recognized Developer
Feb 20, 2007
29,238
66,257
268
Fargo
www.scottcrosler.com
Alright then...

Build 20131008.010041 up!


Changes
  • Re-synced repo for 2013/10/08
  • Fixed Settings -> Security F/C
  • Changed SU to SuperSU


Also can I have some people rate the thread 5 stars... The Nexus 7 FHD troll is at it again. He is going around rating my threads, and others, 1 star.

Any help with that would be appreciated. Damn trolls, lol!
 

ktkr

Senior Member
Nov 21, 2011
164
49
0
Alright then...

Build 20131008.010041 up!


Changes
  • Re-synced repo for 2013/10/08
  • Fixed Settings -> Security F/C
  • Changed SU to SuperSU


Also can I have some people rate the thread 5 stars... The Nexus 7 FHD troll is at it again. He is going around rating my threads, and others, 1 star.

Any help with that would be appreciated. Damn trolls, lol!
You fixed the security settings fc! Mind sharing how you managed to fix that?

Sent from my Nexus 7 using Tapatalk 4
 
  • Like
Reactions: crunch514

Scott

Retired Recognized Developer
Feb 20, 2007
29,238
66,257
268
Fargo
www.scottcrosler.com

mpmilestogo

Senior Member
Aug 9, 2009
348
66
0
Union City California
Alright then...

Build 20131008.010041 up!


Changes
  • Re-synced repo for 2013/10/08
  • Fixed Settings -> Security F/C
  • Changed SU to SuperSU


Also can I have some people rate the thread 5 stars... The Nexus 7 FHD troll is at it again. He is going around rating my threads, and others, 1 star.

Any help with that would be appreciated. Damn trolls, lol!
Hi Scott. Where is the download link for this one? I think a few folks would love to know the fix for the security fc since last I read it was blocking their update as well. Definitely want to try the aosp one.

Sent from my Nexus 7 using XDA Premium 4 mobile app
 
  • Like
Reactions: Scott

Scott

Retired Recognized Developer
Feb 20, 2007
29,238
66,257
268
Fargo
www.scottcrosler.com
Thanks Scotts, appreciated your fast response. :good:
:cowboy:
Your welcome!

Hi Scott. Where is the download link for this one? I think a few folks would love to know the fix for the security fc since last I read it was blocking their update as well. Definitely want to try the aosp one.

Sent from my Nexus 7 using XDA Premium 4 mobile app
Its in the OP. Post 1. I just changed the link. Happy downloading!
 

Scott

Retired Recognized Developer
Feb 20, 2007
29,238
66,257
268
Fargo
www.scottcrosler.com
hi scott,
could you please share the sources you build from? and specifically how you fixed the Security settings FC?
thanks.
The source is the AOSP tree and it can be found here: http://source.android.com/source/downloading.html (thats all I am using).

Fixing the Settings F/C was creative... had to Google to get the answer, lol

Here is what I found...

CM 10.2 initially had this issue as its based from AOSP like this rom (SOURCE). They did not explain a fix... Also, note this is a less than one week old issue. So I continued on with Google... (Google is a son of a ***** when you need it :))

Then found this thread on XDA from the Nexus 4 about an update to 4.2.2 HERE! This started to make sense as they posted a fix for the N4. HOWEVER that fix was not applicable to our N7.2 because we did not have the keymaster files on the vendor partition!!!

So test flashed the Google stock ROM /system/vendor/firmware/keymaster/* files into this AOSP ROM. VIOLA! It worked and solved the problem.

Now I will admit I am not sure why these files are not in the AOSP source tree as I am still learning... If you can shed more light then please do! But I do know that it fixed the issue. Was not seemingly prevalent before October 2nd (or maybe it was but thats when it was reported on CM10.2) and moving those files into the ROM base resolved (granted they are not in the same spot as the N4).

Please feel free to share anything you know in this thread.
 
Last edited:

mpmilestogo

Senior Member
Aug 9, 2009
348
66
0
Union City California
Your welcome!


Its in the OP. Post 1. I just changed the link. Happy downloading!
Thanks Scott. I think I found something rather strange with my tablet with just about any of the AOSP builds. I found this on another as well. It seems whenever I enable locations in chrome or chrome beta the tablet soft resets immediately. If I turn off location reporting, nothing happens but I get no location updates. I decided to restore things using the factory images. For the umpteen thousandth time, thanks to the Android team for providing the safety net!

Gonna try again later today and see if this issue persists after resetting the device to the factory image and reflashing the AOSP build.
 

Scott

Retired Recognized Developer
Feb 20, 2007
29,238
66,257
268
Fargo
www.scottcrosler.com
Thanks Scott. I think I found something rather strange with my tablet with just about any of the AOSP builds. I found this on another as well. It seems whenever I enable locations in chrome or chrome beta the tablet soft resets immediately. If I turn off location reporting, nothing happens but I get no location updates. I decided to restore things using the factory images. For the umpteen thousandth time, thanks to the Android team for providing the safety net!

Gonna try again later today and see if this issue persists after resetting the device to the factory image and reflashing the AOSP build.
No this very possible depending on the GAPPS used. I think this is more a GAPPS issue then a ROM issue. I cant say for sure but I might have time to look later.

If someone else knows then do tell.

However I dont much care for Chrome on mobile (love it on PC) so I use AOSP and it runs well. But have not tested location.

Im sure a fix can be found with enough effort.
 

mpmilestogo

Senior Member
Aug 9, 2009
348
66
0
Union City California
No this very possible depending on the GAPPS used. I think this is more a GAPPS issue then a ROM issue. I cant say for sure but I might have time to look later.

If someone else knows then do tell.

However I dont much care for Chrome on mobile (love it on PC) so I use AOSP and it runs well. But have not tested location.

Im sure a fix can be found with enough effort.
Interesting. I've tried the BANKS minimal GAPPS core and photosphere as well as the goo.im gapps in clean flashes of other aosp based ROMs but still had the same issue. Perhaps I'll try the PA gapps next since they seem to have everything in them. Gonna give the whole thing a try a bit later today as well. I'm lucky enough to have two Nexus 7 tablets so one has your latest CleanROM on it which I love! The other seems to have descended into flashing heaven or the other place ;).

Any help appreciate on the issue though. I'd love to run AOSP on the second tablet since one of them is destined for my daughter when she realizes she wants one.
 

TheDarkDefender

Senior Member
Aug 5, 2012
4,092
6,434
0
30
Reston, VA
The source is the AOSP tree and it can be found here: http://source.android.com/source/downloading.html (thats all I am using).

Fixing the Settings F/C was creative... had to Google to get the answer, lol

Here is what I found...

CM 10.2 initially had this issue as its based from AOSP like this rom (SOURCE). They did not explain a fix... Also, note this is a less than one week old issue. So I continued on with Google... (Google is a son of a ***** when you need it :))

Then found this thread on XDA from the Nexus 4 about an update to 4.2.2 HERE! This started to make sense as they posted a fix for the N4. HOWEVER that fix was not applicable to our N7.2 because we did not have the keymaster files on the vendor partition!!!

So test flashed the Google stock ROM /system/vendor/firmware/keymaster/* files into this AOSP ROM. VIOLA! It worked and solved the problem.

Now I will admit I am not sure why these files are not in the AOSP source tree as I am still learning... If you can shed more light then please do! But I do know that it fixed the issue. Was not seemingly prevalent before October 2nd (or maybe it was but thats when it was reported on CM10.2) and moving those files into the ROM base resolved (granted they are not in the same spot as the N4).

Please feel free to share anything you know in this thread.
Thank you very much. Did you figure out the commit in the CM repo that actually solved this issue?

Also, what do you mean by So test flashed the Google stock ROM /system/vendor/firmware/keymaster/* files into this AOSP ROM ? Could you elaborate please?

I'd be happy to share anything I get to know about this. Been researching about this too. :) Thanks.