Jump to content

5 posts in this topic

Recommended Posts

Posted

LLDB on Android (Communication between Android and Windows) 

By me ofc

 

Note: I will not cover how to [url=https://iree.dev/developers/debugging/android-with-lldb/]install LLDB[/url] on Windows and Android. This is to setup communication between Android  and Windows after you've installed LLDB on your Android device. However, I did include the documentation how I install it on my machine and on my android in the zip.

Requirement:

  • Windows PC (Tested on Win 11)
    • Make sure you have PowerShell installed (Should be by default). PowerShell ISE is what we're targetting
  • Android device that is rooted (Not for virtual machines)
    • Tested on:
      • Pixel 9 Pro XL
      • OnePlus13

 

Hidden Content

Reply to this topic to see the hidden content & download link. 👀

 

Snapshot:

HcxSeE.jpg

 

Instruction:

1) Download the zip file.

2) Unzip it anywhere you desire.

3) Make sure your android device is hook up with usb and have usb debugging set to on and also to use usb as file transfer.

4) Open PowerShell ISE and locate the 'StartLLDB.ps1'. Click the Play button to execute the script.

Click Start 'LLDB Server' and it should look like:
q2P7Nm.jpg

You should now see the status with a PID (Not the same as mine ofc).

 

5) Open PowerShell ISE (New session; do not try to open it on the existing tab). Locate the 'StartDebug.ps1' script and click the play button to execute the script. 

  a) On the game name; if you know what it is; you can just type it then click 'Attach (Interactive)' button. It will locate the pid process of your game. 
JY1G2E.jpg

  b) It should open a command prompt windows and attach your game process. Ready for you to press c to continue and set watchpoint etc... 

Example of setting a watchpoint:
# size must be 1, 2, 4, or 8 on AArch64, and the address must be aligned to that size

watchpoint set expression -w write -s 4 -- (void*)0xYOUR_ADDR

 

Details of the Debugger windows:

Start LLDB Server = Create a LLDB host on Android side so you can use Windows to connect to it.

Kill LLDB Server = If for some odd reason your game crash and you need to setup a new host/server; this is the right button to click. Once killed the existing one, click the 'Start LLDB Server' to start a new one.

Refresh Log = straight forward; it just clears and refresh the log box.

******************

Game name textbox = This is where you type your game filename and it will use that information to search and attach the correct process.

Auto-handle common signals = reduce the debugger to throw extra details after attached so your connection will be alot quicker.

Resume after attach = after attached the process; you manually have to type continue then press enter to resume the game. This will perform just that for you. However, it's possible that the game may break and freeze for other random triggers and you'll have to manually type c and enter to resume.

Attach = Attach the process.

Kill = If the game freezes and won't resume at all or if the game crash; this is what you need to click to kill it.

 

  • Informative 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines