Skip to content
This repository has been archived by the owner on Oct 1, 2021. It is now read-only.

Cannot stop / restart container #40

Open
alistairo opened this issue May 10, 2020 · 1 comment
Open

Cannot stop / restart container #40

alistairo opened this issue May 10, 2020 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@alistairo
Copy link

Container never successfully restarts after being stopped of system shutdown:

cat /etc/os-release

NAME="Ubuntu"
VERSION="19.10 (Eoan Ermine)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 19.10"
VERSION_ID="19.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=eoan
UBUNTU_CODENAME=eoan

Run docker as:
docker run -td --name aind5 --privileged -p 5900:5900 -v /lib/modules:/lib/modules:ro aind/aind

docker exec -it aind5 /bin/bash

:/# adb devices

List of devices attached

  • daemon not running; starting now at tcp:5037
  • daemon started successfully
    emulator-5558 device

:/# adb shell pm list packages

package:com.android.cts.priv.ctsshim
package:com.android.providers.telephony
package:com.android.providers.calendar
package:com.android.providers.media
package:com.android.wallpapercropper
....
....
....

:/# exit

docker logs aind5

Created symlink /etc/systemd/system/systemd-firstboot.service → /dev/null.
Created symlink /etc/systemd/system/systemd-udevd.service → /dev/null.
Created symlink /etc/systemd/system/multi-user.target.wants/docker-entrypoint.service → /etc/systemd/system/docker-entrypoint.service.
/docker-entrypoint.sh: starting /lib/systemd/systemd --show-status=false --unit=docker-entrypoint.target
systemd 245.4-4ubuntu3 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
Detected virtualization docker.
Detected architecture x86-64.
Set hostname to <9ff15c008a22>.
/lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly.

  • source /etc/docker-entrypoint-cmd
    ++ unsudo /home/user/docker-2ndboot.sh
  • car=/home/user/docker-2ndboot.sh
  • shift
  • cdr=
    ++ which /home/user/docker-2ndboot.sh
  • exec machinectl shell user@ /home/user/docker-2ndboot.sh
    Connected to the local host. Press ^] three times within 1s to exit session.
  • mkdir -p /home/user/.vnc
  • '[' '!' -e /home/user/.vnc/passwdfile ']'
  • set +x
  • export DISPLAY=:0
  • DISPLAY=:0
  • Xvfb
  • '[' -e /tmp/.X11-unix/X0 ']'
  • sleep 1
  • '[' -e /tmp/.X11-unix/X0 ']'
  • : FIXME: remove this sleep
  • sleep 1
  • : FIXME: remove this sleep
  • sleep 1
  • x11vnc -usepw
    10/05/2020 15:01:17 -usepw: found /home/user/.vnc/passwdfile
    10/05/2020 15:01:17 x11vnc version: 0.9.16 lastmod: 2019-01-05 pid: 111
    10/05/2020 15:01:17 Using X display :0
    10/05/2020 15:01:17 rootwin: 0x388 reswin: 0x200001 dpy: 0x27603380
    10/05/2020 15:01:17
    10/05/2020 15:01:17 ------------------ USEFUL INFORMATION ------------------
    10/05/2020 15:01:17 X DAMAGE available on display, using it for polling hints.
    10/05/2020 15:01:17 To disable this behavior use: '-noxdamage'
    10/05/2020 15:01:17
    10/05/2020 15:01:17 Most compositing window managers like 'compiz' or 'beryl'
    10/05/2020 15:01:17 cause X DAMAGE to fail, and so you may not see any screen
    10/05/2020 15:01:17 updates via VNC. Either disable 'compiz' (recommended) or
    10/05/2020 15:01:17 supply the x11vnc '-noxdamage' command line option.
    10/05/2020 15:01:17
    10/05/2020 15:01:17 Wireframing: -wireframe mode is in effect for window moves.
    10/05/2020 15:01:17 If this yields undesired behavior (poor response, painting
    10/05/2020 15:01:17 errors, etc) it may be disabled:
    10/05/2020 15:01:17 - use '-nowf' to disable wireframing completely.
    10/05/2020 15:01:17 - use '-nowcr' to disable the Copy Rectangle after the
    10/05/2020 15:01:17 moved window is released in the new position.
    10/05/2020 15:01:17 Also see the -help entry for tuning parameters.
    10/05/2020 15:01:17 You can press 3 Alt_L's (Left "Alt" key) in a row to
    10/05/2020 15:01:17 repaint the screen, also see the -fixscreen option for
    10/05/2020 15:01:17 periodic repaints.
    10/05/2020 15:01:17
    10/05/2020 15:01:17 XFIXES available on display, resetting cursor mode
    10/05/2020 15:01:17 to: '-cursor most'.
    10/05/2020 15:01:17 to disable this behavior use: '-cursor arrow'
    10/05/2020 15:01:17 or '-noxfixes'.
    10/05/2020 15:01:17 using XFIXES for cursor drawing.
    10/05/2020 15:01:17 GrabServer control via XTEST.
    10/05/2020 15:01:17
    10/05/2020 15:01:17 Scroll Detection: -scrollcopyrect mode is in effect to
    10/05/2020 15:01:17 use RECORD extension to try to detect scrolling windows
    10/05/2020 15:01:17 (induced by either user keystroke or mouse input).
    10/05/2020 15:01:17 If this yields undesired behavior (poor response, painting
    10/05/2020 15:01:17 errors, etc) it may be disabled via: '-noscr'
    10/05/2020 15:01:17 Also see the -help entry for tuning parameters.
    10/05/2020 15:01:17 You can press 3 Alt_L's (Left "Alt" key) in a row to
    10/05/2020 15:01:17 repaint the screen, also see the -fixscreen option for
    10/05/2020 15:01:17 periodic repaints.
    10/05/2020 15:01:17
    10/05/2020 15:01:17 XKEYBOARD: number of keysyms per keycode 7 is greater
    10/05/2020 15:01:17 than 4 and 51 keysyms are mapped above 4.
    10/05/2020 15:01:17 Automatically switching to -xkb mode.
    10/05/2020 15:01:17 If this makes the key mapping worse you can
    10/05/2020 15:01:17 disable it with the "-noxkb" option.
    10/05/2020 15:01:17 Also, remember "-remap DEAD" for accenting characters.
    10/05/2020 15:01:17
    10/05/2020 15:01:17 X FBPM extension not supported.
    Xlib: extension "DPMS" missing on display ":0".
    10/05/2020 15:01:17 X display is not capable of DPMS.
    10/05/2020 15:01:17 --------------------------------------------------------
    10/05/2020 15:01:17
    10/05/2020 15:01:17 Default visual ID: 0x21
    10/05/2020 15:01:17 Read initial data from X display into framebuffer.
    10/05/2020 15:01:17 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5120
    10/05/2020 15:01:17
    10/05/2020 15:01:17 X display :0 is 32bpp depth=24 true color
    10/05/2020 15:01:17
    10/05/2020 15:01:17 Autoprobing TCP port
    10/05/2020 15:01:17 Autoprobing selected TCP port 5900
    10/05/2020 15:01:17 Autoprobing TCP6 port
    10/05/2020 15:01:17 Autoprobing selected TCP6 port 5900
    10/05/2020 15:01:17 listen6: bind: Address already in use
    10/05/2020 15:01:17 Not listening on IPv6 interface.
    10/05/2020 15:01:17
    10/05/2020 15:01:17 Xinerama is present and active (e.g. multi-head).
    10/05/2020 15:01:17 Xinerama: number of sub-screens: 1
    10/05/2020 15:01:17 Xinerama: no blackouts needed (only one sub-screen)
    10/05/2020 15:01:17
    10/05/2020 15:01:17 fb read rate: 1041 MB/sec
    10/05/2020 15:01:17 fast read: reset -wait ms to: 10
    10/05/2020 15:01:17 fast read: reset -defer ms to: 10
    10/05/2020 15:01:17 The X server says there are 10 mouse buttons.
    10/05/2020 15:01:17 screen setup finished.
    10/05/2020 15:01:17

