{"id":13446629,"url":"https://github.com/aind-containers/aind","last_synced_at":"2025-09-29T02:31:35.957Z","repository":{"id":49239562,"uuid":"254071342","full_name":"aind-containers/aind","owner":"aind-containers","description":"AinD: Android in Docker. Ain't an emulator.","archived":true,"fork":false,"pushed_at":"2021-06-22T11:02:30.000Z","size":2493,"stargazers_count":1492,"open_issues_count":13,"forks_count":90,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-09-27T04:40:14.325Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aind-containers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-08T11:41:30.000Z","updated_at":"2024-09-22T06:16:08.000Z","dependencies_parsed_at":"2022-09-05T11:41:38.808Z","dependency_job_id":null,"html_url":"https://github.com/aind-containers/aind","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aind-containers%2Faind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aind-containers%2Faind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aind-containers%2Faind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aind-containers%2Faind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aind-containers","download_url":"https://codeload.github.com/aind-containers/aind/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234583683,"owners_count":18856280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T05:00:55.311Z","updated_at":"2025-09-29T02:31:35.546Z","avatar_url":"https://github.com/aind-containers.png","language":"Shell","readme":"# :warning: Deprecated in favor of ReDroid\n\nAs of April 2021, AinD is deprecated in favor of [ReDroid](https://github.com/remote-android/redroid-doc).\n\nWhile Anbox/AinD has got stuck in Android 7.1, ReDroid supports very recent Android versions: 8.1, 9, 10, 11, and Android S (12).\n\n- - -\n# AinD: Android (Anbox) in Docker\n\nAinD launches Android apps in Docker, by nesting [Anbox](https://anbox.io/) containers inside Docker.\n\nUnlike VM-based similar projects, AinD can be executed on IaaS instances without support for nested virtualization.\n\nGHCR: `ghcr.io/aind-containers/aind`\n\n:warning: Docker Hub image [`aind/aind`](https://hub.docker.com/r/aind/aind) is no longer updated. Please use `ghcr.io/aind-containers/aind` image on GHCR.\n\n## Purposes\n* Anti-theft (see [FAQ](#faq))\n* Android compatibility (via cloud) for iOS and Windows tablets\n\n### Non-goals\n* Cloud gaming\n\n## Screenshots\n\n```console\n$ docker ps -a\nCONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES\n950e3fa7d320        aind                \"/docker-entrypoint.…\"   7 minutes ago       Up 7 minutes        0.0.0.0:5900-\u003e5900/tcp   aind\n$ docker exec aind ps -ef | tail -n 20\n101023       323     138  0 11:18 pts/2    00:00:00 /system/bin/sdcard -u 1023 -g 1023 -m -w /data/media emulated\n110020       347     154  0 11:18 pts/2    00:00:00 com.android.systemui\n101001       397     154  0 11:18 pts/2    00:00:00 com.android.phone\nuser         403     154  0 11:18 pts/2    00:00:00 com.android.settings:CryptKeeper\nuser         448     154  0 11:18 pts/2    00:00:00 com.android.settings\n110009       531     154  0 11:18 pts/2    00:00:00 android.ext.services\n110032       546     154  0 11:18 pts/2    00:00:00 com.android.deskclock\n110015       577     154  0 11:18 pts/2    00:00:00 com.android.provision\n110047       583     154  0 11:18 pts/2    00:00:00 com.android.smspush\n110000       615     154  0 11:18 pts/2    00:00:00 org.anbox.appmgr\n110011       642     154  0 11:18 pts/2    00:00:00 com.android.managedprovisioning\n110008       657     154  0 11:18 pts/2    00:00:00 android.process.media\n110003       675     154  0 11:18 pts/2    00:00:00 com.android.providers.calendar\n110002       694     154  0 11:18 pts/2    00:00:00 android.process.acore\n110027       744     154  0 11:18 pts/2    00:00:00 com.android.calendar\n110028       765     154  0 11:18 pts/2    00:00:00 com.android.camera2\n110034       784     154  0 11:18 pts/2    00:00:00 com.android.email\n110037       807     154  0 11:18 pts/2    00:00:00 com.android.gallery3d\n110013       822     154  0 11:18 pts/2    00:00:00 com.android.onetimeinitializer\nroot        1003       0  0 11:25 ?        00:00:00 ps -ef\n```\n\n![docs/screenshot.png](docs/screenshot-20200410.png)\n\n## Quick start\nTested on Ubuntu 19.10 (Kernel 5.3).\nMay not work on other distros.\nIf `modprobe ashmem_linux` or `modprobe binder_linux` fails, see https://github.com/anbox/anbox-modules .\n\n```bash\nsudo modprobe ashmem_linux\nsudo modprobe binder_linux\n```\n\n### Docker\n#### VNC\n```bash\ndocker run -td --name aind --privileged -p 5900:5900 -v /lib/modules:/lib/modules:ro ghcr.io/aind-containers/aind\ndocker exec aind cat /home/user/.vnc/passwdfile\n```\n\n\u003e **NOTE**: `--privileged` is required for nesting an Anbox (LXC) inside Docker. But you don't need to worry too much because Anbox launches \"unprivileged\" LXC using user namespaces. You can confirm that all Android processes are running as non-root users, by executing `docker exec aind ps -ef`.\n\nWait for 10-20 seconds until Android processes are shown up in `docker exec aind ps -ef`, and then connect to `5900` via `vncviewer`.\nThe VNC password is stored in `/home/user/.vnc/passwdfile`. The password file can be also overridden by `docker run -v /your/own/passwdfile:/home/user/.vnc/passwdfile:ro` .\n\nIf the application manager doesn't shown up on the VNC screen, try `docker run ...` several times (FIXME).  Also make sure to check `docker logs aind`.\n\n#### Web mode (noVNC)\nTo run the container with [noVNC](https://novnc.com/) support, the environment variable `WEBMODE` can be set with the following command:\n\n```bash\ndocker run -td --name aind --privileged -p 8080:8080 -e \"WEBMODE=1\" -v /lib/modules:/lib/modules:ro ghcr.io/aind-containers/aind\ndocker exec aind cat /home/user/.vnc/passwdfile\n```\n\nThe container will be accessible via the browser at http://localhost:8080/vnc.html\n\n### Docker Compose\n\nTo bring the container up simply run\n```\ndocker-compose up -d\n```\nthe vnc password can be gotten with\n```\ndocker-compose exec aind cat /home/user/.vnc/passwdfile\n```\nyou can check how far it is with\n```\ndocker-compose exec aind ps -ef\n```\n\n### Kubernetes\n\n```bash\nkubectl apply -f kube/aind.yaml\nkubectl port-forward service/aind 5900\n```\n\nThe manifest contains the kernel module installer as `initContainers`.\n\nThe manifest is known to work on:\n- Google Kubernetes Engine (GKE) 1.16.8-gke.8 (ubuntu) [Apr 14, 2020]\n  - Kubernetes 1.16.8, Ubuntu 18.04.4, Kernel 5.3.0-1012-gke, Docker 19.03.2\n  - n2-standard-8\n- Google Kubernetes Engine (GKE) 1.16.8-gke.8 (ubuntu\\_containerd) [Apr 14, 2020]\n  - Kubernetes 1.16.8, Ubuntu 18.04.4, Kernel 5.3.0-1012-gke, containerd 1.2.10\n  - n2-standard-8\n- Azure Kubernetes Service (AKS) 1.17.3 [Apr 14, 2020]\n  - Kubernetes 1.17.3, Ubuntu 16.04.6, Kernel 4.15.0-1071-azure, MS-Moby 3.0.10+azure\n  - Standard DS2 v2\n- kind 0.7.0 [Apr 14, 2020]\n  - Kubernetes 1.17.0, Ubuntu 19.10, Kernel 5.3.0-46-generic, containerd 1.3.2\n  - **NOTE**: Requires `docker exec kind-control-plane mount -o remount,rw /sys`\n\n## Tips\n\n### Troubleshooting\n\n* `docker logs aind`\n* `docker exec -it aind systemctl status anbox-container-manager`\n* `docker exec -it aind ps -ef`\n* `docker exec -it aind cat /var/lib/anbox/logs/console.log`\n\n### adb\n\n```bash\ndocker exec -it aind adb shell\n```\n\nTo run adb on the host:\n\n```\nsocat TCP-LISTEN:5037,reuseaddr,fork 'EXEC:docker exec -i aind  \"socat STDIO TCP-CONNECT:localhost:5037\"' \u0026\nadb connect localhost:5037\nadb shell\n```\n\n## Apps\n\n### Pre-installed Apps\n* Firefox\n* F-Droid\n* Misc accessories like Clock and Calculator\n\n### Installing apk packages\n\nAPK files mounted as `/apk.d/*.apk` are automatically installed on start up.\n\nYou can also use [F-Droid](https://f-droid.org/).\nTo use F-Droid, enable \"Settings\" -\u003e \"Security\" -\u003e \"Allow installation of apps from unknown sources\".\n\n## FAQ\n### Isn't encrypting the phone with strong passcode enough for anti-theft? Why do we need aind?\nPeople in the 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.\n\naind is expected to be used in conjunction with encryption of the client device, and to be used only for sensitive apps, with a passcode that is stronger than the passcode of the client device itself.\n\n## TODOs\n* Map different UID range per containers\n* Better touch screen experience\n* Redirect camera, notifications, ...\n\n## Similar projects\n* [Anbox](https://anbox.io/): Desktop only and single-user/single-instance only. aind is built using Anbox.\n* [Android container in Chrome OS](https://chromium.googlesource.com/chromiumos/platform2/+/master/arc/container-bundle/): ChromeOS/ChromiumOS-only\n* [Docker-Android](https://github.com/budtmo/docker-android): VM-based\n* [kubedroid](https://github.com/kubedroid/kubedroid): VM-based\n* [Anbox Cloud](https://anbox-cloud.io/): Proprietary\n* [Intel Celadon in Container (CIC)](https://github.com/projectceladon/device-intel-cic): [Proprietary](https://github.com/projectceladon/vendor-intel-cic/blob/9b91758a3fa0a6530910d0ada8e99816aa17195d/README)\n\n## License\n* aind itself (e.g. Dockerfile, Kubernetes manifests, and start-up scripts) is licensed under the terms of [the Apache License, Version 2.0](./LICENSE).\n* The Anbox patches ([`./src/patches/anbox/*.patch`](./src/patches/anbox)) are licensed under the terms of [the GNU General Public License, Version 3](https://github.com/anbox/anbox/blob/master/COPYING.GPL), corresponding to [Anbox](https://github.com/anbox/anbox) itself.\n\n### Binary image\n* The `ghcr.io/aind-containers/aind` image on GitHub Container Registry (built from [`./Dockerfile`](./Dockerfile)) contains the binaries of several free software.\n  * Anbox (`/usr/local/bin/anbox`): [the GNU General Public License, Version 3](https://github.com/anbox/anbox/blob/master/COPYING.GPL)\n  * Firefox (`/apk-pre.d/fennec-*.apk`): [the Mozilla Public License 2](https://www.mozilla.org/en-US/about/legal/eula/)\n  * F-Droid (`/apk-pre.d/FDroid.apk`): [the GNU General Public License, Version 3](https://gitlab.com/fdroid/fdroidclient/-/blob/master/LICENSE)\n  * Android image (`/android.img`, fetched from https://build.anbox.io/): see https://source.android.com/setup/start/licenses . For build instruction, see https://github.com/anbox/anbox/blob/master/docs/build-android.md\n  * For other packages, see `/usr/share/doc/*/copyright` .\n","funding_links":[],"categories":["Container Operations","Shell"],"sub_categories":["Runtime"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faind-containers%2Faind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faind-containers%2Faind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faind-containers%2Faind/lists"}