Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 40babf07 authored by Spencer Low's avatar Spencer Low
Browse files

adb: win32: fix ReportServerStartupFailure



The code was passing an fd from adb_open() to android::base::ReadFdToString() which actually
takes a C-Runtime fd (on Windows), so it wasn't working.

The fix is to use APIs that deal with C-Runtime fds:
* unix_open()
* android::base::unique_fd
* unix_lseek() (added in this change)

I also removed an unnecessary call to GetProcessId() since we already have the process id
from the structure returned by CreateProcess().

Test: adb start-server on Win10 and Ubuntu (with a failing server)
Test: mma

Change-Id: Id6e2dd5532a02fe5d9caf96aa007a1b3434a0b59
Signed-off-by: default avatarSpencer Low <CompareAndSwap@gmail.com>
parent 640ceee5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment