nohajc / termux-adb

Run adb in Termux without root permissions!
MIT License
311 stars 32 forks source link

adb reverse not working #12

Closed AlphaBs closed 1 year ago

AlphaBs commented 1 year ago

Describe the bug adb reverse command does not work without any error.

To Reproduce Steps to reproduce the behavior:

run the commands on termux: termux-adb reverse tcp:22222 tcp:22222 nc -l -p 22222

open web browser from connected android device and go to http://localhost:2222 or run nc localhost 22222 on termux of connected android device

Expected behavior nc -l -p 22222 should output any data receiving from connected android device, but it does not.

Screenshots termux-adb: Screenshot_20230319_182747_Termux

connected device: Screenshot_20230319_181752_Termux Screenshot_20230319_181727_Chrome

Smartphone (please complete the following information):

Attach output of the following commands

~ $ pkg show android-tools
Package: android-tools
Version: 34.0.0-1
Maintainer: @termux
Installed-Size: 10.2 MB
Depends: abseil-cpp, brotli, libc++, liblz4, libprotobuf, libusb, pcre2, zlib, zstd
Homepage: https://developer.android.com/
Download-Size: 1665 kB
APT-Sources: https://mirrors.sahilister.in/termux/termux-main stable/main aarch64 Packages
Description: Android platform tools

~ $ termux-adb version
Android Debug Bridge version 1.0.41
Version 31.0.3p1-android-tools
Installed as /data/data/com.termux/files/usr/bin/termux-adb

Attach contents of the following files (after running with debug logs enabled)

adb.10600.log

Additional context

I ran below command to run adb on Samsung device (there was an issue about adb on samsung device) export ADB_SERVER_SOCKET=localfilesystem:$(pwd)/adb_socket

AlphaBs commented 1 year ago

fixed by #6.

ANDROID_NO_USE_FWMARK_CLIENT=1 fakeroot adb reverse tcp:22222 tcp:22222

it works! thank you for great project.