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

Commit

Permalink
Merge pull request #25 from AkihiroSuda/a
Browse files Browse the repository at this point in the history
hide password from `docker logs` + trivial fixes
  • Loading branch information
AkihiroSuda authored Apr 14, 2020
2 parents 9d29cc0 + ca01cac commit caf8e21
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ RUN apt-get update && \
useradd --create-home --home-dir /home/user --uid 1000 -G systemd-journal user && \
curl -L -o /docker-entrypoint.sh https://raw.githubusercontent.com/AkihiroSuda/containerized-systemd/6ced78a9df65c13399ef1ce41c0bedc194d7cff6/docker-entrypoint.sh && \
chmod +x /docker-entrypoint.sh
# apk-pre.d is for pre-installed apks, /apk.d for the mountpoint for user-specific apks
RUN mkdir -p /apk-pre.d /apk.d && \
curl -L -o /apk-pre.d/FDroid.apk https://f-droid.org/FDroid.apk && \
curl -L -o /apk-pre.d/firefox.apk https://ftp.mozilla.org/pub/mobile/releases/68.7.0/android-x86_64/en-US/fennec-68.7.0.en-US.android-x86_64.apk && \
chmod 444 /apk-pre.d/*
COPY --from=lxc /usr/local /usr/local/
COPY --from=android-img /android.img /aind-android.img
COPY --from=anbox /anbox/build/src/anbox /usr/local/bin/anbox
Expand All @@ -111,11 +116,6 @@ ADD src/unsudo /usr/local/bin
ADD src/docker-2ndboot.sh /home/user
# Usage: docker run --rm --privileged -v /:/host --entrypoint bash aind/aind -exc "cp -f /install-kmod.sh /host/aind-install-kmod.sh && cd /host && chroot . /aind-install-kmod.sh"
ADD hack/install-kmod.sh /
# apk-pre.d is for pre-installed apks, /apk.d for the mountpoint for user-specific apks
RUN mkdir -p /apk-pre.d /apk.d && \
curl -L -o /apk-pre.d/FDroid.apk https://f-droid.org/FDroid.apk && \
curl -L -o /apk-pre.d/firefox.apk https://ftp.mozilla.org/pub/mobile/releases/68.7.0/android-x86_64/en-US/fennec-68.7.0.en-US.android-x86_64.apk && \
chmod 444 /apk-pre.d/*
VOLUME /var/lib/anbox
ENTRYPOINT ["/docker-entrypoint.sh", "unsudo"]
EXPOSE 5900
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ If the application manager doesn't shown up on the VNC screen, try `docker run .

Future version will support connection from Web browsers (of phones and tablets) without VNC.

### Troubleshooting

* `docker logs aind`
* `docker exec -it aind systemctl status anbox-container-manager`
* `docker exec -it aind ps -ef`
* `docker exec -it aind cat /var/lib/anbox/logs/console.log`

### Kubernetes

```bash
Expand Down Expand Up @@ -101,13 +108,6 @@ APK files mounted as `/apk.d/*.apk` are automatically installed on start up.
You can also use [F-Droid](https://f-droid.org/).
To use F-Droid, enable "Settings" -> "Security" -> "Allow installation of apps from unknown sources".

### Troubleshooting

* `docker logs aind`
* `docker exec -it aind systemctl status anbox-container-manager`
* `docker exec -it aind ps -ef`
* `docker exec -it aind cat /var/lib/anbox/logs/console.log`

## FAQ
### Isn't encrypting the phone with strong passcode enough for anti-theft? Why do we need aind?
People in th real world are likely to set weak passcode like "1234" (or finger pattern), because they want to open email/phone/twitter/maps/payment apps in just a few seconds.
Expand Down
4 changes: 2 additions & 2 deletions hack/install-kmod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ if [ $(id -u) != 0 ]; then
fi
if [ -e /dev/ashmem ]; then
if grep binder /proc/filesystems; then
echo "ashmem and binderfs are already enabled. Skipping install modules."
echo "ashmem and binderfs are already enabled. Skipping installing modules."
exit 0
fi
if [ -e /dev/binder ]; then
echo "ashmem and binder (classic) are already enabled. Skipping install modules."
echo "ashmem and binder (classic) are already enabled. Skipping installing modules."
exit 0
fi
fi
Expand Down
2 changes: 2 additions & 0 deletions src/docker-2ndboot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ set -eux

mkdir -p ~/.vnc
if [ ! -e ~/.vnc/passwdfile ]; then
set +x
echo $(head /dev/urandom | tr -dc a-z0-9 | head -c 32) > ~/.vnc/passwdfile
set -x
fi

Xvfb &
Expand Down

0 comments on commit caf8e21

Please sign in to comment.