├── files └── root │ └── fix.sh ├── Dockerfile └── README.md /files/root/fix.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sed -i 's/TLSv1, TLSv1.1,//g' /etc/java-8-openjdk/security/java.security 4 | sed -i 's/jack.server.service.port=8076/jack.server.service.port=18076/g' /root/.jack-server/config.properties 5 | sed -i 's/jack.server.admin.port=8077/jack.server.admin.port=18077/g' /root/.jack-server/config.properties 6 | sed -i 's/SERVER_PORT_SERVICE=8076/SERVER_PORT_SERVICE=18076/g' /root/.jack-settings 7 | sed -i 's/SERVER_PORT_ADMIN=8077/SERVER_PORT_ADMIN=18077/g' /root/.jack-settings 8 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | 3 | RUN apt-get update; apt-get install -y liblz4-tool openjdk-8-jdk bc python rsync \ 4 | git-core gnupg flex bison gperf build-essential \ 5 | zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \ 6 | lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \ 7 | libgl1-mesa-dev libxml2-utils xsltproc unzip lsb-release \ 8 | busybox u-boot-tools cpio gawk 9 | 10 | 11 | RUN echo "root:fa" | chpasswd 12 | USER root 13 | ENV USER=root 14 | ADD http://112.124.9.243/docker-files/java-7u171-openjdk-amd64.tgz /usr/lib/jvm/ 15 | RUN tar xzf /usr/lib/jvm/java-7u171-openjdk-amd64.tgz -C /usr/lib/jvm/ && rm -f /usr/lib/jvm/java-7u171-openjdk-amd64.tgz 16 | ADD http://112.124.9.243/docker-files/sun-jdk-6u45.tgz /usr/lib/jvm/ 17 | RUN tar xzf /usr/lib/jvm/sun-jdk-6u45.tgz -C /usr/lib/jvm/ && rm -f /usr/lib/jvm/sun-jdk-6u45.tgz 18 | RUN sed -i 's/TLSv1, TLSv1.1,//g' /etc/java-8-openjdk/security/java.security 19 | COPY files/root/fix.sh /root/ 20 | 21 | RUN echo "all done." 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## **FriendlyELEC-Android-Docker** 2 | 3 | This docker image is used to build android open source project for FriendlyELEC's boards, support for the following android versions: 4 | * Android7 (for RK3399) 5 | * Android5.1 (for S5P4418/S5P6818) 6 | * Android4.4 (for S5P4418) 7 | * Android4.4 (for Allwinner H3) 8 | 9 | Build docker image 10 | ------------ 11 | 12 | ``` 13 | $ git clone https://github.com/friendlyarm/friendlyelec-android-docker.git 14 | $ docker build -t "fa-android" friendlyelec-android-docker 15 | ``` 16 | 17 | Run 18 | ------------ 19 | 20 | Enter docker shell: 21 | ``` 22 | $ mkdir -p ~/work 23 | $ docker run -it -v ~/work:/work fa-android /bin/bash 24 | ``` 25 | 26 | This will mount the local ~/work directory to the container's /work directory. 27 | 28 | Build 29 | ------------ 30 | 31 | * Android 7 (for RK3399) 32 | ``` 33 | $ cd /work 34 | $ git clone https://gitlab.com/friendlyelec/rk3399-nougat.git 35 | $ cd rk3399-nougat 36 | $ ./build-nanopc-t4.sh -F -M 37 | ``` 38 | 39 | * Android 5.1.1_r6 (for S5P6818) 40 | ``` 41 | $ cd /work 42 | $ tar xvf s5pxx18-android5.git-20181228.tgz 43 | $ cd s5pxx18-android5 44 | $ ./sync.sh 45 | $ cp /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/x86_64-linux/bin/ld 46 | $ source build/envsetup.sh 47 | $ lunch aosp_nanopi3-userdebug 48 | $ make update-api 49 | $ make -j$(nproc) 50 | ``` 51 | 52 | * Android 5.1.1_r6 (for S5P4418) 53 | ``` 54 | $ cd /work 55 | $ tar xvf s5pxx18-android5.git-20181228.tgz 56 | $ cd s5pxx18-android5 57 | $ ./sync.sh 58 | $ cp /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/x86_64-linux/bin/ld 59 | $ source build/envsetup.sh 60 | $ lunch aosp_nanopi2-userdebug 61 | $ make update-api 62 | $ make -j$(nproc) 63 | ``` 64 | 65 | * Android4.4 (for S5P4418) 66 | ``` 67 | $ cd /work 68 | $ tar xvf android-4.4.2-20180207.tar.xz 69 | $ export PATH=/usr/lib/jvm/jdk1.6.0_45/bin:$PATH 70 | $ cd kitkat 71 | $ sed -i -e "s/) = 3.82))/) = 4.1))/g" build/core/main.mk 72 | $ source build/envsetup.sh 73 | $ lunch aosp_nanopi2-userdebug 74 | $ make -j$(nproc) 75 | ``` 76 | 77 | * Android 4.4 (for Allwinner H3) 78 | ``` 79 | $ cd /work/ 80 | $ git clone https://github.com/friendlyarm/h3_lichee.git --depth 1 -b master lichee 81 | $ cp gcc-linaro-arm.tar.xz lichee/brandy/toolchain/ 82 | $ cd lichee/fa_tools/ 83 | $ ./build.sh -b nanopi-m1 -p android -t all 84 | $ cd ../../ 85 | $ 7z x h3-android-20170608.7z.001 86 | $ cd android 87 | $ sed -i -e "s/) = 3.82))/) = 4.1))/g" build/core/main.mk 88 | $ ./build.sh -b nanopi-m1 89 | ``` 90 | 91 | Resources 92 | ------------ 93 | * How to Install and Use Docker on Ubuntu 18.04 94 | https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04 95 | 96 | ## License 97 | 98 | The MIT License (MIT) 99 | Copyright (C) 2018 FriendlyELEC 100 | 101 | Permission is hereby granted, free of charge, to any person obtaining a copy 102 | of this software and associated documentation files (the "Software"), to deal 103 | in the Software without restriction, including without limitation the rights 104 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 105 | copies of the Software, and to permit persons to whom the Software is 106 | furnished to do so, subject to the following conditions: 107 | 108 | The above copyright notice and this permission notice shall be included in 109 | all copies or substantial portions of the Software. 110 | 111 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 112 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 113 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 114 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 115 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 116 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 117 | THE SOFTWARE. 118 | --------------------------------------------------------------------------------