Android/Building

From OLPC
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

How to build an Android and OLPC OS dual-boot image for XO-4.

Ingredients

  • a well connected development system,
  • about 20 GB of download capability,

Method

$ repo init -u git://dev.laptop.org/users/ben/android_manifest -b android-4.3.1-xo4
$ repo sync
  • if you would like to include google services, download developer package from here gapps. See also Google Apps
  • The Google Apps packages are NOT SUPPORTED in any way by OLPC.
$ tar -zxvf gapps.tar.gz
$ mv gapps vendor/olpc/xo4/
  • start the build:
$ . build/envsetup.sh
$ lunch 14
$ make installclean && make -j8 && make userdatatarball
  • (the 14 means to build engineer version ... use command "lunch" to list all the build options, Android/Building/Variants)
  • (the -j8 means to run eight concurrent threads of build ... the number of threads should be chosen according to how many CPU cores your build environment has access to.)
  • install the android-tools-fsutils package or ensure you have simg2img tools in your /usr/bin/ simg2img
  • create zd file:

Android only image

$ cd vendor/olpc/xo4/mkzd
$ sudo ./mkzd.sh

Combine Android with Sugar

  • ensure you have a copy of the OLPC OS Linux, Sugar and Gnome build file, e.g. 32014o4.zd,
$ cd vendor/olpc/xo4/sugar-combiner
$ make
$ sudo ./mkzd.sh

Alternative Method

To merge an already published Android build with an already published OLPC OS derived build:

Using an Android build before 2015 on XO-4 produced in 2015 requires a special kernel, contact OLPC for details.

Source code

source code for building Android is a combination of 4 parts.

  • You can also download kernel image form latest kernel if you don't want to change kernel
manifest
git repository
frameworks/av
git repository
frameworks/base
git repository
frameworks/native
git repository
system/core
git repository
hardware/libhardware
git repository
hardware/libhardware_legacy
git repository
hardware/marvell
git repository
build
git repository
bionic
git repository
external/bluetooth/bluedroid
git repository
external/kernel-headers
git repository
external/webkit
git repository
packages/apps/Calendar
git repository
packages/apps/Gallery2
git repository
packages/apps/Launcher2
git repository
packages/providers/CalendarProvider
git repository
  • source code from vendor, Marvell and OLPC
vendor/marvell/generic
git repository
vendor/marvell/external
git repository
vendor/olpc/xo4
git repository
device/olpc/xo4
git repository
device/olpc/xo4-kernel
git repository

See Also