jhen0409 / jhen0409/react-native-debugger
[Android] Reverse RN packager port automatically by ADB when device connected
- Dominant language
- JavaScript
- Stars
- 10.4k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
Currently RN have [reverse RN packager port](https://github.com/facebook/react-native/blob/6f4025e322ef9d5761f8e3474c90b5c101afd3d9/local-cli/runAndroid/runAndroid.js#L68) when we run `react-native run-android`, but it will reset when we restart/reconnect to device/emulator, this may be a problem that people often experienced - we need to run `react-native run-android` again or run `adb reverse tcp:8081 tcp:8081` manually.
Maybe [`client.trackDevices` of adbkit](https://github.com/openstf/adbkit#tracking-devices) could help this, then we just need to run [`adb.reversePackager`](https://github.com/jhen0409/react-native-debugger/blob/master/app/index.js#L18).
Contributor guide
Assessment
This issue has not been assessed yet.