My experience with LLDB on Electra Jailbreak 1.0.4
Mar 18, 2018
Debugging via USB
Attaching LLDB to already running process
Running an app under LLDB
I tried to google a short and clear instruction how to debug apps from AppStore on iOS devices jailbroken withElectra, with no success, so I wrote this guide. I tested it on iPhone 7 running iOS 11.1.2 with Electra jailbreak of version 1.0.4. I’m not sure it will work on any iOS device jailbroken with Electra.
Debugging via USB
For me, it works only if I do debugging via USB. Ifiproxyis not installed on your Mac, install it, e.g. withbrew:
$ brew install usbmuxd
Then run in your Mac console:
$ iproxy 6666 6666
$ iproxy 2222 22
Finally, attach you iPhone to USB. That’s it, we are ready to start.
Attaching LLDB to already running process
On your Mac console, connect the iPhone:
$ ssh -p 2222 root@localhost
In the iPhone’s console, run
# ps ax
Find pid of the process you want to attach. Then run
debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-360.0.26.14
for arm64.
Attaching to process 1418...
Listening to port 6666 for a connection from localhost...
everything going well. Now, open another console on your Mac, and run
$ lldb
In LLDB console, run
(lldb) platform select remote-ios
(lldb) process connect connect://localhost:6666
That’s it! :)
Running an app under LLDB
On your Mac console, connect the iPhone:
$ ssh -p 2222 root@localhost
In the iPhone’s console, run
# debugserver localhost:6666 -x backboard /var/containers/Bundle/Application/<path to the app binary>
If you see something like
debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-360.0.26.14
for arm64.
Listening to port 6666 for a connection from localhost...
everything going well. Now, open another console on your Mac, and run
$ lldb
In LLDB console, run
(lldb) platform select remote-ios
(lldb) process connect connect://localhost:6666
Happy debugging!
Wanna say something?
Commenting is not available in this blog, but you canwrite me a letter or message. Please, note that English is not my native language. I'm sorry for mistakes/missprints, if any.