New Custom Rom with new Custom Kernel from scratch

174 45188
Edited by zrox at Sun Nov 23, 2014 02:43

Hi all,

I build a complete new Android Image from scratch, approx. clean (no extereme special apps added) but with some changes to the stock image.

- rebuild 3.4.39 kernel with hdi raw, joystick and bluetooth support (bt does not work yet bt-stack needs to changed to bluez)
- patched (K400 Keyboard support and also others)
- Xbox 360 controller support works out of the box
- wifi 8188eu and ethernet works well
- bluedroid (included but not useful atm. because don't work with bt-usb, needs to be changed to bluez)
- live wallpaper support
- filemanager and stutdown app
- bigger system and data partition
- changed default boot screen



Download the complete SDK.

Compile you own Android image:

1. Step we need Ubuntu 12.4 x64 I work only native, not in a VM so I don't know if it works perfect in a VM and a newer version of Ubuntu will not work..

2. open a Terminal and type
  1. sudo -s
Copy the Code
  1. apt-get update && apt-get upgrade
Copy the Code
install needed packages:
  1. apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev \
  2. lib32ncurses5-dev ia32-libs   x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev g++-multilib \
  3. mingw32 tofrodos python-markdown libxml2-utils libglapi-mesa:i386 uboot-mkimage

  4. and we need java .

  5. sudo add-apt-repository ppa:webupd8team/java
  6. sudo apt-get update
  7. sudo apt-get install oracle-java6-installer
Copy the Code
Download the compete android SDK.

and now lets start, extract it
  1. tar xjf v2.0_A20-Kernel-only.tar.bz2
Copy the Code
switch into the kernel directory
  1. cd V2.0_A20/lichee/linux-3.4/
Copy the Code
copy the kernelconfig file
  1. cp arch/arm/configs/banana_pi_config .config
Copy the Code
configure the kernel if you like to change it
  1. make ARCH=arm menuconfig
Copy the Code
and save it.

now go back in the lichee directory
  1. cd ..
Copy the Code
and build the kernel
  1. ./ -p sun7i_android
Copy the Code
the kernel will be compiled.

if all is ready done, you will find a new directory named out
  1. ls out/android/common/
Copy the Code
in this folder you will find the new compiled Kernel and the modules (just for the info   )

now lets compile android.
  1. cd ../android
Copy the Code
  1. source build/
Copy the Code
  1. lunch
Copy the Code
Select 15 sugar_bpi-eng
and copy the kernel and modules with
  1. extract-bsp
Copy the Code
and now lets start building android
  1. make
Copy the Code
this takes some hours...

if already is done create the image
  1. pack
Copy the Code
and you till find the compiled image in the folder /lichee/tools/pack/sun7i_android_sugar-bpi.img

Now burn the new Image with PhoenixCard and have fun

thats it.

Awesome !!! Yes please post a howto, especillay regarding the kernel build and integration !

Hi ChisP,

I added for now the Image the rest will come soon

happy testing

Thanks very much for your efforts. I just downloaded it and i am testing it. As it seems it doesnt accept any of my USB input devices sadly. My regular cabled mouse is not working, neither my Logitech K400

Edited by vicedens2002 at Thu Nov 6, 2014 01:22

Is it possible to enable bluetooth support ? And please can you make the devices to work which are blacklisted in the kernel ?

Edited by zrox at Thu Nov 6, 2014 11:16

Hi all,
@Adromir, it sounds strange, I have on my banana pi with this image a
A4tech usb-cable mouse, Minix A2 Airmouse and a 360 controller running and all
this input devices works fine. Do you have a possibility to check with a Linux
Distro which modules will be load on your hardware? Probable your power supply is
not strong enough?

@vicedenes, could you explain me which blacklisted devices did you mean?
Yes I think bt support is also possible, but we will see. But plug and play
Is with Android and a lot of hardware not possible, for many devices the
Modules must load manually or with a script.


@zrox: I am not an experienced user yet, i am trying to get into it. How do i check that out?

Install a Linux distro on a SD card , check if your hardware works, open a terminal and type
  1. lsmod
Copy the Code
And please post the output here.
That's it


Oh the hardware Works. The Mouse works on the original Android 4.2.2 image and the K400 works in the Android 4.4 Beta1 image

yes, I mean check if your hardware works when you start your banana pi with the linux distri (for example Lubuntu or Respbian...)

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

Points Rules