Comments (9)
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.
For OS X, should be fixed by v2.0.247 of our NuGet package. Let me know if this helps.
from madb.
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.
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.
@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.
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.
@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.
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.
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)
- How to resubscribe DeviceMonitor.DeviceConnected after disposing?
- Crossplatform compatibility HOT 2
- Getting files in directory and modified timestamp
- Is there a function/method monitor for OnDeviceReconnect
- "File doesn't exist" but it exists HOT 1
- System.ArgumentOutOfRangeException: ""
- Send command realtime
- Make DeviceData a partial class for extension
- How to wait for connection?
- Serial number is the connection IP when using adb over WiFi HOT 1
- The buffer length X does not match the expected buffer length for a picture of width W, height H and pixel depth D HOT 2
- Memory leak caused by GetFrameBufferAsync HOT 2
- StartServer hangs
- Filename of Download/Upload with characters other than English/Numbers
- Starting ADB Server results in a dangling process as the server is treated as a child process
- ADBClient changes (singelton is gone) HOT 1
- ADB Command without shell HOT 1
- DeviceMonitor does not work
- Adb commands for windows 7 rooted device not responding.
- GetFrameBufferAsync artefacts
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from madb.