Android Nougat 7 Raspberry Pi 3 issues

1,809 views
Skip to first unread message

sant...@gmail.com

unread,
Jan 6, 2017, 10:05:02 PM1/6/17
to Android-rpi, pey...@gmail.com
Hello All,
This is Santosh,I am getting the following error when i build android nougat 7 for raspberry pi3,i am getting this error when i run make -j4 after executing the lunch command,could you let me know the rootcause for this issue,the java version that i am using is 1.8 and the ubuntu is 64bit and machine is 64bit.

Error summary:-

============================================
Checking build tools versions...
************************************************************
You asked for an OpenJDK based build but your version is
java version "1.8.0_111" Java(TM) SE Runtime Environment (build 1.8.0_111-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode).
************************************************************
build/core/main.mk:231: *** stop.
build/core/ninja.mk:163: recipe for target 'out/build-aosp_arm.ninja' failed
make: *** [out/build-aosp_arm.ninja] Error 1

-----------------------------------------------------------------------------------------
Regards
Santosh.R



Henri Koivuneva

unread,
Jan 9, 2017, 1:01:48 PM1/9/17
to Android-rpi, pey...@gmail.com, sant...@gmail.com
Have you solved the problem yet? I assume you're using Oracle Java from the error. Have you tried with OpenJDK as the message suggests?

Also:
https://github.com/android-rpi/local_manifests
http://source.android.com/source/initializing.html

OpenJDK 8+ (ubuntu 16.04 & 16.10) is what I've used to build nougat-x86 and marshmallow-x86 as it's required.

Good luck! Please report back on your progress, I'd love to build this too during the next weekends.

santosh ramani

unread,
Jan 14, 2017, 1:26:00 PM1/14/17
to Henri Koivuneva, Android-rpi, Peter Yoon
Hi Henri,
             Still facing the build issue for android Nougat 7 and after doing lunch rpi3-eng and i issued make -j4 it is getting stuck at  "including ./tools/test/connectivity/android.mk" and after sometime reports out of memory error for kati ninja and build fails,Kindly help in resolving this issue,please reply.

Regards
Santosh

santosh ramani

unread,
Jan 14, 2017, 1:26:36 PM1/14/17
to Henri Koivuneva, Android-rpi, Peter Yoon
Henri,
       I am using openjdk 1.8 only.

Regards
Santosh

Henri Koivuneva

unread,
Jan 14, 2017, 2:17:18 PM1/14/17
to santosh ramani, Android-rpi
Hi,

Okay! First, make sure your system fits these requirements: https://source.android.com/source/requirements.html
How much memory do you have? If it's for example 8GB RAM, add swap space so that you have at least 16GB usable total. The building will go slower but this way it might be able to complete...

Then you can try three things, adding more system memory (or allocating more to the VM), lowering the amount of memory jack should use (A), and/or building without ninja (B). Ninja makes builds much faster but uses more memory too.

A: With out of memory errors you can edit your ~/.jack-server/config.properties file and change jack.server.max-service to a lower number like 2. For example:
jack.server.max-service=2

Then when building, try "make -j2" also. Building will be slower but if your device doesn't have enough memory to run 4 concurrent threads to build, these should help it.

B: The Android-x86 developer JJ Meijer has instructions for ninja here: https://groups.google.com/d/msg/android-x86/oR9PpcPnRVA/w-LGGRiTAgAJ

Out of memory tips
Add to device/generic/common/Boardconfig.mk (or some more appropriate location):
ANDROID_JACK_VM_ARGS := -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4096m

Disable Ninja to save some memory (but will slow down incremental builds), also add:
USE_NINJA := false

Stop the Jack server before a new (incremental) build:
jack-admin stop-server

Add those lines to your BoardConfig.mk, stop jack server and then restart the build. That might help too.

NOTE: The two lines above worked for Marshmallow, I haven't needed to do this anymore after moving to a native Ubuntu install that gets all the system memory my PC has (24GB). I haven't built android-rpi yet either, will do hopefully next weekend, so I'm not sure if all of this applies....but here goes! At least you can try if they do anything!

santosh ramani

unread,
Jan 22, 2017, 11:36:24 AM1/22/17
to Henri Koivuneva, Android-rpi, Peter Yoon

Hi Henri,

Still the issue is not resolved,i am getting build issues even for nougat 7 for raspberry pi 3 after trying the build steps that you had suggested,PFA the snapshot,please reply,my build machine is having 2gb ram and i am using make -j2 for the same.

Regards
Santosh

IMAG1294.jpg

santosh ramani

unread,
Jan 27, 2017, 12:52:10 PM1/27/17
to Henri Koivuneva, Android-rpi, Peter Yoon
Hi Henri,
            Still stuck with the nougat build issue and the issue is not getting resolved and any inputs from your end for getting this issue resloved,please reply.

Regards
Santosh

Henri Koivuneva

unread,
Jan 27, 2017, 8:42:05 PM1/27/17
to Android-rpi
Hi,

Looks like the only solution would be to get more system memory (RAM) on the pc or use a machine that is closer to the Android build requirements page.

If you can't add RAM or use another computer with 16GB memory, you could try setting up an Azure trial with 0 INR spending limit and then create a server that matches the requirements? That might work!
https://azure.microsoft.com/en-in/offers/ms-azr-0044p/

santosh ramani

unread,
Jan 29, 2017, 7:14:33 AM1/29/17
to Henri Koivuneva, Peter Yoon, Android-rpi
Hi Henri,
            I have upgraded the RAM and my system ram is 10GB now,and i am using Ubuntu 16.04 version,Now i am getting the "java -Xlint unchecked error",Kindly let me know on how to resolve this issue,PFA the snapshot,please reply.

Thanks and  Regards
Santosh




--
You received this message because you are subscribed to a topic in the Google Groups "Android-rpi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-rpi/rm_ML0S6u3o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-rpi+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-rpi/8d1467cb-5dbc-4097-96d1-095b1ff29e0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

IMAG1366.jpg

Henri Koivuneva

unread,
Jan 30, 2017, 7:37:24 AM1/30/17
to Android-rpi
Hi,

Unfortunately I have no idea what could be the cause... Did you try Repo sync, deleting the out folder and building again, or deleting the whole source and syncing again? Are you following the instructions by the Android-rpi developers? Are all the required packages installed and system updates done?

santosh ramani

unread,
Feb 5, 2017, 9:17:03 AM2/5/17
to Henri Koivuneva, Peter Yoon, Android-rpi
Hi Henri,
            I could build nougat but the .img files are generated under out/target/product/generic/ folder instead of out/target/product/rpi3 what could be the issue,and couple of times i got Out of Memory for Jack errors and the build was getting interrupted,Kindly provide your comments.

Regards
Santosh

On Sun, Jan 29, 2017 at 6:34 PM, Henri Koivuneva <henri.k...@gmail.com> wrote:
Hi, 

Unfortunately I have no idea what could be the cause... Did you try Repo sync, deleting the out folder and building again, or deleting the whole source and syncing again? Are you following the instructions by the Android-rpi developers? Are all the required packages installed and system updates done? 

Henri Koivuneva

unread,
Feb 5, 2017, 9:51:00 AM2/5/17
to santosh ramani, Android-rpi, Peter Yoon
I'd recommend you to check what lunch command you used to build -- the correct one is "lunch rpi3-eng" -- and that you follow the instructions to the letter :) it sounds like the correct arguments weren't given for some reason. 


# Build Android source
 $ source build/envsetup.sh
 $ lunch rpi3-eng
 $ make

I hope this helps! 


Henri Koivuneva

unread,
Feb 11, 2017, 3:28:02 AM2/11/17
to Android-rpi
How's it going with the building?

santosh ramani

unread,
Feb 11, 2017, 1:05:21 PM2/11/17
to Henri Koivuneva, Android-rpi
Hi Henri,
            Still facing build issues getting OOM issues with java rack,kindly provide your comments,tried fixing the issue with the previously mentioned suggestions,did a repo sync as well even then the issue exists,kindly reply.

Regards
Santosh

On Sat, Feb 11, 2017 at 1:58 PM, Henri Koivuneva <henri.k...@gmail.com> wrote:
How's it going with the building?
--
You received this message because you are subscribed to a topic in the Google Groups "Android-rpi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-rpi/rm_ML0S6u3o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-rpi+unsubscribe@googlegroups.com.

Henri Koivuneva

unread,
Feb 11, 2017, 2:13:10 PM2/11/17
to santosh ramani, Android-rpi
Ah.. You can try reducing the number of Jack simultaneous compilations to a lower value in your jack config file, for example 2, if you haven't yet done it.. you can check it again just in case. Make sure you restart jack-server or your computer after changing the variables. Please see my previous message which has instructions:



These groups are full of valuable tips ;)

santosh ramani

unread,
Feb 12, 2017, 3:28:32 AM2/12/17
to Henri Koivuneva, Peter Yoon, Android-rpi
Hi Henri,
             I tried all the steps once again that you had mentioned in the your previous email to me,even then the images are not getting built for rpi3 and there is no rpi3 folder being created  for holding the *.img files,PFA the snapshot of the build logs,Kindly provide your comments,i had selected lunch rpi3-eng only while building for raspberry pi3,please reply.

