Building LeMaker Android 4.2 from Source

129 29517
Edited by mattrix at Mon Jan 5, 2015 20:45

Hi Guys,

LeMaker finally released their source for Android and I have put it into a GitHub repo (for obvious reasons).
I have also added a few utility scripts that make it really really easy to build your very own Android image from scratch.

Here are the very basic instructions.
Should work with Ubuntu 12.04 and 14.04

The commands below are assuming your root, otherwise you may need to use sudo.

Install git if required
  1. apt-get install -y git
Copy the Code
Clone the source code to your pc (ANDROID is the name of the destination folder - you can change this)
The repo is currently 2.66 GB
  1. git clone ANDROID
Copy the Code
Move into the scripts directory
  1. cd ANDROID/scripts
Copy the Code
Install dependencies
  1. ./
Copy the Code
Configure the kernel (OPTIONAL)
  1. ./
Copy the Code
Start the build
  1. ./
Copy the Code
Once the build command finishes, you will be left with a .img that is ready to burn with Phoenix Card.

Remember, the first build takes quite a while depending on your PC specs.
Builds after that are much quicker.

Current Annoyances / Problems
- script needs user interaction to accept Java t&c's - if anyone can figure out how to stop this, let me know.

Some interesting files & folders to play with
  1. ANDROID/android/device/softwinner/sugar-lemaker/
  2. ANDROID/android/device/softwinner/sugar-lemaker/
  3. ANDROID/android/device/softwinner/sugar-lemaker/init.sun7i.rc
  4. ANDROID/android/device/softwinner/sugar-lemaker/camera.cfg
  5. ANDROID/android/devices/softwinner/sugar-lemaker/vold.fstab
  6. ANDROID/android/device/softwinner/common
  7. ANDROID/android/devices/softwinner/wing-common/
  8. ANDROID/android/devices/softwinner/wing-common/preinstallapk
Copy the Code
Thanks to zrox, dlanor, tony_zhang & ChrisP!

Note: I no longer maintain this repo. Please direct any questions etc to ChrisP

Thanks to mattrix update to github.

Great work !!!

Amazing work should I say !!

Will switch to this one as work base and do some verification

With a new git clone ANDROID I get this error:

target thumb C: dbus-daemon <= external/dbus/bus/activation.c
external/dbus/bus/activation.c:26:20: fatal error: config.h: No such file or directory
compilation terminated.
make: *** [out/target/product/sugar-lemaker/obj/EXECUTABLES/dbus-daemon_intermediates/activation.o] Fehler 1

real    116m54.846s

Edited by ChrisP at Thu Dec 4, 2014 16:04

Hi liab,

maybe your issue was because the installation script was not properly installing java runtime. I fixed it and played a bit with the repo and didn't encounter your issue. You should update and retry and tell if you still have the issue ?

Regarding the image generated, I have some quick feedbacks:

  • First, it's running faster then the one generated by the SDK 2.0. Especially in CPU/RAM area, and slower in 2d/3d area. It's hard to give accurate numbers, as antutu benchmark is giving important variation between each test, but it seems to be the general tendency.
  • LibInput is working fine with the mouse right, left and middle button, but have the same issue with Logitech Keyboard as before.
  • MAC address is not visible from android settings (but can be seen using a su + "busybox ifconfig" in a terminal emulator.

liab replied at Thu Dec 4, 2014 02:59
With a new git clone ANDROID I get this error:

targe ...


Sounds like you cloned the source when I was still having issues with it.
Should be fixed now.

in the scripts directory, run
  1. ./
Copy the Code
This should update your source code.

Then, try  ./ again

ChrisP replied at Thu Dec 4, 2014 08:56
Hi liab,

maybe your issue was because the installation script was not properly installing java runt ...


I only briefly tried the .img.
Noticed the MAC address missing.

This should easily be fixed by updating the GMAC driver to the same as the other source I think

Additionnal issue: Going to 1080p is transforming the screen in a kind of kaleidoscope !

Edited by liab at Thu Dec 4, 2014 22:55

Today both are ok.

git clone ANDROID
git clone ANDROID-041214

But even the same like ChrisP, 1080x flickering at the lower end of the screen.

Edit: The lemaker image is very slow! Streaming in HD from a enigma2 sat-box is only for some minutes possible, afterwards it crashed, like the stock and the 4.4.
It seems only 1 cpu is busy?

root@android:/ # mpstat -P ALL
Linux 3.4.39 (localhost)        12/05/14        _armv7l_        (1 CPU)

04:35:34     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
04:35:34     all   22.46    0.63   19.76   13.36    0.01    2.12    0.00    0.00   41.66
04:35:34       0   21.75    0.56   19.81   10.15    0.01    4.15    0.00    0.00   43.57
root@android:/ #

Here the same with my very very good matthuisman for a few days ago:

mpstat -P ALL
Linux 3.4.39 (localhost)        12/05/14        _armv7l_        (2 CPU)

04:42:05     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
04:42:05     all   13.31    1.99   10.72   50.68    0.00    1.59    0.00    0.00   21.72
04:42:05       0   10.08    2.22   10.50   36.96    0.00    3.20    0.00    0.00   37.04
04:42:05       1   16.49    1.77   10.93   64.21    0.00    0.00    0.00    0.00    6.60

The same good result with the tonight build matthuisman/android:

mpstat -P ALL
Linux 3.4.39 (localhost)        12/05/14        _armv7l_        (2 CPU)

05:00:08     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
05:00:08     all   15.08    1.74   10.16   42.88    0.00    1.60    0.00    0.00   28.53
05:00:08       0   13.76    1.40   10.62   28.03    0.00    3.22    0.00    0.00   42.97
05:00:08       1   16.38    2.08    9.72   57.58    0.00    0.00    0.00    0.00   14.25

This is just the raw source provided by Lemaker.

Does their Android 4.2 image do it?

If not, then they haven't really provided us their source...

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

Points Rules