Giter VIP home page Giter VIP logo

Comments (6)

MiteshShah avatar MiteshShah commented on July 17, 2024

Figure it out have to pass --allow-remote :)

from stf.

sorccu avatar sorccu commented on July 17, 2024

Remote hosts are disabled by default because you can easily get into a situation where ADB is seeing the device twice (once as a USB device and once as a remote device). STF would then try to set up both and fail.

To enable remote devices, you can run stf local --allow-remote.

HOWEVER, you must keep a few things in mind.

  1. After running adb tcpip 5555 you must unplug the device first, and only after that run adb connect ip:port.
    • If you don't do it in this order STF won't work because it tries to set up the same device twice.
  2. You CANNOT use the remote debugging feature (STF's adb connect) on the same computer where STF runs.
    • STF will see the same device twice and fail, because it's already connected locally.
    • You can use remote debugging from other computers freely (with the --public-ip option)
  3. adb tcpip is super slow. It's much, much slower than USB.

To make things a bit easier, you can give stf local a device id and it will ignore other devices. For example, stf local --allow-remote phone-ip:5555 would prevent STF from trying to set up any other device than phone-ip:5555.

from stf.

EugenNY avatar EugenNY commented on July 17, 2024

hello. my goal is to connect openstf with remote phones via ssh tunnel.

i was trying to get openstf to connect to my android phones via ssh port-forward. basically my phone is connected to a wifi, adb over wifi is enabled, and i just forward the port 5555 to the machine running openstf. i can do "adb connect localhost:5555" and even use "adb shell" and do all the goodies. its not even that slow over ssh, its ok.

i have been trying to make this work for the last 3 days now, with ubuntu 14 and 16, on a VM, on a physical machine, but no luck. i keep getting the same error.

the error:
when i open localhost:7100 in the browser (chrome, firefox), i see the device, its model number, but as soon as i click on it, it will open the UI and a bit later a dialog pops up "Disconnected. Error. Try to reconnect"

i have tried really everything now. 2 different phones. 2 different Ubuntu (14 and 16), also tried to forward 5037 adb server port instead of the phones 5555 port, but i keep getting the same results.

also tried adb v1.0.32 and v1.0.31

on the machine where openstf is installed, i forwarded 7100 to my laptop, such that i can use Chrome with localhost:7100 - is there any other ports i need to forward? openstf opens a ton of ports.

i dont know whats the problem. i can use "adb shell" just fine on the machine where openstf runs, but openstf just doesnt get booted, here are some logs:

stf local --allow-remote localhost:5555 

WRN/device:plugins:data 13734 [localhost:5555] Unable to find device data { serial: 'localhost:5555',
  platform: 'Android',
  manufacturer: 'LGE',
  operator: 'Boost Mobile',
  model: 'LG-LS720',
  version: '4.1.2',
  abi: 'armeabi-v7a',
  sdk: '16',
  product: 'fx3s_spr_us',
  display: 
   { id: 0,
     width: 480,
     height: 800,
     xdpi: 217.71,
     ydpi: 216.17,
     size: 4.31,
     density: 1.5,
     fps: 60,
     secure: false,
     rotation: 0,
     url: 'ws://192.99.10.45:7400' },
  phone: { imei: '35300606087232', network: 'UNKNOWN' } }
INF/device:plugins:touch 13734 [localhost:5555] Touch origin is top left
INF/device:plugins:touch 13734 [localhost:5555] Requesting touch consumer to start
INF/device:plugins:touch 13734 [localhost:5555] Launching screen service
INF/device:plugins:touch 13734 [localhost:5555] Connecting to minitouch service
INF/device:plugins:touch 13734 [localhost:5555] minitouch says: "Note: device /dev/input/mice is not supported by libevdev"
INF/device:plugins:touch 13734 [localhost:5555] minitouch says: "Type B touch device lge_synaptics_touch (960x1600 with 5 contacts) detected on /dev/input/event0 (score 1100)"
INF/device:plugins:touch 13734 [localhost:5555] Reading minitouch banner
INF/device:plugins:vnc 13734 [localhost:5555] Starting VNC server on port 7402
INF/device:plugins:browser 13734 [localhost:5555] Loading browser list
INF/device:plugins:touch 13734 [localhost:5555] minitouch says: "Connection established"
INF/device:plugins:browser 13734 [localhost:5555] Updating browser list
INF/device:plugins:mute 13734 [localhost:5555] Will not mute master volume during use
INF/provider 13604 [*] Providing 0 of 1 device(s); waiting for "localhost:5555"
INF/device:plugins:forward 13734 [localhost:5555] Launching reverse port forwarding service
INF/device:plugins:forward 13734 [localhost:5555] Connecting to reverse port forwarding service
INF/device:plugins:connect 13734 [localhost:5555] Listening on port 7401
INF/device 13734 [localhost:5555] Fully operational
INF/provider 13604 [*] Providing all 1 device(s)

openstf-disconnected

thank you!

from stf.

xiaweixing avatar xiaweixing commented on July 17, 2024

I got the same issue, any resolution yet?

from stf.

sorccu avatar sorccu commented on July 17, 2024

The issue includes a solution. Furthermore, there are at least 5 more
issues about this. It's not enabled by default because it's a very bad
idea. Read some of the earlier issues to find out why.

On Wednesday, 7 September 2016, xiaweixing [email protected] wrote:

I got the same issue, any resolution yet?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#16 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAB-_YguiHTfnBPWd4XAsA-Z7uXlNkQ3ks5qnmUZgaJpZM4Fac0z
.

from stf.

slakshmiumesh1 avatar slakshmiumesh1 commented on July 17, 2024

I got the same issue, any resolution?

from stf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.