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

Search This thread

fhem

Senior Member
Nov 4, 2013
880
1,573
Pittsburgh, PA
I didn't provide any build/tag for my Nexus 5. I just synced to the newest branch, which was android-6.0.1_r16. Now that I see that list, it doesn't list Nexus 5 next to r16. So does that mean that I need to build it with r11 instead?



As I understand it, yes. Some of those rXX versions are just for device-specific updates.

As long as it built and flashed OK you should be good at r16 ---- r12 , r13, and r16 just added some stuff for nexus 9, nexus player and pixel c. You can check the changelogs here.
 

oops_mr_gumby

Member
Feb 14, 2016
49
8
To see the changes from r11 to r16 you can apparently try running:
Code:
repo forall -pc 'git log --no-merges --oneline android-6.0.1_r11..android-6.0.1_r16

But I just installed a fresh OS and I don't haven't setup a build environment yet so I don't know what format the output comes in, or how useful it might be to you in this case.

I'm no expert but I have read at least one report of problems, I think it was the phone didn't work on a nexus 5 with the pixel c update rXX version installed. I suspect some combinations will work and other won't.
 

BreckZeBoulay

Senior Member
Oct 23, 2012
1,380
640
Boulay in Frankreich :D
Hello everybody !

I change my OS from Ubuntu 14.04 to Debian Stretch.
When I start compiling, I've got this error :
Code:
You are attempting to build with the incorrect version
of java.
 
Your version is: openjdk version "1.8.0_91" OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-2-b14) OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode).
The required version is: "1.7.x"
However, Google recommends to install openjdk8.

Also here : https://source.android.com/source/building.html#wrong-java-version , it's written :
Another JDK previously installed appearing in your path. Prepend the correct JDK to the beginning of your PATH or remove the problematic JDK.
What's the PATH ?

I'm a "bit" lost. :(
 

fhem

Senior Member
Nov 4, 2013
880
1,573
Pittsburgh, PA
Hello everybody !

I change my OS from Ubuntu 14.04 to Debian Stretch.
When I start compiling, I've got this error :
Code:
You are attempting to build with the incorrect version
of java.
 
Your version is: openjdk version "1.8.0_91" OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-2-b14) OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode).
The required version is: "1.7.x"
However, Google recommends to install openjdk8.

Also here : https://source.android.com/source/building.html#wrong-java-version , it's written :

What's the PATH ?

I'm a "bit" lost. :(

Just comment out or delete these lines and it will build fine with Open 8. You will still get the warning message but it will complete the build and all will be good. The java 8 is for the master branch and N --- but MM 6.XXXXXXX will build fine with Open 8.

FYI ----> Look at lines 176 and 177

Code:
Java Development Kit (JDK)

Please note, since there are no available supported OpenJDK 8 packages for Ubuntu 14.04, the Ubuntu 15.04 packages must be installed manually. See JDK for Ubuntu LTS 14.04 for precise instructions.

The master branch of Android in AOSP: Ubuntu - OpenJDK 8, Mac OS - jdk 8u45 or newer
Android 5.x (Lollipop) - Android 6.0 (Marshmallow): Ubuntu - OpenJDK 7, Mac OS - jdk-7u71-macosx-x64.dmg
Android 2.3.x (Gingerbread) - Android 4.4.x (KitKat): Ubuntu - Java JDK 6, Mac OS - Java JDK 6
Android 1.5 (Cupcake) - Android 2.2.x (Froyo): Ubuntu - Java JDK 5
 
  • Like
Reactions: BreckZeBoulay

fhem

Senior Member
Nov 4, 2013
880
1,573
Pittsburgh, PA
I delete the red lines and add the green lines ? (Sorry this noob question)

The red - is the old and the green + is the new so ...................... so you can see I simply added # at the beginning of lines 171, 192, 203 , and 219. Adding the # simply comments out that line ---> same as deleting. So you could also delete lines 171, 192, 203, and 219 and get the same result.
 
  • Like
Reactions: BreckZeBoulay

BreckZeBoulay

Senior Member
Oct 23, 2012
1,380
640
Boulay in Frankreich :D
Code:
external/guava/guava/src/com/google/common/reflect/Types.java:317: error: TypeVariableImpl is not abstract and does not override abstract method getAnnotatedBounds() in TypeVariable
  private static final class TypeVariableImpl<D extends GenericDeclaration>
                       ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
1 warning
build/core/host_java_library.mk:91*: la recette pour la cible «*out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/javalib.jar*» a échouée
make: *** [out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/javalib.jar] Erreur 41
make: *** Attente des tâches non terminées....

#### make failed to build some targets (17:52 (mm:ss)) ####

Any idea ?
 

fhem

Senior Member
Nov 4, 2013
880
1,573
Pittsburgh, PA
Code:
external/guava/guava/src/com/google/common/reflect/Types.java:317: error: TypeVariableImpl is not abstract and does not override abstract method getAnnotatedBounds() in TypeVariable
  private static final class TypeVariableImpl<D extends GenericDeclaration>
                       ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
1 warning
build/core/host_java_library.mk:91*: la recette pour la cible «*out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/javalib.jar*» a échouée
make: *** [out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/javalib.jar] Erreur 41
make: *** Attente des tâches non terminées....

#### make failed to build some targets (17:52 (mm:ss)) ####

Any idea ?

I haven't seen that error but it looks like a problem w/ your java.
Run each of the following from your linux terminal and post results.

Code:
java -version

sudo update-alternatives --config java

sudo update-alternatives --config javac
 
Last edited:

BreckZeBoulay

Senior Member
Oct 23, 2012
1,380
640
Boulay in Frankreich :D
Run each of the following from your linux terminal and post results.

Code:
root@salon:/home/pierre# java --version
Unrecognized option: --version
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
root@salon:/home/pierre# update-alternatives --config java
Il n'existe qu'une «*alternative*» dans le groupe de liens java (qui fournit /usr/bin/java)*:*/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
Rien à configurer.
root@salon:/home/pierre# update-alternatives --config javac
Il n'existe qu'une «*alternative*» dans le groupe de liens javac (qui fournit /usr/bin/javac)*:*/usr/lib/jvm/java-8-openjdk-amd64/bin/javac
Rien à configurer.
First result seems not good...
 

fhem

Senior Member
Nov 4, 2013
880
1,573
Pittsburgh, PA
Code:
root@salon:/home/pierre# java --version
Unrecognized option: --version
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
root@salon:/home/pierre# update-alternatives --config java
Il n'existe qu'une «*alternative*» dans le groupe de liens java (qui fournit /usr/bin/java)*:*/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
Rien à configurer.
root@salon:/home/pierre# update-alternatives --config javac
Il n'existe qu'une «*alternative*» dans le groupe de liens javac (qui fournit /usr/bin/javac)*:*/usr/lib/jvm/java-8-openjdk-amd64/bin/javac
Rien à configurer.
First result seems not good...

I was wrong sorry should be------> java -version

and you look to be good with the others not sure sorry
 

fhem

Senior Member
Nov 4, 2013
880
1,573
Pittsburgh, PA
Code:
pierre@salon:~$ java -version
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-2-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)

And yes the others are good, sorry I'm a french noob :p

No problem Your English is much better then my French LOL -----> I'm really not sure about that error. Which aosp branch/tag are you trying to build and for which device?? I am currently building aosp 6.0.1_r25 for N6, N6P, and N9 using java 8 w/o any issues.
 

fhem

Senior Member
Nov 4, 2013
880
1,573
Pittsburgh, PA
Attach my modded manifest, may be I delete a line......
But I done this before, and no issue

Hate to say it but it sounds like the problem may be with Stretch. I know there people having problems w/ Ubuntu 16.04 also. I don't plan on updating to 16.04 base until I'm sure they get all the bugs out.
Sounds like Stretch is still very new and bound to have issues.

Good luck with getting it figured out. Sorry I can't do more to help.
 

Suici Doga

Senior Member
Mar 3, 2016
74
2
Colombo
suicsoft.com
I have a laptop which has AMD A8-4500M.When compiling AOSP with `-j4` it compiles really fast but it heats up to 98C and I quickly stop it?.About 2 months ago the thermal paste has been applied and the fan is clean.

when compiling on a single core the temperature is about 88C but it is slooow.

Any suggestions?

UPDATE : Reapplied thermal paste and undervolted (see https://gist.github.com/SuicSoft/ea59b5e7856bafdb6972406c4dae331d) and now it doesn't go above 80C even when compiling with 4 cores.And how can I get it to boost for longer since it doesn't overheat but still reduces speed to 1.9Ghz after 2 minutes.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 411
    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!
    82
    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 "you@youremail.com"
    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!
    60
    I have decided to bring this project out of the shadows. The builds are now accessible through dedicated device threads:

    hammerhead

    flo

    deb
    52
    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
    27
    Build 6 is up!


    The following changes were made...


    • File system install instead of block install
    • Added Google Location Services to framework
    • Fixed a root issue that couple DEB users were having



    The ROM is now like a standard ROM install as far as the system.dat vs a /system install. What does this mean? It means you edit the ROM now like add your own apps, take things out and repost it with your changes (as long as credit is given).

    Edit: I posted a Diff of all changes made from Source to this ROM. Its in post #2 for anyone wanting to know the changes that were made to get it where its at.

    Enjoy!