Manual to Compile Android for PINE46
#1
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.
#2
Download latest Android SDK (Android MM 6.0) from here: http://wiki.pine64.org/index.php/Pine_A6...ndroid_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.
#3
Is anyone working on a dedicated media-image like Openelec ?
#4
(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_A6...ndroid_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  ?
#5
(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.
You can find me on IRC, Discord and Twitter


#6
(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_A6...ndroid_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.
#7
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.
#8
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
#9
@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.
#10
(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.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Android 6.0 Tablet and TV (release candidate, maintained) ayufan 228 389,433 12-29-2020, 01:13 AM
Last Post: firmwarefile
Shocked Remote for Android? liodra 18 29,790 12-23-2020, 06:11 AM
Last Post: Learnincurve
  Adding an accelerometer to Android modsbyus 11 16,876 11-02-2020, 08:12 PM
Last Post: Little_Johnny
  Android Things OS dqvsra 2 7,004 12-03-2019, 09:52 AM
Last Post: hangglider
  Is there another link for Android images? Maalth 3 7,080 10-10-2019, 07:57 AM
Last Post: tophneal
Question Android SDK Oreo NGC6691 2 5,632 07-15-2019, 08:29 PM
Last Post: dazza5000
  Putting Android 9 RockPro64 source into easier to manage repositories dazza5000 0 3,353 07-15-2019, 08:29 PM
Last Post: dazza5000
  Android 5.1.1 TV (old-stable, no longer maintained) ayufan 194 259,234 03-12-2019, 04:53 PM
Last Post: neosapien
  Issues with SD Card and Running Android Twistedx 0 3,558 02-26-2019, 11:58 AM
Last Post: Twistedx
  Android 7.1 (PINE A64(+)) pineadmin 59 105,454 02-10-2019, 07:44 PM
Last Post: mmmarcus

Forum Jump:


Users browsing this thread: 3 Guest(s)