Building LeMaker Android 4.2 from Source

129 29573
Edited by liab at Sat Feb 21, 2015 17:47


It will be a long and hard way. Why did lemaker such a stupid thing? Two or four more USB would be better.

Here is the way (I did it with success for a new Realtek stick):

1. You must have the driver sources from the WLAN chip
2. Insert it in /lichee/linux-3.4/drivers/net/wireless/
3. Adapt the Kconfig and Makefile
4. Adapt in /lichee/linux-3.4/ the .config file, I belief under I2C
If you don't do it I expect the build will ask you automatically, enter "m" (m=module build, y=kernel)
5. Build the kernel
6. Look at /lichee/out/android/common/lib/modules/3.4/ whether you find there the .ko driver
7. Goto /android/device/softwinner/sugar-bpi/ and edit the
7.1 Uncomment the active driver
7.2 Insert a section for your new driver
8. May be some changes are in necessary, I had to do there nothing
9. Goto /android/hardware/libhardware_legacy/wifi/ and insert your driver in and wifi.c
10. Build android
11. Test it, look to the log in the console and write in the console
You must see something like that

root@android:/ # lsmod
8192eu 626046 0 - Live 0x00000000
rtl8150 8159 0 - Live 0x00000000
uvcvideo 54674 0 - Live 0x00000000
videobuf_dma_contig 3801 0 - Live 0x00000000
videobuf_core 15272 1 videobuf_dma_contig, Live 0x00000000
mali 116326 10 - Live 0x00000000 (O)
ump 30074 13 mali, Live 0x00000000 (O)
sunxi_ts 17582 0 - Live 0x00000000
gpio_sunxi 7002 0 - Live 0x00000000
sun7i_ir 5965 0 - Live 0x00000000
nand 193610 0 - Live 0x00000000 (O)
root@android:/ #

instead of 8192eu your WLAN driver, if not, start it manually

insmod /vendor/modules/name_of_the_driver

Have a good one and success!
How I belief it's a Broadcom chip and so I can't imagine, that it will work with the
Realtek wpa_supplicant_8_lib, but try it. I tried it with a RT5370sta I had had no success, the driver works, but not the wpa_supplicant_8_lib.

I'm cross-compiling my first image on an 64bits Ubuntu 14.04 environment. The file scripts/ tries to apt-get install libglapi-mesa:i386 , which is not found. I do have libglapi-mesa, but not with the :386 extension. Nobody seems to have this error, any idea how I can solve this?
When I remove the :386 extension and restart the build, it gives an error but after another restart, the build terminates without errors.


I build own android image to get ASUS N10 NANO work on my BananaPi (and I based on this repo: After few changes it works ok (yay!), but I have no audio from HDMI.

I tried build sugar-pi and sugar-lemaker and I tried images with audio_hw.c-old compiled, but without success :/ Could you help me?

Got it I just had to change audio output mode in android settings.

Now I only have to find out how to remember those settings (and how to edit posts on this forum )


I get ..

repository not found



Can you please post some directions on how to enable hid and hid-multitouch in the kernel config before building?

Thank you in advance !


This one was lost due to a stupid DMCA request.

Please refer to this one instead:

I would like to have android 5 or 6


I tried many different ways in order to activate onboard WIFI AP6181 on Banana Pro with BananaPi-Android-4.2.2-Liab source code. I modified /lichee/tools/pack/chips/sun7i/configs/android/sugar-bpi/sys_config.fex and /android/device/softwinner/sugar-bpi/ for activating broadcom chip, and compiled kernel with bcmdhd as built-in and also as module, but still there is something missing.

I also tried to compile AP6210 which is included in 3.4.108 but not in 3.4.39 kernel.

Is there any way I can use the onboard AP6181 WIFI with your source code? I am out of trials now and any suggestions or any solution would be awesome for this issue. Thank you in advance...

Finally, I have a solution!

In order to use onboard WIFI AP6181 on Banana Pro, I made the following:

1. I compiled the kernel with bcmdhd as module

2. In /lichee/tools/pack/chips/sun7i/configs/android/sugar-bpi/sys_config.fex, I changed wifi parameters as;

wifi_used          = 1
wifi_sdc_id        = 3
wifi_usbc_id       = 2
wifi_usbc_type     = 1
wifi_mod_sel       = 7

ap6xxx_wl_regon      = portH22<1><default><default><0>
ap6xxx_wl_host_wake  = portH15<0><default><default><0>

3. In init.rc, I changed wifi service as;

# 1. realtek wifi service
# 1.1 realtek wifi sta service
#service wpa_supplicant /system/bin/wpa_supplicant -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
#    class main
#    socket wpa_wlan0 dgram 660 wifi wifi
#    disabled
#    oneshot

# 1.2 realtek wifi sta p2p concurrent service
#service p2p_supplicant /system/bin/wpa_supplicant \
#    -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -N \
#    -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf
#    class main
#    socket wpa_wlan0 dgram 660 wifi wifi
#    disabled
#    oneshot

# 2. broadcom wifi service
# 2.1 broadcom wifi bcm40181 bcm40183 station and softap
service wpa_supplicant /system/bin/wpa_supplicant \
   -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
   class main
   socket wpa_wlan0 dgram 660 wifi wifi

# 2.2 braodcom wifi sta p2p concurrent service
service p2p_supplicant /system/bin/wpa_supplicant \
   -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N \
   -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1
   class main
   socket wpa_wlan0 dgram 660 wifi wifi

4. And finally, I used op_mode 5 in order to use wifi as;

insmod bcmdhd.ko op_mode=5

It works!

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

Points Rules