Suggestion Issue: Testing Apps Wirelessly (Android ADB)


Pages: 1

Wasanni

  • Subscriber - Stencyl Studio
  • *
July 19, 2019, 06:50:54 am
I think it would be awesome to be able to test an app wirelessly (Android ADB). It would be much more convenient, especially if someone doesn't have an extra device for testing and is using their daily handset.


LIBERADO

  • Expert Stencyler
  • *
July 19, 2019, 07:27:55 am
+1
« Last Edit: July 19, 2019, 07:28:43 am by LIBERADO »


yoplalala

  • Subscriber - Stencyl Studio
  • *
August 14, 2019, 01:59:59 pm
You can actually do this. First you need to connect it by usb.
Then open the terminal or cmd on windows
go to the folder where the "adb' that Stencyl uses ( don't use another adb)
For windows it's in something like Users/Username/Application Data/Stencyl/stencylworks/android-sdk/android-sdk-windows/platform-tools/
and then type

adb tcpip 5555
adb connect 192.168.0.101:5555    # replace by the ip address of your mobile

then you can disconnect usb and use WIFI till you rebbot your computer or your android or adb disconnects itself for whaterver reason

TThen you can test Stencyl as usual


Wasanni

  • Subscriber - Stencyl Studio
  • *
August 14, 2019, 03:41:33 pm
Thanks for the reply!!! Been waiting for this for a while! It seems to work until "sending to device" but then nothing happens.

Normally when an Android device isn't connected it stays at "sending to device". In this case it compiles and the "sending to device" goes away as if it is going to pop up on my device but it never does. I checked the logs and I see 1 error even though the build seems fine.

[adb.exe] adb: error: failed to get feature set: no devices/emulators found

I've done exactly how you instructed. Does it matter when I start Stencyl (before cmd part or after)? Does it matter if I eject my device or not before unplugging? I'm not sure why it wouldn't detect my device.

**  Also interesting to note that it says port 5037 in Stencyl Log even though I put 5555. I tried using 5037 because when I use 5555 it still shows 5037 in the log but the same thing happens with 5037. Other than that I haven't got any errors in cmd part, all the connecting seems fine and I have navigated to the directory you indicated (where adb.exe in Stencyl is located).

Device used: Samsung Galaxy Note 5

adb1" border="0


UPDATE:

When I connect via adb to confirm it is connected after unplugging I type "adb devices" and it shows 1 device connected. After I click Run>Android on Stencyl, if I check again in cmd using "adb devices" it no longer shows any devices connected.


UPDATE #2:

I checked "adb devices" in cmd right after I click Run in Stencyl and I see this:

* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached

Is Stencyl disconnecting my device when I click run and restarting in port:5037?


UPDATE #3:

I finally got it running on my device through adb!
It seems when I click in Stencyl Run>Android, it disconnects my device. If I do "adb connect" in cmd after the compile (with my phone not connected via usb) the app will pop up on my phone within a couple seconds. It's pretty good like this but a little annoying as I keep having to connect after compiling. Not a huge deal, still better than keeping my phone plugged but would be great not to have to do this every time I run the app to test. Going to keep trying but at least for now it's something! Thanks yoplalala!
« Last Edit: August 14, 2019, 06:17:27 pm by Wasanni »


yoplalala

  • Subscriber - Stencyl Studio
  • *
August 15, 2019, 01:18:38 am
I don't have windows  anymore. And I know have usb cacbles that work so it's been a long time since I haven't done it.  But are you sure you used Stencyl's adb ? I remember if you used another adb , Stencyl would disconnect it because it was a different version. You could see in the log if it's the case.

oh now I remember! it would do the same as you in the last months, adb would disconnect quite fast on wnidows. I didn't know over if it was change in Stencyl, windows, or adb ...  Does it say something in the log when stencyl disconnects adb ?

PS : if you have a rooted phone, there are ways to do it without using the usb cable.


Wasanni

  • Subscriber - Stencyl Studio
  • *
August 16, 2019, 06:30:18 am
From what I can tell it seems like Stencyl is restarting the service/process "daemon" and maybe even switching back to port 5037 because right after I compile all I have to do is "adb connect INTERNAL IP:5555" and it sends it to my phone. If I look at my task manager sometimes it seems right after I click Run, the adb process goes away for a second and then comes back, as if it restarted and back on port 5037.

I can't confirm all this 100% but it seems to me that this is what is happening.

adb1" border="0

*The only difference with a rooted device would be that after reboot I wouldn't need to attach a USB for the first time to connect? I don't mind that so much, it's really the disconnecting that's a little annoying. This is still better than keeping my device plugged though, that's for sure.


Pages: 1

Details

  • Reported
    July 19, 2019, 06:50:54 am
  • Updated
    August 16, 2019, 06:30:18 am

  • View Status
    Public
  • Type
    Suggestion
  • Status
    New
  • Priority
    Normal
  • Version
    Stencyl 3.5, 3.5.0 beta 1
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Compiling/Testing Games

Tags