The VNC desktop is: 9ff15c008a22:0
PORT=5900


Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval. It should work with any VNC viewer. Try it by running:

x11vnc -ncache 10 ...

One can also add -ncache_cr for smooth 'copyrect' window motion.
More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching

  • systemctl is-system-running --wait
  • fvwm
    running
  • systemctl status --no-pager -l anbox-container-manager
    ● anbox-container-manager.service - Anbox Container Manager
    Loaded: loaded (/lib/systemd/system/anbox-container-manager.service; enabled; vendor preset: enabled)
    Active: active (running) since Sun 2020-05-10 15:01:15 UTC; 3s ago
    Process: 41 ExecStartPre=/usr/local/bin/anbox-container-manager-pre.sh (code=exited, status=0/SUCCESS)
    Process: 54 ExecStartPre=/usr/local/share/anbox/anbox-bridge.sh start (code=exited, status=0/SUCCESS)
    Main PID: 72 (anbox)
    Tasks: 10 (limit: 4624)
    Memory: 3.3M
    CGroup: /docker/9ff15c008a22de501d6aa70b2b5d5bbefb1b7e8ad4ed3031da59a678b46afe99/system.slice/anbox-container-manager.service
    ├─72 /usr/local/bin/anbox container-manager --daemon --data-path=/var/lib/anbox --android-image=/aind-android.img --use-rootfs-overlay --use-squashfuse
    └─77 squashfuse /aind-android.img /var/lib/anbox/rootfs -o rw,allow_other,dev,suid