Thanks and Regards
Santosh
IMAG1397.jpg

Henri Koivuneva

unread,
Feb 12, 2017, 3:49:13 AM2/12/17
to santosh ramani, Peter Yoon, Android-rpi
Wow...I have no idea of the folder it should output to, but by logic it should be rpi3... Well at least it's now building SOME images! Do they boot on the pi? :D I'll try to find time to try building today, but since my Internet speed has gone down a lot, I'm not sure how long it'll take. Let's see if the same happens here. 

@Peter Yoon &  others, do you have any tips for Santosh?  

To unsubscribe from this group and all its topics, send an email to android-rpi...@googlegroups.com.

santosh ramani

unread,
Feb 25, 2017, 4:39:17 AM2/25/17
to Henri Koivuneva, Peter Yoon, Android-rpi
To unsubscribe from this group and all its topics, send an email to android-rpi+unsubscribe@googlegroups.com.

santosh ramani

unread,
Feb 25, 2017, 4:40:01 AM2/25/17
to Henri Koivuneva, Peter Yoon, Android-rpi
Hi Henri,
             Any updates on this build issue for rpi3,Kindly let me know.

Thanks and Regards
Santosh

Henri Koivuneva

unread,
Feb 25, 2017, 7:02:18 PM2/25/17
to santosh ramani, Android-rpi
Hi!

What are the exact commands you enter to start the build?

Have you synced the source (repo sync) to fetch the latest updates? 

Did you make any changes to the manifest(s), device configuration like BoardConfig etc? Is it 100% as you got it from the repos?

Best wishes,
Henri

santosh ramani

unread,
Feb 26, 2017, 8:40:35 AM2/26/17
to Henri Koivuneva, Android-rpi
Hi Henri,
             I had followed all the steps that you had mentioned in your previous emaisl to me and as well the instructions that was mentioned in the  rpi groups as well,were you able to successfully build Android Nougat 7 in your setup without any build issues,Do let me know.

Regards
Santosh

Henri Koivuneva

unread,
Feb 26, 2017, 5:23:02 PM2/26/17
to Android-rpi, henri.k...@gmail.com, sant...@gmail.com

Hi!

Ah, okay. I made a build now after sync finished, and it DOES indeed create the folder out/target/product/rpi3 after I followed the directions to the letter to test this. On a fresh install of Ubuntu 17.04 as the screenshot shows. Note the correct out folder and successful build.

1. I did these https://github.com/android-rpi/local_manifests
2. Then continued with https://github.com/android-rpi/device_brcm_rpi3
3. Built kernel, installed the stuff mentioned there, and did the changes mentioned on that page from the "Patch framework source" part to the files.
Wiki link from the guide: https://github.com/android-rpi/device_brcm_rpi3/wiki

