Buildozer构建的APK缺失.so库调试符号,如何获取带符号的库?
.so Libraries in a Buildozer Virtual Machine Great question—this is a common pain point when debugging Buildozer-built APKs in Android Studio. Let me walk you through exactly where those debug-enabled .so files live in your Buildozer VM:
Core Buildozer Directory Structure
First, navigate to your project's root directory in the VM. By default, Buildozer stores project files in ~/buildozer-projects/[your-project-name]/. Inside this folder, you'll find a hidden .buildozer directory—this is where all the build artifacts, including debug .so libraries, are stored.
Specific Paths for Debug .so Files
You'll find two key locations with debug-ready .so files:
Unstripped Libraries in the Object Files Directory
This is where the raw, unmodified.sofiles (with full debug symbols) live during the build process:~/buildozer-projects/[your-project-name]/.buildozer/android/platform/build-[architecture]/obj/local/[architecture]/Replace
[architecture]with your target CPU architecture (most commonlyarmeabi-v7aorarm64-v8a). These files are larger than the stripped versions in your APK because they retain all debug metadata.Debug Build Distribution Directory
If you ranbuildozer android debugto generate your APK, the debug-enabled.sofiles are also copied to the distribution output folder:~/buildozer-projects/[your-project-name]/.buildozer/android/platform/build-[architecture]/dists/[your-apk-name]/libs/[architecture]/Note: Some versions of Buildozer might strip symbols here, so the object files directory above is the more reliable source for full debug symbols.
How to Verify You Have the Right Files
To confirm a .so file has debug symbols, use the file command in the VM's terminal:
file libyourlibrary.so
Look for output that includes with debug_info—this means the file contains the debug symbols Android Studio needs.
Once you locate these files, you can copy them from the VM to your local machine (via shared folders, scp, or USB transfer) and replace the stripped .so files in your APK's extracted directory before debugging in Android Studio.
内容的提问来源于stack exchange,提问作者Joshua Harwood

