Android Emulator 에서 Localhost 접근을 하고 싶다면...

2021. 11. 19. 11:14Etc/경험담

ADB Reverse Socket (Android only)

This solution works for me (tested with a MacBook):

  1. Connect Android mobile device with USB cable to laptop
  2. Enable USB Debugging on mobile device
  3. On laptop, run adb reverse tcp:4000 tcp:4000
    • Use your custom port number instead of 4000
  4. Now, on the mobile device, you can navigate to http://localhost:4000/, and it will actually connect to the laptop, not the mobile device

See instructions here.

반응형

'Etc > 경험담' 카테고리의 다른 글

회사에서 리소스 산정시  (0) 2021.11.24
Effective Postman  (0) 2020.09.17
2018 티볼리 에어 - 차박 준비  (0) 2020.08.08
Kotlin ServerRequest Session Scope, Request Scope  (0) 2020.07.02
UML 작성시  (0) 2020.01.16