BPi Android 4.2 Build Guide

72 21719
Edited by mattrix at Mon Nov 24, 2014 17:03


I use DigitalOcean.
$5 USD per month for a half decent cloud server.

You pay per the hour, so when I need heavy usage, I simply create a new grunty "droplet" (as they call it), do my work and then destroy it. 12cents to do something my own PC would take forever to do!

Right now I have just created a $0.23 per hour 16GB Ram 8 CPU droplet.
I will login, download that large file and then upload to GIT
Then I will destroy it.

So, it will take less than an hour.
23cents to save my bandwidth at home and take 1/10th of the time

Edited by ChrisP at Tue Nov 25, 2014 00:54


Maybe there is a timeout if the push is too long, so without a high upload capacity, it allways finish to freeze (I have 100 Mb down, but just 5 Mb  up).

By the way, do you have an idea which SDK is the most up to date, between the one you are uploading and the one I tried ? (Taken from http://pan.baidu.com/wap/link?sh ... K-v3.0.1&page=1 )

Edited by mattrix at Mon Nov 24, 2014 17:42

That's not Vagrant.

That's an actual Ubuntu Cloud Server.

I only use Vagrant at home when development.
Heavy building tasks / upload / download - let another computer do it

Vagrant is really just a "wrapper" for virtual-box.
A way to ensure everyone working on a project is using the exact same development environment.

On my Ubuntu cloud server, I actually use Docker to run my websites etc.
Docker is basically a VM but with no overhead / large size.
More of a sandbox environment I guess?
Docker is the next "big thing" - very very cool!

Not sure how this got above your reply??? STRANGE!

Looking good so far

Edited by mattrix at Mon Nov 24, 2014 18:43


Can someone pull that and try a build?

I deleted lots of large files in their that I reckon arn't needed.
Test videos and Eclipse etc.

still a lot more I bet can be deleted.

Surely after a build, we could look at folders last modified time and remove ones that arn't used during the build?

Should be about half the size of that other download.
Around 1.5GB I think.
Git also compresses before downloading, so maybe less?

I just used the file from the first post on this forum.
I'm not really into the Android thing at the moment, but like to help out where I can.
I think 1 decent repo with a few solid contributors and 1x "official" base Android image would be great.

mattrix replied at Mon Nov 24, 2014 18:35

Can someone pull that and try a build?

Hi Mattrix,
I am also thinking how I release the source code. The source code for Android is too large, and sometimes it is managed by repo. If I push them into github, it would be too hard to manages. How do you think?

I had to do the above in 2x commits. (make sure no commit is larger than 1GB)
Also, make sure no single files are over 50MB.

I used this commnad
  1. find . -printf '%s %p\n'|sort -nr|head
Copy the Code
while I was in the main source directory to find all the largest files.
Most of these large files are binary builds or archives and not required (I think)

Edited by mattrix at Mon Nov 24, 2014 19:55

Also, maybe a good idea to have the kernel and rest of the image stuff in 2x different repositories?


Once we get the main repo up, we can all quickly find non-required files / folders and start slimming it down to just what we need.

mattrix replied at Mon Nov 24, 2014 18:35

Can someone pull that and try a build?

I tried it. It ends after one minute.

PRODUCT_COPY_FILES frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml ignored.
No private recovery resources for TARGET_DEVICE sugar-bpi
make: stat: sdk/sdklauncher/Android.mk: Der Dateiname ist zu lang
make: stat: sdk/monitor/Android.mk: Der Dateiname ist zu lang
make: stat: sdk/find_lock/Android.mk: Der Dateiname ist zu lang
make: stat: sdk/find_java/Android.mk: Der Dateiname ist zu lang
make: stat: sdk/emulator/opengl/Android.mk: Der Dateiname ist zu lang
make: stat: sdk/avdlauncher/Android.mk: Der Dateiname ist zu lang
make: *** Keine Regel, um »sdk/swtmenubar/Android.mk« zu erstellen.  Schluss.

real    1m0.661s

Edited by mattrix at Mon Nov 24, 2014 23:26

Have you compiled successfully using the other source & instructions in post #1?
Basically the same, but using the git repo for the source code

Eg: 14.04 would be something like this
  1. add-apt-repository ppa:webupd8team/java
  2. apt-get update
  3. apt-get install git-core gnupg flex bison gperf build-essential zip curl \
  4.     zlib1g-dev libc6-dev lib32ncurses5-dev lib32z1 lib32ncurses5 lib32bz2-1.0 \
  5.     x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev g++-multilib mingw32 \
  6.     tofrodos python-markdown libxml2-utils libglapi-mesa:i386 u-boot-tools oracle-java6-installer libswitch-perl
  7. git clone https://github.com/matthuisman/android android
  8. cd android/lichee/linux-3.4
  9. cp arch/arm/configs/banana_pi_config .config
  10. make ARCH=arm menuconfig
  11. cd ..
  12. ./build.sh -p sun7i_android
Copy the Code
etc etc

Just tried.
I see a problem.

the Linux-3.4 kernel wasn't added to the git repo.

I'm thinking maybe it had a git folder of it's own or an ignore file in the source code.

Fixed. Also found a missing file that I had deleted.
Repo updated. Compiling now to test if everything is good.

Edited by dlanor at Tue Nov 25, 2014 00:52

@ChrisP & mattrix, re: multicore use of VMware VS VirtualBox

We're talking about different things here.
You guys are talking about the number of physical cores the emulation can use.
I was talking about the number of virtual cores that can be emulated.
Both contribute to the overall speed, but VirtualBox doesn't implement multiple virtual cores.

VirtualBox does have an extremely limited implementation of multiple virtual CPUs, but no multiple virtual cores.
(At least I can't find any mention of such in any of the configuration menus. But I'm using v4.3.12, so perhaps it's been added in later updates.)
VMware has both.

I've had a quick look at your github site, but I'd like some more details on what the 'Android tweaks' include.
I assume that it's a matter of improvements beyond what we got in the download zrox linked for us.
But it would be nice to have some clue as to what those improvements are.

Another thing of importance is that if any improvements affect the build process (like modified 'makefiles' or build configs), then it may be necessary to clean out all old compiled binaries before a new full 'make', both to ensure compatibility between all system components and to ensure that all components benefit from those improvements.

So what I'm getting at is that we need a really good description for each uploaded section of the github site, so people know what they're getting.
Note that this is not intended as criticism, but just some advice for the future.

@mattrix, re: compiling from git repo
Perhaps you missed it, but ChrisP already said that he has so far failed to set up a full source repo (as normally used for complete projects), and that he temporarily settled for the current repo, which just holds selected improved sections of the sources.

As for your own repo, I just found out that it exists, so I haven't had time to check it out yet.
But I plan to do so today, and will probably get back on that topic later on.

Best regards: dlanor

You have to log in before you can reply Login | Sign Up

Points Rules