frist Запустить приложение в режиме отладчика < /p>
Код: Выделить всё
adb shell su -c am start -D -n com.xxx.xxx/.MainActivity
< /code>
Затем прикрепите jdb < /p>
pid=$(adb shell su -c pidof com.xxx.xxx)
adb forward tcp:8700 jdwp:"$pid"
nc -vz 127.0.0.1 8700 # which succeed
jdb -attach 127.0.0.1:8700 # hangs here
Код: Выделить всё
➜ lsof -i:8700
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
adb 43830 liuxiaotong 17u IPv4 0xc7291c09a4113aba 0t0 TCP localhost:8700->localhost:50060 (ESTABLISHED)
adb 43830 liuxiaotong 21u IPv4 0xeaa1ab94203f15d 0t0 TCP localhost:8700 (LISTEN)
jdb 44687 liuxiaotong 11u IPv6 0xd6b32b11ded9dbc6 0t0 TCP localhost:50060->localhost:8700 (ESTABLISHED)
Подробнее здесь: https://stackoverflow.com/questions/796 ... ndroid-app