Code Monkey home page Code Monkey logo

Comments (6)

sorccu avatar sorccu commented on August 18, 2024

Hi!

Be sure to use 1.0.3 or later (and do npm install for updated deps) if you want to try adb connect. We had a bug in our implementation that newer versions of ADB brought up.

The error you're seeing is actually a bit different. You see, STF also supports adb connected devices. So what happens is that STF sets up your local USB device first. Then do you adb connect and it sees a second device, and tries to set it up too. However because you already had STF running on that device it fails because of the "double-setup". I'm currently thinking about perhaps disabling localhost sources from being set up automatically without some command line option, but what you can do right now is to give stf local the serial numbers you want to use, and it will ignore the rest (incl. the adb connected device), like this: stf local T076001226.

You should be able to see both your USB device and the remote device in your chrome developer tools. However, Android Studio is somewhat buggy and will not let you have the same device connected twice, causing random freezes and/or broken functionality in the UI. This happens with the non-STF adb connect too if you leave your USB device connected after adb tcpip 5555.

Also, since you're testing things out I'll just quickly mention that there's a bug in our reverse port forwarding implementation (Node.js side), causing occasional process deaths if you use that feature. I'm rewriting that part right now.

from stf.

sorccu avatar sorccu commented on August 18, 2024

By the way it would be super awesome if we could get built-in support for adb connect in Chrome. There's an open ticket for it but it's being ignored because of the low performance of the native implementation. But it's not the only implementation ;)

from stf.

paulirish avatar paulirish commented on August 18, 2024

I gotcha. Yeah definitely using 1.0.3
In my case I'm running it all on my macbookair. I'll have a moto x and nexus 5 connected by default, maybe more. But then if i adb connect for one of these devices, both connections end up failing.

I see the LOCALHOST entry in chrome:inspect briefly but about 3 seconds later STF dumps it and the connect instance is gone from both chrome:inspect and "Disconnected" on the STF device list.

I'm currently thinking about perhaps disabling localhost sources from being set up automatically without some command line option

ah no! that would make it super hard for me. plus these days the chrome remote debug doesnt need an ADB lock on the devices. so it can share with STF.

I would recommend that for a localhost device, in the Remote Debug block you leave out the adb connect field and just say: "hey go to chrome://inspect". That'd work for me.

built-in support for adb connect in Chrome.

can you point me to the ticket?

(speaking of performance, the perf of minicap is amazing.)

from stf.

gunta avatar gunta commented on August 18, 2024

Hi!

built-in support for adb connect in Chrome.
can you point me to the ticket?

I've opened a Chromium ticket here 1 year ago, but current status is WontFix because "We are experimenting with alternative ways of implementing wireless debugging." Do you have any update on this?
If there is any work we can do to add support for Chrome directly (without needing to install ADB) we would gladly do it, and it would be awesome.
I've opened the #10 STF ticket to keep track of this.

(speaking of performance, the perf of minicap is amazing.)

We are planning to make it even faster, the goal is 60fps on any decent device.

from stf.

sorccu avatar sorccu commented on August 18, 2024

Hi, I may be mistaken here but I believe what you're doing right now is:

  1. Running stf local without any extra args
  2. Then on the same machine, running adb connect localhost:7401

Doing this causes STF to see the same device twice (because ADB is seeing it twice). Then it tries to set up the same device using both the USB serial and the IP/port pair (which is used as the remote serial). Then it fails since they try to set up the same resources.

With 1.0.3, you can prevent this by running stf local <your_device_serial_here> instead of just stf local. This will cause STF to ignore the "new" device that adb connect adds.

Anyway, I just pushed a change to master to require an --allow-remote option if you really, really want STF to try and set up remote devices too. This should solve the problem, can you check and confirm? You'll of course still be able to see the device in your chrome developer tools.

from stf.

paulirish avatar paulirish commented on August 18, 2024

Cool. Thanks for working this out with me. I gotta run but will give this a shot tomorrow.

Cheers!

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.