Cli: adb: error: cannot bind listener: Operation not permitted

Created on 22 Jun 2019  Â·  7Comments  Â·  Source: react-native-community/cli

Environment

  React Native Environment Info:
    System:
      OS: Linux 4.15 Ubuntu 18.04.2 LTS (Bionic Beaver)
      CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
      Memory: 238.72 MB / 11.63 GB
      Shell: 5.4.2 - /bin/zsh
    Binaries:
      Node: 8.10.0 - /usr/bin/node
      Yarn: 1.16.0 - /usr/bin/yarn
      npm: 3.5.2 - /usr/bin/npm
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: 0.59.8 => 0.59.8 
    npmGlobalPackages:
      react-native-cli: 2.0.1

Description

When I run react-native run-android the packager stops after some seconds

BUILD SUCCESSFUL in 2s
181 actionable tasks: 2 executed, 179 up-to-date
info Running adb -s emulator-5554 reverse tcp:8081 tcp:8081
adb: error: cannot bind listener: Operation not permitted
info Could not run adb reverse: Command failed: adb -s emulator-5554 reverse tcp:8081 tcp:8081
info Starting the app on emulator-5554 (adb -s emulator-5554 shell am start -n com.linkapverypurenative/com.linkapverypurenative.MainActivity)...
Starting: Intent { cmp=com.linkapverypurenative/.MainActivity }

image

bug report needs repro

Most helpful comment

Follow below steps:-

  1. adb kill-server
  2. adb root

All 7 comments

Can you provide a repro we can download? Otherwise it's not actionable on our side.

Can you provide a repro we can download? Otherwise it's not actionable on our side.

I cannot provide you with my repo. Its's very strange, I only get this error on my new ubuntu installation. any idea?

happend to me too, looks like android api 29 not allowing adb reverse

Is this a bug in adb/API29 or can we do something about it?

Follow below steps:-

  1. adb kill-server
  2. adb root

@anutheriddle so the problem is that the user needs root access to open a listening port? Weird… is that from a certain Android version?

Looks like upstream bug we can't really fix. Closing, as there's a well-established workaround for this adb issue.

Was this page helpful?
0 / 5 - 0 ratings