godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.31k stars 20k forks source link

Android deploy with Remote Debug or Network FS doesn't work over Wi-Fi #32814

Open cooperra opened 4 years ago

cooperra commented 4 years ago

Godot version:

master (1fed266bf)

OS/device including version:

Host: Arch Linux, 64bit Android Device: Oculus Quest, 9.0.0

Issue description:

The short version is adb reverse ... doesn't work over the network for some reason due to an adb bug and we attempt to use it even if we're connected over the network.

The long version is in the steps to reproduce below.

Godot console shows that reverse fails with a non-zero status.

Installing to device (please wait...): Oculus Quest --- Device API >= 21; debugging over USB --- --- DEVICE API >= 21; DEBUGGING OVER USB --- Reverse result: 1

adb reverse seems to always error with

adb: error: more than one device/emulator

when connected wirelessly, even when used outside Godot, and even when there is only one device in adb devices.

Steps to reproduce:

Attempt to debug a project on an android device over the network (instead of USB).

  1. Connect newish android device with ADB over tcpip
    1. Connect android device that uses at least API level 22 via USB.
    2. adb tcpip 5555
    3. adb connect x.x.x.x:5555 (android device's ip)
    4. Unplug from USB.
  2. Enable "Deploy with Remote Debug" and/or "Small Deploy with Network FS" from the "Debug" menu.
  3. Deploy and run a project via the android button in the top-right corner of the UI.

Expected behavior:

Actual behavior:

Minimal reproduction project: N/A

Related to changes in #10792

cooperra commented 4 years ago

I've already looked into the code for this and plan to fix it for Hacktoberfest. :jack_o_lantern:

I've already confirmed that disabling adb reverse functionality fixes the problem in my case. I just need to conditionally disable it for networked adb connections and output a log message.

creikey commented 4 years ago

Can confirm that this bug is present in latest master ( calinou nightly )

akien-mga commented 4 years ago

Reopening as #32854 is reverted due to the #34376 regression.

KoBeWi commented 3 years ago

Can anyone still reproduce this bug in Godot 3.2.3 or any later release?

boruok commented 3 years ago

@KoBeWi yes, just tried right now.

Installing to device (please wait...): Samsung SM-G900F Performing Push Install C:\Users\User\AppData\Local\Temp/Godot/tmpexport.1620316201.apk: 1 file pushed, 0 skipped. 1.7 MB/s (12554197 bytes in 7.157s) pkg: /data/local/tmp/tmpexport.1620316201.apk Success

--- Device API >= 21; debugging over USB --- --- DEVICE API >= 21; DEBUGGING OVER USB ---

adb.exe: error: more than one device/emulator

Reverse result: 1 Starting: Intent { act=android.intent.action.MAIN cmp=org.godotengine.fantasyworld/com.godot.game.GodotApp }

YuriSizov commented 1 year ago

Is this issue affecting both Godot 3 and 4 or just 3?