May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[41]: + '[' 0 '!=' 0 ']'
May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[41]: + /sbin/modprobe ashmem_linux
May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[41]: + '[' '!' -e /dev/ashmem ']'
May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[41]: + /sbin/modprobe binder_linux
May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[41]: + grep binder /proc/filesystems
May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[50]: nodev binder
May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[41]: + '[' '!' -e /dev/binderfs/binder-control ']'
May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[41]: + mkdir -p /dev/binderfs
May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[41]: + mount -t binder none /dev/binderfs
May 10 15:01:15 9ff15c008a22 systemd[1]: Started Anbox Container Manager.

  • anbox wait-ready
    [fvwm][FlocaleGetFontSet]: (--fixed-medium-r-semicondensed--13-------,--fixed-medium-r-normal--14-------,---medium-r-normal--16-------) Missing font charsets:
    ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, KOI8-R, ISO8859-7, ISO8859-9, ISO8859-13, ISO8859-14, ISO8859-15, JISX0208.1983-0, KSC5601.1987-0, GB2312.1980-0, JISX0201.1976-0, ISO10646-1
  • anbox session-manager
    [ 2020-05-10 15:01:18] [daemon.cpp:61@Run] Application manager service is not running yet
  • sleep 1
    sh: 1: fvwm-menu-desktop: not found
    [FvwmIconMan][FlocaleGetFontSet]: (--fixed-medium-r-semicondensed--13-------,--fixed-medium-r-normal--14-------,---medium-r-normal--16-------) Missing font charsets:
    ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, KOI8-R, ISO8859-7, ISO8859-9, ISO8859-13, ISO8859-14, ISO8859-15, JISX0208.1983-0, KSC5601.1987-0, GB2312.1980-0, JISX0201.1976-0, ISO10646-1
    [FvwmPager][FlocaleGetFontSet]: (--fixed-medium-r-semicondensed--13-------,--fixed-medium-r-normal--14-------,---medium-r-normal--16-------) Missing font charsets:
    ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, KOI8-R, ISO8859-7, ISO8859-9, ISO8859-13, ISO8859-14, ISO8859-15, JISX0208.1983-0, KSC5601.1987-0, GB2312.1980-0, JISX0201.1976-0, ISO10646-1
  • anbox wait-ready
  • sleep 1
  • anbox wait-ready
  • anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
  • adb wait-for-device
  • for f in /apk-pre.d/*.apk
  • adb install /apk-pre.d/FDroid.apk
    Success
  • for f in /apk-pre.d/*.apk
  • adb install /apk-pre.d/firefox.apk
    Success
  • ls '/apk.d/.apk'
    ls: cannot access '/apk.d/
    .apk': No such file or directory
  • figlet Ready

| _ \ ___ __ _ | | _
| |) / _ / |/ _ | | | |
| _ < __/ (
| | (
| | || |
|
| __
|_,|_,|_, |
|
_/

  • echo 'Hint: the password is stored in /home/user/.vnc/passwdfile'
    Hint: the password is stored in /home/user/.vnc/passwdfile
  • exec sleep infinity

docker container stop aind5

docker container start aind5

docker ps -a

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9ff15c008a22 aind/aind "/docker-entrypoint.…" 6 minutes ago Exited (255) 15 seconds ago aind5

docker logs aind5

Created symlink /etc/systemd/system/systemd-firstboot.service → /dev/null.
Created symlink /etc/systemd/system/systemd-udevd.service → /dev/null.
Created symlink /etc/systemd/system/multi-user.target.wants/docker-entrypoint.service → /etc/systemd/system/docker-entrypoint.service.
/docker-entrypoint.sh: starting /lib/systemd/systemd --show-status=false --unit=docker-entrypoint.target
systemd 245.4-4ubuntu3 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
Detected virtualization docker.
Detected architecture x86-64.
Set hostname to <9ff15c008a22>.
/lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly.

  • source /etc/docker-entrypoint-cmd
    ++ unsudo /home/user/docker-2ndboot.sh
  • car=/home/user/docker-2ndboot.sh
  • shift
  • cdr=
    ++ which /home/user/docker-2ndboot.sh
  • exec machinectl shell user@ /home/user/docker-2ndboot.sh
    Connected to the local host. Press ^] three times within 1s to exit session.
  • mkdir -p /home/user/.vnc
  • '[' '!' -e /home/user/.vnc/passwdfile ']'
  • set +x
  • export DISPLAY=:0
  • DISPLAY=:0
  • Xvfb
  • '[' -e /tmp/.X11-unix/X0 ']'
  • sleep 1
  • '[' -e /tmp/.X11-unix/X0 ']'
  • : FIXME: remove this sleep
  • sleep 1
  • : FIXME: remove this sleep
  • sleep 1
  • x11vnc -usepw
    10/05/2020 15:01:17 -usepw: found /home/user/.vnc/passwdfile
    10/05/2020 15:01:17 x11vnc version: 0.9.16 lastmod: 2019-01-05 pid: 111
    10/05/2020 15:01:17 Using X display :0
    10/05/2020 15:01:17 rootwin: 0x388 reswin: 0x200001 dpy: 0x27603380
    10/05/2020 15:01:17
    10/05/2020 15:01:17 ------------------ USEFUL INFORMATION ------------------
    10/05/2020 15:01:17 X DAMAGE available on display, using it for polling hints.
    10/05/2020 15:01:17 To disable this behavior use: '-noxdamage'
    10/05/2020 15:01:17
    10/05/2020 15:01:17 Most compositing window managers like 'compiz' or 'beryl'
    10/05/2020 15:01:17 cause X DAMAGE to fail, and so you may not see any screen
    10/05/2020 15:01:17 updates via VNC. Either disable 'compiz' (recommended) or
    10/05/2020 15:01:17 supply the x11vnc '-noxdamage' command line option.
    10/05/2020 15:01:17
    10/05/2020 15:01:17 Wireframing: -wireframe mode is in effect for window moves.
    10/05/2020 15:01:17 If this yields undesired behavior (poor response, painting
    10/05/2020 15:01:17 errors, etc) it may be disabled:
    10/05/2020 15:01:17 - use '-nowf' to disable wireframing completely.
    10/05/2020 15:01:17 - use '-nowcr' to disable the Copy Rectangle after the
    10/05/2020 15:01:17 moved window is released in the new position.
    10/05/2020 15:01:17 Also see the -help entry for tuning parameters.
    10/05/2020 15:01:17 You can press 3 Alt_L's (Left "Alt" key) in a row to
    10/05/2020 15:01:17 repaint the screen, also see the -fixscreen option for
    10/05/2020 15:01:17 periodic repaints.
    10/05/2020 15:01:17
    10/05/2020 15:01:17 XFIXES available on display, resetting cursor mode
    10/05/2020 15:01:17 to: '-cursor most'.
    10/05/2020 15:01:17 to disable this behavior use: '-cursor arrow'
    10/05/2020 15:01:17 or '-noxfixes'.
    10/05/2020 15:01:17 using XFIXES for cursor drawing.
    10/05/2020 15:01:17 GrabServer control via XTEST.
    10/05/2020 15:01:17
    10/05/2020 15:01:17 Scroll Detection: -scrollcopyrect mode is in effect to
    10/05/2020 15:01:17 use RECORD extension to try to detect scrolling windows
    10/05/2020 15:01:17 (induced by either user keystroke or mouse input).
    10/05/2020 15:01:17 If this yields undesired behavior (poor response, painting
    10/05/2020 15:01:17 errors, etc) it may be disabled via: '-noscr'
    10/05/2020 15:01:17 Also see the -help entry for tuning parameters.
    10/05/2020 15:01:17 You can press 3 Alt_L's (Left "Alt" key) in a row to
    10/05/2020 15:01:17 repaint the screen, also see the -fixscreen option for
    10/05/2020 15:01:17 periodic repaints.
    10/05/2020 15:01:17
    10/05/2020 15:01:17 XKEYBOARD: number of keysyms per keycode 7 is greater
    10/05/2020 15:01:17 than 4 and 51 keysyms are mapped above 4.
    10/05/2020 15:01:17 Automatically switching to -xkb mode.
    10/05/2020 15:01:17 If this makes the key mapping worse you can
    10/05/2020 15:01:17 disable it with the "-noxkb" option.
    10/05/2020 15:01:17 Also, remember "-remap DEAD" for accenting characters.
    10/05/2020 15:01:17
    10/05/2020 15:01:17 X FBPM extension not supported.
    Xlib: extension "DPMS" missing on display ":0".
    10/05/2020 15:01:17 X display is not capable of DPMS.
    10/05/2020 15:01:17 --------------------------------------------------------
    10/05/2020 15:01:17
    10/05/2020 15:01:17 Default visual ID: 0x21
    10/05/2020 15:01:17 Read initial data from X display into framebuffer.
    10/05/2020 15:01:17 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5120
    10/05/2020 15:01:17
    10/05/2020 15:01:17 X display :0 is 32bpp depth=24 true color
    10/05/2020 15:01:17
    10/05/2020 15:01:17 Autoprobing TCP port
    10/05/2020 15:01:17 Autoprobing selected TCP port 5900
    10/05/2020 15:01:17 Autoprobing TCP6 port
    10/05/2020 15:01:17 Autoprobing selected TCP6 port 5900
    10/05/2020 15:01:17 listen6: bind: Address already in use
    10/05/2020 15:01:17 Not listening on IPv6 interface.
    10/05/2020 15:01:17
    10/05/2020 15:01:17 Xinerama is present and active (e.g. multi-head).
    10/05/2020 15:01:17 Xinerama: number of sub-screens: 1
    10/05/2020 15:01:17 Xinerama: no blackouts needed (only one sub-screen)
    10/05/2020 15:01:17
    10/05/2020 15:01:17 fb read rate: 1041 MB/sec
    10/05/2020 15:01:17 fast read: reset -wait ms to: 10
    10/05/2020 15:01:17 fast read: reset -defer ms to: 10
    10/05/2020 15:01:17 The X server says there are 10 mouse buttons.
    10/05/2020 15:01:17 screen setup finished.
    10/05/2020 15:01:17

The VNC desktop is: 9ff15c008a22:0
PORT=5900


Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval. It should work with any VNC viewer. Try it by running:

x11vnc -ncache 10 ...

One can also add -ncache_cr for smooth 'copyrect' window motion.
More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching

  • systemctl is-system-running --wait
  • fvwm
    running
  • systemctl status --no-pager -l anbox-container-manager
    ● anbox-container-manager.service - Anbox Container Manager
    Loaded: loaded (/lib/systemd/system/anbox-container-manager.service; enabled; vendor preset: enabled)
    Active: active (running) since Sun 2020-05-10 15:01:15 UTC; 3s ago
    Process: 41 ExecStartPre=/usr/local/bin/anbox-container-manager-pre.sh (code=exited, status=0/SUCCESS)
    Process: 54 ExecStartPre=/usr/local/share/anbox/anbox-bridge.sh start (code=exited, status=0/SUCCESS)
    Main PID: 72 (anbox)
    Tasks: 10 (limit: 4624)
    Memory: 3.3M
    CGroup: /docker/9ff15c008a22de501d6aa70b2b5d5bbefb1b7e8ad4ed3031da59a678b46afe99/system.slice/anbox-container-manager.service
    ├─72 /usr/local/bin/anbox container-manager --daemon --data-path=/var/lib/anbox --android-image=/aind-android.img --use-rootfs-overlay --use-squashfuse
    └─77 squashfuse /aind-android.img /var/lib/anbox/rootfs -o rw,allow_other,dev,suid

May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[41]: + '[' 0 '!=' 0 ']'
May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[41]: + /sbin/modprobe ashmem_linux
May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[41]: + '[' '!' -e /dev/ashmem ']'
May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[41]: + /sbin/modprobe binder_linux
May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[41]: + grep binder /proc/filesystems
May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[50]: nodev binder
May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[41]: + '[' '!' -e /dev/binderfs/binder-control ']'
May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[41]: + mkdir -p /dev/binderfs
May 10 15:01:14 9ff15c008a22 anbox-container-manager-pre.sh[41]: + mount -t binder none /dev/binderfs
May 10 15:01:15 9ff15c008a22 systemd[1]: Started Anbox Container Manager.

  • anbox wait-ready
    [fvwm][FlocaleGetFontSet]: (--fixed-medium-r-semicondensed--13-------,--fixed-medium-r-normal--14-------,---medium-r-normal--16-------) Missing font charsets:
    ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, KOI8-R, ISO8859-7, ISO8859-9, ISO8859-13, ISO8859-14, ISO8859-15, JISX0208.1983-0, KSC5601.1987-0, GB2312.1980-0, JISX0201.1976-0, ISO10646-1
  • anbox session-manager
    [ 2020-05-10 15:01:18] [daemon.cpp:61@Run] Application manager service is not running yet
  • sleep 1
    sh: 1: fvwm-menu-desktop: not found
    [FvwmIconMan][FlocaleGetFontSet]: (--fixed-medium-r-semicondensed--13-------,--fixed-medium-r-normal--14-------,---medium-r-normal--16-------) Missing font charsets:
    ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, KOI8-R, ISO8859-7, ISO8859-9, ISO8859-13, ISO8859-14, ISO8859-15, JISX0208.1983-0, KSC5601.1987-0, GB2312.1980-0, JISX0201.1976-0, ISO10646-1
    [FvwmPager][FlocaleGetFontSet]: (--fixed-medium-r-semicondensed--13-------,--fixed-medium-r-normal--14-------,---medium-r-normal--16-------) Missing font charsets:
    ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, KOI8-R, ISO8859-7, ISO8859-9, ISO8859-13, ISO8859-14, ISO8859-15, JISX0208.1983-0, KSC5601.1987-0, GB2312.1980-0, JISX0201.1976-0, ISO10646-1
  • anbox wait-ready
  • sleep 1
  • anbox wait-ready
  • anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
  • adb wait-for-device
  • for f in /apk-pre.d/*.apk
  • adb install /apk-pre.d/FDroid.apk
    Success
  • for f in /apk-pre.d/*.apk
  • adb install /apk-pre.d/firefox.apk
    Success
  • ls '/apk.d/.apk'
    ls: cannot access '/apk.d/
    .apk': No such file or directory
  • figlet Ready

| _ \ ___ __ _ | | _
| |) / _ / |/ _ | | | |
| _ < __/ (
| | (
| | || |
|
| __
|_,|_,|_, |
|
_/

  • echo 'Hint: the password is stored in /home/user/.vnc/passwdfile'
    Hint: the password is stored in /home/user/.vnc/passwdfile
  • exec sleep infinity
    systemd 245.4-4ubuntu3 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
    Detected virtualization docker.
    Detected architecture x86-64.
    /lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly.
    /docker-entrypoint.sh: starting /lib/systemd/systemd --show-status=false --unit=docker-entrypoint.target
    systemd 245.4-4ubuntu3 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
    Detected virtualization docker.
    Detected architecture x86-64.
    Set hostname to <9ff15c008a22>.
    Failed to attach 1 to compat systemd cgroup /docker/9ff15c008a22de501d6aa70b2b5d5bbefb1b7e8ad4ed3031da59a678b46afe99/init.scope: No such file or directory
    Failed to open pin file: No such file or directory
    Failed to allocate manager object: No such file or directory
    [!!!!!!] Failed to allocate manager object.
    Exiting PID 1...

After a system shutdown, I am able to restart the container with the above command, but adb shell pm gives me segmentation fault.

container logs when starting container after system shutdown:

/docker-entrypoint.sh: starting /lib/systemd/systemd --show-status=false --unit=docker-entrypoint.target
systemd 245.4-4ubuntu3 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
Detected virtualization docker.
Detected architecture x86-64.
Set hostname to <9ff15c008a22>.
/lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly.

  • source /etc/docker-entrypoint-cmd
    ++ unsudo /home/user/docker-2ndboot.sh
  • car=/home/user/docker-2ndboot.sh
  • shift
  • cdr=
    ++ which /home/user/docker-2ndboot.sh
  • exec machinectl shell user@ /home/user/docker-2ndboot.sh
    Connected to the local host. Press ^] three times within 1s to exit session.
  • mkdir -p /home/user/.vnc
  • '[' '!' -e /home/user/.vnc/passwdfile ']'
  • export DISPLAY=:0
  • DISPLAY=:0
  • '[' -e /tmp/.X11-unix/X0 ']'
  • sleep 1
  • Xvfb
  • '[' -e /tmp/.X11-unix/X0 ']'
  • : FIXME: remove this sleep
  • sleep 1
  • : FIXME: remove this sleep
  • sleep 1
  • x11vnc -usepw
    10/05/2020 15:16:08 -usepw: found /home/user/.vnc/passwdfile
    10/05/2020 15:16:08 x11vnc version: 0.9.16 lastmod: 2019-01-05 pid: 108
    10/05/2020 15:16:08 Using X display :0
    10/05/2020 15:16:08 rootwin: 0x388 reswin: 0x200001 dpy: 0xc85ee380
    10/05/2020 15:16:08
    10/05/2020 15:16:08 ------------------ USEFUL INFORMATION ------------------
    10/05/2020 15:16:08 X DAMAGE available on display, using it for polling hints.
    10/05/2020 15:16:08 To disable this behavior use: '-noxdamage'
    10/05/2020 15:16:08
    10/05/2020 15:16:08 Most compositing window managers like 'compiz' or 'beryl'
    10/05/2020 15:16:08 cause X DAMAGE to fail, and so you may not see any screen
    10/05/2020 15:16:08 updates via VNC. Either disable 'compiz' (recommended) or
    10/05/2020 15:16:08 supply the x11vnc '-noxdamage' command line option.
    10/05/2020 15:16:08
    10/05/2020 15:16:08 Wireframing: -wireframe mode is in effect for window moves.
    10/05/2020 15:16:08 If this yields undesired behavior (poor response, painting
    10/05/2020 15:16:08 errors, etc) it may be disabled:
    10/05/2020 15:16:08 - use '-nowf' to disable wireframing completely.
    10/05/2020 15:16:08 - use '-nowcr' to disable the Copy Rectangle after the
    10/05/2020 15:16:08 moved window is released in the new position.
    10/05/2020 15:16:08 Also see the -help entry for tuning parameters.
    10/05/2020 15:16:08 You can press 3 Alt_L's (Left "Alt" key) in a row to
    10/05/2020 15:16:08 repaint the screen, also see the -fixscreen option for
    10/05/2020 15:16:08 periodic repaints.
    10/05/2020 15:16:08
    10/05/2020 15:16:08 XFIXES available on display, resetting cursor mode
    10/05/2020 15:16:08 to: '-cursor most'.
    10/05/2020 15:16:08 to disable this behavior use: '-cursor arrow'
    10/05/2020 15:16:08 or '-noxfixes'.
    10/05/2020 15:16:08 using XFIXES for cursor drawing.
    10/05/2020 15:16:08 GrabServer control via XTEST.
    10/05/2020 15:16:08
    10/05/2020 15:16:08 Scroll Detection: -scrollcopyrect mode is in effect to
    10/05/2020 15:16:08 use RECORD extension to try to detect scrolling windows
    10/05/2020 15:16:08 (induced by either user keystroke or mouse input).
    10/05/2020 15:16:08 If this yields undesired behavior (poor response, painting
    10/05/2020 15:16:08 errors, etc) it may be disabled via: '-noscr'
    10/05/2020 15:16:08 Also see the -help entry for tuning parameters.
    10/05/2020 15:16:08 You can press 3 Alt_L's (Left "Alt" key) in a row to
    10/05/2020 15:16:08 repaint the screen, also see the -fixscreen option for
    10/05/2020 15:16:08 periodic repaints.
    10/05/2020 15:16:08
    10/05/2020 15:16:08 XKEYBOARD: number of keysyms per keycode 7 is greater
    10/05/2020 15:16:08 than 4 and 51 keysyms are mapped above 4.
    10/05/2020 15:16:08 Automatically switching to -xkb mode.
    10/05/2020 15:16:08 If this makes the key mapping worse you can
    10/05/2020 15:16:08 disable it with the "-noxkb" option.
    10/05/2020 15:16:08 Also, remember "-remap DEAD" for accenting characters.
    10/05/2020 15:16:08
    10/05/2020 15:16:08 X FBPM extension not supported.
    Xlib: extension "DPMS" missing on display ":0".
    10/05/2020 15:16:08 X display is not capable of DPMS.
    10/05/2020 15:16:08 --------------------------------------------------------
    10/05/2020 15:16:08
    10/05/2020 15:16:08 Default visual ID: 0x21
    10/05/2020 15:16:08 Read initial data from X display into framebuffer.
    10/05/2020 15:16:08 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5120
    10/05/2020 15:16:08
    10/05/2020 15:16:08 X display :0 is 32bpp depth=24 true color
    10/05/2020 15:16:08
    10/05/2020 15:16:08 Autoprobing TCP port
    10/05/2020 15:16:08 Autoprobing selected TCP port 5900
    10/05/2020 15:16:08 Autoprobing TCP6 port
    10/05/2020 15:16:08 Autoprobing selected TCP6 port 5900
    10/05/2020 15:16:08 listen6: bind: Address already in use
    10/05/2020 15:16:08 Not listening on IPv6 interface.
    10/05/2020 15:16:08
    10/05/2020 15:16:08 Xinerama is present and active (e.g. multi-head).
    10/05/2020 15:16:08 Xinerama: number of sub-screens: 1
    10/05/2020 15:16:08 Xinerama: no blackouts needed (only one sub-screen)
    10/05/2020 15:16:08
    10/05/2020 15:16:08 fb read rate: 1074 MB/sec
    10/05/2020 15:16:08 fast read: reset -wait ms to: 10
    10/05/2020 15:16:08 fast read: reset -defer ms to: 10
    10/05/2020 15:16:08 The X server says there are 10 mouse buttons.
    10/05/2020 15:16:08 screen setup finished.
    10/05/2020 15:16:08

The VNC desktop is: 9ff15c008a22:0
PORT=5900


Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval. It should work with any VNC viewer. Try it by running:

x11vnc -ncache 10 ...

One can also add -ncache_cr for smooth 'copyrect' window motion.
More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching

  • systemctl is-system-running --wait
  • fvwm
    running
  • systemctl status --no-pager -l anbox-container-manager
    ● anbox-container-manager.service - Anbox Container Manager
    Loaded: loaded (/lib/systemd/system/anbox-container-manager.service; enabled; vendor preset: enabled)
    Active: active (running) since Sun 2020-05-10 15:16:06 UTC; 3s ago
    Process: 41 ExecStartPre=/usr/local/bin/anbox-container-manager-pre.sh (code=exited, status=0/SUCCESS)
    Process: 55 ExecStartPre=/usr/local/share/anbox/anbox-bridge.sh start (code=exited, status=0/SUCCESS)
    Main PID: 73 (anbox)
    Tasks: 10 (limit: 4624)
    Memory: 19.8M
    CGroup: /docker/9ff15c008a22de501d6aa70b2b5d5bbefb1b7e8ad4ed3031da59a678b46afe99/system.slice/anbox-container-manager.service
    ├─73 /usr/local/bin/anbox container-manager --daemon --data-path=/var/lib/anbox --android-image=/aind-android.img --use-rootfs-overlay --use-squashfuse
    └─78 squashfuse /aind-android.img /var/lib/anbox/rootfs -o rw,allow_other,dev,suid

May 10 15:16:05 9ff15c008a22 anbox-container-manager-pre.sh[41]: + /sbin/modprobe ashmem_linux
May 10 15:16:05 9ff15c008a22 anbox-container-manager-pre.sh[41]: + '[' '!' -e /dev/ashmem ']'
May 10 15:16:05 9ff15c008a22 anbox-container-manager-pre.sh[41]: + mknod /dev/ashmem c 10 52
May 10 15:16:05 9ff15c008a22 anbox-container-manager-pre.sh[41]: + /sbin/modprobe binder_linux
May 10 15:16:05 9ff15c008a22 anbox-container-manager-pre.sh[41]: + grep binder /proc/filesystems
May 10 15:16:05 9ff15c008a22 anbox-container-manager-pre.sh[52]: nodev binder
May 10 15:16:05 9ff15c008a22 anbox-container-manager-pre.sh[41]: + '[' '!' -e /dev/binderfs/binder-control ']'
May 10 15:16:05 9ff15c008a22 anbox-container-manager-pre.sh[41]: + mkdir -p /dev/binderfs
May 10 15:16:05 9ff15c008a22 anbox-container-manager-pre.sh[41]: + mount -t binder none /dev/binderfs
May 10 15:16:06 9ff15c008a22 systemd[1]: Started Anbox Container Manager.

  • anbox wait-ready
  • anbox session-manager
    [ 2020-05-10 15:16:09] [daemon.cpp:61@Run] Application manager service is not running yet
  • sleep 1
    [fvwm][FlocaleGetFontSet]: (--fixed-medium-r-semicondensed--13-------,--fixed-medium-r-normal--14-------,---medium-r-normal--16-------) Missing font charsets:
    ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, KOI8-R, ISO8859-7, ISO8859-9, ISO8859-13, ISO8859-14, ISO8859-15, JISX0208.1983-0, KSC5601.1987-0, GB2312.1980-0, JISX0201.1976-0, ISO10646-1
    sh: 1: fvwm-menu-desktop: not found
    [FvwmPager][FlocaleGetFontSet]: (--fixed-medium-r-semicondensed--13-------,--fixed-medium-r-normal--14-------,---medium-r-normal--16-------) Missing font charsets:
    ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, KOI8-R, ISO8859-7, ISO8859-9, ISO8859-13, ISO8859-14, ISO8859-15, JISX0208.1983-0, KSC5601.1987-0, GB2312.1980-0, JISX0201.1976-0, ISO10646-1
    [FvwmIconMan][FlocaleGetFontSet]: (--fixed-medium-r-semicondensed--13-------,--fixed-medium-r-normal--14-------,---medium-r-normal--16-------) Missing font charsets:
    ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, KOI8-R, ISO8859-7, ISO8859-9, ISO8859-13, ISO8859-14, ISO8859-15, JISX0208.1983-0, KSC5601.1987-0, GB2312.1980-0, JISX0201.1976-0, ISO10646-1
  • anbox wait-ready

docker exec -it aind5 /bin/bash

adb devices

List of devices attached

  • daemon not running; starting now at tcp:5037
  • daemon started successfully
    emulator-5558 device

adb shell
x86_64:/ $ pm

Segmentation fault (core dumped)

@AkihiroSuda AkihiroSuda added bug Something isn't working help wanted Extra attention is needed labels May 11, 2020
@Fuseteam
Copy link
Contributor

uh this is bit hard to read, I can tell what is actually a quote and what is actually said 😅

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants