[-]
[+]
|
Changed |
_service:tar_git:waydroid.spec
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,7 +2,7 @@
<service name="tar_git">
<param name="url">https://github.com/sailfishos-open/waydroid.git</param>
<param name="branch">main</param>
- <param name="revision">1.2.0+git2</param>
+ <param name="revision">1.2.0+git3</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Deleted |
_service:tar_git:Waydroid.qml
^
|
@@ -1,227 +0,0 @@
-import QtQuick 2.0
-import Sailfish.Silica 1.0
-import Nemo.DBus 2.0
-import QtQml 2.2
-
-Page {
- id: root
-
- property bool serviceRunning
- property bool waydroidAutostart
- property bool ready: false
- property string serviceStatus: serviceRunning ? "active" : "inactive"
- property string serviceName: "waydroid-session.service"
-
- DBusInterface {
- id: waydroidSessionService
-
- bus: DBus.SessionBus
- service: "org.freedesktop.systemd1"
- iface: "org.freedesktop.systemd1.Unit"
- signalsEnabled: true
-
- function updateProperties() {
- if (path !== "") {
- var s = waydroidSessionService.getProperty("ActiveState")
- root.serviceRunning = (s === "active")
- } else {
- root.serviceRunning = false
- }
- }
- onPathChanged: updateProperties()
- }
-
- DBusInterface {
- id: manager
-
- bus: DBus.SessionBus
- service: "org.freedesktop.systemd1"
- path: "/org/freedesktop/systemd1"
- iface: "org.freedesktop.systemd1.Manager"
- signalsEnabled: true
-
- signal unitNew(string name)
- signal unitFilesChanged()
-
- onUnitFilesChanged: {
- updateAutostart()
- }
-
- Component.onCompleted: {
- updatePath()
- updateAutostart()
- }
- function updateAutostart() {
- manager.typedCall("GetUnitFileState", [{"type": "s", "value": serviceName}],
- function(state) {
- console.log(state)
- if (state !== "disabled" && state !== "invalid") {
- root.waydroidAutostart = true
- } else {
- root.waydroidAutostart = false
- root.serviceRunning = false
- }
- },
- function() {
- root.waydroidAutostart = false
- root.serviceRunning = false
- })
- }
-
- function setAutostart(isAutostart) {
- if(isAutostart)
- enableWaydroidUnit()
- else
- disableWaydroidUnit()
- }
-
- function enableWaydroidUnit() {
- manager.typedCall( "EnableUnitFiles",[{"type":"as","value":[serviceName]},
- {"type":"b","value":false},
- {"type":"b","value":false}],
- function(carries_install_info,changes){
- root.waydroidAutostart = true
- console.log(carries_install_info,changes)
- },
- function() {
- console.log("Enabling error")
- }
- )
-
- }
-
- function disableWaydroidUnit() {
- manager.typedCall( "DisableUnitFiles",[{"type":"as","value":[serviceName]},
- {"type":"b","value":false}],
- function(changes){
- root.waydroidAutostart = false
- console.log(changes)
- },
- function() {
- console.log("Disabling error")
- }
- )
- }
-
- function startWaydroidUnit() {
- manager.typedCall( "StartUnit",[{"type":"s","value":serviceName},
- {"type":"s","value":"fail"}],
- function(job) {
- console.log("job started - ", job)
- waydroidSessionService.updateProperties()
- runningUpdateTimer.start()
- },
- function() {
- console.log("job started failure")
- })
- }
-
- function stopWaydroidUnit() {
- manager.typedCall( "StopUnit",[{"type":"s","value":serviceName},
- {"type":"s","value":"replace"}],
- function(job) {
- console.log("job stopped - ", job)
- waydroidSessionService.updateProperties()
- runningUpdateTimer.start()
- },
- function() {
- console.log("job stopped failure")
- })
- }
-
- function updatePath() {
- manager.typedCall("LoadUnit", [{ "type": "s", "value": serviceName}]);
- manager.typedCall("GetUnit", [{ "type": "s", "value": serviceName}], function(unit) {
- waydroidSessionService.path = unit
- }, function() {
- waydroidSessionService.path = ""
- })
- }
- }
-
- Timer {
- id: runningUpdateTimer
- interval: 1000
- running: true
- repeat: true
- onTriggered:{
- manager.updatePath()
- waydroidSessionService.updateProperties()
- }
- }
-
- SilicaFlickable {
- anchors.fill: parent
- contentHeight: content.height + Theme.paddingMedium
- width: parent.width
-
- Column {
- id:content
- width:parent.width
-
- PageHeader {
- id: header
- title: qsTr("Waydroid settings")
- }
-
- TextSwitch {
- id: autostart
- text: qsTr("Start Waydroid session on bootup")
- description: qsTr("When this is off, you won't have access to android applications")
- enabled: root.ready
- automaticCheck: false
- checked: root.waydroidAutostart
- onClicked: {
- manager.setAutostart(!checked)
- }
- }
-
- Label {
- x: Theme.horizontalPageMargin
- width: parent.width - 2*Theme.horizontalPageMargin
- text: qsTr("Start/stop Waydroid session daemon.")
- wrapMode: Text.Wrap
- font.pixelSize: Theme.fontSizeExtraSmall
- color: Theme.secondaryHighlightColor
- }
-
- Label {
- id: waydroidSystemdStatus
- x: Theme.horizontalPageMargin
- width: parent.width - 2*Theme.horizontalPageMargin
- text: qsTr("Waydroid session current status") + " - " + root.serviceStatus
- wrapMode: Text.Wrap
- font.pixelSize: Theme.fontSizeExtraSmall
- color: Theme.secondaryHighlightColor
- }
-
- Item {
- width: 1
|
[-]
[+]
|
Deleted |
_service:tar_git:anbox.conf
^
|
@@ -1,10 +0,0 @@
-[Protocol]
-/dev/puddlejumper = aidl2
-/dev/vndpuddlejumper = aidl2
-/dev/hwpuddlejumper = hidl
-
-[ServiceManager]
-/dev/puddlejumper = aidl2
-/dev/vndpuddlejumper = aidl2
-/dev/hwpuddlejumper = hidl
-
|
[-]
[+]
|
Changed |
_service:tar_git:waydroid-1.2.0+git3.tar.gz/README.md
^
|
@@ -1,13 +1,37 @@
-# Waydroid sailfish packaging
+# Waydroid Sailfish OS packaging
## User Usage
-* Install this package
-* As defaultuser run the command 'waydroid init' which will download the required root filesytems
-* Reboot (services were enabled afer installation and will start next boot)
-* As defaultuser, run the command 'waydroid show-full-ui'
+You can run Waydroid session either by starting it as a systemd
+service (on boot or on request) or through dedicated app. As it is
+recommended to run Waydroid using its full UI mode, UI is similar in
+the both approaches.
-And hopefully you will be presented with an android window
+When using Waydroid through systemd services, Waydroid settings are
+available as a module of Sailfish Settings. These allow you to request
+starting the session on boot and start/stop session. UI of the session
+will be opened with the launcher on applications grid. Main drawback
+of using UI via this approach is that if you close the UI in Lipstick,
+it will not open again due to some issue in interaction between
+Lipstick and Waydroid. To use this approach, install package
+*waydroid-settings*.
+
+In the case of the dedicated app, Waydroid session will be started
+with start of the app and closed with the app. As a result, it is
+slower than using pre-started Waydroid session via systemd. The
+dedicated app can be installed via *waydroid-runner* package.
+
+* Install `waydroid-settings` or `waydroid-runner` package.
+* As root (devel-su) run the command `waydroid init` which will download the required root filesystems. See `waydroid init -h` for the list of available images.
+* Reboot (container service will start next boot).
+
+If using *waydroid-settings*:
+* Goto Jolla Settings > Waydroid and start the "Session" service (you can choose to start it automatically)
+* Click on the Waydroid icon launcher, this will start the fullscreen waydroid UI
+
+If using *waydroid-runner*, start it from the launcher.
+
+It is expected that you will be presented with an Android window.
## Porter tasks
@@ -20,4 +44,4 @@
veth
xt_CHECKSUM
```
-* Android vibration service is disabled in Sailfish and needs to be enabled for waydroid
+* Android vibration service is disabled in Sailfish and needs to be enabled for Waydroid
|
[-]
[+]
|
Added |
_service:tar_git:waydroid-1.2.0+git3.tar.gz/config/anbox.conf
^
|
@@ -0,0 +1,10 @@
+[Protocol]
+/dev/puddlejumper = aidl2
+/dev/vndpuddlejumper = aidl2
+/dev/hwpuddlejumper = hidl
+
+[ServiceManager]
+/dev/puddlejumper = aidl2
+/dev/vndpuddlejumper = aidl2
+/dev/hwpuddlejumper = hidl
+
|
[-]
[+]
|
Added |
_service:tar_git:waydroid-1.2.0+git3.tar.gz/config/waydroid-container.service
^
|
@@ -0,0 +1,12 @@
+[Unit]
+Description=Waydroid container
+After=graphical.target
+
+[Service]
+Type=simple
+Restart=no
+ExecStart=/usr/bin/waydroid container start
+ExecStop=/usr/bin/waydroid container stop
+
+[Install]
+WantedBy=graphical.target
|
[-]
[+]
|
Added |
_service:tar_git:waydroid-1.2.0+git3.tar.gz/config/waydroid-session.service
^
|
@@ -0,0 +1,11 @@
+[Unit]
+Description=Waydroid session
+
+[Service]
+Type=simple
+Restart=no
+ExecStart=/usr/bin/waydroid session start
+ExecStop=/usr/bin/waydroid session stop
+
+[Install]
+WantedBy=user-session.target
|
[-]
[+]
|
Added |
_service:tar_git:waydroid-1.2.0+git3.tar.gz/config/waydroid.conf
^
|
@@ -0,0 +1,3 @@
+veth
+xt_CHECKSUM
+
|
[-]
[+]
|
Added |
_service:tar_git:waydroid-1.2.0+git3.tar.gz/config/waydroid.desktop
^
|
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Type=Application
+Name=Waydroid
+Exec=waydroid show-full-ui
+Icon=/opt/waydroid/data/AppIcon.png
|
[-]
[+]
|
Added |
_service:tar_git:waydroid-1.2.0+git3.tar.gz/settings/Waydroid.qml
^
|
@@ -0,0 +1,227 @@
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+import Nemo.DBus 2.0
+import QtQml 2.2
+
+Page {
+ id: root
+
+ property bool serviceRunning
+ property bool waydroidAutostart
+ property bool ready: false
+ property string serviceStatus: serviceRunning ? "active" : "inactive"
+ property string serviceName: "waydroid-session.service"
+
+ DBusInterface {
+ id: waydroidSessionService
+
+ bus: DBus.SessionBus
+ service: "org.freedesktop.systemd1"
+ iface: "org.freedesktop.systemd1.Unit"
+ signalsEnabled: true
+
+ function updateProperties() {
+ if (path !== "") {
+ var s = waydroidSessionService.getProperty("ActiveState")
+ root.serviceRunning = (s === "active")
+ } else {
+ root.serviceRunning = false
+ }
+ }
+ onPathChanged: updateProperties()
+ }
+
+ DBusInterface {
+ id: manager
+
+ bus: DBus.SessionBus
+ service: "org.freedesktop.systemd1"
+ path: "/org/freedesktop/systemd1"
+ iface: "org.freedesktop.systemd1.Manager"
+ signalsEnabled: true
+
+ signal unitNew(string name)
+ signal unitFilesChanged()
+
+ onUnitFilesChanged: {
+ updateAutostart()
+ }
+
+ Component.onCompleted: {
+ updatePath()
+ updateAutostart()
+ }
+ function updateAutostart() {
+ manager.typedCall("GetUnitFileState", [{"type": "s", "value": serviceName}],
+ function(state) {
+ console.log(state)
+ if (state !== "disabled" && state !== "invalid") {
+ root.waydroidAutostart = true
+ } else {
+ root.waydroidAutostart = false
+ root.serviceRunning = false
+ }
+ },
+ function() {
+ root.waydroidAutostart = false
+ root.serviceRunning = false
+ })
+ }
+
+ function setAutostart(isAutostart) {
+ if(isAutostart)
+ enableWaydroidUnit()
+ else
+ disableWaydroidUnit()
+ }
+
+ function enableWaydroidUnit() {
+ manager.typedCall( "EnableUnitFiles",[{"type":"as","value":[serviceName]},
+ {"type":"b","value":false},
+ {"type":"b","value":false}],
+ function(carries_install_info,changes){
+ root.waydroidAutostart = true
+ console.log(carries_install_info,changes)
+ },
+ function() {
+ console.log("Enabling error")
+ }
+ )
+
+ }
+
+ function disableWaydroidUnit() {
+ manager.typedCall( "DisableUnitFiles",[{"type":"as","value":[serviceName]},
+ {"type":"b","value":false}],
+ function(changes){
+ root.waydroidAutostart = false
+ console.log(changes)
+ },
+ function() {
+ console.log("Disabling error")
+ }
+ )
+ }
+
+ function startWaydroidUnit() {
+ manager.typedCall( "StartUnit",[{"type":"s","value":serviceName},
+ {"type":"s","value":"fail"}],
+ function(job) {
+ console.log("job started - ", job)
+ waydroidSessionService.updateProperties()
+ runningUpdateTimer.start()
+ },
+ function() {
+ console.log("job started failure")
+ })
+ }
+
+ function stopWaydroidUnit() {
+ manager.typedCall( "StopUnit",[{"type":"s","value":serviceName},
+ {"type":"s","value":"replace"}],
+ function(job) {
+ console.log("job stopped - ", job)
+ waydroidSessionService.updateProperties()
+ runningUpdateTimer.start()
+ },
+ function() {
+ console.log("job stopped failure")
+ })
+ }
+
+ function updatePath() {
+ manager.typedCall("LoadUnit", [{ "type": "s", "value": serviceName}]);
+ manager.typedCall("GetUnit", [{ "type": "s", "value": serviceName}], function(unit) {
+ waydroidSessionService.path = unit
+ }, function() {
+ waydroidSessionService.path = ""
+ })
+ }
+ }
+
+ Timer {
+ id: runningUpdateTimer
+ interval: 1000
+ running: true
+ repeat: true
+ onTriggered:{
+ manager.updatePath()
+ waydroidSessionService.updateProperties()
+ }
+ }
+
+ SilicaFlickable {
+ anchors.fill: parent
+ contentHeight: content.height + Theme.paddingMedium
+ width: parent.width
+
+ Column {
+ id:content
+ width:parent.width
+
+ PageHeader {
+ id: header
+ title: qsTr("Waydroid settings")
+ }
+
+ TextSwitch {
+ id: autostart
+ text: qsTr("Start Waydroid session on bootup")
+ description: qsTr("When this is off, you won't have access to android applications")
+ enabled: root.ready
+ automaticCheck: false
+ checked: root.waydroidAutostart
+ onClicked: {
+ manager.setAutostart(!checked)
+ }
+ }
+
+ Label {
+ x: Theme.horizontalPageMargin
+ width: parent.width - 2*Theme.horizontalPageMargin
+ text: qsTr("Start/stop Waydroid session daemon.")
+ wrapMode: Text.Wrap
+ font.pixelSize: Theme.fontSizeExtraSmall
+ color: Theme.secondaryHighlightColor
+ }
+
+ Label {
+ id: waydroidSystemdStatus
+ x: Theme.horizontalPageMargin
+ width: parent.width - 2*Theme.horizontalPageMargin
+ text: qsTr("Waydroid session current status") + " - " + root.serviceStatus
+ wrapMode: Text.Wrap
+ font.pixelSize: Theme.fontSizeExtraSmall
+ color: Theme.secondaryHighlightColor
+ }
+
+ Item {
+ width: 1
|
[-]
[+]
|
Added |
_service:tar_git:waydroid-1.2.0+git3.tar.gz/settings/waydroid.json
^
|
@@ -0,0 +1,15 @@
+{
+ "translation_catalog" : "waydroid",
+ "entries": [
+ {
+ "path": "system_settings/system/waydroid",
+ "title": "Waydroid",
+ "type": "page",
+ "icon": "image://theme/icon-m-file-apk",
+ "order": 500,
+ "params": {
+ "source": "/usr/share/waydroid/settings/Waydroid.qml"
+ }
+ }
+ ]
+}
|
[-]
[+]
|
Deleted |
_service:tar_git:waydroid-container.service
^
|
@@ -1,12 +0,0 @@
-[Unit]
-Description=Waydroid container
-After=graphical.target
-
-[Service]
-Type=simple
-Restart=no
-ExecStart=/usr/bin/waydroid container start
-ExecStop=/usr/bin/waydroid container stop
-
-[Install]
-WantedBy=graphical.target
|
[-]
[+]
|
Deleted |
_service:tar_git:waydroid-session.service
^
|
@@ -1,11 +0,0 @@
-[Unit]
-Description=Waydroid session
-
-[Service]
-Type=simple
-Restart=no
-ExecStart=/usr/bin/waydroid session start
-ExecStop=/usr/bin/waydroid session stop
-
-[Install]
-WantedBy=user-session.target
|
[-]
[+]
|
Deleted |
_service:tar_git:waydroid.conf
^
|
@@ -1,3 +0,0 @@
-veth
-xt_CHECKSUM
-
|
[-]
[+]
|
Deleted |
_service:tar_git:waydroid.desktop
^
|
@@ -1,5 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=Waydroid
-Exec=waydroid show-full-ui
-Icon=/opt/waydroid/data/AppIcon.png
|
[-]
[+]
|
Deleted |
_service:tar_git:waydroid.json
^
|
@@ -1,15 +0,0 @@
-{
- "translation_catalog" : "waydroid",
- "entries": [
- {
- "path": "system_settings/system/waydroid",
- "title": "Waydroid",
- "type": "page",
- "icon": "image://theme/icon-m-file-apk",
- "order": 500,
- "params": {
- "source": "/usr/share/waydroid/settings/Waydroid.qml"
- }
- }
- ]
-}
|