This repository has been archived by the owner on Oct 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Akihiro Suda <[email protected]>
- Loading branch information
1 parent
f6de7de
commit 0f9de0a
Showing
4 changed files
with
41 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,43 @@ | ||
#!/bin/bash | ||
# docker-2ndboot.sh is executed as a non-root user via `unsudo`. | ||
|
||
function finish { | ||
figlet ERROR | ||
echo "ERROR: failed!" | ||
: FIXME: the container should shutdown automatically here | ||
} | ||
trap finish EXIT | ||
|
||
cd $(realpath $(dirname $0)/..) | ||
set -eux | ||
Xvfb & | ||
export DISPLAY=:0 | ||
|
||
: FIXME | ||
sleep 5 | ||
until [ -e /tmp/.X11-unix/X0 ]; do sleep 1; done | ||
: FIXME: remove this sleep | ||
sleep 1 | ||
x11vnc & | ||
|
||
: FIXME | ||
sleep 5 | ||
: FIXME: remove this sleep | ||
sleep 1 | ||
fvwm & | ||
anbox session-manager & | ||
systemctl is-system-running --wait | ||
systemctl status anbox-container-manager --no-pager | ||
|
||
: FIXME | ||
sleep 5 | ||
anbox session-manager & | ||
until anbox wait-ready; do sleep 1; done | ||
anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity | ||
|
||
sleep infinity | ||
adb wait-for-device | ||
|
||
# install apk (pre-installed apps such as F-Droid) | ||
for f in /apk-pre.d/*.apk; do adb install $f; done | ||
|
||
# install apk | ||
if ls /apk.d/*.apk; then | ||
for f in /apk.d/*.apk; do adb install $f; done | ||
fi | ||
|
||
# done | ||
figlet "Ready" | ||
ps -ef | ||
exec sleep infinity |