This document describes how to build and run AndroidX on the ordinary GNU/Linux platform.
- GNU/Linux platform(eg. ,
Ubuntu
) - Docker
golang
、git
andrepo
In this section, we describe how to build the toolkit and customize your own specified images.
If you already have go
installed you can use the following command to build and install the AndroidKit toolkit.
go get -u github.com/CGCL-codes/AndroidX/src/cmd/androidkit
Once you have build the tool, use the following command to build the example configuration
export PATH=$PATH:<androidkit-path>
androidkit build AndroidX.yml
To customize, copy and modify the AndroidX.yml
to your own file.yml
,then run androidkit build file.yml
to generate its specified output.
The yaml format specifies the image to be built:
AndroidX-Kernel
specifies a kernel Docker image, containing a kernel and a filesystem tarball, eg containing modules.AndroidX-Init
is the baseinit
process Docker image, which is unpacked as the base system, containinginit
,containerd
,runc
and et al.
AndroidX uses notary to support Docker image security. Using this document to install and use the notary.
Since we boot AndroidX using AndroidX-Kernel
+AndroidX-Init
,AndroidX-system.img
is necessary before running.
We use Android-x86 6.0 for generating system image, use the following command to build and get the system image.
repo init -u git://git.osdn.net/gitroot/android-x86/manifest -b android-x86-6.0-r3
repo sync --no-tags --no-clone-bundle
cd <path-to-clone-dir>/example/marshmallow-x86/build-marshmallow-x86
docker build -t <repo-name>/marshmallowx-x86-build-environment .
docker run -it --name android-build-container -v <path-to-source>:/source <repo-name>/marshmallow-x86-build-environment
Once you have your own customized images, you can use the following command to boot AndroidX
androidKit run
See androidkit --help
for more information. In addition, we also provide some useful scripts to help you understand how AndroidX works, which can be found in androidkit-tools/scripts
directory.