Giter VIP home page Giter VIP logo

Comments (9)

qmfrederik avatar qmfrederik commented on September 27, 2024

Hi @PhilippCh ,

Thanks for the detailed bug report!

I looked into this, and you are correct, a normal TCP endpoint is used by adb on all systems.

I was misled by the one exception - Debian (and hence also Ubuntu) has manually patched adb to listen on local sockets and Ubuntu was the Unix system on which we tested.

So the correct behavior would be to use TCP sockets on all operating systems, except for Debian Linux and derivatives.

I'll fix it for OS X, and keep this issue open to track a solution for Linux.

from madb.

qmfrederik avatar qmfrederik commented on September 27, 2024

For OS X, should be fixed by v2.0.247 of our NuGet package. Let me know if this helps.

from madb.

PhilippCh avatar PhilippCh commented on September 27, 2024

Unfortunately, this does not solve the problem. PlatformID on many OS X devices is still returned as PlatformID.Unix.

Here's a fixed version of Environment.OSVersion.Platform that checks whether certain Mac-specific directories exist on the machine. I would create a pull request, but I'm not sure whether you'd want to include this "hack" in the official version.

public static PlatformID GetCurrentPlatform() {
            var platformId = Environment.OSVersion.Platform;

            if (platformId == PlatformID.Unix) {

                // Well, there are chances MacOSX is reported as Unix instead of MacOSX.
                // Instead of platform check, we'll do a feature checks (Mac specific root folders)
                if (Directory.Exists("/Applications")
                    & Directory.Exists("/System")
                    & Directory.Exists("/Users")
                    & Directory.Exists("/Volumes")) {

                    platformId = PlatformID.MacOSX;
                }
            }

            return platformId;
        }

(Credit goes to http://stackoverflow.com/questions/10138040/how-to-detect-properly-windows-linux-mac-operating-systems)

from madb.

qmfrederik avatar qmfrederik commented on September 27, 2024

Thanks, I guess the best way would be to just make sure ADB is always listening on a TCP port and not on a Unix socket.

I'll look into this & get back to you.

from madb.

qmfrederik avatar qmfrederik commented on September 27, 2024

@PhilippCh, sorry for that!

Can you give v2.0.257 a try? In that version, we always assume the connection will be an IP connection (that's the default for adb); if anyone wants to use madb on a Debian/Ubuntu server they can manually specify a UnixSocket and we'll connect to that socket instead.

Long story short, should work out of the box now unless you're on Debian/Ubuntu and using their patched version of adb.

from madb.

PhilippCh avatar PhilippCh commented on September 27, 2024

Seems to be working fine now, thanks a lot! 👍

With the new build I'm receiving this error (http://stackoverflow.com/questions/31992705/vs2015-project-no-longer-runs-in-debug-mode) for SharpAdbClient.dll though. Any way around that?

from madb.

qmfrederik avatar qmfrederik commented on September 27, 2024

@PhilippCh , I'm guessing you're seeing this error because we include the debug symbols for SharpAdbClient in the NuGet package.

Just to test this theory, could you try to delete the SharpAdbClient.pdb file in packages\SharpAdbClient.2.0.254\lib\net45 and your project's output folder, and let me know whether you still get this error message?

Thanks!

from madb.

PhilippCh avatar PhilippCh commented on September 27, 2024

Unfortunately, this didn't fix the issue. I do have the SharpAdbClient.Extensions project in my solution (if that makes a difference), though like in the StackOverflow I linked, all configurations are set to Debug/x86.

from madb.

qmfrederik avatar qmfrederik commented on September 27, 2024

This issue is quite old. The original problem - macOS compatibility - has been fixed and I've never been able to reproduce the other behavior.

Feel free to open a new issue if you're still having a problem with this using the latest version of SharpAdbClient, though.

from madb.

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.