PINE64
Manual to Compile Android for PINE46 - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4)
+--- Forum: Android on Pine A64(+) (https://forum.pine64.org/forumdisplay.php?fid=5)
+--- Thread: Manual to Compile Android for PINE46 (/showthread.php?tid=1116)

Pages: 1 2 3


Manual to Compile Android for PINE46 - lvcargnini - 05-21-2016

Anyone, 

Could please provide the steps to compile an Android image for PINE64. I would like to start working in the latest Android image, specially targeting the AndroidTV build for the PINE64.

This thread could be used to aggregate the steps-by-steps later.

Provisioning to add possible steps here later, so no one needs to hunt multiple pages of messages.


RE: Manual to Compile Android for PINE46 - NGC6691 - 05-22-2016

Download latest Android SDK (Android MM 6.0) from here: http://wiki.pine64.org/index.php/Pine_A64_Software_Release#Android_SDK

Once in the source directory:
(Its very useful to use ccache and -jobs option to speed up a lot the compiling procedure)

Code:
$ export USE_CCACHE=1
$ export CCACHE_DIR=/path/of/.ccache
$ prebuilts/misc/linux-x86/ccache/ccache -M 50G

$ source build/envsetup.sh
$ lunch tulip_p1-eng
$ make -jN

Replace /path/of/.ccache with your preferred directory
Replace N with the number of your CPU cores.

But, at this point I have a question too:

How to flash the MicroSD using dd? I can't find any info in the wiki.
I mean, we should have a proper partition layout before to flash generated image files.


RE: Manual to Compile Android for PINE46 - Bloodyraw - 05-22-2016

Is anyone working on a dedicated media-image like Openelec ?


RE: Manual to Compile Android for PINE46 - lvcargnini - 05-22-2016

(05-22-2016, 08:34 AM)NGC6691 Wrote: Download latest Android SDK (Android MM 6.0) from here: http://wiki.pine64.org/index.php/Pine_A64_Software_Release#Android_SDK
.....
Thanks for the quick reply, why tulip_p1-eng ?

did you created the pine64 or this is a copy from another device, to use as baseline  ?


RE: Manual to Compile Android for PINE46 - Luke - 05-22-2016

(05-22-2016, 09:17 AM)Bloodyraw Wrote: Is anyone working on a dedicated media-image like Openelec ?

I take that you mean linux based ? We would need the mali binaries for that to make sense.


RE: Manual to Compile Android for PINE46 - NGC6691 - 05-23-2016

(05-22-2016, 04:05 PM)lvcargnini Wrote:
(05-22-2016, 08:34 AM)NGC6691 Wrote: Download latest Android SDK (Android MM 6.0) from here: http://wiki.pine64.org/index.php/Pine_A64_Software_Release#Android_SDK
.....
Thanks for the quick reply, why tulip_p1-eng ?

did you created the pine64 or this is a copy from another device, to use as baseline  ?

tulip_p1 is the device codename of PINE64.


RE: Manual to Compile Android for PINE46 - lvcargnini - 05-23-2016

I had to modify the file build/core/combo/mac_version.mk

How can I upload you, or anyone with this changes ? where is the official github tree ?

Also I'm getting this error:

Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.

Your version is: java version "1.8.0_60" Java™ SE Runtime Environment (build 1.8.0_60-b27) Java HotSpot™ 64-Bit Server VM (build 25.60-b23, mixed mode).
The required version is: "1.7.x"

Please follow the machine setup instructions at
https://source.android.com/source/initializing.html
************************************************************
build/core/main.mk:171: *** stop. Stop.

\e[0;31m#### make failed to build some targets (16 seconds) ####\e[00m


Android 6 and M where suppose to compile on OpenJDK or JDK 8

(05-23-2016, 11:44 AM)lvcargnini Wrote: I had to modify the file build/core/combo/mac_version.mk

How can I upload you, or anyone with this changes ? where is the official github tree ?

Also I'm getting this error:

Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.

Your version is: java version "1.8.0_60" Java™ SE Runtime Environment (build 1.8.0_60-b27) Java HotSpot™ 64-Bit Server VM (build 25.60-b23, mixed mode).
The required version is: "1.7.x"

Please follow the machine setup instructions at
   https://source.android.com/source/initializing.html
************************************************************
build/core/main.mk:171: *** stop.  Stop.

\e[0;31m#### make failed to build some targets (16 seconds) ####\e[00m


Android 6 and M where suppose to compile on OpenJDK or JDK 8
It seems we need to add teh following :
export EXPERIMENTAL_USE_JAVA8=1

I'm trying to set this variable without too many success so far.


RE: Manual to Compile Android for PINE46 - IlyaM - 05-24-2016

When I try to compile it, I get an error

Code:
No private recovery resources for TARGET_DEVICE tulip_p1-eng
make: *** No rule to make target 'external/wpa_supplicant_8/wpa_supplicant/src/drivers/drivers.mk'. Stop.
#### make failed to build some targets (08:39 (mm:ss)) ####
I tried to reinstall ubuntu, the same issue
How can I solve it?
I use Ubuntu 16.04 and openjdk-7


RE: Manual to Compile Android for PINE46 - NGC6691 - 05-24-2016

@lvcargnini: I suggest you to downgrade to java 7, Android 6 isn't ready yet to be compiled with java 8 by default.
AFAIK there isn't any official github tree.


RE: Manual to Compile Android for PINE46 - NGC6691 - 05-24-2016

(05-24-2016, 02:50 AM)IlyaM Wrote: When I try to compile it, I get an error

Code:
No private recovery resources for TARGET_DEVICE tulip_p1-eng
make: *** No rule to make target 'external/wpa_supplicant_8/wpa_supplicant/src/drivers/drivers.mk'. Stop.
#### make failed to build some targets (08:39 (mm:ss)) ####
I tried to reinstall ubuntu, the same issue
How can I solve it?
I use Ubuntu 16.04 and openjdk-7

Take a look in external/wpa_supplicant_8/wpa_supplicant, there must be a symlink named src pointing to ../src.