diff --git a/Ghidra/Debug/Debugger-agent-lldb/src/main/help/help/topics/lldb/lldb.html b/Ghidra/Debug/Debugger-agent-lldb/src/main/help/help/topics/lldb/lldb.html index 654d58ffe2..33e9057262 100644 --- a/Ghidra/Debug/Debugger-agent-lldb/src/main/help/help/topics/lldb/lldb.html +++ b/Ghidra/Debug/Debugger-agent-lldb/src/main/help/help/topics/lldb/lldb.html @@ -43,6 +43,9 @@ python3 -m pip install psutil protobuf==3.20.3 +

If you're using lldb from the Android NDK and do not have Pip, see Setup for Android NDK

+

If you are offline, or would like to use our provided packages, we still use Pip, but with a more complicated invocation:

@@ -205,5 +208,63 @@ perl -i -pe 's/(?<=pendingNMI\x00{4})\x00/\x01/' macOS_15-1234567.vmss

This has the same options as the LLDB via SSH launcher, which are necessary for connecting to the Android debugger, but executes via the normal lldb mechanism.

+ +

Setup for Android NDK

+ +

If you're using the copy of lldb included with the Android NDK (Native Development + Kit), it may not include pip. Notably, this is the case on Windows at the time of + writing. Fortunately, you can retrieve the components to install Pip into the NDK from an + official Python distribution.

+ +
    +
  1. + First, figure out the version of Python that is embedded in the NDK's build of LLDB, and + get its path. (If you know the path to lldb, you probably already know the path to its + Python.) From a Windows Command Prompt or Powershell: +
    +PS> C:\path\to\android-ndk\...\lldb
    +(lldb) script
    +>>> import sys
    +>>> sys.version
    +[copy down the version indicated]
    +>>> sys.path
    +[look for the paths ending with Lib and DLLs, and copy them down]
    +
    +
  2. + +
  3. Now, obtain the same version of Python from the official Python website, and install or + unpack it.
  4. + +
  5. Locate your new installation of Python. If you don't already know where it landed, this + can be found by examining the Properties of the Python shortcut in your Start Menu.
  6. + +
  7. There should be a Lib\ensurepip directory in the official Python installation. + Copy this into the same place in the Android NDK's build of Python.
  8. + +
  9. + There are also three native modules that need to be copied from the official Python's + DLLs\ directory to the same in the NDK's build. This is to support SSL for + downloading packages from PyPI: (Substitue the ??'s appropriately.) + + +
  10. + +
  11. + We should now have enough to bootstrap the NDK's Python with Pip. Again at the Windows + Command Prompt or Powershell: +
    +PS> C:\path\to\android-ndk\...\python -m ensurepip
    +PS> C:\path\to\android-ndk\...\python -m pip install ...
    +
    + See the Setup section for the arguments to pass to pip install + .... +
  12. +