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.

118 lines
5.2 KiB

4 years ago
4 years ago
4 years ago
4 years ago
  1. # Anbox install files
  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. `PKGBUILD` file is Arch Linux specific file. Otherwise, you can use rest of the files on any Linux distribution.
  5. ## Anbox files
  6. Many files have originally been provided by [anbox-git AUR package](https://aur.archlinux.org/packages/anbox-git/). However, small changes have been made.
  7. ### Changes and additions
  8. #### [anbox-bridge.network](anbox_files/anbox-bridge.network) (systemd-networkd file)
  9. - Added `[Network]` entry `ConfigureWithoutCarrier=yes`
  10. - Added IPv4 broadcast address `192.168.250.255` into `[Address]` section
  11. - 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.
  12. #### [anbox-container-manager.service](anbox_files/anbox-container-manager.service) (Systemd service file)
  13. - Changed `[Service]` entry `ExecStart=...` from
  14. ```
  15. ExecStart=/usr/bin/anbox container-manager --daemon --privileged --data-path=/var/lib/anbox
  16. ```
  17. to
  18. ```
  19. ExecStart=/usr/bin/anbox container-manager --daemon --data-path=/var/lib/anbox
  20. ```
  21. - Multiple security-related additions
  22. - Added `[Unit]` entries
  23. ```
  24. Wants=lxc.service
  25. After=lxc.service
  26. ```
  27. #### [anbox-session-manager.service](anbox_files/anbox-session-manager.service) (Systemd service file)
  28. - Added `[Service]` entry `Environment=ANBOX_FORCE_SERVER_SIDE_DECORATION=true`
  29. #### [subuid](anbox_files/subuid) & [subgid](anbox_files/subgid)
  30. LXC container user and group mapping files `/etc/subuid` and `/etc/subgid` for Android OS container.
  31. #### anbox-session-manager (shell script)
  32. 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.
  33. Place into `/usr/local/bin/` folder.
  34. #### Patch files
  35. - [patch_audio01_timing.patch](anbox_files/patch_audio01_timing.patch) & [patch_audio02_pass-messenger.patch](anbox_files/patch_audio02_pass-messenger.patch)
  36. - Details: [GitHub: Anbox PR #1034 - Implement audio timing](https://github.com/anbox/anbox/pull/1034)
  37. - [patch_bytesize-to-bytesizelong.patch](anbox_files/patch_bytesize-to-bytesizelong.patch)
  38. - Details: [GitHub: Anbox PR #1480 - rpc: use ByteSizeLong from protobuf](https://github.com/anbox/anbox/pull/1480)
  39. - [patch_cm-helpmenu-unhidden.patch](anbox_files/patch_cm-helpmenu-unhidden.patch)
  40. - Details: personal patch to unhide `container-manager` options in Anbox executable help menu
  41. - [patch_cm-privileged-warn.patch](anbox_files/patch_cm-privileged-warn.patch)
  42. - Details: personal patch to add `not recommended` note into `--privileged` parameter description
  43. - [patch_python3.patch](anbox_files/patch_python3.patch)
  44. - Details: [GitHub: Anbox issue - Python 2 is EOL: comment by karuboniru](https://github.com/anbox/anbox/issues/1478#issuecomment-638055086)
  45. - [patch_remove-unknown-opt.patch](anbox_files/patch_remove-unknown-opt.patch)
  46. - Details: personal patch to remove unknown compilation time G++ option
  47. ## Android OS files
  48. Contains Android OS image file with additional patches. Base Android version is `7.1.1_r13`. The compiled image source code is purely based on [Android Open Source Project codebase](https://android.googlesource.com/).
  49. On Arch Linux, you can use [anbox-image AUR package](https://aur.archlinux.org/packages/anbox-image/) as reference to install this custom Android image. Or just simply copy the image into `/var/lib/anbox/`, overriding the original Android OS image file `android.img`.
  50. ### Additional features:
  51. - Server-side decoration support
  52. - Audio timing fix for stream videos
  53. - Default Gallery app no longer pauses video playback when changing focus to another Android application
  54. - Avoid unnecessary Linux kernel warnings by removing unused Android-native features
  55. ### Patch files
  56. Compiled Android OS image file `android.img` with the following patches applied:
  57. - [patch_audio01_timing.patch](androidOS_files/patch_audio01_timing.patch) & [patch_audio02_pass-messenger.patch](androidOS_files/patch_audio02_pass-messenger.patch)
  58. - Details: as above
  59. - [patch_gallery2_no-activity-checks.patch](androidOS_files/patch_gallery2_no-activity-checks.patch)
  60. - Details: 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 simultaneosly.
  61. - [patch_initcgroups.patch](androidOS_files/patch_initcgroups.patch)
  62. - Remove unnecessary cgroups and related mount points from containerized Android OS system. Remove cpusets.
  63. - Both options generate unnecessary Linux main system kernel `dmesg` output and both options fail.