The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

aux/android: support uncompressed native libs

if useLegacyPackaging in src/xrt/targets/openxr_android/build.gradle
set to false, the full path of monado.so will become
/data/app/../../base.apk!/lib/ABI/libopenxr_monado.so.
The function getRuntimeSourceDir will get the wrong path.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2153>

authored by

tao.pei and committed by
Rylie Pavlik
c5e9af02 e4636ca1

+7
+7
src/xrt/auxiliary/android/android_load_class.cpp
··· 40 40 // dli_filename is full path of the library contains the symbol. For example: 41 41 // /data/app/~~sha27MVNR46wLF-96zA_LQ==/org.freedesktop.monado.openxr_runtime.out_of_process-cqs8L2Co3WfHGgvDwF12JA==/lib/arm64/libopenxr_monado.so 42 42 dir = info.dli_fname; 43 + 44 + // Trim trailing lib path to .so (e.g. /lib/arm64/libopenxr_monado.so) 43 45 dir = dir.substr(0, dir.find("/lib/")); 46 + 47 + // In case the SO is not extracted, trim off the base APK name and ! 48 + // This finishes handling cases like: 49 + // /data/app/~~sha27MVNR46wLF-96zA_LQ==/org.freedesktop.monado.openxr_runtime.out_of_process-cqs8L2Co3WfHGgvDwF12JA==/base.apk!/lib/arm64/libopenxr_monado.so 50 + dir = dir.substr(0, dir.find("/base.apk!")); 44 51 } 45 52 46 53 return dir;