I currently don't have a pc. I have two rooted devices Arm64 host device with Debian rootfs and the device to be debugged which contains the lldb-server binary armv7. I am trying to remote debug my android device using LLDB. I pulled the lldb-server binary from android ndk24 and put it in /data/local/tmp. Installed Debian sid on another term and apt installed lldb.

I connected client device via wifi-hotspot (one with lldb-server) using the host with the linux rootfs.

The commands I ran on server device

./data/local/tmp/lldb-server platform --listen "*:2000"  --server

Checked using netstat and the lldb-server had bound to all addresses(

On host(client lldb) device in debian sid terminal I ran:

apt install lldb
platform select remote-android
platform connect connect://

Then I got error failed connect port.

However, using GDB and gdbserver everything worked perfectly. I have tried installing lldb on debian buster but same result and even ran the lldb-server binary on the host(device with debian sid) but same result. Right now I'm stuck here. How do I solve this?

Help will be greatly appreciated. Thank you.

Edit Here is output of telnet

root@localhost:~# telnet 2000
Connected to
Escape character is '^]'.
Connection closed by foreign host.
root@localhost:~# telnet 5555
Connected to
Escape character is '^]'.

And heres same network output from lldb.

lldb) platform select remote-android
  Platform: remote-android
 Connected: no
(lldb) platform connect connect;//
error: Invalid URL: connect;//
(lldb) platform connect connect://
error: Failed to connect port

And now I dont really know the problem. Should i try installing on a different rootfs? Let me do that.

Edit 2

Installed ubuntu focal and still got same results on lldb 10.0.0.

  • May be a different program like Android Studio or Visual Studio has automatically connected to the remote lldb instance and thus the port is blocked (because only one connection is allowed)? Especially Android Studio is known to be "greedy" establishing connections automatically in background and thus blocking other programs. Have you checked on the Android device if there is already a network connection?
    – Robert
    Jun 9, 2022 at 8:13
  • i actually have neither of them installed. Its just a small Debian rootfs in a proot environment and from netstat output i found no established connection but listeners only.
    – Silent
    Jun 10, 2022 at 19:46
  • You wrote that gdb connection works, so in generat TCP seems to work. Just to be sure what happens if you try to connect to port 2000 using telnet instead of lldb? If that works then something is wrong in the communication between lldb and lldb-sever.
    – Robert
    Jun 10, 2022 at 21:31
  • Okay let me try and I will reply what happens. Although could it be a lldb-server problem maybe i should compile lldb-server myself maybe the android ndk provided one have been stripped off other features and cant be connected to using original lldb?
    – Silent
    Jun 11, 2022 at 17:17
  • @Robert I have edited the question
    – Silent
    Jun 11, 2022 at 18:09

1 Answer 1


I don't know if this should be an answer or not. I finally managed to use lldb remote debugging but again faced more challenges but eventually prevailed.

What I did was instead of using lldb platform command I used lldb gdbserver command which function correctly but had a caveat of accepting local connections only and rejecting connections from external addresses. So I had to use iptables' nat table to finally make it work.

iptables -I INPUT -t nat -p tcp -d --dport 2000 -j SNAT --to-source
./data/local/tmp/lldb-server g

Then on lldb client I did


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.