Custom Anbox installation files & patches, including patched Android OS image file.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
9.6 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. # Anbox installation
  2. This repository contains recommended Anbox configuration to run the program as securely as possible.
  3. Many users misconfigure Anbox to run in privileged mode which permits real root access for Android system processes to a Linux system. Configuration in this repository contains proper settings to run Anbox in _unprivileged mode_, thus better protecting your Linux system from possibly malicious Android processes.
  4. Additionally, this repository provides feature-patched Android OS image file patches for Anbox, and several other improvements. **See and get available Android images on [https://fjordtek.com/public/applications/anbox/images/](https://fjordtek.com/public/applications/anbox/images/).**
  5. `PKGBUILD` file is Arch Linux specific file. Otherwise, you can use rest of the files on any Linux distribution.
  6. ## Anbox installation
  7. Anbox installation steps are roughly described in [Installation Steps](installation-steps.md).
  8. ## Anbox files
  9. Subdirectory [anbox_files](anbox_files). Many files have originally been provided by [anbox-git AUR package](https://aur.archlinux.org/packages/anbox-git/). However, small changes have been made.
  10. ### Changes and additions
  11. #### # [anbox-bridge.network](anbox_files/anbox-bridge.network) (systemd-networkd file)
  12. - Added `[Network]` entry `ConfigureWithoutCarrier=yes`
  13. - Added IPv4 broadcast address `192.168.250.255` into `[Address]` section
  14. - Removed `IPMasquerade=yes` entry from `[Address]` section. Depending on your network topology, you may want to keep this option. I don't need or use it.
  15. #### # [anbox-container-manager.service](anbox_files/anbox-container-manager.service) (Systemd service file)
  16. - Changed `[Service]` entry `ExecStart=...` from
  17. ```
  18. ExecStart=/usr/bin/anbox container-manager --daemon --privileged --data-path=/var/lib/anbox
  19. ```
  20. to
  21. ```
  22. ExecStart=/usr/bin/anbox container-manager --daemon --data-path=/var/lib/anbox
  23. ```
  24. - Multiple security-related additions
  25. - Added `[Unit]` entries
  26. ```
  27. Wants=lxc.service
  28. After=lxc.service
  29. ```
  30. #### # [anbox-session-manager.service](anbox_files/anbox-session-manager.service) (Systemd service file)
  31. - Added `[Service]` entry `Environment=ANBOX_FORCE_SERVER_SIDE_DECORATION=true`
  32. #### # [subuid](anbox_files/subuid) & [subgid](anbox_files/subgid)
  33. LXC container user and group mapping files `/etc/subuid` and `/etc/subgid` for Android OS container.
  34. #### # anbox-session-manager (shell script)
  35. Simple wrapper script to be added into desktop startup program configuration. This is a simple work around script. If `anbox-session-manager` Systemd service is launched _before_ X11 session, launching the X11 session fails for unknown reasons. This script ensures that X11 session is launched _before_ `anbox-session-manager` Systemd service.
  36. Place into `/usr/local/bin/` folder and set as executable (`chmod +x <file/path>`).
  37. ----------
  38. #### Patch files
  39. | Patch file | Description |
  40. |------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  41. | [patch_audio01_timing.patch](anbox_files/patch_audio01_timing.patch), [patch_audio02_pass-messenger.patch](anbox_files/patch_audio02_pass-messenger.patch) | [GitHub: Anbox PR #1034 - Implement audio timing](https://github.com/anbox/anbox/pull/1034) |
  42. | [patch_bytesize-to-bytesizelong.patch](anbox_files/patch_bytesize-to-bytesizelong.patch) | [GitHub: Anbox PR #1480 - rpc: use ByteSizeLong from protobuf](https://github.com/anbox/anbox/pull/1480) |
  43. | [patch_cm-helpmenu-unhidden.patch](anbox_files/patch_cm-helpmenu-unhidden.patch) | Unhide `container-manager` options in Anbox executable help menu |
  44. | [patch_cm-privileged-warn.patch](anbox_files/patch_cm-privileged-warn.patch) | Add `not recommended` note into `--privileged` parameter description |
  45. | [patch_python3.patch](anbox_files/patch_python3.patch) | [GitHub: Anbox issue - Python 2 is EOL: comment by karuboniru](https://github.com/anbox/anbox/issues/1478#issuecomment-638055086) |
  46. | [patch_remove-unknown-opt.patch](anbox_files/patch_remove-unknown-opt.patch) | Remove unknown compilation time G++ option |
  47. | [patch_window-restored.patch](anbox_files/patch_window-restored.patch) | Some Android applications such as [NewPipe](https://github.com/TeamNewPipe/NewPipe) require `SDL_WINDOWEVENT_RESTORED` handling so that application window contents are correctly rendered after minimize/maximize operations. |
  48. | [patch_window-icons.patch](anbox_files/patch_window-icons.patch) | Set SDL window icon property for each application window by using application specific PNG icons. Adds value for `_NET_WM_ICON` property in X11 environment (`xprop` command). |
  49. ## Android OS files
  50. Subdirectory [androidOS_files](androidOS_files). Contains Android OS image file build instructions and additional patches. You find patched Android image along with additional information and possible other images on [https://fjordtek.com/public/applications/anbox/images/](https://fjordtek.com/public/applications/anbox/images/).
  51. Compiled Android image source code is purely based on [Android Open Source Project codebase](https://android.googlesource.com/).
  52. On Arch Linux, you can use [anbox-image AUR package](https://aur.archlinux.org/packages/anbox-image/). If you want to use the patched image, use either provided [anbox-image-custom PKGBUILD](androidOS_files/anbox-image-custom/PKGBUILD) or simply directly copy the patched Android image file into `/var/lib/anbox/` as `android.img`.
  53. ### Patch files
  54. Provided patch files are applied to the patched Android OS image file `android_7.1.1_r13_patched.img` ([direct link](https://fjordtek.com/public/applications/anbox/images/android_7.1.1_r13_patched.img)). The patch files are as follows:
  55. | Patch file | Description |
  56. |--------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  57. | [patch_audio01_timing.patch](androidOS_files/patch_audio01_timing.patch), [patch_audio02_pass-messenger.patch](androidOS_files/patch_audio02_pass-messenger.patch) | As above |
  58. | [patch_gallery2_no-activity-checks.patch](androidOS_files/patch_gallery2_no-activity-checks.patch) | Remove video & audio pause functionality from default Android OS system application `com.android.gallery3d` as the pause functionality does not fit into Linux desktop environment when running multiple Android applications simultaneously. |
  59. | [patch_initcgroups.patch](androidOS_files/patch_initcgroups.patch) | Remove unnecessary cgroups and related mount points from containerized Android OS system. Remove cpusets. Both options generate unnecessary Linux main system kernel `dmesg` output and both options fail. |