Skip to content
Branch: master
Find file History
asm89 Add support for ADB_SERVER_SOCKET in dumpapp
There are multiple ways to set the adb server connection information in the
environment. This commit adds support for `ADB_SERVER_SOCKET`.

Set a valid server socket environment variable:
```
$ export ADB_SERVER_SOCKET=tcp:localhost:5038
$ adb devices
List of devices attached
* daemon not running; starting now at tcp:localhost:5038
* daemon started successfully
```

Now dumpapp doesn't fail anymore:
```
$ scripts/dumpapp
Failure to target device None: no devices/emulators found
```

It does fail when the socket spec is invalid/unsupported:
```
$ export ADB_SERVER_SOCKET=nope
$ scripts/dumpapp
...
stetho_open.HumanReadableError: Invalid or unsupported socket spec 'nope' specified in ADB_SERVER_SOCKET.
```

```
$ export ADB_SERVER_SOCKET=tcp:localhost:abc
$ scripts/dumpapp
...
stetho_open.HumanReadableError: Invalid integer 'abc' specified in ANDROID_ADB_SERVER_PORT or ADB_SERVER_SOCKET.
```
Latest commit c23ff88 Oct 9, 2018
You can’t perform that action at this time.