From 0810d99547cd888c98922fd5586747d4d8f77bef Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Sat, 2 Jan 2021 15:45:19 +0300 Subject: [PATCH] Fix working, tweak README --- README.ROSA | 13 ++----------- anbox-session-manager.service | 9 --------- anbox.spec | 8 ++++---- org.anbox.service | 3 +++ 4 files changed, 9 insertions(+), 24 deletions(-) delete mode 100644 anbox-session-manager.service create mode 100644 org.anbox.service diff --git a/README.ROSA b/README.ROSA index cf6ad64..bf62896 100644 --- a/README.ROSA +++ b/README.ROSA @@ -18,20 +18,11 @@ You also need to download the Android image to /var/lib/anbox/android.img. The path is important, since the systemd service metioned below will check it. The pre-build image can be found at . -Then start the anbox-container-manager.service and the -anbox-session-manager.service, anbox-session-manager.service is a systemd -user service. - -Add lxc to autostart and start it right now: - - sudo systemctl enable --now lxc - -You can run following commands to manually start and enbale (add to autostart) the services: +After installing the anbox package, add anbox service to autostart and start it right now: sudo systemctl enable --now anbox-container-manager.service - systemctl --user enable --now anbox-session-manager.service -If the above commands all succeed, you can start the Android application from +If the above commands succeed, you can start the Android application from desktop menu now. Or you launch application from command line: anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity diff --git a/anbox-session-manager.service b/anbox-session-manager.service deleted file mode 100644 index f2872e9..0000000 --- a/anbox-session-manager.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Anbox Session Manager -Documentation=man:anbox(1) - -[Service] -ExecStart=/usr/bin/anbox session-manager - -[Install] -WantedBy=default.target diff --git a/anbox.spec b/anbox.spec index f3dbd21..62181fe 100644 --- a/anbox.spec +++ b/anbox.spec @@ -4,7 +4,7 @@ Summary: Android in a box Name: anbox Version: 0.0 -Release: 0.git%{commit_short}.1 +Release: 0.git%{commit_short}.2 License: GPLv3 Group: Emulators Url: https://anbox.io @@ -12,7 +12,7 @@ Source0: https://github.com/anbox/anbox/archive/%{commit}.tar.gz?/%{name}-%{comm # Additional stuff from Debian Source10: anbox-container-manager.service -Source11: anbox-session-manager.service +Source11: org.anbox.service Source12: anbox.desktop Source13: anbox.1 Source14: README.ROSA @@ -89,10 +89,10 @@ See %{_docdir}/anbox/README.ROSA for more information. %{_datadir}/dbus-1/interfaces/org.anbox.ApplicationManager.xml %{_datadir}/dbus-1/interfaces/org.anbox.Gps.xml %{_datadir}/dbus-1/interfaces/org.anbox.Sensors.xml +%{_datadir}/dbus-1/services/org.anbox.service %{_datadir}/pixmaps/anbox.png %{_datadir}/applications/anbox.desktop %{_mandir}/man1/anbox.1* -%{_userunitdir}/anbox-session-manager.service %{_unitdir}/anbox-container-manager.service %dir /var/lib/anbox @@ -132,7 +132,7 @@ cp %{SOURCE14} README.ROSA install -m0644 -D snap/gui/icon.png %{buildroot}%{_datadir}/pixmaps/anbox.png install -m0644 -D %{SOURCE10} %{buildroot}%{_unitdir}/anbox-container-manager.service -install -m0644 -D %{SOURCE11} %{buildroot}%{_userunitdir}/anbox-session-manager.service +install -m0644 -D %{SOURCE11} %{buildroot}%{_datadir}/dbus-1/services/org.anbox.service install -m0644 -D %{SOURCE12} %{buildroot}%{_datadir}/applications/anbox.desktop install -m0644 -D %{SOURCE13} %{buildroot}%{_mandir}/man1/anbox.1 install -m0755 -D scripts/anbox-bridge.sh %{buildroot}%{_datadir}/anbox/anbox-bridge.sh diff --git a/org.anbox.service b/org.anbox.service new file mode 100644 index 0000000..0e7bed6 --- /dev/null +++ b/org.anbox.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.anbox +Exec=/usr/bin/anbox session-manager