eglApi.cpp line 495 and line 1865
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index f41e6e2
..62b76d7 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -495,7 +495,7 @@ EGLSurface eglCreateWindowSurface(  EGLDisplay dpy, EGLConfig config,
         cnx
->egl.eglGetConfigAttrib(iDpy, config, EGL_ALPHA_SIZE, &a);
         
if (a > 0) {
             
// alpha-channel requested, there's really only one suitable format
-            format = HAL_PIXEL_FORMAT_RGBA_8888;
+            format = HAL_PIXEL_FORMAT_BGRA_8888;
         
} else {
             
EGLint r, g, b;
             r
= g = b = 0;
@@ -1865,7 +1865,7 @@ EGLClientBuffer eglCreateNativeClientBufferANDROID(const EGLint *attrib_list)
     
// Validate format.
     
if (red_size == 8 && green_size == 8 && blue_size == 8) {
         
if (alpha_size == 8) {
-            format = HAL_PIXEL_FORMAT_RGBA_8888;
+            format = HAL_PIXEL_FORMAT_BGRA_8888;
         
} else {
             format
= HAL_PIXEL_FORMAT_RGB_888;
         
}


GLSurfaceView.java line 992
diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java
index
0f5dd3a..08d31c1 100644
--- a/opengl/java/android/opengl/GLSurfaceView.java
+++ b/opengl/java/android/opengl/GLSurfaceView.java
@@ -992,7 +992,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
     
*/
     
private class SimpleEGLConfigChooser extends ComponentSizeChooser {
         
public SimpleEGLConfigChooser(boolean withDepthBuffer) {
-            super(8, 8, 8, 0, withDepthBuffer ? 16 : 0, 0);
+            super(8, 8, 8, 8, withDepthBuffer ? 24 : 0, 0);
         
}
     
}



StrictMode.java line 1077
diff --git a/core/java/android/os/StrictMode.java b/core/java/android/os/StrictMode.java
index c36b488
..ee02a86 100644
--- a/core/java/android/os/StrictMode.java
+++ b/core/java/android/os/StrictMode.java
@@ -1077,7 +1077,7 @@ public final class StrictMode {
         
// overrides this, so we force the behavior only after the short-circuit
         
// check above.
         
if (IS_ENG_BUILD) {
-            doFlashes = true;
+         //   doFlashes = true;
         
}
 
         
// Thread policy controls BlockGuard.

The line numbers change when the developers update the code so if you can't find the specific parts, search in the files and they're pretty recognizable.
I just commented those parts out instead of deleting.


 Could you send your "lunch rpi3-eng" command output here? Mine is as follows:
============================================
PLATFORM_VERSION_CODENAME
=REL
PLATFORM_VERSION
=7.1.1
TARGET_PRODUCT
=rpi3
TARGET_BUILD_VARIANT
=eng
TARGET_BUILD_TYPE
=release
TARGET_BUILD_APPS
=
TARGET_ARCH
=arm
TARGET_ARCH_VARIANT
=armv7-a-neon
TARGET_CPU_VARIANT
=cortex-a7
TARGET_2ND_ARCH
=
TARGET_2ND_ARCH_VARIANT
=
TARGET_2ND_CPU_VARIANT
=
HOST_ARCH
=x86_64
HOST_2ND_ARCH
=x86
HOST_OS
=linux
HOST_OS_EXTRA
=Linux-4.10.0-8-generic-x86_64-with-Ubuntu-17.04-zesty
HOST_CROSS_OS
=windows
HOST_CROSS_ARCH
=x86
HOST_CROSS_2ND_ARCH
=x86_64
HOST_BUILD_TYPE
=release
BUILD_ID
=NMF26X
OUT_DIR
=out
============================================


Now I'll follow the rest of the instructions to add TV launcher and see if it boots.

Best wishes,
Henri

These groups are full of valuable tips ;)
2017-02-11 20:05 GMT+02:00 santosh ramani <sant...@gmail.com>:
Hi Henri,
            Still facing build issues getting OOM issues with java rack,kindly provide your comments,tried fixing the issue with the previously mentioned suggestions,did a repo sync as well even then the issue exists,kindly reply.

Regards
Santosh
On Sat, Feb 11, 2017 at 1:58 PM, Henri Koivuneva <henri.k...@gmail.com> wrote:
How's it going with the building?

--
You received this message because you are subscribed to a topic in the Google Groups "Android-rpi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-rpi/rm_ML0S6u3o/unsubscribe - private.
To unsubscribe from this group and all its topics, send an email to android-rpi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-rpi/777cef16-2b42-4c85-b2a0-5a93a3d39c5e%40googlegroups.com - private.
For more options, visit https://groups.google.com/d/optout - private.







Henri Koivuneva

unread,
Feb 26, 2017, 7:10:00 PM2/26/17
to Android-rpi, santosh ramani
Well I get the same problem with both my monitors as previously. "Rainbow screen of death". I spent 1.5 hours trying different config.txt and build.prop tweaks but couldn't get it to show anything else but the rainbow splash.....using the official 5v 2.5a power supply.

Do you guys have any suggestions on what to try? They work well in Ubuntu and Raspbian. I tried the same configs toi but with no luck. I also tried with my OnePlus 3 5v4a charger and a high quality micro USB charging cable, also with no difference.

Monitor 1: 1680x1050 ViewSonic VX2240W, VGA to HDMI active adapter, works with Raspbian, Ubuntu

Monitor 2: 3440x1440 Asus PG348Q native HDMI, works with Raspbian and Ubuntu with different resolutions, max 1920x1080

I'm out of ideas. Please help.

vijayb...@gmail.com

unread,
Apr 20, 2019, 11:19:02 AM4/20/19
to Android-rpi
Hi Santosh,

Try using following command

$ export USE_NINJA=false

Regards,
Vijay

sheh

unread,
Jul 7, 2026, 4:03:13 AM (24 hours ago) Jul 7
to Android-rpi

The thread shows how technical projects often depend on the right setup, compatibility, and enough system resources to work properly.That same planning matters with work trucks too, where fitment, durability, and practical protection should match daily hauling needs.Truck accessories like BackRack connect naturally with this idea by focusing on cab protection, secure equipment use, and long-term reliability.

ramesh ranganathan

unread,
Jul 7, 2026, 4:11:15 AM (24 hours ago) Jul 7
to sheh, Android-rpi
Send phone number 

--
You received this message because you are subscribed to the Google Groups "Android-rpi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-rpi...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/android-rpi/3dbd0baa-2d4b-44e5-96ea-880615cc62b9n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages