waydroid / waydroid

Waydroid uses a container-based approach to boot a full Android system on a regular GNU/Linux system like Ubuntu.
https://waydro.id
GNU General Public License v3.0
7.22k stars 301 forks source link

[BUG] App-defined intents (schemes) are not opened in the resp. apps #1447

Open tuxor1337 opened 3 weeks ago

tuxor1337 commented 3 weeks ago

Describe the bug

Similarly to #412 (which was about market:// links), but applying to all kinds of app-defined intent-filters: When clicking on or typing a link for which some of my apps defines an intent-filter, the link is not opened in that app. For example, if I install OsmAnd, and type geo:52.0,9.0?z=19 in the Waydroid browser (I don't mean the host browser!), it just tries to start a search, but it does not ask whether I want to open the link in an app (which is the usual behavior on my Android devices).

Some apps offer login via a WebView and after logging in, they redirect to an app-defined intent, such as the German railway app DB Navigator, which has an intent-filter for dbnav://. However, this just spawnes an ERR_UNKNOWN_URL_SCHEME within the WebView, and does not redirect the auth link back to the DB Navigator app.

As a workaround, I can manually copy the link that does not work as expected, and then run waydroid app intent android.intent.action.VIEW "URI" on my host (see https://github.com/waydroid/waydroid/pull/433).

The same behavior applies to waydroid on my desktop (Fedora 40, x86_64) and on my linux phone (pmOS on OnePlus 6).

Waydroid version

1.4.2

Device

Linux Desktop

Operating System

Fedora 40

Kernel version

6.8.11-300

Desktop Environment

GNOME 46.2

GPU

Intel i5 Gen8 integrated graphics

Logs

/var/lib/waydroid/waydroid.cfg

[waydroid]
arch = x86_64
vendor_type = MAINLINE
system_datetime = 1717219045
vendor_datetime = 1714216970
suspend_action = freeze
mount_overlays = True
images_path = /var/lib/waydroid/images
system_ota = https://ota.waydro.id/system/lineage/waydroid_x86_64/VANILLA.json
vendor_ota = https://ota.waydro.id/vendor/waydroid_x86_64/MAINLINE.json
binder = binder
vndbinder = vndbinder
hwbinder = hwbinder
binder_protocol = aidl3
service_manager_protocol = aidl3

[properties]

/var/lib/waydroid/waydroid.prop

sys.use_memfd=true
debug.stagefright.ccodec=0
ro.hardware.gralloc=gbm
ro.hardware.egl=mesa
ro.hardware.vulkan=intel
ro.hardware.camera=v4l2
ro.opengles.version=196609
waydroid.system_ota=https://ota.waydro.id/system/lineage/waydroid_x86_64/VANILLA.json
waydroid.vendor_ota=https://ota.waydro.id/vendor/waydroid_x86_64/MAINLINE.json
waydroid.tools_version=1.4.2
ro.vndk.lite=true
waydroid.host.user=thomas
waydroid.host.uid=1000
waydroid.host.gid=1000
waydroid.host_data_path=/home/thomas/.local/share/waydroid/data
waydroid.xdg_runtime_dir=/run/user/1000
waydroid.pulse_runtime_path=/run/user/1000/pulse
waydroid.wayland_display=wayland-0
waydroid.background_start=false
waydroid.stub_sensors_hal=1

/var/lib/waydroid/waydroid_base.prop

sys.use_memfd=true
debug.stagefright.ccodec=0
ro.hardware.gralloc=gbm
ro.hardware.egl=mesa
ro.hardware.vulkan=intel
ro.hardware.camera=v4l2
ro.opengles.version=196609
waydroid.system_ota=https://ota.waydro.id/system/lineage/waydroid_x86_64/VANILLA.json
waydroid.vendor_ota=https://ota.waydro.id/vendor/waydroid_x86_64/MAINLINE.json
waydroid.tools_version=1.4.2
ro.vndk.lite=true

/var/lib/waydroid/waydroid.log waydroid.log

sudo waydroid shell -- logcat -d | tee logcat.txt logcat.txt

sudo dmesg | tee dmesg.txt dmesg.txt

drzraf commented 1 week ago

Same behavior confirmed. Only logcat entries after running: waydroid app intent android.intent.action.MAIN foobar://login/abc

06-22 06:18:59.090   239  1670 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startActivity:993 org.lineageos.platform.internal.WayDroidService$2.launchIntent:388 lineageos.waydroid.IPlatform$Stub.onTransact:244 android.os.Binder.execTransactInternal:1159 android.os.Binder.execTransact:1123 
06-22 06:18:59.090   239  1670 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startActivity:1005 android.app.ContextImpl.startActivity:994 org.lineageos.platform.internal.WayDroidService$2.launchIntent:388 lineageos.waydroid.IPlatform$Stub.onTransact:244 android.os.Binder.execTransactInternal:1159 
06-22 06:18:59.090   239  1670 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN dat=foobar://login/abc flg=0x10000000} from uid 1000

But no reaction from the UI.

Anyway, as a workaround, using adb shell am start specifying the -d -a -c arguments does the trick.