GloDroid / glodroid_manifest

Android port that aims to bring both user- and developer-friendly experience in using AOSP with a set of single-board computers (SBC), phones and other devices.
471 stars 67 forks source link

Add Dockerfile for building GloDroid on any Ubuntu distributions #136

Closed romanmarchenko22 closed 3 years ago

romanmarchenko22 commented 3 years ago

Step 1: Install Docker Engine on your host machine The instruction for Docker installation is on the official site.

Step 2: Build Docker image $ docker build -t glodroid https://github.com/GloDroid/glodroid_manifest.git#next

Step 3: Map the location of GloDroid source code that will be saved on your host machine in docker run command $ docker run -it -v <path_to_local_glodroid>:/home/user/aosp:z --user "$(id -u):$(id -g)" glodroid

Once you run your Docker container, you can fetch and build AOSP with the usual commands.

Step 4: Set the global git options in the container $ git config --global user.name "Your Name" $ git config --global user.email "you@example.com"

Step 5: Fetch Android sources $ repo init -u https://github.com/glodroid/glodroid_manifest $ repo sync -cq

Step 6: Build GloDroid $ source ./build/envsetup.sh $ lunch pinephone-userdebug $ make -j3 $ make images

Signed-off-by: Roman Marchenko roman.marchenko@globallogic.com

rsglobal commented 3 years ago

Hi @romanmarchenko22 ,

Thank you for your contribution. Does it work only for the Ubuntu or for other distributive as well?

romanmarchenko22 commented 3 years ago

Hi @romanmarchenko22 ,

Thank you for your contribution. Does it work only for the Ubuntu or for other distributive as well?

Hello @rsglobal, I will check this pipeline on another distributive and will report as soon as possible.

rsglobal commented 3 years ago

@romanmarchenko22 ,

I have a problem with --privileged=true enabled:

root@9c520f8e17f2:/aosp# m
[W][2021-04-29T11:45:12+0000][570] void cmdline::logParams(nsjconf_t *)():250 Process will be UID/EUID=0 in the global user namespace, and will have user root-level access to files
[W][2021-04-29T11:45:12+0000][570] void cmdline::logParams(nsjconf_t *)():260 Process will be GID/EGID=0 in the global user namespace, and will have group root-level access to files

Do we need privileged mode?

romanmarchenko22 commented 3 years ago

@romanmarchenko22 ,

I have a problem with --privileged=true enabled:

root@9c520f8e17f2:/aosp# m
[W][2021-04-29T11:45:12+0000][570] void cmdline::logParams(nsjconf_t *)():250 Process will be UID/EUID=0 in the global user namespace, and will have user root-level access to files
[W][2021-04-29T11:45:12+0000][570] void cmdline::logParams(nsjconf_t *)():260 Process will be GID/EGID=0 in the global user namespace, and will have group root-level access to files

Do we need privileged mode?

@rsglobal, thank you for your remark. Actually, there is no great need to use privileged mode, because we use --cap-add=ALL flag, which allows running the container with all available capabilities. I will remove --privileged=true flag from the manual and it will be a solution to your problem with warnings.