Skip to content

Instantly share code, notes, and snippets.

@snyh
Created April 14, 2017 05:29
Show Gist options
  • Save snyh/01e6c9d555d82c778eff3a7acb95f02d to your computer and use it in GitHub Desktop.
Save snyh/01e6c9d555d82c778eff3a7acb95f02d to your computer and use it in GitHub Desktop.
install anbox in deepin 2015.4
wget https://raw.githubusercontent.com/anbox/anbox-installer/84b3ea95ebfa71723a62eb9291d62884b9306555/installer.sh -O install.sh
patch install.sh <<EOF
26c26
< SUPPORTED_DISTROS=("Ubuntu" "LinuxMint" "neon" "elementary")
---
> SUPPORTED_DISTROS=("Ubuntu" "LinuxMint" "neon" "elementary", "Deepin")
148c148
< sudo apt install -y software-properties-common linux-headers-generic
---
> sudo apt install -y software-properties-common linux-headers-deepin-amd64
149a150
> sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 21C6044A875B67B7
151c152
< sudo apt install -y anbox-modules-dkms
---
> sudo apt install -y anbox-modules-dkms snapd
EOF
bash ./install.sh
@snyh
Copy link
Author

snyh commented Apr 14, 2017

  1. Run snap need enable apparmor.
    append GRUB_CMDLINE_LINUX_DEFAULT="splash quiet apparmor=1 security=apparmor" to /etc/default/grub and run sudo update-grub

  2. But, the snap behavior is not exactly same as ubuntu, so I just simplely change the usr.lib.snaped.sanp-confine mode from enforce to complain.
    sudo apt-get install apparmor-utils && sudo aa-complain /usr/lib/snapd/snap-confine

  3. Reboot and systemctl --user start anbox

@snyh
Copy link
Author

snyh commented Apr 14, 2017

the anbox session-manager and container-manager are both running, but the anbox luanch failed.

Sadly, I hasn't figure out why it stuck at

snyh-s7% strace -s1000 -e write anbox launch                
write(7, "GET /v2/snaps HTTP/1.1\r\nHost: localhost\r\nUser-Agent: Go-http-client/1.1\r\nAccept-Encoding: gzip\r\n\r\n", 98) = 98
[WW 2017-04-14 07:06:56] [launch.cpp:115@operator()] Stop waiting as we're already waiting for too long. Something is wrong
[WW 2017-04-14 07:06:56] [launch.cpp:116@operator()] with your setup and the container may have failed to boot.
+++ exited with 1 +++

@snyh
Copy link
Author

snyh commented Apr 14, 2017

It seems not the GET /v2/snaps problem. It's ok directly use curl, like this.

socat -d -d TCP-LISTEN:8080,fork UNIX:/run/snapd.socket
curl localhost:8080/v2/snaps

@snyh
Copy link
Author

snyh commented Apr 14, 2017

It seems my kernel hasn't support /sys/module/fuse/parameters/userns_mounts which to support run lxc in snap container

@yanyuechuixue
Copy link

Have you solve this problem?

@suoko
Copy link

suoko commented Oct 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment